Repository navigation
build: require node 24.18 and pin dependency install scripts - #675
Merged
Merged
Conversation
Gutenberg develops against Node 24.18, while this project was pinned to Node 20. Matching it keeps the toolchains aligned and clears the Node 22.12 floor that Vitest 5 requires. `engines`, `devEngines`, and `engine-strict` mirror Gutenberg's setup so an unsupported Node or npm version fails the install outright instead of surfacing later as an obscure runtime error. The three cover different gaps: `devEngines` also guards `npm run`, but is ignored by the npm 10 that ships with Node 20, so `engine-strict` is what stops the very version this commit moves away from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
npm 11.16 reports which dependencies run install scripts and lets the project record a decision for each. Approve the five that produce or select a native binary the toolchain needs, and deny core-js, whose postinstall only prints a funding notice. Entries are pinned to the reviewed version, so a bump that changes one of these scripts warns again rather than inheriting the earlier approval. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dcalhoun
force-pushed
the
build/node-24-18
branch
from
September 17, 2026 01:56
46e67e7 to
3297824
Compare
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/675")Built from 3297824 |
dcalhoun
marked this pull request as ready for review
September 17, 2026 02:05
oguzkocer
approved these changes
Sep 17, 2026
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.
What?
Upgrade the project to Node.js v24.18.
Why?
Unblock #660 and align with the
WordPress/gutenberg project.
How?
Bump the
.nvmrcconfiguration file. Add additional configuration fornpmversion, supported
engines/devEngines, andallowedScripts.🤖 Agent summary
build: require node 24.18 to match gutenberg.nvmrcmoves from20to24.18, the version Gutenberg pins. Node 24.18 ships npm 11.16.0, which is also the npm floor Gutenberg declares.The motivation is dependabot's Vitest 5 bump, which requires Node >= 22.12.
viteis already^8.0.16, past Vitest 5's>= 6.4.0floor, so Node was the only blocker.Three fields enforce the requirement, because each covers a different gap:
npm installnpm run <script>enginesalonenpm warn EBADENGINEengines+engine-strictnpm error EBADENGINE, abortsdevEnginesnpm error EBADDEVENGINES, abortsnpm error EBADDEVENGINES, abortsdevEnginesis the stronger of the two, but it is ignored by npm 10.8.2 — the npm bundled with Node 20 — so on its own it would miss exactly the contributors this PR moves away from. Verified: withdevEnginesin place,npm run test:unitunder Node 20 runs all 231 tests without complaint.engine-strictis what every npm version honors, so it is the one that actually stops a Node 20 install. Gutenberg carries the same combination.build: review and pin dependency install scriptsnpm 11.16 reports which dependencies run install scripts and lets the project record a decision per package. Approved the five that produce or select a native binary the toolchain needs (
electron,fsevents,@parcel/watcher,unrs-resolver,fs-ext-extra-prebuilt) and deniedcore-js, whose postinstall only prints a funding notice.Entries are pinned to the reviewed version, so a bump that changes one of these scripts warns again rather than inheriting the earlier approval.
strict-allow-scriptsis deliberately left off. It would turn an unapproved script from a warning into a hard install failure, at the cost of breaking CI on every dependency bump touching those packages until someone re-approves.Verification
Ran on Node 24.18.0 after a clean
npm ci:make lint-js— cleanmake test-js— 17 files, 231 tests passingmake build REFRESH_JS_BUILD=1— succeeds (the rebuilt bundle is not part of this PR)npm ci— noallow-scriptswarnings remain,core-js's banner is gone,electronstill downloads its binarynpm ciunder Node 20 — fails withEBADENGINE, as intendedTesting Instructions
N/A, no user-facing changes.
Accessibility Testing Instructions
N/A, no user-facing changes.
Screenshots or screencast
N/A, no user-facing changes.
🤖 Generated with Claude Code