Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ Changelog tracking starts at **v0.12.0**, the first release cut after this conve

<!-- New release entries go here, newest first, each mirroring docs/releases/v<version>.md under a `## v<version>` header. -->

## v8.0.0-rc.16

This release moves the toolchain to `@prisma/cli-engine` 0.6.3, which shares one ArkType copy with the Prisma ORM packages. With engine 0.6.2, a fresh Bun install could resolve two ArkType copies, and `prisma orm init` and `prisma contract emit` then failed on a valid contract. A `@default` that PSL refuses is now reported at the written value, with a message that says what to write instead.

The upgrade recipes for this hop: the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/) and the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). Each breaking change below names the change id to look for in them.

## Breaking changes

- **The toolchain requires `@prisma/cli-engine` 0.6.3.** A project or extension that pins `@prisma/cli-engine` itself must move the pin from `0.6.2` to `0.6.3`. The engine's commands and output do not change: its only change is that it accepts ArkType `^2.2.7` instead of exactly `2.2.3`. See `engine-pin-moves-to-0-6-3` in the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/) and the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30632](https://github.com/prisma/orm/pull/30632))

- **`@default` diagnostics point at the written value and say what to write.** `PSL_VALUE_TYPE_INCOMPATIBLE` and `PSL_INVALID_LITERAL` from `@default` now point at the written value, or at the list element they name, not at the whole attribute. A refusal starts with what to write instead: `count Int @default([1])` now reports `Expected a number; got a list`, where it reported `pg/int4 has no cast from a list; it casts from pg/int2`. A wrong argument to a default function, such as `@default(uuid(5))`, is reported at that argument. The codes do not change, and schemas and contracts do not change; only code that asserts a diagnostic's text or location must change. See `default-refusals-point-at-the-written-value`, `default-refusals-say-what-to-write` and `function-call-arguments-keep-their-diagnostics` in the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30539](https://github.com/prisma/orm/pull/30539))

