Skip to content

fix: support cookie v2.x#387

Merged
mcollina merged 1 commit into
mainfrom
fix/support-cookie-v2
Jul 9, 2026
Merged

fix: support cookie v2.x#387
mcollina merged 1 commit into
mainfrom
fix/support-cookie-v2

Conversation

@Tony133

@Tony133 Tony133 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Proposal:

Change

  • cookie v2 removed the serialize(name, value, opts) export, replacing it with stringifySetCookie({ name, value, ...opts }). lib/request.js still called cookie.serialize(...) to build the Cookie header from options.cookies, so any inject() call passing cookies threw cookie.serialize is not a function (500/TypeError).

Notes for reviewers

@Tony133 Tony133 changed the title fix: support cookie@2 fix: support cookie v2 Jul 8, 2026
@Tony133 Tony133 force-pushed the fix/support-cookie-v2 branch from e45a568 to 8027bc5 Compare July 8, 2026 21:05
@Tony133 Tony133 changed the title fix: support cookie v2 fix: support cookie v2.x Jul 8, 2026
 v2 dropped the  export in
favour of , breaking
the  header built from  in inject() with
.

- adapt lib/request.js to the new cookie@2 API
- bump the  dependency to ^2.0.1
@Tony133 Tony133 force-pushed the fix/support-cookie-v2 branch from 8027bc5 to e0a4731 Compare July 8, 2026 21:10
@Tony133 Tony133 marked this pull request as ready for review July 8, 2026 21:12
@Tony133 Tony133 requested a review from a team July 8, 2026 21:12

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 3780ca6 into main Jul 9, 2026
17 checks passed
@mcollina mcollina deleted the fix/support-cookie-v2 branch July 9, 2026 10:04
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.

3 participants