Prisma 5.20.0stable Released Sep 24, 2024
Impact Score: 5/10

Prisma 5.20.0 β€” Release Notes & Engineering Impact

Source available β€” automated, not human-reviewed

Component: prisma Β· Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Compatibility not verified β€” check source notes
$ npm install --save-dev --save-exact [email protected]
πŸ“„ .MD
⚑ Executive Summary (TL;DR)

Prisma 5.20.0. Source highlight: 🌟 **Help us spread the word about Prisma by starring the repo or posting on X about the release.** 🌟

Who Does This Impact? (Role-Based Analysis)

πŸ’» Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

πŸ“Š Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

βš™οΈ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

πŸ”§ Bug Fixes & Patches (1)

  • Fix broken engine size publishing workflow
πŸ“„ View Raw Release Notes (Original Developer Log)
🌟 **Help us spread the word about Prisma by starring the repo or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.20.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.20.0) about the release.** 🌟 ## Highlights ### `strictUndefinedChecks` in Preview With Prisma ORM 5.20.0, the Preview feature `strictUndefinedChecks` will disallow any value that is explicitly `undefined` and will be a runtime error. This change is direct feedback from [this GitHub issue](https://github.com/prisma/prisma/issues/20169) and follows [our latest proposal](https://github.com/prisma/prisma/issues/20169#issuecomment-2338360300) on the same issue. To demonstrate the change, take the following code snippet: ```tsx prisma.table.deleteMany({ where: { // If `nullableThing` is nullish, this query will remove all data. email: nullableThing?.property, } }) ``` In Prisma ORM 5.19.0 and below, this could result in unintended behavior. In Prisma ORM 5.20.0, if the `strictUndefinedChecks` Preview feature is enabled, you will get a runtime error instead: ```tsx Invalid \`prisma.user.findMany()\` invocation in /client/tests/functional/strictUndefinedChecks/test.ts:0:0 XX }) XX XX test('throws on undefined input field', async () => { β†’ XX const result = prisma.user.deleteMany({ where: { email: undefined ~~~~~~~~~ } }) Invalid value for argument \`where\`: explicitly \`undefined\` values are not allowed." ``` We have also introduced the `Prisma.skip` symbol, which will allow you to get the previous behavior if desired. ```tsx prisma.table.findMany({ where: { // Use Prisma.skip to skip parts of the query email: nullableEmail ?? Prisma.skip } }) ``` From Prisma ORM 5.20.0 onward, we recommend enabling `strictUndefinedChecks`, along with the TypeScript compiler option `exactOptionalPropertyTypes`, which will help catch cases of undefined values at compile time. Together, these two changes will help protect your Prisma queries from potentially destructive behavior. `strictUndefinedChecks` will be a valid Preview feature for the remainder of Prisma ORM 5. With our next major version, this behavior will become the default and the Preview feature will be β€œgraduated” to Generally Available. If you have any questions or feedback about `strictUndefinedChecks`, please ask/comment in our dedicated [Preview feature GitHub discussion](https://github.com/prisma/prisma/discussions/25271). ### `typedSql` bug fix Thank you to everyone who has tried out our [`typedSql` Preview feature](https://www.prisma.io/blog/announcing-typedsql-make-your-raw-sql-queries-type-safe-with-prisma-orm) and [provided feedback](https://github.com/prisma/prisma/discussions/25106)! This release has a quick fix for typescript files generated when Prisma Schema enums had hyphens. ## Fixes and improvements ### Prisma - [Prisma incorrectly parses CRDB's FK constraint error as `not available`.](https://github.com/prisma/prisma/issues/24072) - [Invalid TypeScript files created by `generate` when typedSql is enabled and enum contains hyphens.](https://github.com/prisma/prisma/issues/25163) - [`@prisma/internals` didn't list `ts-toolbelt` in dependencies.](https://github.com/prisma/prisma/issues/17952) - [using `$extends` prevents model comments from being passed to TypeScript](https://github.com/prisma/prisma/issues/24648) ### Prisma Engines - [Planetscale engine tests: interactive_tx](https://github.com/prisma/prisma-engines/issues/4469) - [Fix broken engine size publishing workflow](https://github.com/prisma/prisma-engines/issues/4991) ## Credits Huge thanks to @mcuelenaere, @pagewang0, @key-moon, @pranayat, @yubrot, @thijmenjk, @mydea, @HRM, @haaawk, @baileywickham, @brian-dlee, @nickcarnival, @eruditmorina, @nzakas, and @gutyerrez for helping!