Repository navigation
fix: declare one supported Node.js range, ^22.18.0 || ^24.11.0 || >=26.0.0 - #343
Open
wmadden-electric wants to merge 2 commits into
Open
wmadden-electric wants to merge 2 commits into
wmadden-electric wants to merge 2 commits into
Conversation
prisma, @prisma/cli and @prisma/compute now declare the same engines.node range as create-prisma and the projects it generates. The package READMEs and contributor docs state it in prose. A scripts test fails if a package declares anything else. @prisma/cli-engine keeps >=22.12.0 until its next real change: any change to its manifest needs a new engine version, which composer-cli and orm-toolchain must peer before the shell can ship it. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…anifest Reverts a comment edit in packages/cli-engine/tests, which counts as an engine change and fails check-engine-version. The engines test now skips folders under packages/ that have no package.json. CONTRIBUTING notes that @prisma/cli-engine keeps its own wider range until its next version. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
commit: |
4 of 5 tasks
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.
The CLI accepts any Node from 22.18 up. create-prisma, and every project it generates, accepts a narrower range. After this PR the CLI declares the same range.
Decision
Every Prisma 8 tool supports one Node.js range:
^22.18.0 || ^24.11.0 || >=26.0.0. In prose: Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.Why one range
The packages, the docs and the generated projects disagreed.
prismaand@prisma/clideclared>=22.18.0.@prisma/computedeclared>=22.12.0. The repo README said "Node.js 24 or newer". create-prisma and its generated projects said^22.18.0 || ^24.11.0 || >=26.0.0(prisma/create-prisma#128). A user could not tell which Node to install.The range covers the Node 22 line from 22.18, the Node 24 line from 24.11, and everything from 26.
It leaves out Node 24.0 to 24.10 because 24.11 is Node 24's first LTS release. Releases before it were the "Current" line, which we do not test.
What changes for users
engine-strictis set.enginesdoes not match. A Yarn 1 user on one of these Node versions can no longer installprisma.engines.Changes
engines.nodeis the range inprisma,@prisma/cliand@prisma/compute, and in the private@repo/cli-telemetryand@repo/cli-conformance.prismaand@prisma/cliREADMEs state the range in prose.package.json(contributors' Node) is^24.11.0 || >=26.0.0. The repo README, CONTRIBUTING and onboarding guide say "Node.js 24.11 or newer on the 24 line, or 26 or newer". Contributors stay on Node 24 or newer because the startup-isolation test cannot run on Node 22.scripts/node-engines.test.mjs, run bypnpm test:scripts. It fails if any package with anenginesfield declares a different range, or if a package gains or loses anenginesfield.@prisma/cli-enginekeeps>=22.12.0for now. Any change to its manifest needs a new engine version (scripts/check-engine-version.mjs).@prisma/composer-cliand@prisma/orm-toolchainpeer the engine at exactly0.7.0, so a new engine version would make the shell ship an engine they do not accept until both publish again. Users never install the engine on its own; it comes withprisma, which declares the narrower range. The test holds the engine's current value and fails when someone changes it, which reminds them to remove the exception.Testing
pnpm typecheck,pnpm lint,pnpm test:scripts, the@prisma/cli-engineunit tests and the@repo/cli-conformancetests pass.scripts/node-engines.test.mjsfails againstmainand passes on this branch.engines.nodeallows. Forprismaand@prisma/clithat stays Node 22.18. For@prisma/computeit moves from 22.12 to 22.18. I builtprisma,@prisma/cliand@prisma/computewith the old and the new manifests, and the output is byte-for-byte identical.node scripts/check-engine-version.mjs origin/mainexits 0 with "Engine version 0.7.0 is consistent with this change set." Nothing underpackages/cli-engine/changes.Alternatives considered
>=22.18.0. That keeps accepting Node 24.0 to 24.10, which we do not test, and keeps the CLI out of step with the projects create-prisma generates.0.8.0. That forces composer-cli and orm-toolchain to publish versions that peer0.8.0before the nextprismarelease can pass conformance, for a field users never see on the engine. The engine takes the range with its next real change instead.Agent: maui-32