Skip to content

chore: use Headers.getSetCookie - #2730

Merged
kettanaito merged 2 commits into
feat/3.0from
fix/use-get-set-cookie
Apr 29, 2026
Merged

chore: use Headers.getSetCookie#2730
kettanaito merged 2 commits into
feat/3.0from
fix/use-get-set-cookie

Conversation

@kettanaito

@kettanaito kettanaito commented Apr 29, 2026

Copy link
Copy Markdown
Member
  • Drop TypeScript 5.0 and 5.1, add 5.9.
  • Use Headers.prototype.getSetCookie() instead of headers-polyfill.
  • Correctly handle multiple set-cookie response headers now.

We still rely on headers-polyfil for multipart data when parsing headers of individual multipart chunks.

@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4429c2ad-cde9-41f7-b71f-5d27cd8a849b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/use-get-set-cookie

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/core/utils/request/storeResponseCookies.ts`:
- Around line 8-14: The current use of Promise.all with getRawSetCookie(...)
causes concurrent cookieStore.setCookie(...) calls and can break header
application order; change the logic in the storeResponseCookies flow to apply
Set-Cookie headers sequentially (e.g., iterate over getRawSetCookie(response)
with for/for-of and await each cookieStore.setCookie(responseCookie,
request.url) before continuing) so each jar mutation and persist completes in
wire order rather than concurrently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ed81601b-77b8-4b1e-b831-812ba06a80c2

📥 Commits

Reviewing files that changed from the base of the PR and between 9eb5e9b and 948b3b4.

📒 Files selected for processing (4)
  • .github/workflows/compat.yml
  • src/core/handlers/RequestHandler.ts
  • src/core/utils/HttpResponse/decorators.ts
  • src/core/utils/request/storeResponseCookies.ts

Comment thread src/core/utils/request/storeResponseCookies.ts Outdated
@pkg-pr-new

pkg-pr-new Bot commented Apr 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/msw@2730

commit: 5413dba

@kettanaito
kettanaito merged commit dfd9c77 into feat/3.0 Apr 29, 2026
28 of 29 checks passed
@kettanaito
kettanaito deleted the fix/use-get-set-cookie branch April 29, 2026 11:14
@kettanaito kettanaito mentioned this pull request Apr 29, 2026
30 tasks
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.

1 participant