freeCodeCamp / chapter

A self-hosted event management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
1.92k stars 360 forks source link

fix(deps): update prisma monorepo to v4.11.0 #2427

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) 4.10.1 -> 4.11.0 age adoption passing confidence
prisma (source) 4.10.1 -> 4.11.0 age adoption passing confidence

Release Notes

prisma/prisma ### [`v4.11.0`](https://togithub.com/prisma/prisma/releases/tag/4.11.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.10.1...4.11.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.11.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.11.0) about the release.** šŸŒŸ #### Highlights ##### JSON protocol Early Preview This release introduces an early Preview feature: JSON protocol. During performance investigations and optimizations, we noticed that the existing implementation added a CPU and memory overhead that was especially noticeable for larger Prisma schemas. Therefore, we found an alternative way to express our queries without needing that overhead: JSON. To try out the new protocol, enable the `jsonProtocol` Preview feature in your Prisma schema: ```prisma generator client { provider = "prisma-client-js" previewFeatures = ["jsonProtocol"] } ``` Regenerate Prisma Client to use the new JSON protocol. For environments or situations where it is not viable to enable the Preview feature flag to your Prisma schema file, we also added an environment variable that you can use to force the use of the JSON Protocol Preview feature: `PRISMA_ENGINE_PROTOCOL=json`. Note: This is an early Preview feature with a significant limitation: Invalid input to Prisma Client will throw unpolished, internal errors that are less descriptive and user-friendly than our usual ones. We intend to improve these future releases. Using it with Data Proxy and Prisma Data Platform currently also leads to errors. We expect using `jsonProtocol` to improve Prisma Client's startup performance significantly. This will likely have a more significant impact on applications with larger Prisma schemas. We would appreciate your feedback on this feature on the following particularly: 1. Does using this preview feature introduce any regressions or problems in your application? 2. If not, how does it influence the performance of your application? Can you share before and after measurements? For feedback, please comment on the [GitHub feedback issue](https://togithub.com/prisma/prisma/issues/18095). ##### Introspection support for MySQL, SQL Server, and CockroachDB views You can now run `prisma db pull` against your database to populate your Prisma schema with your views in MySQL, SQL Server, and CockroachDB. To learn more, refer to our documentation on [views introspection](https://www.prisma.io/docs/concepts/components/prisma-schema/views#use-introspection). Try it out and let us know your thoughts in this [GitHub issue](https://togithub.com/prisma/prisma/issues/17335). ##### Prisma Client extensions improvements: raw query operations This release adds support for extending top-level raw query operations. ```ts const prisma = new PrismaClient().$extends({ query: { // relational databases $queryRaw({ args, query, operation }) { // handle $queryRaw operation return query(args) }, $executeRaw({ args, query, operation }) { // handle $executeRaw operation return query(args) }, $queryRawUnsafe({ args, query, operation }) { // handle $queryRawUnsafe operation return query(args) }, $executeRawUnsafe({ args, query, operation }) { // handle $executeRawUnsafe operation return query(args) }, // MongoDB $runCommandRaw({ args, query, operation }) { // handle $runCommandRaw operation return query(args) }, }, }) ``` ##### Webpack plugin for Next.js apps using Prisma in monorepo setups If you've been using Prisma Client in a Next.js app in a monorepo setup, you might have seen this infamous error message: Error: ENOENT: no such file or directory, open schema.prisma We finally pinpointed the problem's source to the Next.js bundling step and opened [an issue in the Next.js repository for Vercel to investigate](https://togithub.com/vercel/next.js/issues/46070) and hopefully fix it. In the meantime, we've created a workaround via a webpack plugin that makes sure your Prisma schema is copied to the correct location: `@prisma/nextjs-monorepo-workaround-plugin`. To use the plugin, first install it: npm install -D @​prisma/nextjs-monorepo-workaround-plugin Import the plugin into your `next.config.js` file and use it in `config.plugins`: ```js const { PrismaPlugin } = require('@​prisma/nextjs-monorepo-workaround-plugin') module.exports = { webpack: (config, { isServer }) => { if (isServer) { config.plugins = [...config.plugins, new PrismaPlugin()] } return config }, } ``` For further information, refer to our [documentation](https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-monorepo) to learn how to use it and [open an issue](https://togithub.com/prisma/prisma/issues/new/choose) if it doesn't work as expected. #### Fixes and improvements ##### Prisma Client - [Prisma hangs when javascript is minified](https://togithub.com/prisma/prisma/issues/12355) - [Issue with prisma failing to locate schema file in monorepo](https://togithub.com/prisma/prisma/issues/12588) - [NextJS try to open "schema.prisma" at wrong path.](https://togithub.com/prisma/prisma/issues/12823) - [pnpm workspace + nextjs: `ENOENT: no such file or directory, open '...\.next\server\pages\api\schema.prisma'`](https://togithub.com/prisma/prisma/issues/12853) - [next.js ENOENT trying to open schema.prisma](https://togithub.com/prisma/prisma/issues/12921) - [Error with custom output in NPM monorepo: `Error: ENOENT: no such file or directory, open 'schema.prisma'`](https://togithub.com/prisma/prisma/issues/13233) - [Error with custom output in Turborepo using Blitz.js: Error: ENOENT: no such file or directory, open '<...>/schema.prisma'](https://togithub.com/prisma/prisma/issues/14566) - [Upsert fails on Postgres with list column.](https://togithub.com/prisma/prisma/issues/16760) - [Error received when connecting items in an existing one-to-many relationship on MySQL](https://togithub.com/prisma/prisma/issues/17103) - [`ENOENT` with custom output and ESM module in NPM monorepo (including Nextjs): `no such file or directory, open /.../schema.prisma...`](https://togithub.com/prisma/prisma/issues/17687) - [Setting `ignoreEnvVarErrors: true` Node API QE causes `datasourceOverrides` to be ignored](https://togithub.com/prisma/prisma/issues/17873) - [PCE: Support query extensions for raw queries](https://togithub.com/prisma/prisma/issues/18027) ##### Prisma Migrate - [sslaccept=accept_invalid_certs not working with mysql server 8.0.30](https://togithub.com/prisma/prisma/issues/14903) - [Error 08S01 (1043) -> Bad Handshake. MySQL Connection with SSL certs](https://togithub.com/prisma/prisma/issues/16886) - [Introspection of MySQL views](https://togithub.com/prisma/prisma/issues/17414) - [Introspection of SQL Server views](https://togithub.com/prisma/prisma/issues/17415) - [Introspection of CockroachDB views](https://togithub.com/prisma/prisma/issues/17418) - [`db pull`: add new codes for introspection warnings for views in the CLI](https://togithub.com/prisma/prisma/issues/17578) - [Figure out where getDMMF is used for validation](https://togithub.com/prisma/prisma/issues/17618) - [Error when `directUrl` is `prisma://` connection string](https://togithub.com/prisma/prisma/issues/17780) - [4.10.0, unexpected: `errorCode: 'P1012' PrismaClientInitializationError: error: Environment variable not found: DATABASE_URL.`](https://togithub.com/prisma/prisma/issues/17797) - [Validation output is now always colored, also in CI](https://togithub.com/prisma/prisma/issues/17806) - [Prisma Client falsely validates `directUrl` env var value, leading to validation error (Affects PDP/Data Proxy and normal Engine)](https://togithub.com/prisma/prisma/issues/17810) - [Fix Postgres introspection of partition tables false positives on inherited tables](https://togithub.com/prisma/prisma/issues/17816) - [Support openSUSE Tumbleweed](https://togithub.com/prisma/prisma/issues/17947) - [Change `validate` to return `Result<(), JsError>` in `Wasm` module](https://togithub.com/prisma/prisma/issues/17955) - [(internal): add unit tests for path-specific libssl version parsing](https://togithub.com/prisma/prisma/issues/18001) #### Credits Huge thanks to [@​KhooHaoYit](https://togithub.com/KhooHaoYit), [@​rintaun](https://togithub.com/rintaun), [@​ivan](https://togithub.com/ivan), [@​Mini256](https://togithub.com/Mini256), [@​Lioness100](https://togithub.com/Lioness100), [@​yukukotani](https://togithub.com/yukukotani), [@​sandrewTx08](https://togithub.com/sandrewTx08), [@​fubhy](https://togithub.com/fubhy), [@​zachtil](https://togithub.com/zachtil), [@​unflxw](https://togithub.com/unflxw), [@​Mosaab-Emam](https://togithub.com/Mosaab-Emam) 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/-Q5vV6s4jIU) on **Thursday, March 2** at **5 pm Berlin | 8 am San Francisco**.

Configuration

šŸ“… Schedule: Branch creation - At any time (no schedule defined), 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 these updates again.



This PR has been generated by Mend Renovate. View repository job log here.

socket-security[bot] commented 1 year ago

Socket Security Pull Request Report

šŸ‘ No new dependency issues detected in pull request

Pull request report summary
Issue Status
Install scripts āœ… 0 issues
Native code āœ… 0 issues
Bin script shell injection āœ… 0 issues
Unresolved require āœ… 0 issues
Invalid package.json āœ… 0 issues
HTTP dependency āœ… 0 issues
Git dependency āœ… 0 issues
Potential typo squat āœ… 0 issues
Known Malware āœ… 0 issues
Telemetry āœ… 0 issues
Protestware/Troll package āœ… 0 issues
Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Powered by socket.dev

ghost commented 1 year ago
šŸ‘‡ Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/freeCodeCamp/chapter/2427/5068ed8d/448110225bfd20858f415e7e6b5a75ccc090a574.svg)](https://app.codesee.io/r/reviews?pr=2427&src=https%3A%2F%2Fgithub.com%2FfreeCodeCamp%2Fchapter) #### Legend CodeSee Map legend