chore(repo): upgrade monorepo to Node.js 24#8351
Conversation
- Update root package.json engines to require Node >=24.15.0 - Update .nvmrc to Node 24.15.0 - Update CI workflows to use Node 24 as primary version - Add Node 20 to CI test matrix for published package compatibility - Update release workflow caching to Node 24 Published packages maintain Node >=20.9.0 compatibility as specified in their individual engines fields. This change only affects the monorepo development environment and CI/CD pipelines.
🦋 Changeset detectedLatest commit: 878fbb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdated Node.js target from 22.x to 24.15.0 across project configs and CI: Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: |
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/two-factor-authentication |
- Bump default node-version in init actions from 22 to 24 so integration-tests run on the version required by engines.node - In ClerkRequest, build init explicitly when cloning a Request to avoid undici extracting a cross-realm signal (e.g. from NextRequest), which Node 24's stricter instanceof check rejects - Also fixes a latent precedence bug where a provided init was silently dropped
- Pin node-version to 24.15.0 in init actions, matrix, and pkg-pr-new step so the engines.node check (>=24.15.0) is satisfied - Use a Proxy to intercept the 'signal' read when cloning a Request, instead of eagerly reading individual properties (which broke in environments like Cloudflare Workers where Request.cache is not implemented)
There was a problem hiding this comment.
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 @.github/workflows/ci.yml:
- Around line 221-224: CI matrix includes an unsupported "node-version: 20"
entry; remove that entry so the matrix only contains the supported
"node-version: 24.15.0". Edit the matrix block that lists the node-version
values (the YAML key "node-version" in the job matrix) and delete the line with
"20", leaving the existing "24.15.0" (and keep "test-filter" and "filter-label"
entries unchanged); verify no other job or matrix elsewhere still references
node 20.
🪄 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 YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 4d516f8e-f4a5-4b0a-a1fa-a36126cee8dc
📒 Files selected for processing (4)
.github/actions/init-blacksmith/action.yml.github/actions/init/action.yml.github/workflows/ci.ymlpackages/backend/src/tokens/clerkRequest.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/actions/init-blacksmith/action.yml
- .github/actions/init/action.yml
- packages/backend/src/tokens/clerkRequest.ts
| // 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); |
There was a problem hiding this comment.
Can confirm this makes sense. Undici validates init.signal when constructing a Request, and that can reject signals coming from framework-specific request objects
https://github.com/nodejs/undici/blob/main/lib/web/fetch/request.js#L1077-L1085
…oxy and patchRequest
Summary
Changes
package.jsonengines to require Node ≥24.15.0.nvmrcto Node 24.15.0Test plan