Skip to content

feat: handle Set-Cookie headers, add waitForFakeTime, and update deps#75

Merged
KyleJune merged 1 commit intomainfrom
dev
Mar 24, 2026
Merged

feat: handle Set-Cookie headers, add waitForFakeTime, and update deps#75
KyleJune merged 1 commit intomainfrom
dev

Conversation

@KyleJune
Copy link
Copy Markdown
Member

Summary

Fixes Set-Cookie header corruption when multiple cookies are set, adds waitForFakeTime testing utility for Deno's FakeTime compatibility with @testing-library/react, and updates dependencies including react-router 7.13.2.

Changes

  • Fix Set-Cookie headers being merged with commas by Headers.entries() — use getSetCookie() with append instead across all header forwarding paths (renderDocument, redirect handler, error handler)
  • Add waitForFakeTime utility to @udibo/juniper/utils/testing — a drop-in replacement for waitFor that works when FakeTime is active, using FakeTime.restoreFor to flush the fake timer queue
  • Add unstable_url to test mock args for react-router 7.13.2 compatibility
  • Use useRef in createRoutesStub to avoid recreating the router on every render
  • Update dependencies (react-router, @std/testing, etc.)
  • Update testing docs and skill with waitForFakeTime usage guidance

Testing

  • Added tests for multiple Set-Cookie header handling in server.test.tsx
  • Updated all template and example tests to use waitForFakeTime where FakeTime is active
  • All template, example, and package tests pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@KyleJune KyleJune merged commit 0a65257 into main Mar 24, 2026
8 of 9 checks passed
@KyleJune KyleJune deleted the dev branch March 24, 2026 01:39
KyleJune pushed a commit that referenced this pull request Mar 24, 2026
# [0.4.0](0.3.3...0.4.0) (2026-03-24)

### Features

* handle Set-Cookie headers, add waitForFakeTime, and update deps ([#75](#75)) ([0a65257](0a65257))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant