This is one of the first three pull requests with dependency updates we've sent your way. We tried to start with a few easy patch-level updates. Hopefully your tests will pass and you can merge this pull request without too much risk. This should give you an idea how Depfu works in general.
After you merge your first pull request, we'll send you a few more. We'll never open more than seven PRs at the same time so you're not getting overwhelmed with updates.
Let us know if you have any questions. Thanks so much for giving Depfu a try!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
🌟Help us spread the word about Prisma by starring the repo or tweeting 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 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.
To learn more about the connector and how it differs from PostgreSQL, head to our documentation.
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:
To learn more about configuring index types in your schema, refer to our documentation.
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:
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:
constres=awaitprisma.$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("<some_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:
awaitprisma.$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:
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:
awaitprisma.$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:
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:
awaitprisma.$executeRaw`INSERT INTO "Table" ("bigint", "bytes", "decimal") VALUES (${BigInt("123")}, ${Buffer.from([1,2,3])}, ${newPrisma.Decimal("12.23")});`
Prisma 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.
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu close
Closes this PR and deletes the branch
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Welcome to Depfu 👋
This is one of the first three pull requests with dependency updates we've sent your way. We tried to start with a few easy patch-level updates. Hopefully your tests will pass and you can merge this pull request without too much risk. This should give you an idea how Depfu works in general.
After you merge your first pull request, we'll send you a few more. We'll never open more than seven PRs at the same time so you're not getting overwhelmed with updates.
Let us know if you have any questions. Thanks so much for giving Depfu a try!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ prisma (3.13.0 → 3.14.0) · Repo
Release Notes
3.14.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 70 commits:
feat(sdk): add error reason when it is not possible to submit error report (#13257)
chore(deps): update engines to 3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a (#13255)
chore(deps): update engines to 3.14.0-35.b139d939b80290fb7fb7a0455a577fcf02fa95cd (#13254)
fix(client): Fix package path in `generate` output (#13031)
chore(deps): update engines to 3.14.0-34.5cf26752c9aac4cf41ddca31b999a4a4906fdae8 (#13252)
fix(client): json stringify overflow (#12916)
chore(deps): update engines to 3.14.0-33.656da0566481bafc47a8a1f135ab368779db1893 (#13251)
chore(deps): update jest
fix(db pull): --url no longer overrides the datasource provider (#12910)
chore(deps): update dependency husky to v8 (#13246)
chore(deps): update dependency ts-jest to v28
chore(deps): update engines to 3.14.0-32.13d12f1fc9655c2d6bbd8f772677f0dc1e662963 (#13248)
fix(client): Correctly serialize Decimal.js in an input (#13215)
fix(client): use correct $-names in error messages (#13190)
test(client): Make passing custom arguments to functional tests easier (#13226)
chore: add contributors (#13231)
chore(deps): update engines to 3.14.0-31.bdec961782f52c38a7daf86dc155e89e6405d156 (#13228)
ci: try running integration-tests package tests all at once (#13224)
chore(deps): update engines to 3.14.0-30.17e2b313119d2b13299393860d690564a3ecd47f (#13221)
chore(deps): update react-prisma (#13139)
chore(tests): highlight schema in vscode (#13204)
chore(deps): update engines to 3.14.0-28.7065cb28b6b34148da7ce0e72533104aab97466e (#13202)
ci: CockroachDB image beta.5 (#13185)
Revert "fix(client): join `runtimeDir` and `runtimeName` using `path.join()` (#12425)" (#13201)
fix(client): integrate queryRaw improvements (#13066)
fix(client): join `runtimeDir` and `runtimeName` using `path.join()` (#12425)
fix(client): re-export in the way that cjs-module-lexer can detect (#12907)
chore: update .gitignore (#13029)
chore(deps): update studio to v0.460.0 (#13167)
chore(deps): update engines to 3.14.0-20.da5675bdd71708d45094cf108b148b0a2728def2 (#13161)
ci: Removing /rebase GH Actions (#13159)
chore(deps): update engines to 3.14.0-19.3a4f2d3390e654e93d6a1ebc85eaa056249089e0 (#13154)
chore(deps): update dependency @types/jest to v27.5.0
chore(deps): update engines to 3.14.0-18.a66fa1f702fa1b49f12a406a62d0d01efb72b1d6 (#13148)
chore(deps): update dependency @types/node to v16.11.33
chore(deps): update engines to 3.14.0-17.cbc216d31d31c3b722f24b03f68be12a595dfea6 (#13147)
chore(deps): update engines to 3.14.0-16.51eedf92d49b198f6699eacd692c99a77a3ca86a (#13144)
chore: use pnpm v6 for Renovate
chore(deps): update engines to 3.14.0-15.8195e4e838b2c6d535ad38a39d010665acdb5ab2 (#13129)
test: Add yarn dev dependency to sdk (#13125)
ci: Remove unused GH Actions workflows and move scripts into subfolder (#13087)
fix(engine-core): tests for terminals with links support (#13118)
client: prune backup scripts (#13061)
chore(client): documented postinstall script during deep-dive (#13064)
ci(update-engines-version): Output Prisma-Engines commit hash with link (#13079)
chore(react-prisma): undo renovate change for react peerdep min version
chore: change syntax highlighting from GraphQL to Prisma for fixtures
fix(tests): use correct key to get active provider (#13094)
fix(migrate): use correct provider name when creating CockroachDB db (#13051)
fix: correct "setup" to "set up" when used as a verb (#13104)
ci: print gh actions workflow_dispatch input (#13078)
chore(deps): update peter-evans/create-or-update-comment action to v2 (#13091)
chore(deps): update engines to 3.14.0-12.fd79bd1b7ef358f87831ab08bc0b01470c2fde8a (#13114)
ci: pin pnpm v6 (#13113)
chore(deps): pin dependency ts-pattern to 4.0.2 (#13096)
chore(cli): moved ts-pattern to devDependencies (#13075)
ci: /rebase (#13090)
Delete rebase.yml
ci: Create Rebase GH Action to be used via `/rebase` in comments (#13086)
chore(deps): update engines to 3.14.0-8.194f3643b83b9089974d7a9ee6fbe321c100d390 (#13071)
chore(deps): update engines to 3.14.0-7.4ae1eb270190caa8f6baacc69dbc167bb6fa36f6 (#13067)
chore(deps): update engines to 3.14.0-6.294b3a9f01da4da7fb151a057030618374b3f120 (#13047)
chore(deps): update engines to 3.14.0-3.2f9463cbc0d7477d0a162ecb30bb747e4287385c (#13030)
fix(deps): update dependency p-retry to v4.6.2 (#13025)
chore(deps): update definitelytyped (#13019)
chore(deps): update react-prisma
chore(deps): update react-prisma
chore(deps): update jest
chore(deps): update engines to 3.14.0-2.cfc4d6eac26c4229aad752aa92eee7df06be3a2d (#13016)
chore: make generatorHandler test snapshot clearer for invalid executable (#13013)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands