Skip to content

fix: added support for "missing" matcher #1905

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 30, 2023

Conversation

taty2010
Copy link
Contributor

@taty2010 taty2010 commented Jan 24, 2023

Summary

This update allows us to support the "missing" matcher key. The 'missing' matcher is the opposite of 'has' and checks if the type, key and/or value doesn't match.

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

fixes #1796

Standard checks:

  1. go to https://deploy-preview-1905--next-plugin-edge-middleware.netlify.app/missing
  2. In the network tab you should see x-cookie-missing: true in the response headers
  3. go to https://deploy-preview-1905--next-plugin-edge-middleware.netlify.app/matcher-cookie and go back to the missing page
  4. The x-cookie-missing: true should now be gone since the cookie has been applied.
  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@taty2010 taty2010 requested a review from a team January 24, 2023 23:59
@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for graceful-sfogliatella-8d42f0 failed.

Name Link
🔨 Latest commit 5de27e1
🔍 Latest deploy log https://app.netlify.com/sites/graceful-sfogliatella-8d42f0/deploys/63d15267b3529f0008cdd9b6

@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/63d7e8e0be045a00096a0f85
😎 Deploy Preview https://deploy-preview-1905--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 24, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/63d7e8e06558700009ed4c93
😎 Deploy Preview https://deploy-preview-1905--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@taty2010 taty2010 self-assigned this Jan 24, 2023
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Jan 24, 2023
@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/63d7e8e08e32a500085bbb7d
😎 Deploy Preview https://deploy-preview-1905--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/63d7e8e068b6e70008967546
😎 Deploy Preview https://deploy-preview-1905--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/63d7e8e0990f8000087e6036
😎 Deploy Preview https://deploy-preview-1905--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/63d7e8e0fc1ae80008011647
😎 Deploy Preview https://deploy-preview-1905--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/63d7e8e0beffe80007218854
😎 Deploy Preview https://deploy-preview-1905--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/63d7e8e0154ffe00080c79a4
😎 Deploy Preview https://deploy-preview-1905--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 0002647
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/63d7e8e061086b00090a9106
😎 Deploy Preview https://deploy-preview-1905--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ascorbic
Copy link
Contributor

ascorbic commented Jan 25, 2023

@ascorbic
Copy link
Contributor

The tests are failing because you need to run prettier: https://github.com/netlify/next-runtime/actions/runs/4001502021/jobs/6867794232

@sarahetter
Copy link

Looks good! Is it possible to add an example of this new matcher working in one of our demos?

Copy link

@sarahetter sarahetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! Thank you!

Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! :shipit:

@kodiakhq kodiakhq bot merged commit f30e178 into main Jan 30, 2023
@kodiakhq kodiakhq bot deleted the tn/add-middlewareMatcher-missing branch January 30, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support "missing" middleware matcher
3 participants