Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update prisma monorepo to v4.13.0 #77

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 28, 2023

Mend Renovate

This PR contains the following updates:

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

Release Notes

prisma/prisma

v4.13.0

Compare Source

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

Highlights
Introspection stopgaps

The Prisma Schema Language (PSL) currently doesn't support all database features and functionality of our target databases. The PSL is an abstraction over SQL and will keep evolving to address gaps in our database feature matrix.

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 Stopgaps 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 (”Stopgaps” as we will remove them as soon as we implement full support for these features).

In this release, we added stopgaps for the following features:

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.

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, Netlify caching troubleshooting.

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. If you're still running into this problem, let us know by creating a GitHub issue.

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 or create a bug report if your run into any issues.

Fixes and improvements
Prisma Client
Prisma Migrate
Language tools (e.g. VS Code)
Credits

Huge thanks to @​KhooHaoYit, @​rintaun, @​maxmartynov, @​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" live stream.

The stream takes place on YouTube on Thursday, April 20 at 5 pm Berlin | 8 am San Francisco.

v4.12.0

Compare 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 views Preview feature significantly improved this release: prisma db pull now reads the SQL query used to define a view and stores it in a .sql file in a views folder next to your Prisma schema.

Note: These .sql files are not yet used for creating or updating views during migrations yet. For now, we are only looking for feedback. Let us know if the introspected SQL files match the views picked up in your database and if the correct files were created in your filesystem.

We encourage you to leave feedback in this GitHub issue.

Improvements to JSON protocol (Early Preview)

In 4.11.0, we announced the jsonProtocol Preview 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 tracing Preview feature) and logging to Prisma Client for Data Proxy.

Fixes and improvements
Prisma Migrate
Prisma Client
Language tools (e.g. VS Code)
Credits

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.0

Compare 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 jsonProtocol Preview feature in your Prisma schema:

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.

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. 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.

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 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:

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 to learn how to use it and open an issue if it doesn't work as expected.

Fixes and improvements
Prisma Client
Prisma Migrate
Credits

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.


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.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 7dababb to 6208a30 Compare March 9, 2023 02:07
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 6208a30 to 425c44f Compare March 28, 2023 13:23
@renovate renovate bot changed the title chore(deps): update prisma monorepo to v4.11.0 chore(deps): update prisma monorepo to v4.12.0 Mar 28, 2023
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 425c44f to b0c69bb Compare March 30, 2023 19:37
@renovate renovate bot changed the title chore(deps): update prisma monorepo to v4.12.0 chore(deps): update prisma monorepo to v4.13.0 Apr 18, 2023
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from b0c69bb to 283a7c2 Compare April 18, 2023 15:20
@Quramy Quramy merged commit b194fdc into main Apr 20, 2023
1 check passed
@Quramy Quramy deleted the renovate/prisma-monorepo branch April 20, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant