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 all non-major dependencies #222

Merged
merged 1 commit into from
Sep 29, 2022
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 26, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) ^4.3.1 -> ^4.4.0 age adoption passing confidence
@typescript-eslint/eslint-plugin 5.38.0 -> 5.38.1 age adoption passing confidence
@typescript-eslint/parser 5.38.0 -> 5.38.1 age adoption passing confidence
dotenv ^16.0.2 -> ^16.0.3 age adoption passing confidence
prisma (source) 4.3.1 -> 4.4.0 age adoption passing confidence
typescript (source) 4.8.3 -> 4.8.4 age adoption passing confidence

Release Notes

prisma/prisma

v4.4.0

Compare Source

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

Major improvements
General improvements

In the last sprint, we focused our efforts on squashing as many bugs as we could. You can find the full list of improvements and bug fixes in the Fixes and improvements section below.

Some of the improvements we made include but are not limited to:

  • Improved optimistic concurrency control (GitHub issue)
  • Improved decimal precision
  • Improved handling of big amounts of prepared statement placeholders:
    Databases impose limits when they hit a specific number, and when a query (either generated by Prisma Client or provided by the user directly as a raw query) hits it some users ran into a misleading Can't reach database server error message (GitHub issue). The error message will now be more useful (P2035 error code), and Prisma Client should not cause these errors anymore.

If you notice any regression, please make sure to create a GitHub issue. We touched a lot of code in this sprint, and even though we are confident in our tests, something might have slipped through the cracks. We'd like to fix the regressions as soon as possible.

isolationLevel for sequential transaction operations

In version 4.2.0, we added support for setting transaction isolation levels for interactive transactions (Preview). You can now define isolation levels for sequential transaction operations: prisma.$transaction([]).

Isolation levels describe different types of trade-offs between isolation and performance that databases can make when processing transactions. Isolation levels determine what types of data leaking can occur between transactions or what data anomalies can occur.
To set the transaction isolation level, use the isolationLevel option in the second parameter of the API. For example:

await prisma.$transaction(
  [
    // sequential operations
    prisma.user.create({ data: {/** args */ } }),
    prisma.post.create({ data: {/** args  */ } })
  ],
  {
    isolationLevel: Prisma.TransactionIsolationLevel.Serializable
  }
)

Prisma Client supports the following isolation levels if they're available in your database provider:

  • ReadCommitted
  • ReadUncommitted
  • RepeatableRead
  • Serializable
  • Snapshot

Learn more about it in our documentation.

New P2034 error code for transaction conflicts or deadlocks

When using certain isolation levels, it is expected that a transaction can fail due to a write conflict or a deadlock, throwing an error. One way to solve these cases is by retrying the transaction.

To make this easier, we're introducing a new PrismaClientKnownRequestError with the error code P2034: "Transaction failed due to a write conflict or a deadlock. Please retry your transaction". You can programmatically catch the error and retry the transaction. Here's an example showing how you can retry a transaction:

import { Prisma, PrismaClient } from '@​prisma/client'

const prisma = new PrismaClient()
async function main() {
  const MAX_RETRIES = 5
  let retries = 0;

  let result;
  while (retries < MAX_RETRIES) {
    try {
      result = await prisma.$transaction(
        [
          prisma.user.deleteMany({ where: { /**  args */ } }),
          prisma.post.createMany({ data: { /**  args */ } })
        ],
        {
          isolationLevel: Prisma.TransactionIsolationLevel.Serializable
        }
      )
    } catch (error) {
      if (error.code === 'P2034') {
        retries++
        continue
      }
      throw error
    }
  }
}
Fixes and improvements
Prisma Client
Prisma
Prisma Migrate
Prisma Studio
Credits

Huge thanks to @​abenhamdine, @​miguelgargallo, @​Clansty, @​panoplied, @​MEnnabah, @​drzamich, @​AndrewSouthpaw, @​kt3k for helping!

💼 We're hiring!

If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you.

We're looking for a Developer Advocate (Frontend / Fullstack) and Back-end Engineer: Prisma Data Platform.

Feel free to read the job descriptions and apply using the links provided.

Prisma Data Platform

We're working on the Prisma Data Platform — a collaborative environment for connecting apps to databases. It includes the:

  • Data Browser for navigating, editing, and querying data
  • Data Proxy for your database's persistent, reliable, and scalable connection pooling.
  • Query Console for experimenting with queries

Try it out and let us know what you think!

📺 Join us for another "What's new in Prisma" livestream

Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" livestream.

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

typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)

v5.38.1

Compare Source

Note: Version bump only for package @​typescript-eslint/eslint-plugin

typescript-eslint/typescript-eslint (@​typescript-eslint/parser)

v5.38.1

Compare Source

Note: Version bump only for package @​typescript-eslint/parser

motdotla/dotenv

v16.0.3

Compare Source

Changed
  • Added library version to debug logs (#​682)
Microsoft/TypeScript

v4.8.4

Compare Source

For release notes, check out the release announcement.

For the complete list of fixed issues, check out the

Downloads are available on:


Configuration

📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, click this checkbox.

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

renovate-approve[bot]
renovate-approve bot previously approved these changes Sep 26, 2022
renovate-approve[bot]
renovate-approve bot previously approved these changes Sep 27, 2022
@renovate renovate bot changed the title chore(deps): update all non-major dependencies to v5.38.1 fix(deps): update all non-major dependencies Sep 27, 2022
@JaronZ JaronZ enabled auto-merge (squash) September 29, 2022 20:17
@JaronZ JaronZ merged commit 3983012 into main Sep 29, 2022
@renovate renovate bot deleted the renovate/all-minor-patch branch September 29, 2022 20:19
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