Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[next][routing-utils] Add missing matcher support #8874

Merged
merged 2 commits into from Nov 9, 2022
Merged

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Nov 8, 2022

Related Issues

This adds handling to ensure we pass through the missing route field correctly for custom routes and middleware matchers. Tests are also added in the complimentary Next.js PR for this, example deployment can be seen here https://vtest314-e2e-tests-jj4-vtest314-next-e2e-tests.vercel.app/

x-ref: slack thread
x-ref: vercel/next.js#42660

馃搵 Checklist

Tests

  • The code changed/added as part of this PR has been covered with tests
  • All tests pass locally with yarn test-unit

Code Review

  • This PR has a concise title and thorough description useful to a reviewer
  • Issue from task tracker has a link to this PR

@ijjk ijjk merged commit c2d0887 into main Nov 9, 2022
@ijjk ijjk deleted the ijjk/handle-missing branch November 9, 2022 00:17
ijjk added a commit to vercel/next.js that referenced this pull request Nov 9, 2022
This adds support for a `missing` field which is complimentary to `has`
to only match when `query`, `header`, or `cookie` values are not
present. The `missing` field can be applied for middleware matchers as
well to prevent running middleware when these fields are present.

x-ref: vercel/vercel#8874
x-ref: [slack
thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1667935428788529?thread_ts=1667850697.542269&cid=C03S8ED1DKM)
x-ref: #25653
x-ref: #34046
x-ref: #28185
x-ref: #25930
x-ref: #24608
x-ref: #27431

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: next area: routing-utils pr: automerge Automatically merge the PR when checks pass semver: patch PR contains bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants