Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update prisma monorepo to v5.11.0 (#254)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@prisma/client](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma/tree/HEAD/packages/client)) | [`5.8.1` -> `5.11.0`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.8.1/5.11.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/5.8.1/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/5.8.1/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [prisma](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma/tree/HEAD/packages/cli)) | [`5.8.1` -> `5.11.0`](https://renovatebot.com/diffs/npm/prisma/5.8.1/5.11.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prisma/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prisma/5.8.1/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/5.8.1/5.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prisma/prisma (@​prisma/client)</summary> ### [`v5.11.0`](https://togithub.com/prisma/prisma/releases/tag/5.11.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.10.2...5.11.0) Today, we are excited to share the `5.11.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/post?text=Check%20out%20the%20latest%20%40prisma%20release%20v5.11.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps%3A%2F%2Fgithub.com%2Fprisma%2Fprisma%2Freleases%2Ftag%2F5.11.0) about the release.** ##### Highlights ##### Edge function support for Cloudflare and Vercel (Preview) We’re thrilled to announce that support for edge function deployments with Prisma ORM is now in Preview 🥳 As of this release, you can deploy your apps that are using Prisma ORM to: - Vercel Edge Functions and Vercel Edge Middleware - Cloudflare Workers and Cloudflare Pages In order to deploy to an edge function, you’ll need to use a compatible database driver (along with its [Prisma driver adapter](https://www.prisma.io/docs/orm/overview/databases/database-drivers#driver-adapters)): - Neon Serverless Driver (for PostgreSQL databases hosted via [Neon](https://neon.tech/)) - PlanetScale Serverless Driver (for MySQL databases hosted via [PlanetScale](https://planetscale.com/)) - `pg` driver (for traditional PostgreSQL databases) - `@libsql/client` driver (for SQLite databases hosted via [Turso](https://turso.tech/)) Check out our [documentation](https://www.prisma.io/docs/orm/prisma-client/deployment/edge/overview) to learn how you can deploy an edge function using any combination of supported edge function provider and database. ##### Performance improvements in nested `create` operations With Prisma ORM, you can create multiple new records in *nested* queries, for example: ```ts const user = await prisma.user.update({ where: { id: 9 }, data: { name: 'Elliott', posts: { create: { data: [{ title: 'My first post' }, { title: 'My second post' }], }, }, }, }) ``` In previous versions, Prisma ORM would translate this into multiple SQL `INSERT` queries, each requiring its own roundtrip to the database. As of this release, these nested `create` queries are optimized and the `INSERT` queries are sent to the database *in bulk* in a single roundtrip. These optimizations apply to one-to-many as well as many-to-many relations. With this change, using the nested `create` option to create multiple records effectively becomes equivalent to using a nested `createMany` operation (except that `createMany` *only* works with one-to-many relations, whereas `create` works both with one-to-many and many-to-many). > **Note**: Only the deepest nested operation is optimized. If a user specified `create (1) -> create (2) -> create (3)` in their query, only `create (3)` will be optimized. ##### Fixes and improvements ##### Prisma Client - [Prisma errors when not using the major.minor.patch versioning system](https://togithub.com/prisma/prisma/issues/7317) - [mongodb where condition resulted in combined $ne but should not be $eq](https://togithub.com/prisma/prisma/issues/15175) - [Node hangs when `console.log(new PrismaClient())`](https://togithub.com/prisma/prisma/issues/18292) - [Add wolfy linux to supported OS](https://togithub.com/prisma/prisma/issues/18329) - [Support Linux Gentoo](https://togithub.com/prisma/prisma/issues/18698) - [Know engines to download for Void Linux](https://togithub.com/prisma/prisma/issues/20434) - [Engine does not support Linux distro "openeuler"](https://togithub.com/prisma/prisma/issues/20937) - [Prisma Doesn't Recognize Crystal Linux distro](https://togithub.com/prisma/prisma/issues/21955) - [Regression: Mapped `enum` throws error (collation `cp1250_czech_cs` or similar)](https://togithub.com/prisma/prisma/issues/21967) - [`NOT` condition leaks out of its desired bounds](https://togithub.com/prisma/prisma/issues/22007) - [The column does not exist in the current database.](https://togithub.com/prisma/prisma/issues/22098) - [Logging `PrismaClient` object is slow](https://togithub.com/prisma/prisma/issues/22848) - [Running `prisma generate` on Litespeed Web Server cPanel with ssh](https://togithub.com/prisma/prisma/issues/22857) - [Prisma doesn't know which engines to download for the Linux distro "guttaos"](https://togithub.com/prisma/prisma/issues/23031) - [Error in driver-adapter-utils with `tsc`: `Cannot find namespace 'debug'.`](https://togithub.com/prisma/prisma/issues/23091) - [VS Code debugger freeze from time to time, when Prisma Client is involved](https://togithub.com/prisma/prisma/issues/23181) - [`push` method still unimplemented for scalar lists in CockroachDB](https://togithub.com/prisma/prisma/issues/23183) - [`Invalid character` error persists on 5.10.1 in Prisma Studio](https://togithub.com/prisma/prisma/issues/23225) - [Add "Peppermint OS" to list of supported distros](https://togithub.com/prisma/prisma/issues/23237) - [`runtimeDescription` is not defined error](https://togithub.com/prisma/prisma/issues/23430) ##### Prisma Migrate - [Prisma with UOS or Deepin](https://togithub.com/prisma/prisma/issues/18374) - [Warning: Linux distro "slackware"](https://togithub.com/prisma/prisma/issues/18547) - [Error when run `npx prisma db pull` with DeepinOS 20.9GNU/LInux](https://togithub.com/prisma/prisma/issues/19157) - [Add solus to list of known supported distros](https://togithub.com/prisma/prisma/issues/21493) - [NixOS not recognised as a Linux distribution](https://togithub.com/prisma/prisma/issues/22145) - [Prisma Warning on Ubuntu 20.04](https://togithub.com/prisma/prisma/issues/22347) - [Let Prisma detect Artix Linux distro](https://togithub.com/prisma/prisma/issues/22522) - [couldn't identify clear-linux-os](https://togithub.com/prisma/prisma/issues/22539) - [Prisma doesn't know which engines to download with `Linux Mint`](https://togithub.com/prisma/prisma/issues/23141) - [`Error: Invalid character` when `schema.prisma` includes Chinese/Non-ASCII characters in a comment](https://togithub.com/prisma/prisma/issues/23201) ##### Prisma Engines - [\[DA\] Planetscale engine tests: aggregations](https://togithub.com/prisma/prisma-engines/issues/4473) - [\[DA\] Planetscale engine tests: json filtering](https://togithub.com/prisma/prisma-engines/issues/4475) - [\[DA\] Planetscale engine tests: order and pagination](https://togithub.com/prisma/prisma-engines/issues/4478) - [\[DA\] Planetscale engine tests: oids](https://togithub.com/prisma/prisma-engines/issues/4479) - [\[DA\] Planetscale engine tests: nested_createmany_fail_dups](https://togithub.com/prisma/prisma-engines/issues/4481) - [\[DA\] Planetscale engine tests: create_many_error_dups](https://togithub.com/prisma/prisma-engines/issues/4484) - [\[DA\] Planetscale engine tests: upsert_fails_if_filter_dont_match](https://togithub.com/prisma/prisma-engines/issues/4486) ### [`v5.10.2`](https://togithub.com/prisma/prisma/releases/tag/5.10.2) [Compare Source](https://togithub.com/prisma/prisma/compare/5.10.1...5.10.2) Today, we are issuing the `5.10.2` patch release. #### Fix in Prisma CLI - [`Invalid character` error persists on 5.10.1 in Prisma Studio](https://togithub.com/prisma/prisma/issues/23225) ### [`v5.10.1`](https://togithub.com/prisma/prisma/releases/tag/5.10.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.10.0...5.10.1) Today, we are issuing the `5.10.1` patch release. ##### Fix in Prisma Client / Prisma CLI - [Error: Invalid character when schema.prisma includes Chinese/Non-ASCII characters in a comment](https://togithub.com/prisma/prisma/issues/23201) ### [`v5.10.0`](https://togithub.com/prisma/prisma/releases/tag/5.10.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.9.1...5.10.0) Today, we are excited to share the `5.10.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/post?text=Check%20out%20the%20latest%20%40prisma%20release%20v5.10.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps%3A%2F%2Fgithub.com%2Fprisma%2Fprisma%2Freleases%2Ftag%2F5.10.0) about the release.** ##### Highlights ##### Optimized relation queries in MySQL (Preview) This release brings the optimizations for relation queries from the previous releases to MySQL as well! This means that by enabling the `relationJoins` Preview feature with the `mysql` database provider, you now also get access to the `relationLoadStrategy` option in relation queries that let you choose whether you want to merged relations on the application- or database-level. If you enable the `relationJoins` Preview feature, you can choose between the `join` and `query` options: - `join` (default): Sends a single query to the database and joins the data on the database-level. - `query`: Sends multiple queries to the database and joins the data on the application-level. To get started, enable the Preview feature in your Prisma schema: ```prisma // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["relationJoins"] } ``` Be sure to re-generate Prisma Client afterwards: npx prisma generate And finally, specify the relation loading strategy for your relation query via the `relationLoadStrategy` option as follows: ```ts await prisma.user.findMany({ relationLoadStrategy: 'join', // or 'query' include: { posts: true, }, }) ``` Note that in the example above, the `relationLoadStrategy` could be omitted altogether because `join` is used as the default value. A few notes about `relationLoadStrategy` support on MySQL: - `relationLoadStrategy` is supported for MySQL v8.0.14 and higher. MariaDB is not supported. - Prisma ORM uses correlated sub-queries for MySQL (as opposed to `LATERAL` JOINs which are used on PostgreSQL). ##### Configure transaction options in the `PrismaClient` constructor This feature enables you to configure the following transaction options on a global level via the `PrismaClient` constructor: - `isolationLevel`: Sets the [transaction isolation level](https://www.prisma.io/docs/orm/prisma-client/queries/transactions#transaction-isolation-level). By default, this is set to the value currently configured in your database. - `timeout`: The maximum amount of time the interactive transaction can run before being canceled and rolled back. The default value is 5 seconds. - `maxWait`: The maximum amount of time Prisma Client will wait to acquire a transaction from the database. The default value is 2 seconds. Here is an example of how you can set this value globally for all transactions: ```ts const prisma = new PrismaClient({ transactionOptions: { isolationLevel: 'ReadCommitted', timeout: 1_000, // 1 sec maxWait: 2_000 // 2 sec } }) ``` Thanks a lot to our fantastic community member [`@tockn`](https://togithub.com/tockn), who took the initiative to implement this feature in Prisma ORM 🎉 Note that you can still override the global values by [setting them on a particular transaction](https://www.prisma.io/docs/orm/prisma-client/queries/transactions#transactions-options). ##### New `P2037` code for “Too many database connections opened” errors We introduced a new error code for “Too many database connections opened” errors: `P2037`. You can find all error codes in our [documentation](https://www.prisma.io/docs/orm/reference/error-reference#prisma-client-query-engine). ##### Access the Prisma Data Platform via Prisma CLI Now available in Early Access, you can manage your workspace and configure [Prisma Accelerate](https://www.prisma.io/docs/accelerate) and [Prisma Pulse](https://www.prisma.io/docs/pulse) directly from the terminal. Visit our [docs](https://www.prisma.io/docs/platform/platform-cli/commands) to learn more about the integration and try it out for yourself! ##### Fixes and improvements ##### Prisma Client - [called `Option::unwrap()` on a `None` value when using the relationJoins preview feature with driver adapters](https://togithub.com/prisma/prisma/issues/22294) - [\[5.9.0 Bug\] `Prisma.TransactionClient` appears to be missing types](https://togithub.com/prisma/prisma/issues/22870) - [Error after Upgrading from 5.8.1 to 5.9.0](https://togithub.com/prisma/prisma/issues/22875) - [\[5.9.0\] `@prisma/client` in Next.js middleware](https://togithub.com/prisma/prisma/issues/22877) - [\[v5.9.0\] `$extends` always return `any`](https://togithub.com/prisma/prisma/issues/22884) - [Prisma edge runtime error](https://togithub.com/prisma/prisma/issues/22886) - [\[5.9.0\] All queries result in any type](https://togithub.com/prisma/prisma/issues/22888) - [`Error: Prisma Client is unable to run in an edge runtime. As an alternative, try Accelerate: https://pris.ly/d/accelerate.`](https://togithub.com/prisma/prisma/issues/22889) - [\[5.9.0\] Error: Prisma Client is unable to run in an edge runtime. As an alternative, try Accelerate: https://pris.ly/d/accelerate.](https://togithub.com/prisma/prisma/issues/22893) - [v5.9.0 / Don't generate type. And the error from the previous version is still there](https://togithub.com/prisma/prisma/issues/22896) - [\[5.9.0\] Getting strange types after generating](https://togithub.com/prisma/prisma/issues/22903) - [relationJoins: "The column `t3.bookGenreTitle` does not exist in the current database"](https://togithub.com/prisma/prisma/issues/22926) - [Missing export @​prisma/client/generator-build](https://togithub.com/prisma/prisma/issues/22927) - [`relationJoins` preview feature: called `Option::unwrap()` on a `None` value](https://togithub.com/prisma/prisma/issues/22971) ### [`v5.9.1`](https://togithub.com/prisma/prisma/releases/tag/5.9.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.9.0...5.9.1) Today, we are issuing the `5.9.1` patch release. ##### Fixes in Prisma Client In `5.9.0` we have changed our conditional exports in `@prisma/client`. This resulted in broken types for TypesScript users using certain combinations of `module`/`moduleResolution` settings. Additionally, it also caused a regression for Next.js users which have encountered invalid error messages from our side. You can now try out `5.9.1` and let us know if you find a bug at https://pris.ly/prisma-prisma-bug-report - [\[5.9.0\] Getting strange types after generating #​22903](https://togithub.com/prisma/prisma/issues/22903) - [v5.9.0 / Don't generate type. And the error from the previous version is still there #​22896](https://togithub.com/prisma/prisma/issues/22896) - [\[5.9.0\] Error: Prisma Client is unable to run in an edge runtime. As an alternative, try Accelerate: https://pris.ly/d/accelerate. #​22893](https://togithub.com/prisma/prisma/issues/22893) - [`Error: Prisma Client is unable to run in an edge runtime. As an alternative, try Accelerate: https://pris.ly/d/accelerate.` #​22889](https://togithub.com/prisma/prisma/issues/22889) - [\[5.9.0\] All queries result in any type #​22888](https://togithub.com/prisma/prisma/issues/22888) - [Prisma edge runtime error #​22886](https://togithub.com/prisma/prisma/issues/22886) - [please how i cant fix this message issues #​22885](https://togithub.com/prisma/prisma/issues/22885) - [\[v5.9.0\] $extends always return any #​22884](https://togithub.com/prisma/prisma/issues/22884) - [\[5.9.0\] @​prisma/client in Next.js middleware #​22877](https://togithub.com/prisma/prisma/issues/22877) - [Error after Upgrading from 5.8.1 to 5.9.0 #​22875](https://togithub.com/prisma/prisma/issues/22875) - [\[5.9.0 Bug\] Prisma.TransactionClient appears to be missing types #​22870](https://togithub.com/prisma/prisma/issues/22870) Note: many issues are duplicates. ### [`v5.9.0`](https://togithub.com/prisma/prisma/releases/tag/5.9.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.8.1...5.9.0) Today, we are excited to share the `5.9.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check) about the release.** This release brings a number of small improvements as we continue our work on larger features which you will hear more about in the coming weeks: - Improve the performance of relation queries by introducing JOINs (see [last release](https://togithub.com/prisma/prisma/releases/tag/5.8.0)). - Support deployment to edge functions (already available in Early Access, you can apply for trying it out by taking our [survey](https://pris.ly/survey/edge-functions-release-notes-5-9-0)). ##### Highlights ##### Optimized result sets for more efficient queries We continue our efforts of the performance of Prisma Client queries. In [`5.1.0`](https://togithub.com/prisma/prisma/releases/tag/5.1.0), we introduced the `RETURNING` keyword for several queries on PostrgeSQL and CockroachDB. We now expanded the use of `RETURNING` to SQLite and a broader range of queries for existing databases (e.g. `delete` on PostgreSQL and MongoDB). You can learn more about the optimizations of the result sets in these PRs: - [feat(qe): avoid extra select on delete queries](https://togithub.com/prisma/prisma-engines/pull/4595) - [feat(qe): enable queries with returning for sqlite](https://togithub.com/prisma/prisma-engines/pull/46) ##### SQL Server: Return proper error for unreachable database When trying migrate/introspect a SQL server instance that’s unreachable, Prisma ORM now returns the correct `P1001` error instead of failing without an error. Learn more in this PR: [SQL Server: Migrate/Introspection engine doesn't return P1001 error for unreachable url](https://togithub.com/prisma/prisma/issues/11407). ##### Fixes and improvements ##### Prisma Client - [Skip unnecessary `select` queries on create/update/delete](https://togithub.com/prisma/prisma/issues/8069) - [.prisma/client: Name can't start with a dot](https://togithub.com/prisma/prisma/issues/17685) - [Nested json is transformed to string when used “$type” key in object](https://togithub.com/prisma/prisma/issues/21454) - [Parallel execution with Promise.all causes P2024 error in version 5.8.0 due to connection limit](https://togithub.com/prisma/prisma/issues/22610) ##### Prisma Migrate - [SQL Server: Migrate/Introspection engine doesn't return P1001 error for unreachable url](https://togithub.com/prisma/prisma/issues/11407) - [Prisma errors fetching table 'CHECK_CONSTRAINTS' (which only exists in MySQL 8.0.16+) in MySQL 8.0.14](https://togithub.com/prisma/prisma/issues/19775) - [`ERROR: column "..." being dropped, try again later` when applying migrations with CRDB 23.1](https://togithub.com/prisma/prisma/issues/20851) ##### Language tools (e.g. VS Code) - [Extension wrongfully suggests Json as a valid type completion on Sqlite](https://togithub.com/prisma/language-tools/issues/1638) ##### Company news ##### Test edge functions support in Early Access Today, the only way how to use Prisma ORM in edge functions (e.g. Cloudflare Workers or Vercel Edge Functions) is by using [Prisma Accelerate](https://www.prisma.io/data-platform/accelerate). However, we are actively working on making Prisma ORM compatible with edge functions natively as well. If you want to become an early tester, you can apply for the private Early Accessing program by taking this [survey](https://pris.ly/survey/edge-functions-release-notes-5-9-0). ##### We Transitioned Prisma Accelerate to IPv6 Without Anyone Noticing Last year, AWS announced the decision to begin charging for IPv4 addresses beginning in February 2024. This move had a major impact on Prisma Accelerate, prompting us to go all-in on IPv6. [Learn more in this technical deep dive](https://www.prisma.io/blog/accelerate-ipv6-first) into how we approached our IPv6 migration, lessons learned, and the outcome for users of Prisma Accelerate. ##### Credits Huge thanks to [@​laplab](https://togithub.com/laplab), [@​Druue](https://togithub.com/Druue), [@​anuraaga](https://togithub.com/anuraaga), [@​onichandame](https://togithub.com/onichandame), [@​LucianBuzzo](https://togithub.com/LucianBuzzo), [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​almeidx](https://togithub.com/almeidx), [@​victorgdb](https://togithub.com/victorgdb), [@​tinola](https://togithub.com/tinola), [@​sampolahtinen](https://togithub.com/sampolahtinen), [@​AikoRamalho](https://togithub.com/AikoRamalho), [@​petradonka](https://togithub.com/petradonka) for helping! </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 10am on Friday" (UTC), 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ettorepuccetti/terrarossa). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information