Chore: Bump CI Node.js from 20 to 24 - #7219
Closed
Gykes wants to merge 1 commit into
Closed
Conversation
Node 20 is past end-of-life and is no longer receiving security updates. The `generate` job was the only place still pinning Node 20; the compiler image used by the cross-compile jobs has been on node:24-bookworm for a while (docker/compiler/Dockerfile), so this aligns CI with the toolchain the rest of the build already uses. Also raises the `engines` floor in ui/v2.5/package.json to match. The previous `>= 20` let contributors build locally on a newer Node with language features the CI runner could not parse, producing failures that only appeared in CI -- most recently a regex using inline modifier groups `(?i:...)`, which parse on Node 23+ but throw "Invalid group" on Node 20 when rollup reconstructs the literal at build time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GoAD2nqsMqbkNGdzSBJJ6q
Collaborator
Author
|
sigh you ask CC one question and it goes on a rampage. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Node 20 is past end-of-life and no longer receives security updates, so CI should move off it.
The
generatejob inbuild.ymlwas the only remaining Node 20 pin. The compiler image that the cross-compile jobs run in has been onnode:24-bookwormfor a while already (docker/compiler/Dockerfile), so this just brings the one native job in line with the toolchain the rest of the build already uses. Node 24 is the current active LTS.What changed
.github/workflows/build.yml—node-version: '20'→'24'ui/v2.5/package.json—engines.node">= 20"→">= 24"The
enginesbump matters as much as the workflow one. With a floor of>= 20, a contributor on a newer Node can use language features the CI runner cannot parse, so the build passes locally and fails only in CI with an error that looks unrelated to their change.That is not hypothetical — it is currently happening on #7207, where a regex using inline modifier groups (
(?i:...)) fails thegeneratejob:Rollup reconstructs regex literals with
new RegExp()in the host Node process, so whether the build succeeds depends entirely on the runner's V8 version. Modifier groups landed in V8 12.5, so they parse on Node 23+ and throw on Node 20.To be clear, this PR does not fix #7207 — that regex has a separate bug and needs changing on its own merits. This only removes the version skew that made the failure confusing.
Testing
Ran the full UI pipeline on a modern Node against current
develop:pnpm run check(tsc --noEmit) — cleanpnpm run lint(biome + stylelint) — cleanpnpm run build(vite) — built in 15.91sNo lockfile or dependency changes;
pnpm install --frozen-lockfileresolves unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01GoAD2nqsMqbkNGdzSBJJ6q