Skip to content

build: require Node 24 and drop Node 22 - #39

Merged
xiaodoudou merged 6 commits into
devfrom
ci/node-24
Oct 11, 2026
Merged

xiaodoudou merged 6 commits into
devfrom
ci/node-24

Conversation

@xiaodoudou

@xiaodoudou xiaodoudou commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

engines was ^22.12.0. It is now ^24.0.0, in package.json and the lockfile, so installing on Node 22 prints an engine warning. Node 24 is the only supported version.

Every CI job runs on Node 24: the commit check, test, drivers and the npm publish. The Docker example runs on node:24-bookworm-slim. The README, CONTRIBUTING, the create-site skill and the changelog say Node 24.

The first run on Node 24 found a bug in lib/util/confirm.js, the yes or no question of cms-import and cms-import-remote. After a wrong answer it asked again with rl.prompt(). If the input had already ended, for example a pipe that closes right after the answer, the interface was closed, and Node 24 throws ERR_USE_AFTER_CLOSE where Node 22 does not. It now asks again only while the input is open, so a closed input still counts as no.

Dropping Node 22 is a breaking change for anyone still on it. engines only warns unless a project sets engine-strict. Node 26 is not LTS yet, so it is not in the range. The Docker example depends on embed-cms ^3.0.4, which resolves to 3.1.0, whose engines is still ^22.12.0, so npm install in the container prints an engine warning until the next release.

Run locally on Node 22: the frontend suite (122 files, 2856 tests), ESLint, the audit, the Docker example test and the confirm tests. The backend suites were not run locally; CI ran them on Node 24.

engines was ^22.12.0, which npm reads as Node 22 only, so Node 24 got an engine warning. It now allows ^22.12.0 || ^24.0.0, and a node-24 job runs the unit, frontend, integration and build steps next to the Node 22 ones. It is a separate job because the rules of main ask for checks named test and drivers.
The Docker example builds and runs on node:24-bookworm-slim. The commit check, the drivers job and the npm publish run on Node 24. The test job stays on Node 22, the oldest supported line, beside the node-24 job.
After a wrong answer, confirm asked the question again with rl.prompt(). When the input ended in the same chunk (printf 'what\n' | cms-import), the interface was already closed, and Node 24 throws ERR_USE_AFTER_CLOSE there where Node 22 let it pass. The question is now asked again only while the input is open, so a closed input still counts as no.
engines is now ^24.0.0, every CI job runs on Node 24, and the separate node-24 job is gone because test is the Node 24 job now. The README, CONTRIBUTING, the create-site skill and the changelog say Node 24.
@xiaodoudou xiaodoudou changed the title build: support Node 24 and run CI on it build: require Node 24 and drop Node 22 Oct 11, 2026
@xiaodoudou
xiaodoudou merged commit 50c6b8a into dev Oct 11, 2026
3 checks passed
@xiaodoudou
xiaodoudou deleted the ci/node-24 branch October 11, 2026 14:22
xiaodoudou added a commit that referenced this pull request Oct 12, 2026
build: require Node 24 and drop Node 22
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.

1 participant