From 53f2d5096e89c893274a8237b082a63b0074c991 Mon Sep 17 00:00:00 2001 From: willbot Date: Fri, 9 Oct 2026 11:11:14 +0200 Subject: [PATCH 1/2] fix: support one Node.js range, ^22.18.0 || ^24.11.0 || >=26.0.0 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 Signed-off-by: Will Madden --- CONTRIBUTING.md | 7 ++-- README.md | 2 +- docs/onboarding/getting-started.md | 2 +- package.json | 4 +-- packages/cli-conformance/package.json | 2 +- packages/cli-engine/tests/config.test.ts | 2 +- packages/cli-telemetry/package.json | 2 +- packages/cli/README.md | 2 +- packages/cli/package.json | 2 +- packages/compute/package.json | 2 +- packages/prisma/README.md | 2 +- packages/prisma/package.json | 2 +- scripts/node-engines.test.mjs | 44 ++++++++++++++++++++++++ 13 files changed, 58 insertions(+), 17 deletions(-) create mode 100644 scripts/node-engines.test.mjs diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d98e10e5..b5d02e67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,13 +10,10 @@ is unclear, update the relevant product doc before changing the command surface. Requirements: -- Node.js 24 or newer +- Node.js 24.11 or newer on the 24 line, or 26 or newer - pnpm 10 -Published `@prisma/cli` declares a lower floor (Node 22.18, matching -`@prisma/composer`), and composer runs fine there. The repo develops and tests -on 24 because the startup-isolation probe cannot run on Node 22; the reason is -recorded in `packages/cli/tests/composer-isolation.test.ts`. +Published packages support Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (`engines.node` is `^22.18.0 || ^24.11.0 || >=26.0.0`, the same range as create-prisma and the projects it generates). The repo develops and tests on 24 because the startup-isolation probe cannot run on Node 22; the reason is recorded in `packages/cli/tests/composer-isolation.test.ts`. Install dependencies: diff --git a/README.md b/README.md index 0e121237..e1b110ae 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Deployments start from pushing the connected repository, the Console, or `prisma Requirements: -- Node.js 24 or newer +- Node.js 24.11 or newer on the 24 line, or 26 or newer - pnpm 10+ Install dependencies: diff --git a/docs/onboarding/getting-started.md b/docs/onboarding/getting-started.md index d135f13d..edcba4ab 100644 --- a/docs/onboarding/getting-started.md +++ b/docs/onboarding/getting-started.md @@ -4,7 +4,7 @@ This guide gets a local checkout ready for CLI development. ## Requirements -- Node.js 24 or newer +- Node.js 24.11 or newer on the 24 line, or 26 or newer - pnpm 10 ## Install diff --git a/package.json b/package.json index d23210fb..aa7555b0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "8.0.0-rc.22", "private": true, "engines": { - "node": ">=24" + "node": "^24.11.0 || >=26.0.0" }, "packageManager": "pnpm@11.6.0", "scripts": { @@ -18,7 +18,7 @@ "lint:fix": "biome check . --write", "bump-version": "node scripts/bump-version.ts", "test": "turbo run test", - "test:scripts": "node --test scripts/determine-version-utils.test.ts scripts/set-version-utils.test.ts scripts/bump-cli-engine-version-utils.test.ts scripts/resolve-package-version.test.mjs scripts/update-product-versions.test.mjs scripts/verify-published.test.mjs", + "test:scripts": "node --test scripts/determine-version-utils.test.ts scripts/set-version-utils.test.ts scripts/bump-cli-engine-version-utils.test.ts scripts/resolve-package-version.test.mjs scripts/update-product-versions.test.mjs scripts/verify-published.test.mjs scripts/node-engines.test.mjs", "typecheck": "turbo run typecheck", "prisma-cli": "tsx packages/cli/src/bin.ts", "prisma": "tsx packages/cli/src/bin.ts", diff --git a/packages/cli-conformance/package.json b/packages/cli-conformance/package.json index dbfe2094..8f0889bf 100644 --- a/packages/cli-conformance/package.json +++ b/packages/cli-conformance/package.json @@ -16,7 +16,7 @@ "./tarball-io": "./src/tarball-io.ts" }, "engines": { - "node": ">=22.12.0" + "node": "^22.18.0 || ^24.11.0 || >=26.0.0" }, "license": "Apache-2.0", "scripts": { diff --git a/packages/cli-engine/tests/config.test.ts b/packages/cli-engine/tests/config.test.ts index 1b7fd61c..9ab4fcaa 100644 --- a/packages/cli-engine/tests/config.test.ts +++ b/packages/cli-engine/tests/config.test.ts @@ -1123,7 +1123,7 @@ export default definePrismaConfig({ `, [], ); - // Which error a Node in our supported range (>=22.12.0) reports for + // Which error a Node in our supported range reports for // TypeScript it cannot strip varies by version, so this asserts only // that the direct import failed. What the test is for is the pair: // the direct import fails where loadConfig, below, succeeds. diff --git a/packages/cli-telemetry/package.json b/packages/cli-telemetry/package.json index f8c90e3f..a75c9ace 100644 --- a/packages/cli-telemetry/package.json +++ b/packages/cli-telemetry/package.json @@ -23,7 +23,7 @@ "dist" ], "engines": { - "node": ">=22.12.0" + "node": "^22.18.0 || ^24.11.0 || >=26.0.0" }, "license": "Apache-2.0", "scripts": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 10810fb7..50301f8b 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -102,7 +102,7 @@ npx prisma-cli service version promote VERSION_ID ## Beta notes -- Requires Node.js 22.18 or newer. +- Requires Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. - This is a release-candidate package and may change quickly. - The 8.0.0 release candidates publish as `@prisma/cli` on the `next` dist-tag. - The package binary is `prisma-cli`; the sibling `prisma` package ships the same CLI under the `prisma` binary. diff --git a/packages/cli/package.json b/packages/cli/package.json index f6266766..6a88750b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,7 +19,7 @@ "access": "public" }, "engines": { - "node": ">=22.18.0" + "node": "^22.18.0 || ^24.11.0 || >=26.0.0" }, "keywords": [ "prisma", diff --git a/packages/compute/package.json b/packages/compute/package.json index a4e984f0..3bdd130d 100644 --- a/packages/compute/package.json +++ b/packages/compute/package.json @@ -18,7 +18,7 @@ "access": "public" }, "engines": { - "node": ">=22.12.0" + "node": "^22.18.0 || ^24.11.0 || >=26.0.0" }, "keywords": [ "prisma", diff --git a/packages/prisma/README.md b/packages/prisma/README.md index 82760de7..415525e5 100644 --- a/packages/prisma/README.md +++ b/packages/prisma/README.md @@ -99,7 +99,7 @@ npx prisma service version promote VERSION_ID ## Beta notes -- Requires Node.js 22.18 or newer. +- Requires Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. - This is a release-candidate package and may change quickly. - The 8.0.0 release candidates publish as `prisma` on the `next` dist-tag. - The package binary is `prisma`. diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 71151f63..e9298dba 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -23,7 +23,7 @@ "access": "public" }, "engines": { - "node": ">=22.18.0" + "node": "^22.18.0 || ^24.11.0 || >=26.0.0" }, "keywords": [ "prisma", diff --git a/scripts/node-engines.test.mjs b/scripts/node-engines.test.mjs new file mode 100644 index 00000000..09191c7b --- /dev/null +++ b/scripts/node-engines.test.mjs @@ -0,0 +1,44 @@ +import assert from "node:assert/strict"; +import { readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; +import { describe, it } from "node:test"; + +const SUPPORTED_NODE_RANGE = "^22.18.0 || ^24.11.0 || >=26.0.0"; +// Changing the engine's manifest requires a new engine version, which the +// product CLIs then have to peer before the shell can ship it. The engine +// takes the range with its next real change; delete this entry then. +const RANGE_BEFORE_NEXT_ENGINE_RELEASE = { + "@prisma/cli-engine": ">=22.12.0", +}; +const packagesDir = join(import.meta.dirname, "..", "packages"); + +const runtimePackages = readdirSync(packagesDir, { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map((entry) => + JSON.parse( + readFileSync(join(packagesDir, entry.name, "package.json"), "utf8"), + ), + ) + .filter((manifest) => manifest.engines !== undefined); + +describe("engines.node", () => { + it("covers every package that ships runtime code", () => { + assert.deepEqual(runtimePackages.map((manifest) => manifest.name).sort(), [ + "@prisma/cli", + "@prisma/cli-engine", + "@prisma/compute", + "@repo/cli-conformance", + "@repo/cli-telemetry", + "prisma", + ]); + }); + + for (const manifest of runtimePackages) { + it(`is the supported range in ${manifest.name}`, () => { + assert.equal( + manifest.engines.node, + RANGE_BEFORE_NEXT_ENGINE_RELEASE[manifest.name] ?? SUPPORTED_NODE_RANGE, + ); + }); + } +}); From 451bd0a3f2d4efa20b953da3bac301768ffe80a9 Mon Sep 17 00:00:00 2001 From: willbot Date: Fri, 9 Oct 2026 11:15:50 +0200 Subject: [PATCH 2/2] fix: leave the engine untouched, and skip package folders without a manifest 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 Signed-off-by: Will Madden --- CONTRIBUTING.md | 2 +- packages/cli-engine/tests/config.test.ts | 2 +- scripts/node-engines.test.mjs | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5d02e67..3fee1be2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ Requirements: - Node.js 24.11 or newer on the 24 line, or 26 or newer - pnpm 10 -Published packages support Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (`engines.node` is `^22.18.0 || ^24.11.0 || >=26.0.0`, the same range as create-prisma and the projects it generates). The repo develops and tests on 24 because the startup-isolation probe cannot run on Node 22; the reason is recorded in `packages/cli/tests/composer-isolation.test.ts`. +Published packages support Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer (`engines.node` is `^22.18.0 || ^24.11.0 || >=26.0.0`, the same range as create-prisma and the projects it generates). The exception is `@prisma/cli-engine`, which keeps its own wider range until its next version; users never install it on its own. The repo develops and tests on 24 because the startup-isolation probe cannot run on Node 22; the reason is recorded in `packages/cli/tests/composer-isolation.test.ts`. Install dependencies: diff --git a/packages/cli-engine/tests/config.test.ts b/packages/cli-engine/tests/config.test.ts index 9ab4fcaa..1b7fd61c 100644 --- a/packages/cli-engine/tests/config.test.ts +++ b/packages/cli-engine/tests/config.test.ts @@ -1123,7 +1123,7 @@ export default definePrismaConfig({ `, [], ); - // Which error a Node in our supported range reports for + // Which error a Node in our supported range (>=22.12.0) reports for // TypeScript it cannot strip varies by version, so this asserts only // that the direct import failed. What the test is for is the pair: // the direct import fails where loadConfig, below, succeeds. diff --git a/scripts/node-engines.test.mjs b/scripts/node-engines.test.mjs index 09191c7b..c804622a 100644 --- a/scripts/node-engines.test.mjs +++ b/scripts/node-engines.test.mjs @@ -1,5 +1,5 @@ import assert from "node:assert/strict"; -import { readdirSync, readFileSync } from "node:fs"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; import { join } from "node:path"; import { describe, it } from "node:test"; @@ -14,11 +14,9 @@ const packagesDir = join(import.meta.dirname, "..", "packages"); const runtimePackages = readdirSync(packagesDir, { withFileTypes: true }) .filter((entry) => entry.isDirectory()) - .map((entry) => - JSON.parse( - readFileSync(join(packagesDir, entry.name, "package.json"), "utf8"), - ), - ) + .map((entry) => join(packagesDir, entry.name, "package.json")) + .filter((manifestPath) => existsSync(manifestPath)) + .map((manifestPath) => JSON.parse(readFileSync(manifestPath, "utf8"))) .filter((manifest) => manifest.engines !== undefined); describe("engines.node", () => {