Repository navigation
chore: declare the node and npm floors that the tsdown build requires via devEngines - #7093
Merged
trentm merged 7 commits intoSep 22, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7093 +/- ##
=======================================
Coverage 94.79% 94.79%
=======================================
Files 394 394
Lines 13832 13832
Branches 3196 3196
=======================================
Hits 13112 13112
Misses 720 720 🚀 New features to boost your workflow:
|
overbalance
enabled auto-merge
September 16, 2026 23:27
trentm
reviewed
Sep 17, 2026
overbalance
disabled auto-merge
September 17, 2026 00:59
Pull request dashboard statusMerged · refreshed 2026-09-22 00:06 UTC Status above doesn't look right?
|
overbalance
force-pushed
the
overbalance/update-node-npm
branch
from
September 18, 2026 18:56
2f561e2 to
0870997
Compare
overbalance
force-pushed
the
overbalance/update-node-npm
branch
from
September 18, 2026 19:06
0870997 to
1aa217c
Compare
overbalance
force-pushed
the
overbalance/update-node-npm
branch
from
September 18, 2026 19:36
5313cee to
73307db
Compare
5 of 6 tasks
trentm
approved these changes
Sep 21, 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.
Which problem is this PR solving?
This is needed for the repo's conversion to tsdown. Moving the build from
tscto tsdown (#6293) raised the toolchain a contributor needs to build this repo at all, and nothing declares it. Contributors on an older toolchain only find out through a confusingFailed to import module "unrun"failure, andCONTRIBUTING.mdstill tells them npm7.xis enough. The npm floor comes from the same work:min-release-agein.npmrcis silently ignored by every npm below11.10.0.This PR writes those floors down. It changes no build behavior; it turns an undeclared tsdown requirement into a diagnostic contributors can act on.
Short description of the changes
devEnginesto the rootpackage.json, declaring the development runtime (node^24.11.1 || >=26.0.0) and package manager (npm>=11.10.0).onFail: "warn". An unsupported toolchain prints a diagnostic naming the offending version, and every command still succeeds. See "Impact on CI" for whyerroris not usable in this repo.CONTRIBUTING.mdto point atdevEngines.runtimeas the source of truth, replacing the stale>= 22.18and npm7.xguidance.devEnginesis npm's workspace-local counterpart toengines: it applies to people developing in this repo and is not published. The packages' ownenginesare untouched, so the supported range for consumers does not change and remains>=22.15.0.Type of change
How Has This Been Tested?
EBADDEVENGINESwarning naming the offending version, still exit 0.npm run compile(42 projects, 3245 files) on Node 22.18.0, 22.22.3, 24.11.1 and 26.9.0: all succeed, byte-identical output compared by hashing every file under everydist/. Node 20.19.0 fails.Checklist:
How these floors were chosen
The declared range is deliberately narrower than tsdown's own, so the numbers are worth recording.
The floor comes from the tsdown toolchain, not from our code
tsdown@0.22.14declaresengines.nodeas^22.18.0 || >=24.11.0, inherited fromrolldown-plugin-dtsandimport-without-cache. The22.18.0half is a real gate: tsdown picks its config loader withprocess.features.typescript, which only becomes truthy in Node 22.18.0, where type stripping is enabled by default. Below that it falls back to the optionalunrunpeer, which we do not install, and everycompilefails withFailed to import module "unrun". Renamingtsdown.config.tsto.mjsdoes not help; the loader is chosen once at module scope.Node 20 is not reachable at all: with
unruninstalled the config loads and the build then dies inside tsdown's core withTypeError: Promise.withResolvers is not a function, which arrived in Node 22.0.0.Why the floors are higher than tsdown's own range
tsdown's ranges mark where the features it needs arrived, not where the relevant Node bugs were fixed. The binding defect is nodejs/node#59929, which tsdown names in its own error path: "... or upgrading Node.js to v24.11.1 or later." The fix reached each line separately:
^22.18.0^24.11.0^24.11.1>=24.11.0>=26.0.0^24.11.0includes24.11.0itself, the exact version tsdown's message tells you to upgrade away from; the hotfix landed two weeks later in24.11.1.Worth stating plainly: #59929 does not reproduce here. Node 22.18.0 and 24.11.0 build this repo successfully, because our config graph does not take the loader path that triggers it. The floors rest on the upstream changelog and tsdown's own diagnostic, not on a local repro: being wrong this way asks a contributor for a newer patch release than they strictly need, being wrong the other way is the loader failure this PR exists to prevent.
Why Node 22 is excluded for development
An earlier revision declared
^22.22.3, where the loader fix landed. That is dropped because the 22 line cannot satisfy the npm floor at all: no Node 22 release bundles npm>=11.10.0, the whole line ships10.9.x, so a contributor there would warn on every install unless they separately rannpm i -g npm@latest.This narrows what maintainers develop on, not what the project supports: the unit-test and e2e matrices still include an exact
22.15.0job.The npm floor
>=11.10.0is set bymin-release-age=3in.npmrc, the install cooldown that keeps us from pulling a version published minutes ago. Bisecting standalone installs puts the boundary between npm11.9.0, which reportsUnknown project config "min-release-age", and11.10.0, which honors it. This is also why CI pins Node^26.3.0, bundling npm 11.16.0.This key uses
onFail: "warn"because in-range Node 24 releases below24.14.1bundle npm11.6.x, under the floor. Contributors there keep a working build and get one actionable message, fixed bynpm i -g npm@latestrather than a Node upgrade:Per the Node.js release index,
24.14.1(npm11.11.0) is the first Node 24 release where the warning disappears on its own, which is the versionCONTRIBUTING.mdnames.Impact on CI
None as written, but only because both keys use
onFail: "warn"..github/workflows/unit-test.ymlinstalls and builds on^26.3.0, then switches Node to run the test matrix (22.15.0,22,24,26).devEngines.runtimeconstrains building; the packageengines(>=22.15.0) constrain running.onFail: "error"was tried onruntimeand had to be reverted, which is worth recording because the reasoning above makes it look safe.devEnginesgates npm itself, not just build commands, so once Node is switched down to a matrix version below the build floor, every npm invocation exits 1. It failsnode-tests (22.15.0)ande2e-tests (22.15.0)insidesetup-node, before any test runs:The workflow cannot work around this, since the failing call is internal to
setup-node's cache restore. A repo that deliberately tests below its build floor cannot useonFail: "error"without dropping matrix entries or lowering the floor to>=22.15.0, defeating the purpose of this PR.