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

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

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 1, 2023

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/internals (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

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.

If you have been using Prisma for a while, read our documentation about our Query Engine or peeked at our codebase, you might be aware that Prisma Client uses a GraphQL-like protocol to communicate to the Query Engine when you execute a query. This was mainly because of historical reasons (Prisma was born initially from the GraphQL backend-as-a-service “Graphcool”) and wasn't changed as it worked well.

During performance investigations and optimizations, though, we noticed that GraphQL 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.

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.

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


  • 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 added the release:chore This PR is a chore (means nothing for users) label Mar 1, 2023
@replay-io
Copy link

replay-io bot commented Mar 1, 2023

16 replays were recorded for 1161eab.

image 0 Failed
image 16 Passed
    requireAuth graphql checks
          ```
          locator.waitFor: Target closed
          =========================== logs ===========================
          waiting for locator('.rw-form-error-title').locator('text=You don\'t have permission to do that') to be visible
          ============================================================
          ```
        </ol>
      </details>
      <li><a href=https://app.replay.io/recording/b34f637c-0ac6-4d20-966e-832169f12736>useAuth hook, auth redirects checks</a></li>
      <li><a href=https://app.replay.io/recording/0bf5f988-737b-4193-9a70-c9f8d65ae555>Check that <meta> tags are rendering the correct dynamic data</a></li>
      <li><a href=https://app.replay.io/recording/1dc7bc06-1379-4779-887c-055714e19792>Check that a specific blog post is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/bf3aa75f-a0a5-4223-ab37-e07d803d47ba>Check that about is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/a8d346e9-cc49-4f3a-a73f-f6a5ef75310d>Check that homepage is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/11e33c58-4079-4ae9-bbb3-25dff09fb84d>Check that you can navigate from home page to specific blog post</a></li>
      <li><a href=https://app.replay.io/recording/cbd0eff0-27db-4528-9065-115af51e9a8c>Waterfall prerendering (nested cells)</a></li>
      <li><a href=https://app.replay.io/recording/f19171a7-6d24-4a55-a221-0a9ad91b8f6f>RBAC: Admin user should be able to delete contacts</a></li>
      <li><a href=https://app.replay.io/recording/cd4181e0-fbd2-499d-8341-5d9fb1bb3a7a>RBAC: Should not be able to delete contact as non-admin user</a></li>
      <li><a href=https://app.replay.io/recording/7028a6eb-9230-4e33-9d87-ba32c15affd5>Smoke test with dev server</a></li>
      <li><a href=https://app.replay.io/recording/89e19d07-1200-4876-9dc1-463b231a7dcb>Smoke test with rw serve</a></li>
      <li><a href=https://app.replay.io/recording/c6901bce-4e6b-4117-9c3f-b6ecebd181fe>Loads Cell mocks when Cell is nested in another story</a></li>
      <li><a href=https://app.replay.io/recording/05924a85-ee72-4c2a-8e73-ee030bf71920>Loads Cell Stories</a></li>
      <li><a href=https://app.replay.io/recording/c815bf1e-0c32-44cc-843d-6cef61bb1649>Loads MDX Stories</a></li>
      <li><a href=https://app.replay.io/recording/21eff15b-27a2-4591-9e05-2e52e8800d66>Mocks current user, and updates UI while dev server is running</a></li>
      

View test run on Replay ↗︎

@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 022a33d to 1161eab Compare March 1, 2023 10:29
@jtoar jtoar merged commit a1cab7b into main Mar 1, 2023
@jtoar jtoar deleted the renovate/prisma-monorepo branch March 1, 2023 17:14
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Mar 1, 2023
@jtoar jtoar modified the milestones: next-release, v4.3.0 Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant