-
Notifications
You must be signed in to change notification settings - Fork 449
chore(repo): upgrade monorepo to Node.js 24 #8351
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
Open
jacekradko
wants to merge
22
commits into
main
Choose a base branch
from
jacek/upgrade-to-node-24
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9fcc619
chore: upgrade monorepo to Node.js 24
jacekradko d50f674
chore: add changeset for Node 24 upgrade
jacekradko 6d4945a
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko 9bf6afa
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko 711329c
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko d70ee79
fix(backend): clone Request without cross-realm AbortSignal on Node 24
jacekradko e9f8d1a
fix: pin Node to 24.15.0 and use Proxy to hide signal in clone
jacekradko 8d74519
fix(react-router): omit signal from patchRequest clone for Node 24
jacekradko 8619779
fix(backend): satisfy curly lint rule in ClerkRequest signal proxy
jacekradko b736bc2
ci(repo): pin minimum-supported Node 20.9.0 in unit-test matrix
jacekradko a14d934
ci(repo): bump unit-test Node 20 matrix to 20.19.0 for build toolchai…
jacekradko 05d014c
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko 7913812
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko 844e18c
Delete .claude/scheduled_tasks.lock
jacekradko d0bffa3
Delete .changeset/giant-mirrors-find.md
jacekradko 06f4e3c
fix(backend,tanstack-react-start): omit cross-realm AbortSignal in pr…
jacekradko 878fbb8
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko 7f3767c
Merge remote-tracking branch 'origin/main' into jacek/upgrade-to-node-24
jacekradko 02b5a08
fix(tanstack-react-start): bridge AbortSignal in patchRequest via loc…
jacekradko b24182f
fix(tanstack-react-start): keep signal omitted in patchRequest under …
jacekradko 302a2ae
test(tanstack-react-start): drop unworkable signal-forward regression…
jacekradko e967b12
Merge branch 'main' into jacek/upgrade-to-node-24
jacekradko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@clerk/backend': patch | ||
| '@clerk/react-router': patch | ||
| '@clerk/tanstack-react-start': patch | ||
| --- | ||
|
|
||
| Fix `Request` cloning and outbound `fetch` to omit cross-realm `AbortSignal`. Node 24's bundled undici tightened the `instanceof AbortSignal` check on `RequestInit.signal`, which broke: | ||
|
|
||
| - Cloning framework-specific requests such as `NextRequest` in `@clerk/backend`'s `ClerkRequest`. | ||
| - Subclassed `Request`s passed through `patchRequest` in `@clerk/react-router` and `@clerk/tanstack-react-start`. | ||
| - Frontend API proxying in `@clerk/backend`'s `clerkFrontendApiProxy`, which forwarded the inbound request's signal to the upstream `fetch`. Abort propagation will be restored in a follow-up via an in-realm `AbortController` bridge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 22.11.0 | ||
| 24.15.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,25 @@ class ClerkRequest extends Request { | |
| // https://github.com/nodejs/undici/issues/2155 | ||
| // https://github.com/nodejs/undici/blob/7153a1c78d51840bbe16576ce353e481c3934701/lib/fetch/request.js#L854 | ||
| const url = typeof input !== 'string' && 'url' in input ? input.url : String(input); | ||
| super(url, init || typeof input === 'string' ? undefined : input); | ||
| // When cloning a Request by passing it as init, hide its `signal`. Undici's | ||
| // Request constructor in Node 24 performs a strict instanceof check on the | ||
| // signal and rejects ones from a different realm (e.g. NextRequest). Using a | ||
| // Proxy keeps property access lazy so environments that don't implement | ||
| // optional getters (e.g. Cloudflare Workers' Request lacks `cache`) still work. | ||
| let cloneInit: RequestInit | undefined; | ||
| if (init) { | ||
| cloneInit = init; | ||
| } else if (typeof input !== 'string') { | ||
| cloneInit = new Proxy(input as Request, { | ||
| get(target, prop) { | ||
| if (prop === 'signal') { | ||
| return undefined; | ||
| } | ||
| return Reflect.get(target, prop, target); | ||
| }, | ||
| }) as unknown as RequestInit; | ||
| } | ||
| super(url, cloneInit); | ||
|
Comment on lines
+29
to
+47
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can confirm this makes sense. Undici validates https://github.com/nodejs/undici/blob/main/lib/web/fetch/request.js#L1077-L1085 |
||
| this.clerkUrl = this.deriveUrlFromHeaders(this); | ||
| this.cookies = this.parseCookies(this); | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.