Skip to content

[ISSUE #654] Raise minimum Node.js to 22 LTS and modernise CI workflows - #721

Merged
dengliming merged 1 commit into
apache:masterfrom
marDC-it:feat/654-node-22-lts
Oct 16, 2026
Merged

dengliming merged 1 commit into
apache:masterfrom
marDC-it:feat/654-node-22-lts

Conversation

@marDC-it

Copy link
Copy Markdown
Contributor

Fixes #654.

Node 18 and 20 have both reached end-of-life, while package.json still declared
"node": ">=8.0.0" and the workflows pinned Node 16/20 on deprecated action versions.

Changes

File Change
package.json engines.node → >=22.12.0, the floor commander@15 requires
.nvmrc 20 → 22
README.md prerequisite now reads "Node.js 22 LTS or newer (24 recommended)"
.github/workflows/build.yml matrix [22.x, 24.x], checkout@v4, setup-node@v4 with cache: npm
.github/workflows/deploy.yml checkout@v4, setup-node@v4, build on Node 24
.github/workflows/sync-to-main.yml build on Node 24 instead of 16

Two things the matrix change would otherwise have broken silently

  • The lint step was gated on if: matrix.node-version == '20.x'. With the matrix moved to
    [22.x, 24.x] that condition can never match, so lint would stop running with no error
    anywhere. It now runs on 22.x.
  • The coverage artifact had the fixed name unit-test-coverage. actions/upload-artifact@v4
    rejects a second upload under a name already used in the same run, so with two matrix jobs
    the workflow would have failed. The name now carries the Node version.

Verification

Local, on Node v24.21.0 (Windows):

command result
npm ci 3562 packages, no errors
npm run build Compiled successfully, with no NODE_OPTIONS and no --openssl-legacy-provider
npm run test:coverage 56 suites / 281 tests passed; coverage unchanged at 20.07%
npm run lint 0 errors

This answers the open question in #654 about whether the roadhog build needs the legacy
OpenSSL provider on modern Node: on Node 24 it does not. Node 22 is covered by the new CI
matrix rather than locally.

Deliberately out of scope: the caniuse-lite data warning, typescript@2.9.2, the bundle
size and the npm audit findings. All real, none of them this issue.


Generative AI assistance (Claude) was used while investigating this issue and preparing the
change, per the ASF Generative Tooling Guidance. The changes and the verification above are
mine and I take responsibility for them.

…CI workflows

Node 18 and 20 are both end-of-life, while package.json still declared
"node": ">=8.0.0" and the workflows pinned Node 16/20 on deprecated action
versions.

- package.json: engines.node >= 22.12.0, the floor commander@15 requires
- .nvmrc: 22
- README: Node 22 LTS or newer, 24 recommended
- build.yml: matrix [22.x, 24.x], checkout@v4, setup-node@v4 with npm cache
- deploy.yml: checkout@v4, setup-node@v4, build on Node 24
- sync-to-main.yml: build on Node 24 instead of 16

Two details the matrix change would otherwise have broken silently:

- the lint step was gated on matrix.node-version == '20.x' and would have
  stopped running; it now runs on 22.x
- the coverage artifact had a fixed name, which actions/upload-artifact@v4
  rejects when two matrix jobs upload it; the name now carries the version

Verified locally on Node v24.21.0 (Windows): npm ci, npm run build (compiled
successfully with no NODE_OPTIONS), npm run test:coverage (56 suites / 281
tests) and npm run lint all pass.
@dengliming
dengliming merged commit b2586ea into apache:master Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Raise minimum Node.js to 22 LTS and update the CI matrix (Node 18/20 are EOL)

2 participants