Prisma: 5.3.0 Release

Release date:
September 11, 2023
Previous version:
5.2.0 (released August 22, 2023)
Magnitude:
1,000 Diff Delta
Contributors:
9 total committers
Data confidence:
Commits:

54 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored September 4, 2023
Authored August 28, 2023
Authored September 1, 2023

Top Contributors in 5.3.0

SevInf
millsp
Jolg42
aqrln
Druue
renovate-bot
stephenwade
prisma-bot
janpio

Directory Browser for 5.3.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

Highlights

In this sprint, we’ve made bug fixes and overall improvements to Prisma Client. We’ve been working on a few projects that will be announced soon. Stay tuned for the upcoming releases for updates!

Improvements and bug fixes

We made the following changes:

Prisma Client improvements

  • Validation for undefined values in arrays in Json fields We added runtime validation for undefined values in arrays in Json fields. Prisma Client will now return an error when an array contains an undefined value. Therefore, we encourage you to add validation that either removes the value or transforms it to null if you stumble on the runtime validation:
// Query
await prisma.user.findMany({
 where: {
   // JSON field
   preferences: [undefined, '"theme": "dark"', null, ]
 }
})

// Example error message on running the query
Can not use `undefined` value within array. Use `null` or filter out `undefined` values
  • Performance improvements for models with many unique fields

This release improves Prisma Client’s memory consumption for models with many @unique constraints. This was a regression from version 4.10.1, where in some cases, if a model had many unique constraints, Prisma Client would use up a lot of available memory.

  • Fixed the segmentation fault error that used to occur on ARM64 Linux binary targets
  • Metrics Preview feature improvements:
    • We updated the counters and gauge properties
    • We fixed the bug that caused the prisma_pool_connections_open metric to have a negative value in some cases.

Prisma Migrate improvements

  • Fixed an introspection bug for MongoDB views. Previously, if a MongoDB database contained a view, prisma db pull would throw an error. We resolved this, and views are now ignored.
  • Added the PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK environment variable that enables you to disable advisory locking.

VS Code extension improvements

  • Added support for rendering multi-line comments in tooltips when hovering on a block.
  • Improved the auto-completion for composite types in other blocks.
  • Added a Code Action that allows you to replace SetDefault with NoAction when using MySQL and the default/foreignKeys relation mode.

Fixes and improvements

Prisma Migrate

Prisma Client

Language tools (e.g. VS Code)

Credits

Huge thanks to @alencardc, @Oreilles, @christianledgard, @skyzh, @alula, @michaelpoellath, @RobertCraigie, @stephenwade for helping!