Blagues-API / blagues-api

😂 API de Blagues française et Open Source
https://www.blagues-api.fr
MIT License
46 stars 17 forks source link

fix(deps): update prisma dependencies to ^4.3.1 #434

Closed renovate[bot] closed 2 years ago

renovate[bot] commented 2 years ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) ^4.1.1 -> ^4.3.1 age adoption passing confidence
prisma (source) 4.1.1 -> 4.3.1 age adoption passing confidence

Release Notes

prisma/prisma ### [`v4.3.1`](https://togithub.com/prisma/prisma/releases/tag/4.3.1) [Compare Source](https://togithub.com/prisma/prisma/compare/4.3.0...4.3.1) Today, we are issuing the `4.3.1` patch release. #### Fixes in Prisma Client - [Prisma Client is incompatible with TypeScript 4.8](https://togithub.com/prisma/prisma/issues/15041) #### Fixes in Prisma CLI - [Prisma 4.3.0 takes 100x more time to generate types](https://togithub.com/prisma/prisma/issues/15109) ### [`v4.3.0`](https://togithub.com/prisma/prisma/releases/tag/4.3.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.2.1...4.3.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v4.3.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.3.0) about the release.** 🌟 #### Major improvements ##### Field reference support on query filters (Preview) We're excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) support for field references. You can enable it with the `fieldReference` Preview feature flag. Field references will allow you to compare columns against other columns. For example, given the following schema: ```prisma generator client { provider = "prisma-client-js" previewFeatures = ["fieldReference"] } model Invoice { id Int @​id @​default(autoincrement) paid Int due Int } ``` You can now compare one column with another after running `prisma generate`, for example: ```ts // Filter all invoices that haven't been paid yet await prisma.invoice.findMany({ where: { paid: { lt: prisma.invoice.fields.due // paid < due } } }) ``` Learn more about field references in [our documentation](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#compare-columns-in-the-same-table). Try it out and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/15068). ##### Count by filtered relation (Preview) In this release, we're adding support for the ability to count by a filtered relation. You can enable this feature by adding the `filteredRelationCount` Preview feature flag. Given the following Prisma schema: ```prisma generator client { provider = "prisma-client-js" previewFeatures = ["filteredRelationCount"] } model User { id Int @​id @​default(autoincrement()) email String @​unique name String? posts Post[] } model Post { id Int @​id @​default(autoincrement()) title String content String? published Boolean @​default(false) author User? @​relation(fields: [authorId], references: [id]) authorId Int? } ``` You can now express the following query with the Preview feature after re-generating Prisma Client: ```ts // Count all published user posts await prisma.user.findMany({ select: { _count: { posts: { where: { published: true } }, }, }, }) ``` Learn more in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#filter-the-relation-count) and let us know what you think in [this issue](https://togithub.com/prisma/prisma/issues/15069) ##### Multi-schema support (Preview) In this release, we're adding *very* early Preview support of multi-schema support for [PostgreSQL](https://www.postgresql.org/docs/14/ddl-schemas.html) and [SQL Server](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-schema?view=sql-server-ver16) behind the `multiSchema` Preview feature flag. With it, you can write a Prisma schema that accesses models across multiple schemas. Read further in this [GitHub issue](https://togithub.com/prisma/prisma/issues/1122#issuecomment-1231773471). Try it out and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/15077). ##### Prisma CLI exit code fixes We've made several improvements to the Prisma CLI: - `prisma migrate dev` previously returned a successful exit code (0) when `prisma db seed` was triggered but failed due to an error. We've fixed this and `prisma migrate dev` will now exit with an unsuccessful exit code (1) when seeding fails. - `prisma migrate status` previously returned a successful exit code (0) in unexpected cases. The command will now exit with an unsuccessful exit code (1) if: - An error occurs - There's a failed or unapplied migration - The migration history diverges from the local migration history (`/prisma/migrations` folder) - Prisma Migrate does not manage the database' migration history - The previous behavior when canceling a prompt by pressing Ctrl + C was returning a successful exit code (0). It now returns a non-successful, `SIGINT`, exit code (130). - In the *rare* event of a Rust panic from the Prisma engine, the CLI now asks you to submit an error report and exit the process with a non-successful exit code (1). Prisma previously ended the process with a successful exit code (0). ##### Improved precision for the `tracing` Preview feature Before this release, you may have occasionally seen some traces that took 0μs working with the `tracing` Preview feature. In this release, we've increased the precision to ensure you get accurate traces. Let us know if you run into any issues in this [GitHub issue](https://togithub.com/prisma/prisma/issues/14640). ##### `prisma format` now uses a Wasm module Initially, the `prisma format` command relied on logic from the Prisma engines in form of a native binary. In an ongoing effort to make `prisma` more portable and easier to maintain, we decided to shift to a Wasm module. `prisma format` now uses the same Wasm module as the one the Prisma language server uses, i.e. `@prisma/prisma-fmt-wasm`, which is now visible in `prisma version` command's output. Let us know what you think. In case you run into any issues, let us know by creating a [GitHub issue](https://togithub.com/prisma/prisma). ##### MongoDB query fixes > ⚠️ This may affect your query results if you relied on this *buggy* behavior in your application. While implementing field reference support, we noticed a few correctness bugs in our MongoDB connector that we fixed along the way: 1. `mode: insensitive` alphanumeric comparisons (e.g. “a” > “Z”) didn’t work ([GitHub issue](https://togithub.com/prisma/prisma/issues/14663)) 2. `mode: insensitive` didn’t exclude undefined ([GitHub issue](https://togithub.com/prisma/prisma/issues/14664)) 3. `isEmpty: false` on lists types (e.g. String\[]) returned true when a list is empty ([GitHub issue](https://togithub.com/prisma/prisma-engines/issues/3133)) 4. `hasEvery` on list types wasn’t aligned with the SQL implementations ([GitHub issue](https://togithub.com/prisma/prisma-engines/issues/3132)) ##### JSON filter query fixes > ⚠️ This may affect your query results if you relied on this *buggy* behavior in your application. > We also noticed a few correctness bugs in when filtering JSON values when used in combination with the `NOT` condition. For example: ```ts await prisma.log.findMany({ where: { NOT: { meta: { string_contains: "GET" } } } }) ```
Prisma schema ```prisma model Log { id Int @​id @​default(autoincrement()) level Level message String meta Json } enum Level { Info Warn Error } ```
If you used `NOT` with any of the following queries on a `Json` field, double-check your queries to ensure they're returning the correct data: - `string_contains` - `string_starts_with` - `string_ends_with` - `array_contains` - `array_starts_with` - `array_ends_with` - `gt`/`gte`/`lt`/`lte` ##### Prisma extension for VS Code improvements The Prisma language server now provides [Symbols](https://code.visualstudio.com/docs/editor/editingevolved#\_go-to-symbol) in VS Code. This means you can now: - See the different blocks (`datasource`, `generator`, `model`, `enum`, and `type`) of your Prisma schema in the [Outline view](https://code.visualstudio.com/docs/getstarted/userinterface#\_outline-view). This makes it easier to navigate to a block in 1 click A few things to note about the improvement are that: - CMD + hover on a field whose type is an enum will show the block in a popup - CMD + left click on a field whose type is a model or enum will take you to its definition. - Enable [Editor sticky scroll](https://code.visualstudio.com/updates/v1\_70#\_editor-sticky-scroll) from version `1.70` of VS Code. This means you can have sticky blocks in your Prisma schema, improving your experience when working with big schema files Make sure to update your VS Code application to 1.70, and the [Prisma extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) to `4.3.0`. We'd also like to give a big **Thank you** to [@​yume-chan](https://togithub.com/yume-chan) for your [contribution](https://togithub.com/yume-chan)! ##### Prisma Studio improvements We've made several improvements to the filter panel which includes: - Refined filter panel - Reducing the contrast of the panel in dark mode - Ability to toggle filters in the panel - Refined error handling for MongoDB m-n relations Prisma Studio prevents fatal errors when interacting with m-n relations by explicitly disabling creating, deleting, or editing records for m-n relations - Multi-row copying You can select multiple rows and copy them to your clipboard as JSON objects using CMD + C on MacOS or Ctrl + C on Windows/ Linux #### Prisma Client Extensions: request for comments For the last couple of months, we've been working on a specification for an upcoming feature — Prisma Client extensions. We're now ready to share our proposed design and we would appreciate your feedback. Prisma Client Extensions aims to provide a type-safe way to extend your existing Prisma Client instance. With Prisma Client Extensions you can: - Define computed fields - Define methods for your models - Extend your queries - Exclude fields from a model ... and much more! Here’s a glimpse at how that will look: ```jsx const prisma = new PrismaClient().$extend({ $result: { User: { fullName: (user) => { return `${user.firstName} ${user.lastName}` }, }, }, $model: { User: { signup: async ({ firstName, lastName, email, password }) => { // validate and create the user here return prisma.user.create({ data: { firstName, lastName, email, password } }) }, }, }, }) const user = await prisma.user.signup({ firstName: "Alice", lastName: "Lemon", email: "alice@prisma.io", password: "pri$mar0ckz" }) console.log(user.fullName) // Alice Lemon ``` For further details, refer to [this GitHub issue](https://togithub.com/prisma/prisma/issues/15074). Have a read and let us know what you think! #### Fixes and improvements ##### Prisma Client - [Allow WHERE conditions to compare columns in same table](https://togithub.com/prisma/prisma/issues/5048) - [Dates serialized without quotation marks in query event parameters property ](https://togithub.com/prisma/prisma/issues/6578) - [Ability to filter count in "Count Relation Feature"](https://togithub.com/prisma/prisma/issues/8413) - [Some traces show 0μs](https://togithub.com/prisma/prisma/issues/14614) - [\[MongoDB\] Alphanumeric insensitive filters don't work](https://togithub.com/prisma/prisma/issues/14663) - [\[MongoDB\] Insensitive filters don't exclude undefineds](https://togithub.com/prisma/prisma/issues/14664) - [Schema size affects runtime speed](https://togithub.com/prisma/prisma/issues/14695) - [Prisma Client always receive engine spans even when not tracing](https://togithub.com/prisma/prisma/issues/14842) - [Environment variables not available when using Wrangler 2](https://togithub.com/prisma/prisma/issues/14924) ##### Prisma - [Undo "skip flaky referentialActions sql server test"](https://togithub.com/prisma/prisma/issues/7936) - [Add `@prisma/prisma-fmt-wasm` to CLI and output dependency version in `-v`, use instead of Formatter Engine binary](https://togithub.com/prisma/prisma/issues/12496) - [Add jest snapshots for improved `db push` output in MongoDB](https://togithub.com/prisma/prisma/issues/13776) - [OpenSSL error message appearing while using query-engine has false positives](https://togithub.com/prisma/prisma/issues/14104) - [Calling `dmmf` raises "Schema parsing - Error while interacting with query-engine-node-api library" misleading error message when there is a schema validation error.](https://togithub.com/prisma/prisma/issues/14588) - [Unique composite indexes do not clash with a matching name on schema validation (composite types)](https://togithub.com/prisma/prisma/issues/14768) - [CLI: `migrate status` should return a non-successful exit code (1) when a failed migration is found or an error occurs](https://togithub.com/prisma/prisma/issues/14860) - [CLI: `migrate dev` should return a non-successful exit code (1) when there is an error during seeding](https://togithub.com/prisma/prisma/issues/14862) ##### Prisma Migrate - [Prisma CLI non-interactive detection is incorrect.](https://togithub.com/prisma/prisma/issues/14620) ##### Language tools (e.g. VS Code) - [Provide Symbols to VSCode](https://togithub.com/prisma/language-tools/issues/751) - [Support "Outline view" for Prisma Schema](https://togithub.com/prisma/language-tools/issues/1031) #### Credits Huge thanks to [@​abenhamdine](https://togithub.com/abenhamdine), [@​drzamich](https://togithub.com/drzamich), [@​AndrewSouthpaw](https://togithub.com/AndrewSouthpaw), [@​kt3k](https://togithub.com/kt3k), [@​lodi-g](https://togithub.com/lodi-g), [@​Gnucki](https://togithub.com/Gnucki), [@​apriil15](https://togithub.com/apriil15), [@​givensuman](https://togithub.com/givensuman) for helping! #### Prisma Data Platform We're working on the Prisma Data Platform — a collaborative environment for connecting apps to databases. It includes the: - **Data Browser** for navigating, editing, and querying data - **Data Proxy** for your database's persistent, reliable, and scalable connection pooling. - **Query Console** for experimenting with queries [Try it out](https://cloud.prisma.io/) and let us know what you think! #### 💼 We're hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're looking for a [Developer Advocate (Frontend / Fullstack)](https://grnh.se/894b275b2us) and [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us). Feel free to read the job descriptions and apply using the links provided. #### 📺 Join us for another "What's new in Prisma" livestream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtu.be/YE668p2nxv8) livestream. The stream takes place [on YouTube](https://youtu.be/YE668p2nxv8) on **Thursday, September 1** at **5 pm Berlin | 8 am San Francisco**. ### [`v4.2.1`](https://togithub.com/prisma/prisma/releases/tag/4.2.1) [Compare Source](https://togithub.com/prisma/prisma/compare/4.2.0...4.2.1) Today, we are issuing the `4.2.1` patch release. #### Fix in Prisma Client - [Fixed a cold start performance regression in case of multiple queries starting in parallel right after client creation](https://togithub.com/prisma/prisma/issues/14695) ### [`v4.2.0`](https://togithub.com/prisma/prisma/releases/tag/4.2.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.1.1...4.2.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@​prisma%20release%20v4.2.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.2.0) about the release.** 🌟 ##### Major improvements ##### Prisma Client tracing support (Preview) We're excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) support for tracing in Prisma Client! 🎉 Tracing allows you to track requests as they flow through your application. This is especially useful for debugging distributed systems where each request can span multiple services. With tracing, you can now see how long Prisma takes and what queries are issued in each operation. You can visualize these traces as waterfall diagrams using tools such as [Jaeger](https://www.jaegertracing.io/), [Honeycomb](https://www.honeycomb.io/trace/), or [DataDog](https://www.datadoghq.com/). ![](https://user-images.githubusercontent.com/33921841/183606710-5945999c-4e0b-420c-9de5-4c6bf9984f0c.png) Read more about tracing in our [announcement post](https://www.prisma.io/blog/tracing-launch-announcement-pmk4rlpc0ll) and learn more in [our documentation](https://prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) on how to start working with tracing. Try it out and [let us know what you think](https://togithub.com/prisma/prisma/issues/14640). ##### Isolation levels for interactive transactions We are improving the `interactiveTransactions` Preview feature with the support for defining the isolation level of an interactive transaction. Isolation levels describe different types of trade-offs between isolation and performance that databases can make when processing transactions. Isolation levels determine what types of data leaking can occur between transactions or what data anomalies can occur. To set the transaction isolation level, use the `isolationLevel` option in the second parameter of the API. For example: ```ts await prisma.$transaction( async (prisma) => { // Your transaction... }, { isolationLevel: Prisma.TransactionIsolationLevel.Serializable, maxWait: 5000, timeout: 10000, } ) ``` Prisma Client supports the following isolation levels if they're available in your database provider: - `ReadCommitted` - `ReadUncommitted` - `RepeatableRead` - `Serializable` - `Snapshot` Learn more about in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/transactions#transaction-isolation-level). Try it out, and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/8664). ##### Renaming of Prisma Client Metrics In this release, we've renamed the metrics — counters, gauges, and histograms — returned from `prisma.$metrics()` to make it a little easier to understand at a glance. | Previous | Updated | | ---------------------------------- | -------------------------------------------------- | | `query_total_operations` | `prisma_client_queries_total` | | `query_total_queries` | `prisma_datasource_queries_total` | | `query_active_transactions` | `prisma_client_queries_active` | | `query_total_elapsed_time_ms` | `prisma_client_queries_duration_histogram_ms` | | `pool_wait_duration_ms` | `prisma_client_queries_wait_histogram_ms` | | `pool_active_connections` | `prisma_pool_connections_open` | | `pool_idle_connections` | `prisma_pool_connections_idle` | | `pool_wait_count` | `prisma_client_queries_wait` | Give Prisma Client `metrics` a shot and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/13579) To learn more, check out [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/metrics). ##### Syntax highlighting for raw queries in Prisma Client This release adds syntax highlighting support for raw SQL queries when using ` $queryRaw`` ` and ` $executeRaw`` `. This is made possible using [Prisma's VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma). Screenshot 2022-08-09 at 12 30 27 Note: Syntax highlighting currently doesn't work with when using parentheses, `()`, `$queryRaw()`, `$executeRaw()`, `$queryRawUnsafe()`, and `$executeRawUnsafe()`. If you are interested in having this supported, let us know in this [GitHub issue](https://togithub.com/prisma/language-tools/issues/1219). ##### Experimental Cloudflare Module Worker Support We fixed a bug in this release that prevented the [Prisma Edge Client](https://www.prisma.io/docs/data-platform/data-proxy#edge-runtimes) from working with [Cloudflare Module Workers](https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/). We now provide experimental support with a [workaround for environment variables](https://togithub.com/prisma/prisma/issues/13771#issuecomment-1204295665). Try it out and let us know how what you think! In case you run into any errors, feel free to create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind%2Fbug\&template=bug_report.yml). ##### Upgrade to Prisma 4 In case you missed it, we held a [livestream](https://www.youtube.com/watch?v=FSjkBrfaoEY) a few weeks ago and walked through issues you may run into while upgrading to [Prisma 4](https://togithub.com/prisma/prisma/releases/tag/4.0.0) and how to fix them! ##### Request for feedback Our Product teams are currently running two surveys to help close the feature gaps and improve Prisma. If you have a use-case for geographical data (GIS) or full-text search/ indexes (FTS), we would appreciate your feedback on your needs: - [Prisma GIS](https://prisma103696.typeform.com/to/p8xo5o95) User Research Survey - [Prisma Full-Text Search](https://prisma103696.typeform.com/fts-survey) User Research Survey Many thanks! 🙌🏽 ##### Fixes and improvements ##### Prisma Client - [Allow `dataproxy` to have datasource overrides](https://togithub.com/prisma/prisma/issues/11595) - [Warning during build: equals-negative-zero](https://togithub.com/prisma/prisma/issues/14188) - [getGraphQLType throws error if object has no prototype](https://togithub.com/prisma/prisma/issues/14274) - [Prisma Client: Log Data Proxy usage explicitly](https://togithub.com/prisma/prisma/issues/14319) - [Cannot read property 'name' of undefined attempting to create row](https://togithub.com/prisma/prisma/issues/14342) - [Edge client crashes when enabling debug logs in constructor](https://togithub.com/prisma/prisma/issues/14536) - [TypeError: Cannot read properties of undefined (reading '\_hasPreviewFlag')](https://togithub.com/prisma/prisma/issues/14548) - [Large package.json log output in prisma:client:dataproxyEngine](https://togithub.com/prisma/prisma/issues/14660) ##### Prisma - [Error: \[libs/datamodel/connectors/dml/src/model.rs:338:29\] Crash probably due to cyrillic table names](https://togithub.com/prisma/prisma/issues/12615) - [Prisma doesn't validate composite attributes correctly](https://togithub.com/prisma/prisma/issues/14252) - [Not letting me add Int as a type?](https://togithub.com/prisma/prisma/issues/14389) - [Introspection crash, `libs\datamodel\connectors\dml\src\model.rs:494:29` (missing PK?)](https://togithub.com/prisma/prisma/issues/14403) - [SQL Server introspection panic](https://togithub.com/prisma/prisma/issues/14438) - [Hi Prisma Team! Prisma Migrate just crashed. ](https://togithub.com/prisma/prisma/issues/14462) - [Primary key in model using a missing column](https://togithub.com/prisma/prisma/issues/14511) - [Migrate just crashed sqlserver](https://togithub.com/prisma/prisma/issues/14611) - [Prisma is trying to find column that doesn't exists `prisma db pull` on `SQL Server`](https://togithub.com/prisma/prisma/issues/14636) - [Issue that occurred during `prisma db pull`](https://togithub.com/prisma/prisma/issues/14647) ##### Language tools (e.g. VS Code) - [Highlight raw SQL syntax](https://togithub.com/prisma/language-tools/issues/74) - [Do not offer all the attributes for composite fields in a model or a type](https://togithub.com/prisma/language-tools/issues/1198) ##### Prisma Studio - [Horizontal scrolling does not work](https://togithub.com/prisma/studio/issues/992) ##### Credits Huge thanks to [@​shian15810](https://togithub.com/shian15810), [@​zifeo](https://togithub.com/zifeo), [@​lodi-g](https://togithub.com/lodi-g), [@​Gnucki](https://togithub.com/Gnucki), [@​apriil15](https://togithub.com/apriil15), [@​givensuman](https://togithub.com/givensuman), [@​peter-gy](https://togithub.com/peter-gy) for helping! ##### Prisma Data Platform We're working on the Prisma Data Platform — a collaborative environment for connecting apps to databases. It includes the: - **Data Browser** for navigating, editing, and querying data - **Data Proxy** for persistent, reliable, and scalable connection pooling for your database. - **Query Console** for experimenting with queries [Try it out](https://cloud.prisma.io/) and let us know what you think! ##### 💼 We're hiring! If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you. We're looking for a [Developer Advocate (Frontend / Fullstack)](https://grnh.se/894b275b2us) and [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us). Feel free to read the job descriptions and apply using the links provided. ##### 📺 Join us for another "What's new in Prisma" livestream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtu.be/5Su2c3ZLBGs) livestream. The stream takes place [on YouTube](https://youtu.be/5Su2c3ZLBGs) on **Thursday, August 11** at **5 pm Berlin | 8 am San Francisco**.

Configuration

📅 Schedule: Branch creation - "before 3am on the first day of the month" (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.



This PR has been generated by Mend Renovate. View repository job log here.