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 v6.2.1 #757

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 8, 2025

This PR contains the following updates:

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

Release Notes

prisma/prisma (@​prisma/client)

v6.2.1

Compare Source

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

v6.2.0

Compare Source

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: 'alice@prisma.io',
  profileViews: 0,
  role: 'ADMIN',
  coinflips: []
}, {
  id: 23,
  name: 'Bob',
  email: 'bob@prisma.io',
  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.


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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner January 8, 2025 13:27
@renovate renovate bot added the renovate label Jan 8, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Jan 8, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Jan 8, 2025
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from d06107e to 456277a Compare January 8, 2025 17:34
@renovate renovate bot changed the title fix(deps): update prisma monorepo to v6.2.0 fix(deps): update prisma monorepo to v6.2.1 Jan 8, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Jan 8, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Jan 8, 2025
@renovate renovate bot force-pushed the renovate/prisma-monorepo branch from 456277a to 164cea5 Compare January 8, 2025 18:26
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@prisma/client@6.2.1 environment, filesystem, shell 0 8.63 MB aqrln, pirix-gh, prismabot
npm/prisma@6.2.1 None +5 16 MB pirix-gh, prismabot

🚮 Removed packages: npm/@prisma/client@6.1.0, npm/prisma@6.1.0

View full report↗︎

@naomi-lgbt naomi-lgbt merged commit 8de86cb into main Jan 8, 2025
2 checks passed
@naomi-lgbt naomi-lgbt deleted the renovate/prisma-monorepo branch January 8, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant