chore(deps): update prisma monorepo to v4.12.0 #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.9.0->4.12.04.9.0->4.12.0Release Notes
prisma/prisma
v4.12.0Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Highlights
Introspection of Views SQL improvements (Preview)
The
viewsPreview feature significantly improved this release:prisma db pullnow reads the SQL query used to define a view and stores it in a.sqlfile in aviewsfolder next to your Prisma schema.We encourage you to leave feedback in this GitHub issue.
Improvements to JSON protocol (Early Preview)
In 4.11.0, we announced the
jsonProtocolPreview feature which had some rough edges. This release improves the Preview feature by providing polished and helpful error messages from Prisma Client when something goes wrong. Here is an example error message:We would appreciate it if you would try it out to help us polish the feature and move it to General Availability. Testing it requires little effort. Please also leave any feedback in this issue, or open a new one if you want to report a bug.
Prisma Client startup performance
In this release, we've improved the startup performance of Prisma Client. We're keen on improving the performance of Prisma Client. If you experience any problems with the startup performance, be sure to report them so that we can look into them.
Open Telemetry tracing and logging for Prisma Client for Data Proxy
This release adds support for Open Telemetry tracing (via the
tracingPreview feature) and logging to Prisma Client for Data Proxy.Fixes and improvements
Prisma Migrate
db pullfail with particular enum default value in columnPrisma Client
findUniqueused withPromise.allreturnsnullPrismaPromiseexport after update from 4.9.0 to 4.11.0Unique constraint failed on the fieldson query that worked in 4.10.1jsonProtocolField/Enum is not included in the result of the findFirst/findMany functionLanguage tools (e.g. VS Code)
typeblock for MongoDBCredits
Huge thanks to @KhooHaoYit, @rintaun, @ivan, @art049 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" live stream.
The stream takes place on YouTube on Thursday, March 30 at 5 pm Berlin | 8 am San Francisco.
v4.11.0Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting 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
jsonProtocolPreview feature in your Prisma schema: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
jsonProtocolto 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:
For feedback, please comment on the GitHub feedback issue.
Introspection support for MySQL, SQL Server, and CockroachDB views
You can now run
prisma db pullagainst 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. Try it out and let us know your thoughts in this GitHub issue.
Prisma Client extensions improvements: raw query operations
This release adds support for extending top-level raw query operations.
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:
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 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:
Import the plugin into your
next.config.jsfile and use it inconfig.plugins:For further information, refer to our documentation to learn how to use it and open an issue if it doesn't work as expected.
Fixes and improvements
Prisma Client
ENOENT: no such file or directory, open '...\.next\server\pages\api\schema.prisma'Error: ENOENT: no such file or directory, open 'schema.prisma'ENOENTwith custom output and ESM module in NPM monorepo (including Nextjs):no such file or directory, open /.../schema.prisma...ignoreEnvVarErrors: trueNode API QE causesdatasourceOverridesto be ignoredPrisma Migrate
db pull: add new codes for introspection warnings for views in the CLIdirectUrlisprisma://connection stringerrorCode: 'P1012' PrismaClientInitializationError: error: Environment variable not found: DATABASE_URL.directUrlenv var value, leading to validation error (Affects PDP/Data Proxy and normal Engine)validateto returnResult<(), JsError>inWasmmoduleCredits
Huge thanks to @KhooHaoYit, @rintaun, @ivan, @Mini256, @Lioness100, @yukukotani, @sandrewTx08, @fubhy, @zachtil, @unflxw, @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" live stream.
The stream takes place on YouTube on Thursday, March 2 at 5 pm Berlin | 8 am San Francisco.
v4.10.1Compare Source
Today, we are issuing the
4.10.1patch release.Fixes in Prisma Client
v4.10.0Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Highlights
Improved CLI support for connection poolers
When working with connection poolers such as the Prisma Data Proxy, Accelerate or pgBouncer, it is necessary to use a different URL to connect to the database when using Prisma Client and Prisma Migrate.
We're introducing a new datasource property
directUrlto improve this. When thedirectUrlproperty is present, the Prisma CLI will use it to connect to the database for tasks such as introspection and migrations.To learn more, refer to our documentation.
Introspection support for PostgreSQL views
We introduced initial support for database views in 4.9.0 with the addition of the
viewkeyword. This release introduces introspection support for PostgreSQL views. You can runprisma db pullagainst your database to populate your Prisma schema with your views.To learn more, refer to our documentation on views introspection. Try it out and let us know your thoughts in this GitHub issue.
Improved introspection for unsupported database functionality & partitioned tables
Currently, the Prisma Schema Language(PSL) does not cover the full feature sets of different database providers. For the unsupported database functionality, Prisma provides offers escape hatches like raw queries or manual editing of the migration files.
While we work on adding support for missing database functionality, e.g. database views, some of it is not fully-supported and the escape hatches fail. Objects that use unsupported properties might not be caught during introspection and raw queries might not work. Re-introspection may sometimes remove the information from the schema file and the generated migrations may be invalid or re-generate the same SQL repeatedly.
We're therefore fixing the defects and supporting the unsupported database functionalities Prisma currently doesn't support. We created a list of these features in this GitHub issue we would like to improve.
This release improves introspection support for partitioned tables in PostgreSQL and MySQL. Previously, Prisma would pick up the partitions as
models and miss the actual main table. Prisma will now pick up the main table as amodel, not the partitions.If you're already using partitioned tables in your database, you can use
prisma db pullto update your Prisma schema. If you're already using Prisma and want to partition a table in your database, you can:prisma migrate dev --create-onlyprisma migrate devto apply the draft migration to your databaseTry it out and let us know what you think. If you run into an issue, feel free to create a bug report.
Smaller engine size used in Prisma CLI
In 4.8.0, we decreased the size of the engines by ~50%, which significantly impacted Prisma Client, especially in serverless environments.
In this release, we've reduced the size of Prisma CLI by removing the Introspection and Formatter engines. The introspection functionality is now served by the Migration Engine. A cross-platform Wasm module has entirely replaced the Formatter Engine. This reduces the overall installation size for Prisma CLI.
Fixes and improvements
Prisma Client
aarch64-unknown-linux-musltarget (Alpine Linux on ARM, e.g. M1)getDmmfas Wasm module that could be used in Prisma CLIPrisma
prisma-fmtformatter binaryintrospection-enginebinary from CLIget-platformerror for non-amd64Alpine introduced in[email protected]prevents using custom Prisma enginesError: Unknown binaryTarget debian-openssl-0.0.x and no custom engine files were providedafter upgrading from 4.8.1 to 4.9.0Language tools (e.g. VS Code)
referentialIntegrityin favor ofrelationModedirectUrlCredits
Huge thanks to @rintaun, @ivan, @Mini256, @yukukotani, @sandrewTx08 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" live stream.
The stream takes place on YouTube on Thursday, February 9 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: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.