fix(deps): update prisma monorepo to v5.1.0 #9001
Merged
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.
This PR contains the following updates:
5.0.0
->5.1.0
5.0.0
->5.1.0
5.0.0
->5.1.0
Release Notes
prisma/prisma (@prisma/client)
v5.1.0
Compare Source
Today, we are excited to share the
5.1.0
stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
Highlights
After two big releases where we released Client extensions for production usage (
4.16.0
) and made Prisma faster by default (5.0.0
), we have focused on some smaller issues to make the experience with these new features even better.Community contributions
Our community has been on the roll! We appreciate everyone who helps us by opening a GitHub issue or proposing a fix via Pull Requests. In this release, we're excited to highlight multiple community contributions:
PrismaAction
type, missingfindUniqueOrThrow
andfindFirstOrThrow
https://github.com/prisma/prisma/pull/17471 by @mejiaej and missinggroupBy
https://github.com/prisma/prisma/pull/19985 by @iurylippoBetter performance: Fewer SQL queries on PostgreSQL & CockroachDB
In our continued and ongoing work to make Prisma faster, we identified some Prisma Client queries that led to multiple SQL statements being executed — although in specific databases, that was not necessary.
Hence we optimized our internal SQL generation for PostgreSQL and CockroachDB to generate more efficient SQL queries:
Simple
create
queryIn a simple
create
query,RETURNING
makes the second query and the transaction statements obsolete:Prisma Client query
Before v5.1.0
5.1.0 and later
Simple
update
queryFor a simple
update
query,RETURNING
makes both additional queries and the transaction statements obsolete:Prisma Client query
Before v5.1.0
5.1.0 and later
Simple
update
query, return with relation valueOne
SELECT
query could easily be dropped in a simpleupdate
query that should return a relation value as well:Prisma Client query
Before v5.1.0
5.1.0 and later
Empty
update
queryAn empty
update
query can be optimized to skip the transaction and the second identical query by creating specific handling for this edge case in our code:Prisma Client query
Before v5.1.0
5.1.0 and later
Simple + relation
update
query (but do not return relation value)An update of both the model and its relation, we could drop 2
SELECT
queries that we did before without ever using their return values:Prisma Client query
Before v5.1.0
5.1.0 and later
In the next releases, we will continue optimizing Prisma Client queries to only run the minimal amount of SQL queries necessary.
If you notice any Prisma Client queries that are affected right now, please check the issues under our
performance/queries
label. If you didn’t find one for what you’re seeing, please create a new issue. This will be super useful for us to understand all (edge) cases. Thank you!Prisma Studio now supports
directUrl
Our CLI command
prisma studio
that opens Prisma Studio now also can use thedirectUrl
property of thedatasource
block so you can make it talk to a different database than defined inurl
. This makes it easier to use Studio alongside the Prisma Data Proxy and Accelerate.Prisma Client: No more type clashes
We fixed (almost) all cases where using a specific term as a model name in your Prisma Schema would lead to a type clash due to Prisma’s generated typings. As a result of a type clash, it was not possible to use that model in your code (this was e.g. the case if you named a model
Model
orModelUpdate
).We also deprecated the
<ModelName>Args
type as part of that fix. Going forward,<ModelName>DefaultArgs
should be used instead.Fixes and improvements
Prisma Client
X
andXUpdate
Model
andModelUpdate
is defined in the schema@prisma/internals
(previously @prisma/sdk) uses deprecated dependencies[email protected]
viatemp-write 4.0.0
Datasource
breaks generated return typesmodel
names cause clashes in generated types$extends
TS error: "Inferred type of this node exceeds the maximum length the compiler will serialize" with"declaration": true
intsconfig
Type '"findUniqueOrThrow"' is not assignable to type 'PrismaAction'
Promise
breaks types forPrismaPromise
include
not working on models ending with...Update
with unique compound indexLogLevel
enum conflicts with built-in Prisma typePrisma.XyzFindManyArgs
breaksfindMany
typing in v4.16.0+this.$on("beforeExit")
doesn't work anymore on 5.0.0Error: Unknown value type
on nested createfindUnique
on@unique
columns that are enums<Tablename>UpsertArgs
select field does not match type fordb.<tablename>.upsert(item)
by
ingroupBy
in 5.0.0TypeError [ERR_INVALID_URL]: Invalid URL
whenHTTP(S)_PROXY
en var has is set to a URL without a protocoltsc --watch
fails withJavaScript heap out of memory
errorGetResult
Prisma Studio
directUrl
inprisma studio
Language tools (e.g. VS Code)
Credits
Huge thanks to @skyzh, @alula, @michaelpoellath, @RobertCraigie, @Gerschtli, @andyjy, @mejiaej, @iurylippo, @mrazauskas for helping!
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.