Prisma 5.0.0 contains a lot of changes that improve Prisma’s performance, especially in serverless environments.
As this is a major release, it includes a few breaking changes that might affect a small group of our users. Before upgrading, we recommend that you check out our upgrade guide to understand the impact on your application.
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Highlights
Here’s a summary of the changes:
Preview features moved to General Availability
jsonProtocol: improves communication between Prisma Client and the query engine, makes Prisma faster by default.
fieldReference: adds support for comparing columns of the same table.
extendedWhereUnique: adds support for non-unique columns inside where clauses for queries that operate on unique records.
General improvements and breaking changes
Dependency version changes
Minimum Node.js version change to 16.13.0
Minimum TypeScript version change to 4.7
Minimum PostgreSQL version change to 9.6
Prisma Client embedded SQLite version upgrade to 3.41.2
Main Changes
Removal of rejectOnNotFound property
Removal of some array shortcuts
cockroachdb provider is now required when connecting to a CockroachDB database
Removed runtime/index.js from the generated Prisma Client
Other Changes
Removal of deprecated flags in the Prisma CLI
Removal of the beforeExit hook from the library engine
Removal of deprecated prisma2 executable
Removal of deprecated experimentalFeatures generator property in the Prisma schema
Renamed migration-engine to schema-engine
A JSON-based protocol that improves Prisma’s performance
We’re thrilled to announce that the jsonProtocol Preview feature is now Generally Available. You can now remove the Preview feature flag from your schema after upgrading. We made the JSON-based wire protocol the default protocol used for communication between Prisma Client and the query engine.
We introduced this feature in version 4.11.0 to improve Prisma’s performance. Previously, Prisma used a GraphQL-like protocol to communicate between Prisma Client and the query engine. Applications with larger schemas had higher CPU and memory consumption compared to smaller schemas which created a performance bottleneck.
The JSON-based wire protocol improves efficiency when Prisma Client is communicating with the query engine.
Removal of array shortcuts
We took the opportunity to remove some array shortcuts to make our typings more consistent and logical. These shortcuts were a way to add a single element as a value to an array-based operator instead of wrapping a single element in an array. We will now require array values for the following:
OR operator shortcuts
in and notIn operator shortcuts
PostgreSQL JSON path field shortcut
... (truncated)
Commits
5bbad1e fix(generators): Do not force install of package manager when using ni (#19959)
8d51b1c chore(deps): update engines to 4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f199...
1b17f29 chore(deps): update engines to 4.17.0-25.5f09abedf63bf38cdf856d38d49c0699b1f0...
d185fba chore: renamed "@prisma/prisma-schema-wasm"'s version for consistency (#20106)
44b58d4 chore(client, cli): add --accelerate alias for --data-proxy (#20100)
11ec890 chore(deps): update engines to 4.17.0-24.e992c91512a236fad14c1961a7e0cb10f43f...
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps @prisma/internals from 4.13.0 to 5.0.0.
Release notes
Sourced from
@prisma/internals
's releases.... (truncated)
Commits
5bbad1e
fix(generators): Do not force install of package manager when using ni (#19959)8d51b1c
chore(deps): update engines to 4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f199...1b17f29
chore(deps): update engines to 4.17.0-25.5f09abedf63bf38cdf856d38d49c0699b1f0...d185fba
chore: renamed "@prisma/prisma-schema-wasm
"'s version for consistency (#20106)44b58d4
chore(client, cli): add --accelerate alias for --data-proxy (#20100)11ec890
chore(deps): update engines to 4.17.0-24.e992c91512a236fad14c1961a7e0cb10f43f...4c2469e
chore(deps): update definitelytyped (#19744)36dc8bd
chore(deps): update engines to 4.17.0-22.eac90b24528fc540a7549eac798e4fde23cb...305d64d
fix(internals): vercel pkg resolveBinary on Windows (#20072)4faeccc
chore(deps): update engines to 4.17.0-21.a6324410622b51700b1f574eeca057c71b1a...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)