k-furusho / todo-app-nest-api

REST API for the NestJS + Next.js Todo application
0 stars 0 forks source link

Build(deps): Bump @prisma/client from 4.4.0 to 4.7.0 #81

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps @prisma/client from 4.4.0 to 4.7.0.

Release notes

Sourced from @โ€‹prisma/client's releases.

4.7.0

๐ŸŒŸ Help us spread the word about Prisma by starring the repo or tweeting about the release. ๐ŸŒŸ

Highlights

Interactive transactions are now Generally Available

After an extensive Preview phase and lots of great feedback from our community, we're excited to announce that interactiveTransactions is now Generally Available and production ready! ๐Ÿš€

Interactive transactions allow you to pass an async function into a $transaction, and execute any code you like between the individual Prisma Client queries. Once the application reaches the end of the function, the transaction is committed to the database. If your application encounters an error as the transaction is being executed, the function will throw an exception and automatically rollback the transaction.

Here are some of the feature highlights we've built:

Here's an example of an interactive transaction with a Serializable isolation level:

await prisma.$transaction(
  async (prisma) => {
    // Your transaction...
  },
  {
    isolationLevel: Prisma.TransactionIsolationLevel.Serializable,
    maxWait: 5000,
    timeout: 10000,
  }
)

You can now remove the interactiveTransactions Preview feature in your schema.

Relation mode is Generally Available

This release marks relationMode="prisma" as stable for our users working with databases that don't rely on foreign keys to manage relations. ๐ŸŽ‰

Prismaโ€™s relation mode started as a way to support PlanetScale which does not allow you to create foreign keys for better online migration support. We transformed that into our Referential Integrity Emulation in 3.1.1 when we realised that more users could benefit from it, and then integrated it as the default mode for MongoDB, which generally does not have foreign keys. Prisma needed to use emulation to give the same guarantees.

We then realized the feature was more than just referential integrity and affected how relations work. To reflect this, we renamed the feature to relation mode and the datasource property to relationMode in 4.5.0

Index warnings for relationMode = "prisma"

In this release, we've added a warning to our Prisma schema validation that informs you that the lack of foreign keys might result in slower performance โ€” and that you should add an @@index manually to your schema to counter that. This ensures your queries are equally fast in relation mode prisma as they are with foreign keys.

With relationMode = "prisma", no foreign keys are used, so relation fields will not benefit from the index usually created by the relational database under the hood. This can lead to slower performance when querying these fields. We recommend manually adding an index.

We also added a fix to our VS Code extension to help adding the suggested index with minimal effort:

... (truncated)

Commits
  • 127167c fix(client): Don't recompute extensions list on every access (#16520)
  • fb151af ci(buildkite): engines 4.7.0-74 with node:14-buster (#16519)
  • 10952b7 feat(client): Prisma.defineExtension (#16515)
  • d0392bc feat(client): Add extension name to the errors (#16506)
  • 4b50f8e perf(client): Cache extensions computations (#16496)
  • 2c05329 ci: try node:14-bullseye for buildkite image - 4.7.0-73 (#16503)
  • b30c5bb test(client): Add missing test for null result with extensions (#16486)
  • 9c0d791 chore(deps): update engines to 4.7.0-69.67e7a0088eab37d82b6ee8415d7293ce306b1...
  • 8d8a1ed feat(validate): add lint warnings (#16458)
  • 8509fbb Ensure #16354 is fixed
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

Superseded by #83.