From f55ea743ebce395bb40a26d625adcb3158ee9aa7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:54:42 +0200 Subject: [PATCH] fix(deps): update dependency @prisma/client to v4.16.2 (#82) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@prisma/client](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma)) | [`4.12.0` -> `4.16.2`](https://renovatebot.com/diffs/npm/@prisma%2fclient/4.12.0/4.16.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/4.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/4.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/4.12.0/4.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/4.12.0/4.16.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prisma/prisma (@​prisma/client) ### [`v4.16.2`](https://togithub.com/prisma/prisma/releases/tag/4.16.2) [Compare Source](https://togithub.com/prisma/prisma/compare/4.16.1...4.16.2) Today, we are issuing the `4.16.2` patch release. #### Fixes in Prisma Client - [4.16: (MongoDB) Generated types for list composites are incorrect](https://togithub.com/prisma/prisma/issues/19880) - [Getting wrong types with prisma client extensions](https://togithub.com/prisma/prisma/issues/19958) - [Prisma Client fluent API does not work with extends anymore on 4.16.1](https://togithub.com/prisma/prisma/issues/19921) - [Prisma Client Extensions: `$allModels: { $allOperations }` sets query type to `never` ](https://togithub.com/prisma/prisma/issues/19888) - [Result types are incorrectly inferred when `undefined` explicitly passed to `select`/`include`](https://togithub.com/prisma/prisma/issues/19997) ### [`v4.16.1`](https://togithub.com/prisma/prisma/releases/tag/4.16.1) [Compare Source](https://togithub.com/prisma/prisma/compare/4.16.0...4.16.1) Today, we are issuing the `4.16.1` patch release. #### Fixes in Prisma Client - [Field references are not available on extended clients](https://togithub.com/prisma/prisma/issues/19892) - [4.16.x cannot wrap `$extend` in factory function when `compilerOptions.composite` is `true`](https://togithub.com/prisma/prisma/issues/19866) - [Prisma Schema Type inside a Type not generating a right Payload](https://togithub.com/prisma/prisma/issues/19890) - [Query in findMany in prisma extends returns a wrong type](https://togithub.com/prisma/prisma/issues/19854) - [4.16.0 Count query is not returning the right type when in a transaction](https://togithub.com/prisma/prisma/issues/19867) - [FindMany returns wrong type after extending prisma client](https://togithub.com/prisma/prisma/issues/19864) - [Can't specify $queryRawUnsafe return type after extending prisma client](https://togithub.com/prisma/prisma/issues/19862) ### [`v4.16.0`](https://togithub.com/prisma/prisma/releases/tag/4.16.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.15.0...4.16.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%20v4.16.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.16.0) about the release.** ๐ŸŒŸ #### Highlights This release promotes the following [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) features to [General Availability](https://www.prisma.io/docs/about/prisma/releases#generally-available-ga): - Prisma Client extensions - Ordering by nulls first and last - Count by filtered relation ##### Prisma Client extensions are Generally Available Today, weโ€™re very excited to announce that [Prisma Client extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions) are Generally Available and production-ready! This means you can use the feature without the `clientExtensions` Preview feature flag.๐Ÿš€ Prisma Client extensions are a powerful new feature for adding functionality on top of your Prisma Client in a type-safe manner. With this feature, you can create simple, but flexible solutions. Prisma Client extensions have 4 different types of components that can be included in an extension: - [**Result** extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/result) components: add custom fields and methods to query result objects, for example, virtual/computed fields. - [**Model** extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/model) components: enable you to add new methods to your models alongside existing model methods such as `findMany`. - [**Query** extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/query) components: let you hook into the lifecycle of a query and perform side effects, modify query arguments, or modify the results in a type-safe way. These are an alternative to [middleware](https://www.prisma.io/docs/concepts/components/prisma-client/middleware) that provide complete type safety and can be applied in an ad-hoc manner to different extensions. - [**Client** extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/client) components: allow you to add new top-level methods to Prisma Client. You can use this to extend Prisma Client with functionality that isnโ€™t tied to specific models. ```tsx const prisma = new PrismaClient().$extends({ name: "extension-name", result: { /* ... */ }, model: { /* ... */ }, query: { /* ... */ }, client: { /* ... */ }, }); ``` You can also create and publish extensions for others to use. Learn more about how to share extensions in our [documentation](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/shared-extensions). ##### More features and changes made to Client Extensions We also made the following improvements to Prisma Client extensions in preparation for General Availability: - Added a top-level `$allOperations` method for `query` component that captures all model operations as well as top-level raw queries. Refer to our [documentation](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/query#modify-all-prisma-client-operations) for more information. ```tsx const prisma = new PrismaClient().$extends({ query: { $allOperations({ args, query, operation, model }) { /* your extension's logic here */ } } }) ``` - [`Prisma.validator`](https://www.prisma.io/docs/concepts/components/prisma-client/advanced-type-safety/prisma-validator) can now also be used for extended types: ```tsx const prisma = new PrismaClient().$extends({/* ... */}) const data = Prisma.validator(prisma, 'user', 'findFirst', 'select')({ id: true, }) ``` - `query` callbacks for `$queryRaw` and `$executeRaw` will always receive `Sql` instance as `args`. This instance can be used to compose a new query using `Prisma.sql`: ```tsx const prisma = new PrismaClient().$extends({ query: { $queryRaw({ args, query }) { return query(Prisma.sql`START TRANSACTION; ${args}; COMMIT;`) } } }) ``` - `$on` cannot be called after extending Prisma Client. Therefore, if you want to use event handlers together with extensions, we recommend using the `$on` method before `$extends`. ```tsx const prisma = new PrismaClient() .$on(/* ... */) .$extends({/* ... */}) ``` - We updated the import path for utilities used for authoring extension to `@prisma/client/extension` rather than `@prisma/client` ```diff + import { Prisma } from "@​prisma/client/extension" - import { Prisma } from "@​prisma/client" ``` ##### Deprecating Middleware We also took this opportunity to [deprecate](https://en.wikipedia.org/wiki/Deprecation) Prisma Clientโ€™s [middleware](https://www.prisma.io/docs/concepts/components/prisma-client/middleware). We recommend using to using [Prisma Client `query` extension components](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/query) which can be used to achieve the same functionality and with better type safety. > ๐Ÿšง Middleware will still be available in Prisma Clientโ€™s API. However, we recommend using Prisma Client extensions over middleware. ##### Ordering by nulls first and last is now Generally Available Starting with this release, weโ€™re excited to announce that `orderByNulls` is now Generally Available! This means you can use the feature without the `orderByNulls` Preview feature flag.๐ŸŒŸ We introduced this feature in [4.1.0](https://togithub.com/prisma/prisma/releases/tag/4.1.0) to enable you to sort records with null fields to either appear at the beginning or end of the result. The following example query sorts posts by `updatedAt`, with records having a null value at the end of the list: ```tsx await prisma.post.findMany({ orderBy: { updatedAt: { sort: 'asc', nulls: 'last' }, }, }) ``` To learn more about this feature, refer to our [documentation](https://www.prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#sort-with-null-records-first-or-last). Weโ€™re excited to see what you will build! Feel free to share with us what you build on Twitter, Slack, or Discord. ##### Count by filtered relation is now Generally Available This release moves the `filteredRelationCount` Preview feature to General Availability! This means you can use the feature without the `filteredRelationCount` Preview feature flag. We first introduced this feature in [4.3.0](https://togithub.com/prisma/prisma/releases/tag/4.3.0) to add the ability to count by filtered relations. The following query, for example, counts all posts with the title โ€œHello!โ€: ```tsx await prisma.user.findMany({ select: { _count: { select: { posts: { where: { title: 'Hello!' } }, }, }, }, }) ``` To learn more about this feature, refer to our [documentation](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#filter-the-relation-count). ##### Introspection warnings for expression indexes In the last two releases, [4.13.0](https://togithub.com/prisma/prisma/releases/tag/4.13.0) and [4.14.0](https://togithub.com/prisma/prisma/releases/tag/4.14.0), we added 9 introspection warnings. These warnings surface features in use in your database that cannot currently be represented in the Prisma schema. In this release, weโ€™re adding one more introspection warning to the list: [expression indexes](https://togithub.com/prisma/prisma/issues/2504). On database introspection, the Prisma CLI will surface the feature with a warning, and a comment in your Prisma schema for sections for each feature in use. The warnings will also contain instructions for workarounds on how to use the feature. #### Fixes and improvements ##### Prisma Client - [Attach comments to enum values](https://togithub.com/prisma/prisma/issues/3807) - [Extend Prisma Client](https://togithub.com/prisma/prisma/issues/7161) - [Triple-slash Comments should attach to Composite Types](https://togithub.com/prisma/prisma/issues/13726) - [Nested disconnect fails on MongoDB with extendedWhereUnique](https://togithub.com/prisma/prisma/issues/16869) - [\[ClientExtensions, TypeScript\] Fields of custom type aren't available when using the ClientExtensions preview-feature, unless `select`'d explicitly. ](https://togithub.com/prisma/prisma/issues/17388) - [Extensions incorrect typings generated (casing)](https://togithub.com/prisma/prisma/issues/17405) - [Misleading error message of `prisma generate` when running it directly after installing `prisma`](https://togithub.com/prisma/prisma/issues/17639) - [Prisma.validator: with clientExtensions enabled, Typescript can no longer compute types](https://togithub.com/prisma/prisma/issues/17767) - [enum docstrings do not make it to the prisma client](https://togithub.com/prisma/prisma/issues/17828) - [VScode behavior is very slow while using clientExtensions](https://togithub.com/prisma/prisma/issues/17843) - [Client extensions in interactive transactions are bound to the base client](https://togithub.com/prisma/prisma/issues/17948) - [`$runCommandRaw` is not passing the expected data to middleware or client extension](https://togithub.com/prisma/prisma/issues/18092) - [PCE: Improve runtime types in raw query extensions](https://togithub.com/prisma/prisma/issues/18125) - [Sequential transactions run out of order when using client extensions and middleware](https://togithub.com/prisma/prisma/issues/18276) - [Client Extension: Make `.prismaVersion.client` available on "@​prisma/client/scripts/default-index"](https://togithub.com/prisma/prisma/issues/18829) - [Cannot create record with Prisma.DbNull when clientExtensions enabled](https://togithub.com/prisma/prisma/issues/18854) - [Extended client raw queries fail when using the Prisma.sql helper](https://togithub.com/prisma/prisma/issues/18875) - [jsonProtocol: array shortcut is missing for `distinct` field](https://togithub.com/prisma/prisma/issues/18906) - [Prisma Client Extension: support `Prisma.validator`](https://togithub.com/prisma/prisma/issues/18943) - [Prisma Client: make `clientExtensions` GA ](https://togithub.com/prisma/prisma/issues/19416) - [PCE: Query extensions of `$queryRawUnsafe` also triggers `$allModels.$allOperations`](https://togithub.com/prisma/prisma/issues/19550) - [PCE: `$on` applied to an extended client is also bound to the parent client](https://togithub.com/prisma/prisma/issues/19552) - [Type "never" returned from nested properties when using "select" after enabling data proxy + accelerate](https://togithub.com/prisma/prisma/issues/19572) - [`$queryRaw*` is broken in interactive transactions together with `clientExtensions` in `4.16.0-dev.17`](https://togithub.com/prisma/prisma/issues/19651) - [Deploying to an offline environment fails because it tries to download a Prisma engine checksum file ](https://togithub.com/prisma/prisma/issues/19666) - [jsonProtocol: Wrong error message shown for validation error for checked/unchecked types](https://togithub.com/prisma/prisma/issues/19707) - [Bug: FindXOrThrow don't get batched on the engine](https://togithub.com/prisma/prisma/issues/16625) ##### Prisma Migrate - [Allow skipping sha checksum](https://togithub.com/prisma/prisma/issues/12230) - [Documentation not available in DMMF for MongoDB `type`s](https://togithub.com/prisma/prisma/issues/18551) - [`prisma db pull` gets rid of `@default(uuid())` on re-introspection](https://togithub.com/prisma/prisma/issues/18857) ##### Language tools (e.g. VS Code) - [`Go to Definition` does not work when target model contains a field with a type name that starts with the same name](https://togithub.com/prisma/language-tools/issues/1247) ##### Prisma Studio - [`Error: spawn xdg-open ENOENT` on `prisma studio`](https://togithub.com/prisma/studio/issues/1128) #### ๐Ÿ“บ Join us for another "What's new in Prisma" live stream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream. The stream takes place [on YouTube](https://youtu.be/pLxsipkdQmc) on **Thursday, June 22** at **5 pm Berlin | 8 am San Francisco**. ### [`v4.15.0`](https://togithub.com/prisma/prisma/releases/tag/4.15.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.14.1...4.15.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%20v4.15.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.15.0) about the release.** ๐ŸŒŸ #### Highlights For this release, we focused on fixing bugs and making smaller quality-of-life improvements. ##### Support for custom arguments for `prisma db seed` This release adds support for defining and passing arbitrary arguments to `prisma db seed`. This creates the opportunity for you to define your own arguments in your seed file that you could pass to the `prisma db seed` command. A few example use-cases include, but are not limited to: - Seeding different data in different environments - Partially seeding data in some tables Here is an example `seed.ts` file that defines custom arguments for seeding different data in different environments: ```tsx // prisma/seed.ts import { parseArgs } from "node:util"; const options = { environment: { type: 'string', }, } async function main() { const { values: { environment } } = parseArgs({ options }) switch (environment) { case "development": /** do something for development */ break; case "test": /** do something for test environment */ break; default: break; } } main() ``` You can then provide the `environment` argument when executing the seed script as follows: ```bash npx prisma db seed -- --environment development ``` Let us know what you think, share example usage of this feature, and create a [bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&projects=\&template=bug_report.yml) if you run into any issues. ##### Improved error messages when Query Engine file is not found This release improves the error messages returned by Prisma Client when the Query Engine file is not found. A few reasons the Query Engine file might be missing from your application bundle include when: - The downloaded Query Engine doesnโ€™t match the runtime/ target platform your application is running on. - The Query Engine is not copied to your final application bundle during the build step. We hope these error messages are helpful while debugging your application. ##### Prisma VS Code extension improvements In this release, we made a few improvements to our [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma): 1. Updated the file system watcher that is responsible for restarting the TypeScript server when `prisma generate` is run to ensure the types are in sync > **Note**: > > - This new approach is currently only available on Windows and Linux. We plan on adding support for the new file system watcher on macOS soon. > - This requires both Prisma CLI & VS code extension version `4.15.0` or higher 2. Added [Quick Fixes action](https://code.visualstudio.com/docs/editor/refactoring#\_code-actions-quick-fixes-and-refactorings) for unique identifiers for MongoDB to add the `@map("_id")` attribute function when itโ€™s missing on an identifier field https://user-images.githubusercontent.com/29753584/239030357-2b6613bf-b6b5-48f2-a2df-b93df0692fda.mov 3. Support for [renaming symbols](https://code.visualstudio.com/docs/editor/refactoring#\_rename-symbol) for composite types and views https://user-images.githubusercontent.com/33921841/242042225-87dfee9b-0698-4e1d-b05e-5cb0b8ab1349.mov #### Fixes and improvements ##### Prisma Client - [Prisma generate - `Error: write EPIPE` on WSL <-> Windows](https://togithub.com/prisma/prisma/issues/3294) - [`prisma generate` is blocked by `query-engine-rhel-openssl-1.0.x` opening in Notepad on Windows](https://togithub.com/prisma/prisma/issues/4308) - [Generated client output path hardcoded to build environment](https://togithub.com/prisma/prisma/issues/7228) - [Issue with Yarn Workspace Monorepo: Query engine binary for current platform could not be found.](https://togithub.com/prisma/prisma/issues/7311) - [Cloning a project with checked in `node_modules` (from another platform) leads to platform engine not being present](https://togithub.com/prisma/prisma/issues/7848) - [SvelteKit, Vite and Prisma "module not defined"](https://togithub.com/prisma/prisma/issues/10404) - [Schema File Not Found in non monorepo with custom `output`](https://togithub.com/prisma/prisma/issues/10433) - [Deploying to Cloudflare Workers | "PrismaClient is unable to be run in the browser"](https://togithub.com/prisma/prisma/issues/12981) - [Inline/bundle the contents of the prisma schema on generate](https://togithub.com/prisma/prisma/issues/13052) - [Netlify: `Query engine library for current platform "rhel-openssl-1.0.x" could not be found. You incorrectly pinned it to rhel-openssl-1.0.x`](https://togithub.com/prisma/prisma/issues/13266) - [Query Engine Library Not Found](https://togithub.com/prisma/prisma/issues/13396) - [No client schema when using PrismaClient during cached (standard) Netlify build](https://togithub.com/prisma/prisma/issues/13475) - [Module "@​prisma/client" has no exported member "PrismaClient"](https://togithub.com/prisma/prisma/issues/13946) - [EPERM: operation not permitted](https://togithub.com/prisma/prisma/issues/14626) - [prisma/client crashes when used with older versions of react-refresh](https://togithub.com/prisma/prisma/issues/14953) - [Unable to run prisma cli in pnpm monorepo from workspace install](https://togithub.com/prisma/prisma/issues/15081) - [Misleading error message when the query engine is not found](https://togithub.com/prisma/prisma/issues/15292) - [When setting custom client output directory, generated package.json does not include "sideEffects: false"](https://togithub.com/prisma/prisma/issues/15301) - [ You already added the platform "debian-openssl-1.1.x" to the "generator" block in the "schema.prisma" file as described in https://pris.ly/d/client-generator, but something went wrong. ](https://togithub.com/prisma/prisma/issues/15631) - [Prisma seems to be looking in the wrong location for rhel-openssl-1.0.x](https://togithub.com/prisma/prisma/issues/15638) - [Can't find prisma engine](https://togithub.com/prisma/prisma/issues/16872) - [`Cannot find name '$PrismaModel'` due to feature `extendedWhereUnique` with preview feature `fieldReference`](https://togithub.com/prisma/prisma/issues/16997) - [Netlify build fails with PrismaClientInitializationError](https://togithub.com/prisma/prisma/issues/17167) - [i'm getting the error while requesting the api ](https://togithub.com/prisma/prisma/issues/17906) - [Query engine library for current platform could not be found.](https://togithub.com/prisma/prisma/issues/17996) - [Prisma unable to reconnect if initial connection fails](https://togithub.com/prisma/prisma/issues/18071) - [GraphQL protocol encoder incorrectly turns empty array into empty object.](https://togithub.com/prisma/prisma/issues/18846) - [GraphQL protocol: Invalid `Date` values silently turn into `nulls`](https://togithub.com/prisma/prisma/issues/18970) - [@​prisma/client/edge + Cloudflare Worker / wrangler = Could not resolve "os"](https://togithub.com/prisma/prisma/issues/19174) - [Client is bricked from connecting to DB if first attempt fails.](https://togithub.com/prisma/prisma/issues/19182) - [JSON protocol: incorrect recursive composites detection through multiple nesting levels](https://togithub.com/prisma/prisma/issues/19373) - [`fieldReference` is not working with enums](https://togithub.com/prisma/prisma/issues/19449) ##### Prisma Migrate - [Pass extra arguments to `prisma db seed` to the seed command](https://togithub.com/prisma/prisma/issues/9403) - [Typo in generating migration SQL to add enum.](https://togithub.com/prisma/prisma/issues/19352) ##### Language tools (e.g. VS Code) - [MongoDB: Quick fix for missing `@map("_id")` annotation](https://togithub.com/prisma/language-tools/issues/762) - [Rename composite types](https://togithub.com/prisma/language-tools/issues/1135) - [Views: Support for rename](https://togithub.com/prisma/language-tools/issues/1365) - [TextDocument deprecation](https://togithub.com/prisma/language-tools/issues/1421) - [Lib name change vsce -> @​vscode/vsce](https://togithub.com/prisma/language-tools/issues/1425) #### Credits Huge thanks to [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​art049](https://togithub.com/art049), [@​luxaritas](https://togithub.com/luxaritas), [@​mrazauskas](https://togithub.com/mrazauskas), [@​maxmartynov](https://togithub.com/maxmartynov), [@​haneenmahd](https://togithub.com/haneenmahd) for helping! #### ๐Ÿ“บ Join us for another "What's new in Prisma" live stream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream. The stream takes place [on YouTube](https://youtu.be/t7jsqf0DeNc) on **Thursday, June 1** at **5 pm Berlin | 8 am San Francisco**. ### [`v4.14.1`](https://togithub.com/prisma/prisma/releases/tag/4.14.1) [Compare Source](https://togithub.com/prisma/prisma/compare/4.14.0...4.14.1) Today, we are issuing the `4.14.1` patch release. #### Fix in Prisma Client - [@​prisma/client/edge + Cloudflare Worker / wrangler = Could not resolve "os"](https://togithub.com/prisma/prisma/issues/19174) ### [`v4.14.0`](https://togithub.com/prisma/prisma/releases/tag/4.14.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.13.0...4.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%20v4.14.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.14.0) about the release.** ๐ŸŒŸ #### Request for feedback for Preview features We would appreciate your feedback on a handful of [Preview features](https://www.prisma.io/docs/about/prisma/releases#preview) to help us move them to [General Availability](https://www.prisma.io/docs/about/prisma/releases#generally-available-ga) soon. The Preview features include: - [PostgreSQL extensions](https://togithub.com/prisma/prisma/issues/15835) - [Extended where unique](https://togithub.com/prisma/prisma/issues/15837) - [Field reference support](https://togithub.com/prisma/prisma/issues/15068) - [Order by Nulls](https://togithub.com/prisma/prisma/issues/14377) - [Count by filtered relation](https://togithub.com/prisma/prisma/issues/15069) You can test them by enabling the Preview feature in your Prisma schema and giving them a try already in your Prisma schema, e.g., PostgreSQL extensions, or regenerating Prisma Client and trying them in your queries. #### Highlights ##### Improved Prisma Client startup performance For the last couple of months, we've been working hard to improve the performance of Prisma Client. We also published a blog post on how [How We Sped Up Serverless Cold Starts with Prisma by 9x](https://www.prisma.io/blog/prisma-and-serverless-73hbgKnZ6t), which we recommend you give it a read. This release continues with the same theme by making the size of the generated Prisma Client smaller. We have roughly halved the size of Prisma Client's dependencies. ##### More Introspection warnings for unsupported features In [4.13.0](https://togithub.com/prisma/prisma/releases/tag/4.13.0), we introduced the first 6 introspection warnings that surface the existence of these features in your database and link to our documentation on how to manually work around the Prisma Schema with unsupported database features. In this release, we added 3 more introspection warnings for the following features: - [Check Constraints](https://togithub.com/prisma/prisma/issues/3388) (MySQL + PostgreSQL) - [Exclusion Constraints](https://togithub.com/prisma/prisma/issues/17514) - [MongoDB $jsonSchema](https://togithub.com/prisma/prisma/issues/8135) On introspecting a database using any of these features, you will get a warning from the Prisma CLI and a comment in your Prisma schema where the feature is being used. The warning will also contain a link to instructions on how to manually use the feature. #### Fixes and improvements ##### Prisma Client - [Generator output `client` leads to `Error: ENOENT: no such file or directory, open '.../node_modules/@​prisma/client/schema.prisma'`](https://togithub.com/prisma/prisma/issues/12295) - [DeprecationWarning: Implicit coercion to integer for exit code is deprecated](https://togithub.com/prisma/prisma/issues/17127) - [`thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code: No unsupported field should reach that path', query-engine\connectors\sql-query-connector\src\model_extensions\scalar_field.rs:70:44`](https://togithub.com/prisma/prisma/issues/18517) - [jsonProtocol: `in` argument of filter types does not accept scalars](https://togithub.com/prisma/prisma/issues/18549) - [`jsonProtocol` should report errors as nicely as before](https://togithub.com/prisma/prisma/issues/18876) - [Generated client with custom path containing string `client`: `ENOENT: no such file or directory, open 'D:\\node_modules\.prisma\client\schema.prisma`](https://togithub.com/prisma/prisma/issues/12719) - [Can't find the schema when the project path contains the same name as the generated client folder](https://togithub.com/prisma/prisma/issues/11206) ##### Prisma Migrate - [Build all glibc Linux binaries with CentOS 7](https://togithub.com/prisma/prisma/issues/16772) - [Remove `Please create an issue ...` in `MigrateEngine.ts`](https://togithub.com/prisma/prisma/issues/17268) - [Do not introspect exclusion constraints as Gist indexes](https://togithub.com/prisma/prisma/issues/17515) - [Introspection warnings: move rendering from `DbPull.ts` to the engine ](https://togithub.com/prisma/prisma/issues/17582) - [views: don't create local `views` folder on introspection if no views are found](https://togithub.com/prisma/prisma/issues/18611) - [RelationMode autocomplete uses incorrect casing](https://togithub.com/prisma/prisma/issues/18983) ##### Language tools (e.g. VS Code) - [Support for VSCode Region Marker Folding](https://togithub.com/prisma/language-tools/issues/1382) #### Credits Huge thanks to [@​RobertCraigie](https://togithub.com/RobertCraigie), [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​art049](https://togithub.com/art049), [@​luxaritas](https://togithub.com/luxaritas), [@​mrazauskas](https://togithub.com/mrazauskas) for helping! #### ๐Ÿ“บ Join us for another "What's new in Prisma" live stream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream. The stream takes place [on YouTube](https://youtu.be/JvLTpSINZdA) on **Thursday, May 11** at **5 pm Berlin | 8 am San Francisco**. ### [`v4.13.0`](https://togithub.com/prisma/prisma/releases/tag/4.13.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.12.0...4.13.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%20v4.13.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.13.0) about the release.** ๐ŸŒŸ ##### Highlights ##### Introspection warnings for unsupported features The Prisma Schema Language (PSL) currently doesn't support all database features and functionality of [our target databases](https://www.prisma.io/docs/reference/database-reference/supported-databases). The PSL is an abstraction over SQL and will keep evolving to address gaps in our [database feature matrix](https://www.prisma.io/docs/reference/database-reference/database-features). Before this release, `prisma db pull` did not pick up the unsupported features in a database. It was easy to lose them when running `prisma migrate dev` based on an existing Prisma schema if not included in a migration file using custom migrations. To avoid this, we added introspection warnings that surface the existence of these features in your database and link to our documentation on how to manually work around the Prisma Schema with unsupported database features. In this release, we added introspection warnings for the following features: - [Partitioned tables](https://togithub.com/prisma/prisma/issues/1708) - [PostgreSQL Row Level Security](https://togithub.com/prisma/prisma/issues/12735) - [Index sort order, `NULLS FIRST` / `NULLS LAST`](https://togithub.com/prisma/prisma/issues/15466) - [CockroachDB row-level TTL](https://togithub.com/prisma/prisma/issues/13982) - [Comments](https://togithub.com/prisma/prisma/issues/8703) - [PostgreSQL deferred constraints](https://togithub.com/prisma/prisma/issues/8807) Prisma CLI will output warnings on introspection (`prisma db pull`) and add comments to your Prisma schema. In the coming releases, we will expand this to many more [features labeled with `topic: database-functionality` on GitHub](https://togithub.com/prisma/prisma/issues?q=is%3Aopen+label%3A%22topic%3A+database-functionality%22+label%3Ateam%2Fschema+sort%3Aupdated-desc+). ##### Improved support for Netlify and Vercel build process Netlify and Vercel cache project dependencies during the build process and reuse that cache until dependencies change. While this helps speed up the build process, any `postinstall` scripts of these dependencies will not be executed. Prisma uses a `postinstall` script in its package to automatically trigger the customized generation of Prisma Client for your Prisma Schema. When a dependency cache is used, that generation process is not triggered, and an outdated Prisma Client may be used in your application. When you update your Prisma Schema but not your dependencies, Prisma Client will not be generated for the new schema. For example, columns you added recently to one of your models will not be present in the Prisma Client API - causing errors. This problem can be avoided by: 1. Adding a custom `postinstall` script in your `package.json` file 2. Manually adding a `prisma generate` step to the โ€œBuildโ€ scripts of Vercel and Netlify. We now added detection of this scenario and will prevent a build without an additional `prisma generate`. This will ensure you're aware of the problem early and get guidance on how to fix this problem. You can read more on how to do this in our docs โ€” [Vercel caching troubleshooting](https://prisma.io/docs/guides/other/troubleshooting-orm/help-articles/vercel-caching-issue), [Netlify caching troubleshooting](https://prisma.io/docs/guides/other/troubleshooting-orm/help-articles/netlify-caching-issue). ##### Better support for pnpm as a package manager Before this release, Prisma only used npm scripts which would lead to undesirable behavior for a project using a different package manager such as pnpm and yarn. This release improves the detection of the package managers in your project by using [`ni`](https://togithub.com/antfu/ni). If you're still running into this problem, let us know by creating a [GitHub issue](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&template=bug_report.yml). ##### Segmentation fault and TLS connection error fix In this release, we've fixed a TLS connection error segmentation fault. This mostly affected users running on Node.js 17 or later with OpenSSL 1.1 when using TLS to connect to their database. ##### JSON protocol Preview feature feedback We have fixed multiple bugs for the `jsonProtocol` Preview feature and are close to making it Generally Available. We are still looking for feedback about its usage to ensure it is ready and works as expected for everyone. We would appreciate it if you would try it out, help us polish the feature, and move it to General Availability. Testing it requires little effort. You can test it using the following steps: 1. Enabling the `jsonProtocol` Preview feature in your Prisma schema 2. Re-generating Prisma Client 3. Running your application or tests to make sure everything works We encourage you to leave your feedback in [this GitHub issue](https://togithub.com/prisma/prisma/issues/18095) or [create a bug report](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind/bug\&template=bug_report.yml) if your run into any issues. ##### Fixes and improvements ##### Prisma Client - [`prisma generate` fails when using pnpm workspaces because it tries to install prisma dependencies with npm or yarn](https://togithub.com/prisma/prisma/issues/5340) - [Netlify deploy does not pick up changes to schema file](https://togithub.com/prisma/prisma/issues/6634) - [Vercel: Schema only change does not invalidate build cache](https://togithub.com/prisma/prisma/issues/7291) - [Serverless deployments: Just making a schema level change to a repository does not invalidate `node_modules` cache that contains generated Client](https://togithub.com/prisma/prisma/issues/7818) - [pnpm: Can not `prisma generate` when `@prisma/client` is not installed in project](https://togithub.com/prisma/prisma/issues/9848) - [Segmentation fault crash when using prisma client when using PostgreSQL](https://togithub.com/prisma/prisma/issues/10649) - [Docker with `pnpm install` hangs on `@prisma/client` postinstall ](https://togithub.com/prisma/prisma/issues/11791) - [Automatic installation of missing dependencies isn't compatible with pnpm](https://togithub.com/prisma/prisma/issues/14401) - [Prisma generate throws dependency error karma-chai](https://togithub.com/prisma/prisma/issues/14816) - [Postinstall script fails with PNPM workspaces due to npm ERR! Cannot read properties of null (reading 'matches')](https://togithub.com/prisma/prisma/issues/14944) - [Debian 11 Node 19.3.0 segmentation fault](https://togithub.com/prisma/prisma/issues/16897) - [Prisma client segfault on Ubuntu 22.04](https://togithub.com/prisma/prisma/issues/17223) - [Segmentation Fault in Postgres](https://togithub.com/prisma/prisma/issues/17946) - [Using Prisma with pnpm results in inability to call database related commands](https://togithub.com/prisma/prisma/issues/18238) - [Prisma Connect Causes NodeJS to Close With Exit Code 0](https://togithub.com/prisma/prisma/issues/18336) - [99056 segmentation fault (core dumped) node --require esbuild-register prisma/seed.ts](https://togithub.com/prisma/prisma/issues/18559) - [JSON protocol: sibling composites of the same type are rejected](https://togithub.com/prisma/prisma/issues/18735) ##### Prisma Migrate - [prisma db pull adds redundant comments: "This table is a partition table ..."](https://togithub.com/prisma/prisma/issues/18103) - [Render warning code 30 in cli (PG RLS)](https://togithub.com/prisma/prisma/issues/18700) ##### Language tools (e.g. VS Code) - [`[object Object]` output in logging isn't helpful](https://togithub.com/prisma/language-tools/issues/1390) ##### Credits Huge thanks to [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​rintaun](https://togithub.com/rintaun), [@​maxmartynov](https://togithub.com/maxmartynov), [@​haneenmahd](https://togithub.com/haneenmahd) for helping! ##### ๐Ÿ“บ Join us for another "What's new in Prisma" live stream Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream. The stream takes place [on YouTube](https://youtu.be/NXzQIkfF3E8) on **Thursday, April 20** at **5 pm Berlin | 8 am San Francisco**.
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "after 4pm on friday,before 9am on monday,every weekend" in timezone Europe/Paris, Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Enabled. โ™ป **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. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/specfy/specfy). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 54 ++++++++++++++++++++++--------------------- pkgs/api/package.json | 2 +- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45663ee50..f63b827fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2597,6 +2597,26 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@prisma/client": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", + "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" + }, + "engines": { + "node": ">=14.17" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, "node_modules/@prisma/debug": { "version": "4.16.0", "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-4.16.0.tgz", @@ -2612,10 +2632,15 @@ "version": "4.16.2", "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.16.2.tgz", "integrity": "sha512-vx1nxVvN4QeT/cepQce68deh/Turxy5Mr+4L4zClFuK1GlxN3+ivxfuv+ej/gvidWn1cE1uAhW7ALLNlYbRUAw==", - "dev": true, + "devOptional": true, "hasInstallScript": true, "peer": true }, + "node_modules/@prisma/engines-version": { + "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", + "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" + }, "node_modules/@prisma/generator-helper": { "version": "4.16.0", "resolved": "https://registry.npmjs.org/@prisma/generator-helper/-/generator-helper-4.16.0.tgz", @@ -15077,7 +15102,7 @@ "version": "4.16.2", "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.16.2.tgz", "integrity": "sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g==", - "dev": true, + "devOptional": true, "hasInstallScript": true, "peer": true, "dependencies": { @@ -21055,7 +21080,7 @@ "@fastify/session": "10.2.0", "@fastify/static": "6.10.2", "@octokit/auth-app": "5.0.6", - "@prisma/client": "4.12.0", + "@prisma/client": "4.16.2", "@specfy/emails": "file:../emails", "@specfy/stack-analyser": "1.3.6", "@specfy/sync": "1.0.9", @@ -21101,34 +21126,11 @@ "vitest": "0.29.8" } }, - "pkgs/api/node_modules/@prisma/client": { - "version": "4.12.0", - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@prisma/engines-version": "4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7" - }, - "engines": { - "node": ">=14.17" - }, - "peerDependencies": { - "prisma": "*" - }, - "peerDependenciesMeta": { - "prisma": { - "optional": true - } - } - }, "pkgs/api/node_modules/@prisma/engines": { "version": "4.12.0", "hasInstallScript": true, "license": "Apache-2.0" }, - "pkgs/api/node_modules/@prisma/engines-version": { - "version": "4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7", - "license": "Apache-2.0" - }, "pkgs/api/node_modules/execa": { "version": "7.1.1", "license": "MIT", diff --git a/pkgs/api/package.json b/pkgs/api/package.json index 3535e484e..3ad798f91 100644 --- a/pkgs/api/package.json +++ b/pkgs/api/package.json @@ -33,7 +33,7 @@ "@fastify/session": "10.2.0", "@fastify/static": "6.10.2", "@octokit/auth-app": "5.0.6", - "@prisma/client": "4.12.0", + "@prisma/client": "4.16.2", "@specfy/emails": "file:../emails", "@specfy/stack-analyser": "1.3.6", "@specfy/sync": "1.0.9",