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

[Snyk] Upgrade @prisma/client from 5.10.2 to 5.12.1 #128

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

kevinanielsen
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade @prisma/client from 5.10.2 to 5.12.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 192 versions ahead of your current version.
  • The recommended version was released a month ago, on 2024-04-04.
Release notes
Package name: @prisma/client
  • 5.12.1 - 2024-04-04

    Today, we are issuing the 5.12.1 patch release to fix two small problems with our new Cloudflare D1 support.

    Fixes in Prisma CLI

    Windows-only fix for new D1 specific flags for migrate diff and db pull

    The flags --from-local-d1 and --to-local-d1 for migrate diff and --local-d1 to db pull we added in 5.12.0 were not working as expected when running on Windows only. This is now fixed.

    📚 Documentation: Deploying a Cloudflare worker with D1 and Prisma ORM

    New option for migrate diff: -o or --output

    We added a new parameter --output to migrate diff that can be used to provide a filename into which the output of the command will be written. This is particularly useful for Windows users, using PowerShell, as using > to write into a file creates a UTF-16 LE file that can not be read by wrangler d1 migrations apply. Using this new option, this problem can be avoided:

    npx prisma migrate diff --script --from-empty --to-schema-datamodel ./prisma/schema.prisma --output ./schema.sql

    Related issues:

  • 5.12.1-dev.2 - 2024-04-04
  • 5.12.1-dev.1 - 2024-04-03
  • 5.12.0 - 2024-04-02

    Today, we are excited to share the 5.12.0 stable release 🎉

    🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release.

    Highlights

    Cloudflare D1 (Preview)

    This release brings Preview support for Cloudflare D1 with Prisma ORM 🥳

    D1 is Cloudflare’s SQLite database that can be used when deploying applications with Cloudflare.

    When using Prisma ORM with D1, you can continue to: model your database with Prisma schema language, specify sqlite as your database provider in your Prisma schema, and interact with your database using Prisma Client.

    To use Prisma ORM and D1 on Cloudflare Workers or Cloudflare Pages, you need to set sqlite as your database provider and use the @ prisma/adapter-d1 database adapter via the driverAdapters Preview feature, released back in version 5.4.0.

    Here is an example of sending a query to your D1 database using Prisma Client in your Worker:

    // src/index.ts file
    import { PrismaClient } from '@ prisma/client'
    import { PrismaD1 } from '@ prisma/adapter-d1'

    // Add the D1Database to the Env interface
    export interface Env {
    // This must match the binding name defined in your wrangler.toml configuration
    DB: D1Database
    }

    export default {
    async fetch(
    request: Request,
    env: Env,
    ctx: ExecutionContext
    ): Promise<Response> {
    // Make sure the database name matches the binding name in wrangler.toml and Env interface
    const adapter = new PrismaD1(env.DB)
    // Instantiate PrismaClient using the PrismaD1 driver adapter
    const prisma = new PrismaClient({ adapter })

    <span class="pl-k">const</span> <span class="pl-s1">users</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">prisma</span><span class="pl-kos">.</span><span class="pl-c1">user</span><span class="pl-kos">.</span><span class="pl-en">findMany</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
    <span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-smi">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">users</span><span class="pl-kos">)</span>
    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Response</span><span class="pl-kos">(</span><span class="pl-s1">result</span><span class="pl-kos">)</span>
    

    },
    }

    📚 Documentation: D1 Documentation

    ✍️ Blog post: Build Applications at the Edge with Prisma ORM & Cloudflare D1 (Preview)

    📣 Share your feedback: D1 Driver Adapter

    🚀 Example project: Deploy a Cloudflare Worker with D1

    createMany() for SQLite

    Bringing support for createMany() in SQLite has been a long-awaited feature

    createMany() is a method on Prisma Client, released back in version 2.16.0, that lets you insert multiple records into your database at once. This can be really useful when seeding your database or inserting bulk data.

    Here is an example of using createMany() to create new users:

    const users = await prisma.user.createMany({
      data: [
        { name: 'Sonali', email: '[email protected]' },
        { name: 'Alex', email: '[email protected]' },
        { name: 'Yewande', email: '[email protected]' },
        { name: 'Angelina', email: '[email protected]' },
      ],
    })

    Before this release, if you wanted to perform bulk inserts with SQLite, you would have most likely used $queryRawUnsafe to execute raw SQL queries. But now you don’t have to go through all that trouble 🙂

    With SQLite, createMany() works exactly the same way from an API standpoint as it does with other databases except it does not support the skipDuplicates option. At the behavior level, SQLite will split createMany() entries into multiple INSERT queries when the model in your schema contains fields with attributes like @ default(dbgenerated()) or @ default(autoincrement()) and when the fields are not consistently provided with values across the entries.

    📚Documentation: createMany() - Prisma Client API Reference

    Fixes and Improvements

    Prisma Client

    Credits

    Huge thanks to @ yubrot, @ skyzh, @ anuraaga, @ onichandame, @ LucianBuzzo, @ RobertCraigie, @ arthurfiorette, @ elithrar for helping!

  • 5.12.0-integration-publishing.4 - 2024-03-28
  • 5.12.0-integration-publishing.3 - 2024-03-28
  • 5.12.0-integration-publishing.2 - 2024-03-28
  • 5.12.0-integration-publishing.1 - 2024-03-28
  • 5.12.0-integration-promo-updates.8 - 2024-04-02
  • 5.12.0-integration-promo-updates.7 - 2024-04-02
  • 5.12.0-integration-promo-updates.6 - 2024-04-02
  • 5.12.0-integration-promo-updates.5 - 2024-04-02
  • 5.12.0-integration-promo-updates.4 - 2024-03-29
  • 5.12.0-integration-promo-updates.3 - 2024-03-29
  • 5.12.0-integration-promo-updates.2 - 2024-03-28
  • 5.12.0-integration-promo-updates.1 - 2024-03-28
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.7 - 2024-04-02
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.6 - 2024-04-02
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.5 - 2024-03-29
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.4 - 2024-03-29
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.3 - 2024-03-29
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.2 - 2024-03-29
  • 5.12.0-integration-integrate-migrations-with-adapter-d1.1 - 2024-03-29
  • 5.12.0-integration-engines-5-12-0-9-integration-sql-nested-transactions-3a8bf350548bafdbabbd4a7a6824e64f59ef979f.2 - 2024-03-22
  • 5.12.0-integration-engines-5-12-0-9-integration-sql-nested-transactions-3a8bf350548bafdbabbd4a7a6824e64f59ef979f.1 - 2024-03-22
  • 5.12.0-integration-engines-5-12-0-6-integration-d1-tables-2ba47bbf74c518b0a809d271a5265882545f6d7d.2 - 2024-03-20
  • 5.12.0-integration-engines-5-12-0-6-integration-d1-tables-2ba47bbf74c518b0a809d271a5265882545f6d7d.1 - 2024-03-20
  • 5.12.0-integration-engines-5-12-0-2-integration-sql-nested-transactions-50096754c4d3646683538e723f41441a2e4c3b8a.2 - 2024-03-15
  • 5.12.0-integration-engines-5-12-0-2-integration-sql-nested-transactions-50096754c4d3646683538e723f41441a2e4c3b8a.1 - 2024-03-15
  • 5.12.0-integration-engines-5-12-0-10-integration-jkomyno-d1-boolean-904260f081dd153649eb6e22e36baeb9cb0a0da1.2 - 2024-03-22
  • 5.12.0-integration-engines-5-12-0-10-integration-jkomyno-d1-boolean-904260f081dd153649eb6e22e36baeb9cb0a0da1.1 - 2024-03-22
  • 5.12.0-integration-db-pull-d1.1 - 2024-03-25
  • 5.12.0-dev.55 - 2024-04-02
  • 5.12.0-dev.53 - 2024-04-02
  • 5.12.0-dev.52 - 2024-04-02
  • 5.12.0-dev.51 - 2024-04-02
  • 5.12.0-dev.50 - 2024-04-02
  • 5.12.0-dev.49 - 2024-04-02
  • 5.12.0-dev.46 - 2024-03-28
  • 5.12.0-dev.45 - 2024-03-27
  • 5.12.0-dev.44 - 2024-03-27
  • 5.12.0-dev.43 - 2024-03-26
  • 5.12.0-dev.42 - 2024-03-25
  • 5.12.0-dev.41 - 2024-03-25
  • 5.12.0-dev.40 - 2024-03-24
  • 5.12.0-dev.39 - 2024-03-22
  • 5.12.0-dev.38 - 2024-03-22
  • 5.12.0-dev.37 - 2024-03-22
  • 5.12.0-dev.35 - 2024-03-22
  • 5.12.0-dev.34 - 2024-03-21
  • 5.12.0-dev.33 - 2024-03-21
  • 5.12.0-dev.32 - 2024-03-21
  • 5.12.0-dev.30 - 2024-03-21
  • 5.12.0-dev.29 - 2024-03-20
  • 5.12.0-dev.28 - 2024-03-20
  • 5.12.0-dev.27 - 2024-03-20
  • 5.12.0-dev.26 - 2024-03-20
  • 5.12.0-dev.25 - 2024-03-20
  • 5.12.0-dev.24 - 2024-03-20
  • 5.12.0-dev.23 - 2024-03-19
  • 5.12.0-dev.22 - 2024-03-19
  • 5.12.0-dev.21 - 2024-03-19
  • 5.12.0-dev.20 - 2024-03-19
  • 5.12.0-dev.19 - 2024-03-19
  • 5.12.0-dev.18 - 2024-03-19
  • 5.12.0-dev.17 - 2024-03-19
  • 5.12.0-dev.16 - 2024-03-18
  • 5.12.0-dev.15 - 2024-03-18
  • 5.12.0-dev.14 - 2024-03-15
  • 5.12.0-dev.13 - 2024-03-15
  • 5.12.0-dev.12 - 2024-03-15
  • 5.12.0-dev.11 - 2024-03-14
  • 5.12.0-dev.10 - 2024-03-14
  • 5.12.0-dev.9 - 2024-03-13
  • 5.12.0-dev.6 - 2024-03-13
  • 5.12.0-dev.5 - 2024-03-13
  • 5.12.0-dev.4 - 2024-03-13
  • 5.12.0-dev.3 - 2024-03-13
  • 5.12.0-dev.2 - 2024-03-13
  • 5.12.0-dev.1 - 2024-03-13
  • 5.11.0 - 2024-03-12
    Read more
  • 5.11.0-integration-test-imp-map-order.1 - 2024-03-11
  • 5.11.0-integration-fix-pipeline.8 - 2024-03-06
  • 5.11.0-integration-fix-pipeline.6 - 2024-03-05
  • 5.11.0-integration-fix-pipeline.5 - 2024-03-05
  • 5.11.0-integration-fix-pipeline.4 - 2024-03-05
  • 5.11.0-integration-fix-pipeline.3 - 2024-03-05
  • 5.11.0-integration-fix-pipeline.2 - 2024-03-05
  • 5.11.0-integration-fix-pg-import-ecosystem-tests.1 - 2024-03-05
  • 5.11.0-integration-fix-non-ascii.1 - 2024-02-20
  • 5.11.0-integration-fix-debug-reexport.3 - 2024-03-04
  • 5.11.0-integration-fix-debug-reexport.2 - 2024-03-04
  • 5.11.0-integration-fix-client-wasm-loading-vercel.16 - 2024-03-07
  • 5.11.0-integration-fix-client-wasm-loading-vercel.15 - 2024-03-06
  • 5.11.0-integration-fix-client-wasm-loading-vercel.14 - 2024-03-04
  • 5.11.0-integration-fix-client-wasm-loading-vercel.13 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.12 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.11 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.10 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.9 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.8 - 2024-03-01
  • 5.11.0-integration-fix-client-wasm-loading-vercel.7 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.6 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.5 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.4 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.3 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.2 - 2024-02-29
  • 5.11.0-integration-fix-client-wasm-loading-vercel.1 - 2024-02-29
  • 5.11.0-integration-fix-adapter-pg-again.3 - 2024-03-07
  • 5.11.0-integration-fix-adapter-pg-again.2 - 2024-03-07
  • 5.11.0-integration-feat-prisma-pg-worker.18 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.17 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.16 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.15 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.12 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.11 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.10 - 2024-02-23
  • 5.11.0-integration-feat-prisma-pg-worker.9 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.8 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.7 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.6 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.5 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.4 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.3 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.2 - 2024-02-22
  • 5.11.0-integration-feat-prisma-pg-worker.1 - 2024-02-22
  • 5.11.0-integration-engines-5-11-0-14-feat-wasm-psl-all-1291b5d304c91341e2a49095decdd9c1b0e1dc96.1 - 2024-03-11
  • 5.11.0-integration-engines-5-11-0-12-integration-joins-distinct-inmemory-4505b4687e3684b8b8de317d618aa8d2bf60fc5b.2 - 2024-03-11
  • 5.11.0-integration-engines-5-11-0-12-integration-joins-distinct-inmemory-4505b4687e3684b8b8de317d618aa8d2bf60fc5b.1 - 2024-03-11
  • 5.11.0-integration-engines-5-11-0-10-integration-joins-distinct-inmemory-3883dc47506913af0d7d8a4c82377011eb68c968.2 - 2024-03-11
  • 5.11.0-integration-engines-5-11-0-10-integration-joins-distinct-inmemory-3883dc47506913af0d7d8a4c82377011eb68c968.1 - 2024-03-11
  • 5.11.0-integration-engines-5-10-0-13-feat-qe-specific-psl-performance2-b9f77ddd4b02a49b324c20b050de9087e29da4ed.1 - 2024-02-20
  • 5.11.0-integration-chore-adapter-neon-remove-pool-check.1 - 2024-02-23
  • 5.11.0-dev.61 - 2024-03-11
  • 5.11.0-dev.60 - 2024-03-11
  • 5.11.0-dev.59 - 2024-03-11
  • 5.11.0-dev.58 - 2024-03-11
  • 5.11.0-dev.57 - 2024-03-11
  • 5.11.0-dev.56 - 2024-03-11
  • 5.11.0-dev.55 - 2024-03-11
  • 5.11.0-dev.54 - 2024-03-11
  • 5.11.0-dev.53 - 2024-03-11
  • 5.11.0-dev.52 - 2024-03-07
  • 5.11.0-dev.51 - 2024-03-07
  • 5.11.0-dev.50 - 2024-03-07
  • 5.11.0-dev.49 - 2024-03-06
  • 5.11.0-dev.48 - 2024-03-06
  • 5.11.0-dev.47 - 2024-03-06
  • 5.11.0-dev.46 - 2024-03-06
  • 5.11.0-dev.45 - 2024-03-06
  • 5.11.0-dev.44 - 2024-03-06
  • 5.11.0-dev.43 - 2024-03-05
  • 5.11.0-dev.42 - 2024-03-05
  • 5.11.0-dev.41 - 2024-03-05
  • 5.11.0-dev.40 - 2024-03-05
  • 5.11.0-dev.39 - 2024-03-05
  • 5.11.0-dev.38 - 2024-03-05
  • 5.11.0-dev.37 - 2024-03-04
  • 5.11.0-dev.36 - 2024-03-04
  • 5.11.0-dev.35 - 2024-03-04
  • 5.11.0-dev.33 - 2024-03-04
  • 5.11.0-dev.32 - 2024-03-04
  • 5.11.0-dev.31 - 2024-03-04
  • 5.11.0-dev.30 - 2024-03-04
  • 5.11.0-dev.29 - 2024-03-04
  • 5.11.0-dev.28 - 2024-03-04
  • 5.11.0-dev.27 - 2024-03-04
  • 5.11.0-dev.26 - 2024-03-04
  • 5.11.0-dev.25 - 2024-03-04
  • 5.11.0-dev.24 - 2024-03-04
  • 5.11.0-dev.23 - 2024-03-04
  • 5.11.0-dev.22 - 2024-03-04
  • 5.11.0-dev.21 - 2024-03-04
  • 5.11.0-dev.20 - 2024-03-01
  • 5.11.0-dev.19 - 2024-02-29
  • 5.11.0-dev.18 - 2024-02-28
  • 5.11.0-dev.17 - 2024-02-28
  • 5.11.0-dev.16 - 2024-02-28
  • 5.11.0-dev.15 - 2024-02-27
  • 5.11.0-dev.14 - 2024-02-27
  • 5.11.0-dev.13 - 2024-02-27
  • 5.11.0-dev.12 - 2024-02-26
  • 5.11.0-dev.11 - 2024-02-26
  • 5.11.0-dev.10 - 2024-02-26
  • 5.11.0-dev.8 - 2024-02-23
  • 5.11.0-dev.7 - 2024-02-23
  • 5.11.0-dev.6 - 2024-02-22
  • 5.11.0-dev.5 - 2024-02-21
  • 5.11.0-dev.4 - 2024-02-21
  • 5.11.0-dev.3 - 2024-02-20
  • 5.11.0-dev.2 - 2024-02-20
  • 5.11.0-dev.1 - 2024-02-20
  • 5.10.2 - 2024-02-21

    Today, we are issuing the 5.10.2 patch release.

    Fix in Prisma CLI

from @prisma/client GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Copy link

vercel bot commented May 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flags-game ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 4:30am

@kevinanielsen kevinanielsen merged commit 1a9067e into main Jun 17, 2024
9 checks passed
@kevinanielsen kevinanielsen deleted the snyk-upgrade-5486df5fa6f0241da0e7a177d8ece657 branch June 17, 2024 19:43
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.

2 participants