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

Already on GitHub? Sign in to your account

fix(cookies): add .has in ResponseCookies #533

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

devjiwonchoi
Copy link
Member

@devjiwonchoi devjiwonchoi commented Aug 16, 2023

Since Next.js cookies function returns ResponseCookies as ReadonlyRequestCookies in server requests, cookies().has(//...) throws a TypeError .has is not a function.

Added has in ResponseCookies and tests.

Fixes: #532 Next.js-#54005

@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2023

🦋 Changeset detected

Latest commit: 1afcbf3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@edge-runtime/cookies
@edge-runtime/node-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
edge-runtime ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2023 8:20am

@Kikobeats Kikobeats changed the title feat(cookies): add has in response cookies fix(cookies): add .has in ResponseCookies Aug 16, 2023
@Kikobeats Kikobeats merged commit a4a7dc0 into vercel:main Aug 16, 2023
@devjiwonchoi devjiwonchoi deleted the feat/has-in-response-cookies branch August 16, 2023 08:34
@github-actions github-actions bot mentioned this pull request Aug 16, 2023
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Aug 17, 2023
- Added `has` to ResponseCookies in [edge-runtime/cookies#533](vercel/edge-runtime#533)
- Upgraded edge-runtime/cookies to 3.3.0 #54117 
- Added a test case


Fixes #54005 #54111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support has in ResponseCookies
2 participants