test(tanstack-react-start): add patchRequest regression tests#8399
test(tanstack-react-start): add patchRequest regression tests#8399nikosdouvlis wants to merge 4 commits intomainfrom
Conversation
patchRequest clones the incoming Request on every server middleware invocation before it is handed to @clerk/backend, and had no direct test coverage. This came up while investigating a reported query string drop in the TanStack handshake flow. The query is preserved today, but nothing would catch a regression. Covers URL preservation (query + path), x-forwarded headers, method, and new-instance identity.
🦋 Changeset detectedLatest commit: 2f94f70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds three test files and no production code changes: a Vitest unit test for Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
…eservation Extends the proxy integration test to assert that the FAPI handshake redirect_url keeps the original query string when the app is behind a reverse proxy. Sibling to the existing assertion that the redirect uses the forwarded host. Also adds an empty changeset since this is test-only and does not ship.
- Replace the generic URL case with the exact shape from the Slack report: an encoded nested redirect_url with its own query and port, asserted via URL parsing. - Add coverage for redirect, cache, and signal init options that patchRequest forwards (previously unasserted). - Replace the weak "returns a new Request" check with a signal-abort forwarding assertion that actually proves cloning behavior.
- Assert the cloned URL equals original.url (semantic) instead of comparing against a raw literal. - Add a POST-with-body case that locks in the intentional body drop from #7020. Guards against accidentally forwarding body through the clone, which would reintroduce the undici duplex issues.
No description provided.