TML-1810/TML-1809: Establish version support policy (Node 24, TS 5.9, PG 17, Mongo 8.0)#659
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (72)
📝 WalkthroughWalkthroughThis PR introduces an explicit version support policy for Prisma Next with minimum requirements enforced across the workspace: Node.js >=24, TypeScript >=5.9, PostgreSQL 17, and MongoDB 8.0. It includes policy documentation (ADR 222 and Supported Versions guide), a new validation script to enforce TypeScript peer dependency consistency, updates to nearly all package manifests, and infrastructure adjustments. ChangesVersion Support Policy & Enforcement
🎯 4 (Complex) | ⏱️ ~45 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@prisma-next/extension-author-tools
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/extension-arktype-json
@prisma-next/middleware-cache
@prisma-next/mongo
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/extension-postgis
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/ts-render
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/cli-telemetry
@prisma-next/emitter
@prisma-next/migration-tools
prisma-next
@prisma-next/vite-plugin-contract-emit
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-query-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
size-limit report 📦
|
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/2-mongo-family/9-family/package.json (1)
1-65:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
engines.node(>=24) to this publishable package
packages/2-mongo-family/9-family/package.jsonis missing anenginesfield (and specificallyengines.node: ">=24"). A repo-wide scan shows multiple publishable package.json files have the same omission, including this one.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/9-family/package.json` around lines 1 - 65, The package.json for the Mongo family package is missing an engines field; add an "engines" object with "node": ">=24" at the package root (i.e., update the package manifest represented in this diff to include "engines": { "node": ">=24" }); ensure the change is applied to the top-level package.json for `@prisma-next/family-mongo` so publishing tools and consumers enforce Node >=24.packages/2-mongo-family/1-foundation/mongo-contract/package.json (1)
1-56:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winAdd
engines.node >=24to@prisma-next/mongo-contractpackage.json
packages/2-mongo-family/1-foundation/mongo-contract/package.jsonis missing theengines.nodefield (jq check reports it as absent). Per the PR objectives for all publishable packages, it needsengines.nodeset to>=24.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/1-foundation/mongo-contract/package.json` around lines 1 - 56, The package.json for `@prisma-next/mongo-contract` is missing the engines.node field; add an "engines" object with "node": ">=24" to packages/2-mongo-family/1-foundation/mongo-contract/package.json (ensure the engines.node entry is present alongside existing fields like name, version, and exports so the package manifest meets the publishable-package jq check).packages/3-extensions/sqlite/package.json (1)
1-72:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd
engines.node(>=24) to@prisma-next/sqlite
packages/3-extensions/sqlite/package.jsonis missing theengines/engines.nodefield, so it doesn’t satisfy the requirement that all publishable packages setengines.nodeto>=24.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/3-extensions/sqlite/package.json` around lines 1 - 72, The package `@prisma-next/sqlite` package.json is missing an engines field; add an "engines" object with "node": ">=24" at the top-level of packages/3-extensions/sqlite/package.json (next to "type" or "license") so the file contains "engines": { "node": ">=24" } to satisfy the publishable-package requirement.
♻️ Duplicate comments (4)
packages/2-mongo-family/3-tooling/emitter/package.json (1)
1-56:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMissing
engines.nodefield for version policy enforcement.This publishable package lacks an
engines.nodedeclaration. Per the PR objective, it should declareengines.node: ">=24".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/3-tooling/emitter/package.json` around lines 1 - 56, The package.json for `@prisma-next/mongo-emitter` is missing the required engines.node field; add an "engines": { "node": ">=24" } entry to the top-level JSON in this package.json so the package declares Node >=24 for version policy enforcement (update the package.json object that currently contains "name", "version", etc., by inserting the engines.node property).packages/3-extensions/arktype-json/package.json (1)
1-62:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMissing
engines.nodefield for version policy enforcement.This publishable package lacks an
engines.nodedeclaration. Per the PR objective, it should declareengines.node: ">=24".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/3-extensions/arktype-json/package.json` around lines 1 - 62, The package.json for `@prisma-next/extension-arktype-json` is missing an engines.node declaration required by the version policy; update the package manifest (the JSON object in package.json for the package with "name": "`@prisma-next/extension-arktype-json`") to include an "engines" field with "node": ">=24" so the package enforces Node >=24 at publish time.packages/2-mongo-family/2-authoring/contract-psl/package.json (1)
1-56:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMissing
engines.nodefield for version policy enforcement.This publishable package lacks an
engines.nodedeclaration. Per the PR objective ("engines.node on every publishable package"), add:"engines": { "node": ">=24" }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/2-authoring/contract-psl/package.json` around lines 1 - 56, The package.json for `@prisma-next/mongo-contract-psl` is missing the top-level engines.node field required by the repo policy; edit the package.json (the JSON object containing "name": "`@prisma-next/mongo-contract-psl`" and "version": "0.11.0") and add an "engines" entry with "node": ">=24" at the top level so the file includes the required engines.node declaration for publishing.packages/2-mongo-family/1-foundation/mongo-codec/package.json (1)
1-53:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMissing
engines.nodefield for version policy enforcement.This publishable package lacks an
engines.nodedeclaration. Per the PR objective, it should declareengines.node: ">=24".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/2-mongo-family/1-foundation/mongo-codec/package.json` around lines 1 - 53, The package.json for `@prisma-next/mongo-codec` is missing the engines.node declaration required by our version policy; open the package.json and add an "engines" object with "node": ">=24" at the root (i.e., add "engines": { "node": ">=24" }) so the package declares the minimum Node.js version; update the file where "name": "`@prisma-next/mongo-codec`" and other top-level keys are defined.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/1-framework/1-core/framework-components/package.json`:
- Around line 30-37: This package.json is missing the engines field required to
enforce Node.js 24; add an "engines" object with "node": ">=24" to this
package.json (it’s a publishable package because it already has files, exports,
and repository fields) so the package declares Node >=24 for consumers and
aligns with tsdown's Node 24 requirement.
In `@packages/1-framework/3-tooling/cli/package.json`:
- Around line 7-9: Add a top-level "engines" field to the `@prisma-next/cli`
package.json declaring Node >=24; specifically, edit the package.json that
contains the "bin": { "prisma-next": "./dist/cli.js" } entry and add "engines":
{ "node": ">=24" } at the root so the package (identified as `@prisma-next/cli`)
enforces Node 24+ for publishing and runtime.
In `@packages/2-mongo-family/6-transport/mongo-lowering/package.json`:
- Around line 30-37: Add an "engines" entry to this package.json specifying
Node.js >=24 to satisfy the version support policy: insert an "engines": {
"node": ">=24" } object in the package.json (e.g., adjacent to the existing
"peerDependencies" / "peerDependenciesMeta" section) so the package declares the
required Node version.
In `@packages/2-mongo-family/6-transport/mongo-wire/package.json`:
- Around line 29-36: Add an "engines" field to this package's package.json
specifying Node >=24 to satisfy the version support policy; update the
package.json object (near the existing "peerDependencies"/"peerDependenciesMeta"
entries) by adding an "engines" key with "node": ">=24" so the package
advertises the required Node.js runtime.
In `@packages/2-mongo-family/7-runtime/package.json`:
- Around line 44-51: Add the required Node engine constraint to package.json by
adding an "engines" object with "node": ">=24"; locate the package.json that
currently contains "peerDependencies" and "peerDependenciesMeta" and insert the
"engines": { "node": ">=24" } entry at the top level so the manifest explicitly
declares Node.js >=24 compatibility (ensure format matches existing JSON
structure and commas are adjusted accordingly).
In `@packages/2-sql/2-authoring/contract-psl/package.json`:
- Around line 38-45: The package.json is missing the required Node engine
declaration; add an "engines" entry specifying Node >=24 to the JSON for this
publishable package (e.g., insert "engines": { "node": ">=24" }) so the package
meets the version support policy and aligns with the existing
peerDependencies/peerDependenciesMeta settings.
In `@packages/2-sql/9-family/package.json`:
- Around line 44-51: The package.json is missing the required engines.node
constraint; add an "engines" top-level field with "node": ">=24" (e.g., insert
"engines": { "node": ">=24" }) alongside the existing
peerDependencies/peerDependenciesMeta so the package explicitly declares Node.js
24+ support.
In `@packages/3-extensions/pgvector/package.json`:
- Around line 46-56: The package.json is missing the required engines field
specifying Node 24+; add an "engines" object with "node": ">=24" to the
package.json at the root of this package (next to
"peerDependencies"/"peerDependenciesMeta") so the package declares Node >=24
support as required by the version support policy.
---
Outside diff comments:
In `@packages/2-mongo-family/1-foundation/mongo-contract/package.json`:
- Around line 1-56: The package.json for `@prisma-next/mongo-contract` is missing
the engines.node field; add an "engines" object with "node": ">=24" to
packages/2-mongo-family/1-foundation/mongo-contract/package.json (ensure the
engines.node entry is present alongside existing fields like name, version, and
exports so the package manifest meets the publishable-package jq check).
In `@packages/2-mongo-family/9-family/package.json`:
- Around line 1-65: The package.json for the Mongo family package is missing an
engines field; add an "engines" object with "node": ">=24" at the package root
(i.e., update the package manifest represented in this diff to include
"engines": { "node": ">=24" }); ensure the change is applied to the top-level
package.json for `@prisma-next/family-mongo` so publishing tools and consumers
enforce Node >=24.
In `@packages/3-extensions/sqlite/package.json`:
- Around line 1-72: The package `@prisma-next/sqlite` package.json is missing an
engines field; add an "engines" object with "node": ">=24" at the top-level of
packages/3-extensions/sqlite/package.json (next to "type" or "license") so the
file contains "engines": { "node": ">=24" } to satisfy the publishable-package
requirement.
---
Duplicate comments:
In `@packages/2-mongo-family/1-foundation/mongo-codec/package.json`:
- Around line 1-53: The package.json for `@prisma-next/mongo-codec` is missing the
engines.node declaration required by our version policy; open the package.json
and add an "engines" object with "node": ">=24" at the root (i.e., add
"engines": { "node": ">=24" }) so the package declares the minimum Node.js
version; update the file where "name": "`@prisma-next/mongo-codec`" and other
top-level keys are defined.
In `@packages/2-mongo-family/2-authoring/contract-psl/package.json`:
- Around line 1-56: The package.json for `@prisma-next/mongo-contract-psl` is
missing the top-level engines.node field required by the repo policy; edit the
package.json (the JSON object containing "name":
"`@prisma-next/mongo-contract-psl`" and "version": "0.11.0") and add an "engines"
entry with "node": ">=24" at the top level so the file includes the required
engines.node declaration for publishing.
In `@packages/2-mongo-family/3-tooling/emitter/package.json`:
- Around line 1-56: The package.json for `@prisma-next/mongo-emitter` is missing
the required engines.node field; add an "engines": { "node": ">=24" } entry to
the top-level JSON in this package.json so the package declares Node >=24 for
version policy enforcement (update the package.json object that currently
contains "name", "version", etc., by inserting the engines.node property).
In `@packages/3-extensions/arktype-json/package.json`:
- Around line 1-62: The package.json for `@prisma-next/extension-arktype-json` is
missing an engines.node declaration required by the version policy; update the
package manifest (the JSON object in package.json for the package with "name":
"`@prisma-next/extension-arktype-json`") to include an "engines" field with
"node": ">=24" so the package enforces Node >=24 at publish time.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: e354ee36-02bc-49a1-805d-e912025bfc48
⛔ Files ignored due to path filters (2)
packages/1-framework/3-tooling/cli/test/commands/init/__snapshots__/templates.test.ts.snapis excluded by!**/*.snappnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (72)
docker-compose.yamldocs/README.mddocs/Supported Versions.mddocs/architecture docs/adrs/ADR 222 - Version support policy.mdpackage.jsonpackages/0-config/tsdown/README.mdpackages/0-shared/extension-author-tools/package.jsonpackages/1-framework/0-foundation/contract/package.jsonpackages/1-framework/0-foundation/utils/package.jsonpackages/1-framework/1-core/config/package.jsonpackages/1-framework/1-core/errors/package.jsonpackages/1-framework/1-core/framework-components/package.jsonpackages/1-framework/1-core/operations/package.jsonpackages/1-framework/1-core/ts-render/package.jsonpackages/1-framework/2-authoring/contract/package.jsonpackages/1-framework/2-authoring/ids/package.jsonpackages/1-framework/2-authoring/psl-parser/package.jsonpackages/1-framework/2-authoring/psl-printer/package.jsonpackages/1-framework/3-tooling/cli-telemetry/package.jsonpackages/1-framework/3-tooling/cli/package.jsonpackages/1-framework/3-tooling/cli/src/commands/init/templates/env.tspackages/1-framework/3-tooling/cli/test/commands/init/templates/tsconfig-env.test.tspackages/1-framework/3-tooling/emitter/package.jsonpackages/1-framework/3-tooling/migration/package.jsonpackages/1-framework/3-tooling/prisma-next/package.jsonpackages/1-framework/3-tooling/vite-plugin-contract-emit/package.jsonpackages/2-mongo-family/1-foundation/mongo-codec/package.jsonpackages/2-mongo-family/1-foundation/mongo-contract/package.jsonpackages/2-mongo-family/1-foundation/mongo-value/package.jsonpackages/2-mongo-family/2-authoring/contract-psl/package.jsonpackages/2-mongo-family/2-authoring/contract-ts/package.jsonpackages/2-mongo-family/3-tooling/emitter/package.jsonpackages/2-mongo-family/3-tooling/mongo-schema-ir/package.jsonpackages/2-mongo-family/4-query/query-ast/package.jsonpackages/2-mongo-family/5-query-builders/orm/package.jsonpackages/2-mongo-family/5-query-builders/query-builder/package.jsonpackages/2-mongo-family/6-transport/mongo-lowering/package.jsonpackages/2-mongo-family/6-transport/mongo-wire/package.jsonpackages/2-mongo-family/7-runtime/package.jsonpackages/2-mongo-family/9-family/package.jsonpackages/2-sql/1-core/contract/package.jsonpackages/2-sql/1-core/errors/package.jsonpackages/2-sql/1-core/operations/package.jsonpackages/2-sql/1-core/schema-ir/package.jsonpackages/2-sql/2-authoring/contract-psl/package.jsonpackages/2-sql/2-authoring/contract-ts/package.jsonpackages/2-sql/3-tooling/emitter/package.jsonpackages/2-sql/4-lanes/query-builder/package.jsonpackages/2-sql/4-lanes/relational-core/package.jsonpackages/2-sql/4-lanes/sql-builder/package.jsonpackages/2-sql/5-runtime/package.jsonpackages/2-sql/9-family/package.jsonpackages/3-extensions/arktype-json/package.jsonpackages/3-extensions/middleware-cache/package.jsonpackages/3-extensions/mongo/package.jsonpackages/3-extensions/paradedb/package.jsonpackages/3-extensions/pgvector/package.jsonpackages/3-extensions/postgis/package.jsonpackages/3-extensions/postgres/package.jsonpackages/3-extensions/sql-orm-client/package.jsonpackages/3-extensions/sqlite/package.jsonpackages/3-mongo-target/1-mongo-target/package.jsonpackages/3-mongo-target/2-mongo-adapter/package.jsonpackages/3-mongo-target/3-mongo-driver/package.jsonpackages/3-targets/3-targets/postgres/package.jsonpackages/3-targets/3-targets/sqlite/package.jsonpackages/3-targets/6-adapters/postgres/package.jsonpackages/3-targets/6-adapters/sqlite/package.jsonpackages/3-targets/7-drivers/postgres/package.jsonpackages/3-targets/7-drivers/sqlite/package.jsonscripts/validate-typescript-peer.mjsscripts/validate-typescript-peer.test.mjs
…peScript, DB floors - Bump engines.node from >=20 to >=24 on 16 publishable packages that were behind the root; all 62 now declare >=24 uniformly. tsdown infers its JS output target from this field, so the bump is load-bearing, not advisory. - Add optional typescript peer dependency (>=5.9) to every publishable package. Optional because TypeScript is a dev-time tool — plain-JS consumers must not be forced to install it. - Add scripts/validate-typescript-peer.mjs: source-of-truth constant MIN_TYPESCRIPT_PEER and lint gate that asserts every publishable package declares it. Wired into pnpm lint:manifests and pnpm test:scripts. - Update target packages minServerVersion: postgres 14->17, mongo 6.0->8.0. MMS 11.1.0 (catalog-pinned) downloads MongoDB 8.2.x by default, so the mongo 8.0 floor is honest. Signed-off-by: Will Madden <madden@prisma.io>
…c, and align test infra - Add ADR 222 documenting the version support policy and its enforcement. - Add docs/Supported Versions.md: user-facing reference for all version floors (Node >=24, TypeScript >=5.9, PostgreSQL >=17, MongoDB >=8.0, Bun >=1.2, Deno >=2.0, ESM-only, required tsconfig options). - Link docs/Supported Versions.md from docs/README.md. - Bump docker-compose.yaml Postgres image to 17-alpine so CI test infra matches the declared floor. Signed-off-by: Will Madden <madden@prisma.io>
…comment Signed-off-by: Will Madden <madden@prisma.io>
…kages The initial commit added engines.node to the 16 packages that already declared it (bumping >=20 → >=24), but omitted it from the 46 packages that had no engines field. Every publishable package now uniformly declares engines.node >=24, matching the stated policy goal. Signed-off-by: Will Madden <madden@prisma.io>
3945e1c to
460bd66
Compare
What
Establishes a single, ratified version support policy for Prisma Next and removes existing drift. Closes TML-1810 (minimum TypeScript) and TML-1809 (minimum Node/Bun/Deno), expanded to cover MongoDB, PostgreSQL, and other environmental dependencies.
Recorded as ADR 222 — Version support policy.
The decision
Governing principle: the supported floor for each dependency is the latest GA release we test against. We raise floors freely and only lower them on a concrete user need. Lowering a floor is backwards-compatible; raising one is not — so starting aggressive costs nothing and we can relax later.
>=20(16 pkgs) />=24(root)>=24(all)engines.nodeon every publishable package>=5.9peerDependencies.typescripton all 62 + source-of-truth constant + drift lint1417prismaNext.minServerVersion+ CLI mirror + test docker image6.08.0prismaNext.minServerVersion+ CLI mirror (MMS 11.x runs 8.2.x)>=1.2/>=2.0Why these floors
tsdowninfers the JS output target fromengines.node, so the prior>=20/>=24drift produced inconsistent emit.docker-composePostgres image,mongodb-memory-server), so we never claim more than we test.Drift protection
Both axes are guarded so the floors can't silently fragment again:
pnpm lint:manifestsrunsscripts/validate-typescript-peer.mjs— fails if any publishable package'stypescriptpeer ≠MIN_TYPESCRIPT_PEER.MIN_SERVER_VERSIONdrift test continues to assert the CLI mirror matches each target package'sprismaNext.minServerVersion.Scope
User-facing surfaces (
prisma-next init.env.example, the generatedprisma-next.mdRequirements block, and the newdocs/Supported Versions.md) now reflect the accurate floors. No driver-major bumps were needed (themongodbv7 driver supports server 8.0).Verification
pnpm build✅ ·pnpm typecheck(135/135) ✅ ·pnpm lint:manifests✅ · TS-peer drift test (15/15) ✅ · CLI server-version drift test (23/23) ✅ ·pnpm test:scripts(585/585) ✅pnpm test:integrationnot run locally (needs Docker services) — will run in CI. Two CLI timeout tests (version.test.ts,removed-verb-redirects.test.ts) are pre-existing failures reproduced onmainbefore this branch, unrelated to this change.Summary by CodeRabbit
Documentation
Updated Minimum Requirements
Tooling