Enforce Node 24.19.0 / npm 11.10.0 via devEngines and engine-strict - #939
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
deetergp
approved these changes
Aug 25, 2026
Contributor
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.
This enforces the Node/npm toolchain for local development and CI so the upcoming npm
min-release-agesupply-chain cooldown cannot be silently bypassed. Themin-release-agesetting requires npm >= 11.10.0 and is silently ignored by older npm versions; Node 24.11.0's bundled npm 11.6.x is below that floor. This PR bumps.nvmrcto Node 24.19.0 (same 24.x LTS line, which bundles npm 11.17.0) and declares the floors indevEngines(node >=24.19.0,npm >=11.10.0, both withonFail: "error") rather thanengines: because this package is published to npm and consumed by repos withengine-strictenabled (e.g. App), anenginesfield would impose our repo-tooling floors on every consumer install, breaking consumers on older-but-fine toolchains.devEnginesis checked only for the root project and never when the package is installed as a dependency, so it enforces the floor for people working in this repo without constraining consumers..npmrcwithengine-strict=trueis also added so any futureenginesdeclarations in this repo's dependency tree are respected. On npm >= 10.9 a toolchain below the floor fails withEBADDEVENGINES; older npm ignoresdevEnginessilently, which is acceptable since.nvmrcand CI pin the toolchain. All CI workflows already readnode-version-file: .nvmrc, so no workflow changes were needed.Fixed Issues
For https://github.com/Expensify/Expensify/issues/675045
Tests
.nvmrcand will now run on Node 24.19.0.node --versionis v24.19.0 andnpm --versionis 11.17.0 under the new toolchain, then rannpm install— completed successfully; the lockfile no longer carries anenginesmirror in the root entry (npm does not mirrordevEngines), and the remaining lockfile diff vs main is minimal peer-flag normalization from the newer npm, which is committed.npm ciin a clean checkout under Node 24.19.0 / npm 11.17.0 — completed successfully (exit 0).devEnginesenforcement fires: temporarily set the node floor to>=99and rannpm install --dry-rununder Node 24.19.0 / npm 11.17.0 — failed withEBADDEVENGINES(Invalid semver version ">=99" does not match "v24.19.0" for "runtime", exit code 1), then restored the real floor.devEnginessilently, sonpm install --dry-runsucceeds there — acceptable because.nvmrcand CI pin Node 24.19.0, whose bundled npm enforces the floor.QA
enginesconstraint is imposed on consumers.