- **Extension authors: the stack's data types travel as one `dataTypes` pair.** `ControlStack`, `ContractSourceContext`, the PSL interpreter inputs, `SqlPslBuildContext` and `DefaultMappingOptions` replace `dataTypeLookup` and `dataTypeEntries` with `dataTypes: DataTypeSupport`, and attribute spec contexts and `createBinder` take `dataTypes` too. `entryForTag`, `WrittenValue` and `DataTypeSupport` move to `@internal/framework-components/authoring`. A tagged literal's canonical value is its text: `parseJsonBody` is now `parseJsonText`, and `TaggedLiteralExprAst.body()` is now `text()`. See the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30539](https://github.com/prisma/orm/pull/30539))

## Fixes

- With Bun, `prisma orm init` and `prisma contract emit` no longer fail with `CONTRACT.VALIDATION_FAILED` on a valid contract. Engine 0.6.3 and the Prisma ORM packages now resolve one ArkType copy. ([#30632](https://github.com/prisma/orm/pull/30632))

## v8.0.0-rc.15

In this release, each column in a SQL contract names its data type, such as `pg/text`, in place of the type name the database prints. One script and `prisma db sign` upgrade a project. Codecs now check every value a contract stores, and a field's type in the contract matches its column. Custom collection classes keep their methods through the chain, and scopes let you share a piece of a query across models. The typed SQL builder can lock the rows a select reads. Middleware gains an `afterTransaction` stage, and the cache middleware gains invalidation. A hand-written migration can rename a table with `this.renameTable`. Lists can hold `null` elements. The PSL language server adds hover, go to definition and find references.
Expand Down
8 changes: 4 additions & 4 deletions apps/lsp-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lsp-playground",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"private": true,
"type": "module",
"description": "Private dev playground: opens a PSL file in a browser Monaco editor wired to the Prisma 8 language server for live diagnostics.",
Expand All @@ -24,7 +24,7 @@
"@codingame/monaco-vscode-textmate-service-override": "^25.1.2",
"@codingame/monaco-vscode-theme-defaults-default-extension": "^25.1.2",
"@codingame/monaco-vscode-theme-service-override": "^25.1.2",
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"monaco-editor": "^0.56.0",
"monaco-languageclient": "^10.7.0",
"vscode": "npm:@codingame/monaco-vscode-extension-api@^25.1.2",
Expand All @@ -35,8 +35,8 @@
"ws": "^8.21.2"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"@types/ws": "^8.5.13",
"puppeteer-core": "^25.4.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/telemetry-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telemetry-backend",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"private": true,
"type": "module",
"engines": {
Expand All @@ -22,16 +22,16 @@
"clean": "rm -rf dist coverage"
},
"dependencies": {
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"arktype": "catalog:",
"evlog": "^2.24.0"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@prisma/cli-engine": "0.6.3",
"@prisma/compute-sdk": "^0.43.0",
"@prisma/management-api-sdk": "^1.76.0",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/bun": "^1.2.18",
"@types/node": "catalog:",
"@types/pg": "catalog:",
Expand Down
17 changes: 17 additions & 0 deletions docs/releases/v8.0.0-rc.16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# v8.0.0-rc.16

This release moves the toolchain to `@prisma/cli-engine` 0.6.3, which shares one ArkType copy with the Prisma ORM packages. With engine 0.6.2, a fresh Bun install could resolve two ArkType copies, and `prisma orm init` and `prisma contract emit` then failed on a valid contract. A `@default` that PSL refuses is now reported at the written value, with a message that says what to write instead.

The upgrade recipes for this hop: the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/) and the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). Each breaking change below names the change id to look for in them.

## Breaking changes

- **The toolchain requires `@prisma/cli-engine` 0.6.3.** A project or extension that pins `@prisma/cli-engine` itself must move the pin from `0.6.2` to `0.6.3`. The engine's commands and output do not change: its only change is that it accepts ArkType `^2.2.7` instead of exactly `2.2.3`. See `engine-pin-moves-to-0-6-3` in the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/) and the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30632](https://github.com/prisma/orm/pull/30632))

- **`@default` diagnostics point at the written value and say what to write.** `PSL_VALUE_TYPE_INCOMPATIBLE` and `PSL_INVALID_LITERAL` from `@default` now point at the written value, or at the list element they name, not at the whole attribute. A refusal starts with what to write instead: `count Int @default([1])` now reports `Expected a number; got a list`, where it reported `pg/int4 has no cast from a list; it casts from pg/int2`. A wrong argument to a default function, such as `@default(uuid(5))`, is reported at that argument. The codes do not change, and schemas and contracts do not change; only code that asserts a diagnostic's text or location must change. See `default-refusals-point-at-the-written-value`, `default-refusals-say-what-to-write` and `function-call-arguments-keep-their-diagnostics` in the [app recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30539](https://github.com/prisma/orm/pull/30539))

- **Extension authors: the stack's data types travel as one `dataTypes` pair.** `ControlStack`, `ContractSourceContext`, the PSL interpreter inputs, `SqlPslBuildContext` and `DefaultMappingOptions` replace `dataTypeLookup` and `dataTypeEntries` with `dataTypes: DataTypeSupport`, and attribute spec contexts and `createBinder` take `dataTypes` too. `entryForTag`, `WrittenValue` and `DataTypeSupport` move to `@internal/framework-components/authoring`. A tagged literal's canonical value is its text: `parseJsonBody` is now `parseJsonText`, and `TaggedLiteralExprAst.body()` is now `text()`. See the [extension recipe](https://github.com/prisma/orm/blob/v8.0.0-rc.16/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.15-to-8.0.0-rc.16/). ([#30539](https://github.com/prisma/orm/pull/30539))

## Fixes

- With Bun, `prisma orm init` and `prisma contract emit` no longer fail with `CONTRACT.VALIDATION_FAILED` on a valid contract. Engine 0.6.3 and the Prisma ORM packages now resolve one ArkType copy. ([#30632](https://github.com/prisma/orm/pull/30632))
12 changes: 6 additions & 6 deletions examples/bundle-size/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bundle-size",
"private": true,
"type": "module",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"engines": {
"node": ">=24"
},
Expand All @@ -22,16 +22,16 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-mongo": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-mongo": "workspace:8.0.0-rc.16",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"mongodb": "catalog:",
"pg": "catalog:"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@prisma/cli-engine": "0.6.3",
"@prisma/dev": "catalog:",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@size-limit/file": "^12.1.0",
"@types/node": "catalog:",
"@types/pg": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions examples/bundle-size/src/mongo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "bundle-size-mongo",
"private": true,
"type": "module",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"description": "The Mongo half of the bundle-size example. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this example measures two databases that must not name each other's facade.",
"dependencies": {
"@prisma/orm-mongo": "workspace:8.0.0-rc.15"
"@prisma/orm-mongo": "workspace:8.0.0-rc.16"
}
}
4 changes: 2 additions & 2 deletions examples/bundle-size/src/postgres/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "bundle-size-postgres",
"private": true,
"type": "module",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"description": "The Postgres half of the bundle-size example. Its own manifest because emission reads the nearest one to decide which package names generated files import, and this example measures two databases that must not name each other's facade.",
"dependencies": {
"@prisma/orm-postgres": "workspace:8.0.0-rc.15"
"@prisma/orm-postgres": "workspace:8.0.0-rc.16"
}
}
8 changes: 4 additions & 4 deletions examples/mongo-blog-leaderboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-mongo": "workspace:8.0.0-rc.15",
"@prisma/orm-mongo": "workspace:8.0.0-rc.16",
"mongodb": "catalog:"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"mongodb-memory-server": "catalog:",
"tsx": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
12 changes: 6 additions & 6 deletions examples/mongo-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-extension-middleware-cache": "workspace:8.0.0-rc.15",
"@prisma/orm-mongo": "workspace:8.0.0-rc.15",
"@prisma/orm-extension-middleware-cache": "workspace:8.0.0-rc.16",
"@prisma/orm-mongo": "workspace:8.0.0-rc.16",
"mongodb": "catalog:",
"react": "^19.2.8",
"react-dom": "^19.2.8"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
Expand All @@ -38,5 +38,5 @@
"vite": "catalog:",
"vitest": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
10 changes: 5 additions & 5 deletions examples/multi-extension-monorepo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multi-extension-monorepo",
"version": "8.0.0-rc.15",
"version": "8.0.0-rc.16",
"private": true,
"type": "module",
"engines": {
Expand All @@ -15,12 +15,12 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-postgres": "workspace:8.0.0-rc.15"
"@prisma/orm-postgres": "workspace:8.0.0-rc.16"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
Expand Down
12 changes: 6 additions & 6 deletions examples/paradedb-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-extension-paradedb": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-extension-paradedb": "workspace:8.0.0-rc.16",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"arktype": "^2.2.2",
"dotenv": "^17.4.2",
"pg": "catalog:"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"@types/pg": "catalog:",
"tsx": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
8 changes: 4 additions & 4 deletions examples/prisma-8-cloudflare-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"arktype": "catalog:",
"pg": "catalog:",
"temporal-polyfill": "^1.0.4"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "0.20.3",
"@cloudflare/workers-types": "5.20260804.1",
"@prisma/cli-engine": "0.6.2",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"@types/pg": "catalog:",
"tsx": "catalog:",
"typescript": "catalog:",
"vitest": "^4.1.10",
"wrangler": "4.119.0"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
8 changes: 4 additions & 4 deletions examples/prisma-8-demo-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-sqlite": "workspace:8.0.0-rc.15",
"@prisma/orm-sqlite": "workspace:8.0.0-rc.16",
"arktype": "^2.2.2",
"dotenv": "^17.4.2"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/node": "catalog:",
"tsx": "catalog:",
"typescript": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
14 changes: 7 additions & 7 deletions examples/prisma-8-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-extension-middleware-cache": "workspace:8.0.0-rc.15",
"@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-extension-middleware-cache": "workspace:8.0.0-rc.16",
"@prisma/orm-extension-pgvector": "workspace:8.0.0-rc.16",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"arktype": "^2.2.2",
"dotenv": "^17.4.2",
"pg": "catalog:",
"react": "^19.2.8",
"react-dom": "^19.2.8"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@prisma/cli-engine": "0.6.3",
"@prisma/dev": "catalog:",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/node": "catalog:",
Expand All @@ -50,5 +50,5 @@
"vite": "catalog:",
"vitest": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
12 changes: 6 additions & 6 deletions examples/prisma-8-postgis-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"lint": "biome check . --error-on-warnings"
},
"dependencies": {
"@prisma/orm-extension-postgis": "workspace:8.0.0-rc.15",
"@prisma/orm-postgres": "workspace:8.0.0-rc.15",
"@prisma/orm-extension-postgis": "workspace:8.0.0-rc.16",
"@prisma/orm-postgres": "workspace:8.0.0-rc.16",
"arktype": "^2.2.2",
"dotenv": "^17.4.2",
"leaflet": "^1.9.4",
Expand All @@ -33,9 +33,9 @@
"react-leaflet": "^5.0.0"
},
"devDependencies": {
"@prisma/cli-engine": "0.6.2",
"@repo/test-utils": "workspace:8.0.0-rc.15",
"@repo/tsconfig": "workspace:8.0.0-rc.15",
"@prisma/cli-engine": "0.6.3",
"@repo/test-utils": "workspace:8.0.0-rc.16",
"@repo/tsconfig": "workspace:8.0.0-rc.16",
"@types/leaflet": "^1.9.22",
"@types/node": "catalog:",
"@types/pg": "catalog:",
Expand All @@ -45,5 +45,5 @@
"typescript": "catalog:",
"vitest": "catalog:"
},
"version": "8.0.0-rc.15"
"version": "8.0.0-rc.16"
}
Loading
Loading