Garlic-Team / gcommands

Powerful and flexible discord.js framework.
https://www.npmjs.com/package/gcommands
ISC License
38 stars 9 forks source link

chore(deps): update dependency @prisma/client to v3.14.0 #448

Closed renovate[bot] closed 2 years ago

renovate[bot] commented 2 years ago

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) 3.13.0 -> 3.14.0 age adoption passing confidence

Release Notes

prisma/prisma ### [`v3.14.0`](https://togithub.com/prisma/prisma/releases/3.14.0) [Compare Source](https://togithub.com/prisma/prisma/compare/3.13.0...3.14.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%20v3.14.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.14.0) about the release.** 🌟 #### Major improvements ##### CockroachDB connector is now Generally Available! We are proud to announce the CockroachDB connector is now stable and Generally Available. The connector was built in joined efforts with the team at [Cockroach Labs](https://www.cockroachlabs.com/) and comes with full Prisma Client and Prisma Migrate support. If you're upgrading from Prisma version `3.9.0`+ or the PostgreSQL connector, you can now run `npx prisma db pull` and review the changes to your schema. To learn more about CockroachDB-specific native types we support, refer to [our docs](http://prisma.io/docs/concepts/database-connectors/cockroachdb#type-mapping-limitations-in-cockroachdb). To learn more about the connector and how it differs from PostgreSQL, head to our [documentation](https://www.prisma.io/docs/concepts/database-connectors/cockroachdb). ##### PostgreSQL `GIN`, `GiST`, `SP-GiST`, and `BRIN` indexes support (Preview) We introduced the `extendedIndexes` Preview feature in version `3.5.0`, and we have been adding new configuration options for indexes. We've expanded index type support with the `GIN`, `GiST`, `SP-GiST`, and `BRIN` indexes in this release. To make use of an index type, you can update your Prisma schema by providing the `type` argument to the `@@​index` attribute: ```prisma datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" previewFeatures = ["extendedIndexes"] } model Post { id Int @​id title String content String? tags Json? @​@​index([tags], type: Gin) } ``` The following SQL will be generated in your migration when you run `prisma migrate dev`: ```sql CREATE TABLE "Post" ( "id" INTEGER NOT NULL, "title" TEXT NOT NULL, "content" TEXT, "tags" JSONB, CONSTRAINT "Post_pkey" PRIMARY KEY ("id") ); CREATE INDEX "Post_tags_idx" ON "Post" USING GIN ("tags"); ``` To learn more about configuring index types in your schema, refer to [our documentation](https://prisma.io/docs/concepts/components/prisma-schema/indexes#configuring-the-access-type-of-indexes-with-type-postgresql). ##### Improved `queryRaw` API In this release, we made improvements to the SQL raw API. Some improvements are breaking and will be available behind the new `improvedQueryRaw` Preview feature flag. The `improvedQueryRaw` Preview feature solves most of the issues faced when working with the raw API. We would encourage you to turn on the Preview feature flag, try out the new API, and let us know how we can make it even better. You can enable the Preview feature in your Prisma schema as follows: ```prisma datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" previewFeatures = ["improvedQueryRaw"] } ``` Here's a list of the improvements `improvedQueryRaw` comes with: ##### 1. Raw scalar values are deserialized as their correct JavaScript types Prisma Client queries such as `findMany` deserialize database scalar values to their corresponding JavaScript types. For example, a `DateTime` value is deserialized as a JavaScript `Date,` and a `Bytes` would be deserialized as a JavaScript `Buffer`. Raw queries now implement the same behavior when the `improvedQueryRaw` Preview feature flag is enabled. > ⚠️ This change is not yet available in the SQLite connector. The types of values from the database will be used instead of the types in the Prisma schema. Here's an example query and response: ```ts const res = await prisma.$queryRaw`SELECT bigint, bytes, decimal, date FROM "Table";` console.log(res) // [{ bigint: BigInt("123"), bytes: Buffer.from([1, 2]), decimal: new Prisma.Decimal("12.34"), date: Date("") }] ``` Here's a table that recaps the serialization type-mapping for raw results: | Database Type | Javascript Type | | --- | --- | | Text | String | | Int32 | Number | | Float | Number | | Double | Number | | Int64 | BigInt | | Numeric | Decimal | | Bytes | Buffer | | Json | Object | | DateTime | Date | | Date | Date | | Time | Date | | Uuid | String | | Xml | String | ##### 2. PostgreSQL type-casts We've also fixed a lot of PostgreSQL type-casts that were broken by enabling the `improvedQueryRaw` Preview feature flag. Here's an example of a query that used to fail: ```ts await prisma.$queryRaw`SELECT ${1.5}::int as int`; // Before: db error: ERROR: incorrect binary data format in bind parameter 1 // After: [{ int: 2 }] ``` You can now perform some more type-casts in your queries: ```ts await prisma.$queryRaw`SELECT ${2020}::float4, ${"1 day"}::interval, ${"2022-01-01 00:00:00"}::timestamptz;` ``` A consequence of this fix is that some subtle implicit casts are now handled more strictly and would fail. Here's an example that used to work but won't work anymore under the `improvedQueryRaw` feature flag: ```ts await prisma.$queryRaw`SELECT LENGTH(${42});` // ERROR: function length(integer) does not exist // HINT: No function matches the given name and argument types. You might need to add explicit type casts. ``` The `LENGTH` PostgreSQL function only accept `text` as input. Prisma used to coerce `42` to `text` silently, but won’t anymore. As suggested by the hint, cast `42` to `text` as follows: ```ts await prisma.$queryRaw`SELECT LENGTH(${42}::text);` ``` ##### 3. Query parameters are correctly sent to the database > This improvement is available without the `improvedQueryRaw` Preview feature flag. Before this release, query parameters of type `BigInt`, `Bytes`, and `Decimal` were incorrectly sent to the database leading to instances of unexpected inserts. Passing the types as query parameters now works: ```ts await prisma.$executeRaw`INSERT INTO "Table" ("bigint", "bytes", "decimal") VALUES (${BigInt("123")}, ${Buffer.from([1, 2, 3])}, ${new Prisma.Decimal("12.23")});` ``` #### Fixes and improvements ##### Prisma Client - [Improve type conversion and responses for raw queries](https://togithub.com/prisma/prisma/issues/4569) - [Postgres parameterized interval is passed incorrectly in raw query](https://togithub.com/prisma/prisma/issues/4647) - [queryRaw cannot handle some numbers](https://togithub.com/prisma/prisma/issues/6818) - [Query raw run throws the following error `incorrect binary data format in bind parameter 3`](https://togithub.com/prisma/prisma/issues/7194) - [BigInt becomes Number if queried with `$queryRaw`](https://togithub.com/prisma/prisma/issues/7395) - [Weird behavior of raw query containing st_dwithin and radius parameter binding](https://togithub.com/prisma/prisma/issues/7799) - [`generate` output with `output` has weird package path on Windows](https://togithub.com/prisma/prisma/issues/7809) - [Casting error when using integers in raw query](https://togithub.com/prisma/prisma/issues/7839) - [$queryRaw fails when passing bigint as parameter](https://togithub.com/prisma/prisma/issues/8121) - [Decimal becomes Number if queried with $queryRaw](https://togithub.com/prisma/prisma/issues/9163) - [$queryRaw doesn't allow for typecasts](https://togithub.com/prisma/prisma/issues/9197) - [Raw sql Is not working as expected ](https://togithub.com/prisma/prisma/issues/9333) - [Missing `$` from `executeRaw` in error message "Invalid \`prisma.executeRaw()\` invocation:"](https://togithub.com/prisma/prisma/issues/9388) - [Parameterized ExecuteRaw breaks with Postgres Floats](https://togithub.com/prisma/prisma/issues/9949) - [PANIC: called `Result::unwrap()` on an `Err` value: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51](https://togithub.com/prisma/prisma/issues/10224) - [$queryRaw to Postgres failing to correctly insert/cast numeric parameters](https://togithub.com/prisma/prisma/issues/10424) - [Compound primary key is not generated when a unique field has the same name](https://togithub.com/prisma/prisma/issues/10456) - [`referentialIntegrity = prisma`: Broken query on `onUpdate: Cascade` | `symbol ... not found` | `The column ... does not exist in the current database.`](https://togithub.com/prisma/prisma/issues/10758) - [Getting a "Raw query failed. Code: `N/A`. Message: ` error deserializing column 0: a Postgres value was `NULL\`\`" error when using Postgres ARRAY_AGG with a nullable column](https://togithub.com/prisma/prisma/issues/11339) - [Planetscale not able to upsert with Prisma](https://togithub.com/prisma/prisma/issues/11469) - [connectOrCreate deletes old relation and creates a new one](https://togithub.com/prisma/prisma/issues/11731) - [referentialIntegrity=prisma causes P2022 (column not exist) on updating a record](https://togithub.com/prisma/prisma/issues/11792) - [Unable to insert Buffer into Bytes pg field using $executeRaw](https://togithub.com/prisma/prisma/issues/11834) - [CockroachDB: Figure out, test and document which versions we support](https://togithub.com/prisma/prisma/issues/12383) - [Implement `debugPanic` like functionality for `getConfig` and `getDmmf` of Query Engine](https://togithub.com/prisma/prisma/issues/12494) - [$queryRaw returning numbers for bigint fields](https://togithub.com/prisma/prisma/issues/12551) - [Prisma returns sequence values with number type from Postgres while using queryRaw](https://togithub.com/prisma/prisma/issues/12583) - [PANIC: called `Result::unwrap()` on an `Err` value: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51](https://togithub.com/prisma/prisma/issues/12641) - [RQ: Properly coerce query raw input parameters in the Query Engine](https://togithub.com/prisma/prisma/issues/12795) - [RQ: Properly coerce query raw result in the Client](https://togithub.com/prisma/prisma/issues/12796) - [RQ: Send type-hinted query parameters for raw queries (Postgres)](https://togithub.com/prisma/prisma/issues/12797) - [RQ: Integrate new QE result for query raw in the client](https://togithub.com/prisma/prisma/issues/12800) - [thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code: Relation fields should never hit the BSON conversion logic.', query-engine/connectors/mongodb-query-connector/src/value.rs:34:35](https://togithub.com/prisma/prisma/issues/12929) - [Exception when using Decimal.js instance in an input](https://togithub.com/prisma/prisma/issues/13213) ##### Prisma - [Error: Error in migration engine. Reason: \[migration-engine\cli\src/main.rs:68:41\] called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "stream did not contain valid UTF-8" } ](https://togithub.com/prisma/prisma/issues/5614) - [Allow creating GIN index on JSONB fields in Postgres adapter](https://togithub.com/prisma/prisma/issues/7410) - [`prisma format` panics when you use a colon to declare field type (`field: Type` syntax)](https://togithub.com/prisma/prisma/issues/9302) - [Better error message if using `TEXT` or `BLOB` in MySQL @​id/@​index/@​unique](https://togithub.com/prisma/prisma/issues/10292) - [Schema validation error mentions `Error parsing attribute "@​id"` but it's actually about `@@​id`](https://togithub.com/prisma/prisma/issues/10566) - [Support GiST Index type with Postgres](https://togithub.com/prisma/prisma/issues/10634) - [MySQL 8 function as default not created in first migration](https://togithub.com/prisma/prisma/issues/10715) - [Error: \[introspection-engine/connectors/sql-introspection-connector/src/commenting_out_guardrails.rs:32:59\] called `Option::unwrap()` on a `None` value ](https://togithub.com/prisma/prisma/issues/11008) - [Nicer error message when you try to migrate a CockroachDB database with a `provider=posgresql` schema](https://togithub.com/prisma/prisma/issues/11350) - [Using `--url` for `db pull` ignored/overwrites `provider=cockroachdb`](https://togithub.com/prisma/prisma/issues/11527) - [CockroachDB: support more autoincrementing integer primary key representations](https://togithub.com/prisma/prisma/issues/12239) - [Prisma migrate always DROP DEFAULT on CockroachDB](https://togithub.com/prisma/prisma/issues/12244) - [Allow using a custom root certificate with SQL Server](https://togithub.com/prisma/prisma/issues/12672) - [Write basic tests for cockroachdb in prisma/prisma](https://togithub.com/prisma/prisma/issues/12926) - [CockroachDB: re-add Oid native type](https://togithub.com/prisma/prisma/issues/13003) - [Support Generalized Inverted Indices on CockroachDB](https://togithub.com/prisma/prisma/issues/13065) - [Missing validation on decimal defaults](https://togithub.com/prisma/prisma/issues/13074) - [Log error details in console when we fail to submit an error report](https://togithub.com/prisma/prisma/issues/13256) ##### Prisma Migrate - [CockroachDB session settings for migrations](https://togithub.com/prisma/prisma/issues/12113) ##### Language tools (e.g. VS Code) - [Autocompletion support for composite type indexes](https://togithub.com/prisma/language-tools/issues/1102) - [Add tests for new CockroachDB native types](https://togithub.com/prisma/language-tools/issues/1134) - [Completion for new CockroachDB sequences](https://togithub.com/prisma/language-tools/issues/1144) #### Credits Huge thanks to [@​ever0de](https://togithub.com/ever0de), [@​flatplate](https://togithub.com/flatplate), [@​njmaeff](https://togithub.com/njmaeff), [@​tnzk](https://togithub.com/tnzk), [@​DePasqualeOrg](https://togithub.com/DePasqualeOrg) for helping! #### Prisma Day [Prisma Day](https://prisma.io/day) is back this year, and it'll be on June 15 - 16 at the JamesJune Sommergarten in Berlin. Join us in-person or online for talks and workshops on modern application development and databases. Come and meet and chat with the team behind the Prisma ORM and Prisma Data Platform. #### πŸ’Ό 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 hiring for a number of roles: [Technical Support Engineer](https://grnh.se/ff0d8a702us), [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us), and a [Developer Advocate(Frontend/ Fullstack)](https://grnh.se/894b275b2us). You can find more jobs we're hiring for on our [jobs page](https://www.prisma.io/jobs). Feel free to read through 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/XoS8D8q8icE) livestream. The stream takes place [on YouTube](https://youtu.be/XoS8D8q8icE) on **Thursday, May 12** at **5 pm Berlin | 8 am San Francisco**.

Configuration

πŸ“… Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.



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