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 6.0.1 to 6.2.1 #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nwikeodigwe
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade @prisma/client from 6.0.1 to 6.2.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 69 versions ahead of your current version.

  • The recommended version was released 22 days ago.

Release notes
Package name: @prisma/client
  • 6.2.1 - 2025-01-08

    Today we are releasing the 6.2.1 patch release to address an issue with some of the omitApi preview feature checks having been accidentally omitted when making the feature GA. Now it is fully functional without the preview feature flag.

    Changes

  • 6.2.1-dev.2 - 2025-01-08
  • 6.2.1-dev.1 - 2025-01-08
  • 6.2.0 - 2025-01-07

    Today we're releasing Prisma ORM version 6.2.0 🎉

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

    We have a number of new features in this version, including support for json and enum fields in SQLite, a new updateManyAndReturn function, support for ULID values, as well as the promotion of the omit feature from Preview to Generally Availability.

    Highlights

    Excluding fields via omit is now production-ready

    Our number one requested feature is out of Preview and Generally Available. In 6.2.0, you no longer need to add omitApi to your list of Preview features:

    generator client {
      provider        = "prisma-client-js"
    - previewFeatures = ["omitApi"]
    }

    As a refresher: omit allows you to exclude certain fields from being returned in the results of your Prisma Client queries.

    You can either do this locally, on a per-query level:

    const result = await prisma.user.findMany({
      omit: {
        password: true,
      },
    });

    Or globally, to ensure a field is excluded from all queries of a certain model:

    const prisma = new PrismaClient({
    omit: {
    user: {
    password: true
    }
    }
    })

    // The password field is excluded in all queries, including this one
    const user = await prisma.user.findUnique({ where: { id: 1 } })

    For more information on omit, be sure to check our documentation.

    json and enum fields in SQLite

    Previous to this version, you could not define json and enum fields in your Prisma schema when using SQLite. The respective GitHub issues have been among the most popular ones in our repo, so with our new approach to open-source governance, we finally got to work and implemented these.

    Working with JSON and Enum fields works similarly to other database providers, here’s an example:

    datasource db {
    provider = "sqlite"
    url = "file:./dev.db"
    }

    model User {
    id Int @ id @ default(autoincrement())
    name String
    role Role
    data Json
    }

    enum Role {
    Customer
    Admin
    }

    Support for auto-generated ULID values

    Similar to cuid2 support released in ORM version 6.0.0, we are now adding support for Universally Unique Lexicographically Sortable Identifiers (or short: ULIDs 😄) in version 6.2.0. A ULID value is a 26-character alphanumeric string, e.g. 01GZ0GZ3XARH8ZP44A7TQ2W4ZD.

    With this new feature, you can now create records with auto-generated ULID values for String fields:

    model User {
      id String @ id @ default(ulid())  
    }

    New batch function: updateManyAndReturn

    updateMany allows you to update many records in your database, but it only returns the count of the affected rows, not the resulting rows themselves. With updateManyAndReturn you are now able to achieve this:

    const users = await prisma.user.updateManyAndReturn({
      where: {
        email: {
          contains: 'prisma.io',
        }
      },
      data: {
        role: 'ADMIN'
      }
    })

    This call to updateManyAndReturn will now return the actual records that have been updated in the query:

    [{
      id: 22,
      name: 'Alice',
      email: '[email protected]',
      profileViews: 0,
      role: 'ADMIN',
      coinflips: []
    }, {
      id: 23,
      name: 'Bob',
      email: '[email protected]',
      profileViews: 0,
      role: 'ADMIN',
      coinflips: []
    }]

    Please note that like createManyAndReturn, updateManyAndReturn is only supported in PostgreSQL, CockroachDB, and SQLite.

    Fixed runtime error in Node.js v23

    While not officially supported, we understand that a lot of you like to be on the latest Node.js version — so we fixed an error that only occurred on Node.js 23. Happy coding ✌️

    Prisma is hiring 🤝

    Join us at Prisma to work on the most popular TypeScript ORM and other exciting products like the first serverless database built on unikernels!

    We currently have two open roles in our Engineering team:

    If these don’t fit, you can still check out our jobs page and send a general application.

  • 6.2.0-integration-engines-6-2-0-9-feat-sqlite-enum-de83b89d1d4a474e646feab1929290e26fdf82d7.4 - 2025-01-02
  • 6.2.0-integration-engines-6-2-0-9-feat-sqlite-enum-de83b89d1d4a474e646feab1929290e26fdf82d7.3 - 2025-01-02
  • 6.2.0-integration-engines-6-2-0-9-feat-sqlite-enum-de83b89d1d4a474e646feab1929290e26fdf82d7.2 - 2024-12-31
  • 6.2.0-integration-engines-6-2-0-9-feat-sqlite-enum-de83b89d1d4a474e646feab1929290e26fdf82d7.1 - 2024-12-31
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.7 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.6 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.5 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.4 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.3 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.2 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-7-feat-update-many-and-return-f165828e67aa4eee12e3988ecaef03a622c2c96c.1 - 2024-12-30
  • 6.2.0-integration-engines-6-2-0-13-integration-sql-nested-transactions4-fa6eebbccfd5b45ef639efcb0fe328c189735aa4.2 - 2025-01-07
  • 6.2.0-integration-engines-6-2-0-13-integration-sql-nested-transactions4-fa6eebbccfd5b45ef639efcb0fe328c189735aa4.1 - 2025-01-07
  • 6.2.0-dev.14 - 2025-01-07
  • 6.2.0-dev.13 - 2025-01-06
  • 6.2.0-dev.12 - 2025-01-06
  • 6.2.0-dev.11 - 2025-01-06
  • 6.2.0-dev.10 - 2025-01-02
  • 6.2.0-dev.9 - 2024-12-25
  • 6.2.0-dev.8 - 2024-12-24
  • 6.2.0-dev.7 - 2024-12-23
  • 6.2.0-dev.6 - 2024-12-20
  • 6.2.0-dev.5 - 2024-12-19
  • 6.2.0-dev.4 - 2024-12-19
  • 6.2.0-dev.3 - 2024-12-19
  • 6.2.0-dev.2 - 2024-12-18
  • 6.2.0-dev.1 - 2024-12-18
  • 6.1.0 - 2024-12-17

    Today we're releasing Prisma ORM version 6.1.0

    In this version our tracing Preview feature is being graduated to GA!

    Highlights

    Tracing goes GA

    The tracing Preview feature is now stable. You now no longer have to include tracing in your set of enabled preview features.

    generator client {
       provider        = "prisma-client-js"
    -  previewFeatures = ["tracing"]
    }

    We have also changed some of the spans generated by Prisma Client. Previously, a trace would report the following spans:

    prisma:client:operation
    prisma:client:serialize
    prisma:engine
    prisma:engine:connection
    prisma:engine:db_query
    prisma:engine:serialize
    

    Now, the following are reported:

    prisma:client:operation
    prisma:client:serialize
    prisma:engine:query
    prisma:engine:connection
    prisma:engine:db_query
    prisma:engine:serialize
    prisma:engine:response_json_serialization
    

    Additionally, we have made a few changes to our dependencies:

    • @ opentelemetry/api is now a peer dependency instead of a regular dependency
    • registerInstrumentations in @ opentelemetry/instrumentation is now re-exported by @ prisma/instrumentation

    After upgrading to Prisma ORM 6.1.0 you will need to add @ opentelemetry/api to your dependencies if you haven't already:

    npm install @ opentelemetry/api
    

    You will also no longer need to have @ opentelemetry/instrumentation if you only use registerInstrumentations. In this case you can import registerInstrumentations from @ prisma/instrumentation

    - import { PrismaInstrumentation } from '@ prisma/instrumentation'
    + import { PrismaInstrumentation, registerInstrumentations } from '@ prisma/instrumentation'

    Mutli-line comments in Prisma Schema Language (PSL)

    Comments can now be defined as multi-line in your Prisma schema! Comments can use the existing format:

    // this is a schema comment

    or can now also use our multi-line format:

    /*
     * this is a multi-line comment
     * You can add in all you want here
     * Keep typing and this comment will keep on going
     */

    Bug fixes

    Tracing related

    As we're moving our tracing preview to GA, a number of issues have been resolved. Here are a few highlights:

    Other issues

    We also have a number of other issues that were resolved outside of our tracing feature.

    Fixes and improvements

    Prisma

    Prisma Client

  • 6.1.0-integration-expose-deserialize-raw-result.1 - 2024-12-02
  • 6.1.0-integration-engines-6-1-0-18-fixup-wasm-response-json-serialization-span-8988abfac9afb8e5e01a2f1862852f4e8ce393e0.1 - 2024-12-16
  • 6.1.0-integration-engines-6-1-0-17-fixup-wasm-response-json-serialization-span-18513eab509bdb5aef5cdd9c553594c3924d18cb.1 - 2024-12-16
  • 6.1.0-dev.34 - 2024-12-17
  • 6.1.0-dev.33 - 2024-12-17
  • 6.1.0-dev.32 - 2024-12-17
  • 6.1.0-dev.31 - 2024-12-16
  • 6.1.0-dev.30 - 2024-12-16
  • 6.1.0-dev.29 - 2024-12-16
  • 6.1.0-dev.28 - 2024-12-16
  • 6.1.0-dev.27 - 2024-12-16
  • 6.1.0-dev.26 - 2024-12-16
  • 6.1.0-dev.25 - 2024-12-16
  • 6.1.0-dev.24 - 2024-12-16
  • 6.1.0-dev.23 - 2024-12-16
  • 6.1.0-dev.22 - 2024-12-16
  • 6.1.0-dev.21 - 2024-12-16
  • 6.1.0-dev.20 - 2024-12-16
  • 6.1.0-dev.19 - 2024-12-16
  • 6.1.0-dev.18 - 2024-12-16
  • 6.1.0-dev.17 - 2024-12-16
  • 6.1.0-dev.16 - 2024-12-16
  • 6.1.0-dev.15 - 2024-12-13
  • 6.1.0-dev.14 - 2024-12-12
  • 6.1.0-dev.13 - 2024-12-06
  • 6.1.0-dev.12 - 2024-12-05
  • 6.1.0-dev.11 - 2024-12-04
  • 6.1.0-dev.10 - 2024-12-03
  • 6.1.0-dev.9 - 2024-12-03
  • 6.1.0-dev.8 - 2024-12-03
  • 6.1.0-dev.7 - 2024-12-02
  • 6.1.0-dev.6 - 2024-12-02
  • 6.1.0-dev.5 - 2024-12-02
  • 6.1.0-dev.4 - 2024-12-01
  • 6.1.0-dev.3 - 2024-11-30
  • 6.1.0-dev.2 - 2024-11-30
  • 6.1.0-dev.1 - 2024-11-30
  • 6.0.1 - 2024-12-02

    Today we are releasing the 6.0.1 patch release to address an issue with using Prisma Client generated in a custom output path with Next.js.

    Changes

from @prisma/client GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

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:

Snyk has created this PR to upgrade @prisma/client from 6.0.1 to 6.2.1.

See this package in npm:
@prisma/client

See this project in Snyk:
https://app.snyk.io/org/nwikeodigwe/project/c8fd9917-b566-4f49-8ba9-7b93cb075465?utm_source=github&utm_medium=referral&page=upgrade-pr
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