chore(deps): update prisma monorepo to v2.8.0 #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.3.0->2.8.02.3.0->2.8.0Release Notes
prisma/prisma
v2.8.0Compare Source
Today, we are excited to share the
2.8.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
Major improvements
In today's release, we have two new features coming for you!
findFirstWhile the
findManyAPI gives you a powerful API to query your database with different filters, it's not ideal if you just want to query a single item.On the other hand, the
findOneAPI returns single items, but it only allows for filtering by unique fields.In version
2.8.0, we introducefindFirst- giving you the full power offindManyfilters while only returning the first item that matches the filter criteria.So instead of this:
You can now do this:
All filters available for
findManyare also available infindFirst.Case insensitive filters for PostgreSQL are now stable
In
2.5.0we introduced case insensitive filters for PostgreSQL, in today's release we're promoting this feature to stable. This means you don't need to include theinsensitiveFiltersfeature flag in the Prisma Client generator any more:generator client { provider = "prisma-client-js" - previewFeatures = ["insensitiveFilters"] }The new
modeoption you can pass tofindManyinfluences the corresponding filter (e.g.containsorstartsWith) but doesn't change the return type of thefindManyquery.modecan have two possible values:default: Uses the default filter configured on the database level. If the collation is configured as case insensitive in the database, the default mode will be case insensitive as well. In that case, there's no need to use theinsensitivemode.insensitive: Uses the case insensitive filter (if possible).Note that this feature will not work if you're using database collations that do not know how to convert between upper- and lowercase letters (e.g. the
Ccollation).📚 Documentation: Case sensitivity / Case-sensitive filtering
Already existing preview features from previous releases
Just a quick reminder:
2.6.0we introduced one preview feature, namelyatomicNumberOperations.2.1.0we introduced two preview features, namelyconnectOrCreateandtransactionApi.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
Fixes and improvements
prismasetnext devfindFirstAPIprisma-client-jslanguage-toolsprisma-fmtbinary path in vscode optionsstudioprisma-engines❓ Are you using Prisma at work?
We'd love to know if you're using Prisma at work. Answer with a quick yes or no in our poll, it won't take longer than a few seconds!
Credits
Huge thanks to @nohns for some great contributions in this release!
v2.7.1Compare Source
Today, we are issuing the
2.7.1patch release.Fixes
Prisma Client JS
Prisma Studio
v2.7.0Compare Source
Today we are excited to share the
2.7.0stable release.🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
Major improvements
Prisma Studio is stable 🎉
We are more than excited to share that Prisma Studio has moved out of its experimental state and is promoted to stable with today's release! Prisma Studio is the perfect companion for developers who work with databases in their daily workflows, to quickly get an overview of the state of their database as well as to view and modify the data in it. An announcement blog post will be coming soon!
To use Prisma Studio in your Prisma project, you can now run the
prisma studiocommand without the previously required--experimentalflag:Join the #prisma-studio channel in the Prisma Slack and let us know how you like Prisma Studio! 🙌
Configure Prisma schema location via
package.jsonfor more flexibilityPreviously, your
schema.prismafile needed to be available at a specific location when running Prisma CLI commands or provided via the--schemaoption when invoking a Prisma CLI command.With this release, you can configure the location of your Prisma schema via a
prismaproperty in yourpackage.json:{ "prisma": { "schema": "path/to/schema.prisma" } }The provided location in
package.jsonwill be the default location of the Prisma schema file for any Prisma CLI command you invoke. Note that you can still override this default location by manually specifying the--schemaoption when invoking a Prisma CLI command.📚 Documentation: Prisma schema file location
Already existing preview features from previous releases
Just a quick reminder:
2.6.0we introduced one preview feature, namelyatomicNumberOperations.2.5.0we introduced one preview feature, namelyinsensitiveFilters.2.1.0we introduced two preview features, namelyconnectOrCreateandtransactionApi.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
Feedback wanted: How does introspection work for you?In the last few releases we improved Prisma's database introspection, most notably with "More robust introspection by keeping manual changes in the Prisma schema file" but also many smaller bug fixes. We think it is pretty stable now, and would love to hear from you, our users, how you have been using prisma introspect recently!
If you have used introspection in the past, whether it worked well or not so well with your database, please let us know by sharing your feedback on GitHub!
🌟 Help us spread the word about Prisma
To help spread the word about Prisma, we'd very much appreciate if you would star this repo 🌟 And if you're excited about the features in this week's release, then help us and share it on Twitter.
Fixes and improvements
prisma--schemaargprisma initwith unknown parameter just outputsnullseton nested update on 2.6.0introspectcommand in v2.6.x does not remembercuid()defaults for a field and user-defined @relationnamepropertyintrospect --forcedoes not workprisma-client-jsmigratelanguage-toolsclient/index.d.tsshould not show a notificationstudionullSave Changeswill always failprisma-enginesCredits
Huge thanks to @bre7, @rahul3v, @jasonkuhrt and @Weakky for helping!
v2.6.2Compare Source
Today, we are issuing the
2.6.2patch release.Fixes
Prisma Client JS
v2.6.1Compare Source
Today, we are issuing the
2.6.1patch release.Fixes
Prisma Client JS
seton nested update on 2.6.0 #3503v2.6.0Compare Source
Today we are excited to share the
2.6.0stable release.🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
Major improvements
More robust introspection by keeping manual changes in the Prisma schema file
In prior releases, any manual changes to your Prisma schema would be overridden when invoking
prisma introspect(e.g. usage of@mapor@@​mapas well as the renaming of relation fields).Keeping these manual changes in the Prisma schema file has been available as a preview feature via the
--experimental-reintrospectionalready. After getting tested as a preview feature for a few releases, we are excited to promote this functionality to be the default behavior ofprisma introspectinto this stable release.Note that you can opt-out of this behavior by using the new
--forceflag:prisma introspect --force. This will generate a schema purely based on the introspected database and override any prior manual changes.📚 Documentation: Prisma Introspect
Preview features
New: Atomic number operations on
updateWith today's release, we introduce atomic number operations for
updatequeries in Prisma Client. It allows you to update the values of certain fields atomically.Feature flag
Atomic number operations needs to be enabled with the feature flag
atomicNumberOperationslike so:Usage
We are introducing five atomic operations for
IntandFloatfields :increment: x: Addsxto the current valuedecrement: x: Subtractsxfrom the current valuemultiply: x: Multiplies the current value byxdivide: x: Divides the current value byxset: x: Sets the value tox(equivalent todata: { age: 18 })Here's an example of using the new operations:
📚 Documentation: Atomic operations on update
Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue here).
Already existing preview features from previous releases
Just a quick reminder:
2.5.0we introduced one preview feature, namelyinsensitiveFilters.2.1.0we introduced two preview features, namelyconnectOrCreateandtransactionApi.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
🤔 How would you describe Prisma?
We'd love to hear from you how you describe Prisma to your developer friends and coworkers. If you have 2 minutes, please answer this question via this online form.
🌟 Help us spread the word about Prisma
To help spread the word about Prisma, we'd very much appreciate if you would star this repo 🌟 And if you're excited about the features in this week's release, then help us and share it on Twitter.
Fixes and improvements
prismaprisma/.envleads to confusing error messageprisma generatestack overflow on a large schemanode_modules/.prisma/client/index.d.tsintrospect@updatedAtprisma-client-jsPrismaClientconstructormigrateError querying the database: near ",": syntax errorsaveoutputs connection strings if included in schema filelanguage-tools[]instead of""when using autocompletionstudiomiddlewareswere removed, you can now safely remove them from your schema.prisma.prismanot@prisma/cliskipcan be set to negativeprisma-enginesCredits
Huge thanks to @peter50216 for helping!
v2.5.1Compare Source
Today, we are issuing the
2.5.1patch release.Fixes
Prisma Client JS
Studio
v2.5.0Compare Source
Today we are excited to share the
2.5.0stable release.🌟 Help us spread the word about Prisma by starring the repo ☝️, tweeting about the release or sharing your experience with Prisma on Reddit. 🌟
Major improvements
Middlewares, removing duplicates with
distinctand aggregations are now stableAfter running in preview mode for a number of releases, we are excited to promote the following features into this stable release:
middlewaresdistinctaggregationsApiThis means you can omit the respective feature flags in the
generatorblock in your Prisma schema:generator client { provider = "prisma-client-js" - previewFeatures = ["middlewares", "distinct", "aggregationsApi"] }Read on to learn about each feature individually!
Middlewares
Prisma Client's middleware lets you intercept Prisma Client queries to manipulate its parameters and interrogate its result. A middleware is a function that's passed to Prisma Client's
$usemethod.Middlewares are convenient for a number of use cases, for example:
The following example includes two middlewares:
📚 Documentation: Middleware
Remove duplicates from query results with
distinctPrisma Client allows you to filter duplicate rows from the response to a
findManyquery using thedistinctoption:📚 Documentation: Distinct
Aggregations with
aggregatePrisma Client allows you to perform aggregations operations on the number fields (such as
IntandFloat) of a model - for example, you can get the average age of all users:Prisma Client supports the following aggregations:
avg(average)sum(sum)min(minimum value)max(maximum value)📚 Documentation: Aggregations
Preview features
New: Case insensitive filters (PostgreSQL only)
In
2.5.0we introduce case insensitive filters for querying capabilities to Prisma Client. It allows you to query for fields in a case insensitive way.📚 Documentation: Case sensitivity / Case-sensitive filtering
Feature flag
Insensitive filters querying needs to be enabled with the feature flag
insensitiveFilterslike so:Usage
The new
modeoption you can pass tofindManyinfluences the corresponding filter (e.g.containsorstartsWith) but doesn't change the return type of thefindManyquery.modecan have two possible values:default: Uses the default filter configured on the database level. If the collation is configured as case insensitive in the database, the default mode will be case insensitive as well. In that case, there's no need to use theinsensitivemode.insensitive: Uses the case insensitive filter (if possible).Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue here).
Feature flags for
middlewares,distinctandaggregationApiremovedAs mentioned above, we were able to promote three features into this stable release. This was thanks to your help and feedback, so please keep trying the preview features if they're useful to you and help us by sharing feedback.
Already existing preview features from
2.1.0Just a quick reminder:
2.1.0we introduced two experimental features, namelyconnectOrCreateandtransactionApi.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
🌟 Help us spread the word about Prisma
To help spread the word about Prisma, we'd very much appreciate if you would star this repo 🌟 And if you're excited about the features in this week's release, then help us and share it on Twitter.
Fixes and improvements
prismaOption::unwrap()on aNonevalue', libs/datamodel/core/src/validator/validate.rs:178:29npx prisma introspecterrors with[libs/sql-schema-describer/src/mysql.rs:353:27] column_nameon indexes using expressions (MySQL 8.0.13+)prisma -vnpxprefix when being triggered vianpx prismaitselfStudiocommand intoclipackageTransactionis still a reserved word in 2.4.1prisma-client-jsmigratelanguage-toolsstudioprisma-enginesrepository_dispatchtoworkflow_dispatchto enable running branchesv2.4.1Compare Source
Today, we are issuing the
2.4.1patch release.When we released the new "Order by multiple fields" feature, you gave us feedback, that the order of properties is not stable in JavaScript. Since ES2015 that is not a problem in the language itself anymore.
However, some teams use the eslint sort-keys plugin, which sorts the keys of objects by alphabet.
Therefore we decided to change the API in a patch release to minimize any problems this might cause to you.
Order by multiple fields in
2.4.0Order by multiple fields in
2.4.1v2.4.0Compare Source
Today, we are issuing the
2.4.0stable release.🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release 🌟
Major improvements
Order by multiple fields
A long-awaited feature - the ability to order by multiple fields in Prisma Client is finally here!
Until now you could only order by a single scalar field of a model. The API design however was already prepared for ordering multiple fields with the object syntax we have. Instead of just one property, that
orderByobject can now have as many fields as you want! The order of the fields hereby determines the order of the returned list (see example below).You can use it like so:
As mentioned by the comment, the returned objects in
usersare ordered first byage(descending), and then byname(ascending).📚 Documentation: Sort on multiple fields
Top-level Client Methods:
$dollar prefix for top-level Prisma Client methodsIn recent versions, we introduced a couple of top-level methods in Prisma Client (e.g.
prisma.transaction()andprisma.use()) in preview mode. The immediate feedback was that the denylist for model names grew - which breaks Prisma schemas where a model is calledTransaction,transaction,use, orUse. And the list goes on...In order to have a future-proof API, that allows maximum expressibility in terms of model names, we decided to prefix all non-query methods with a dollar sign
$. That means Prisma Client will from now on ship with the following methods:Pre-existing
$disconnect$connect$on$queryRaw$executeRawStill in preview
$use$transactionThe preview methods have already been renamed, the pre-existing methods like
connectare still available, you just get a deprecation warning. They will be available for a few more releases with an alias, so no hurry to update them yet.Updates in Prisma Studio
With this release, we shipped a number of improvements for Prisma Studio:
Try out Prisma Studio in the online demo or in your Prisma project by running:
Preview features
Changes to
middlewaresandtransactionApiAs mentioned above, we ar changing the names of some the top-level Prisma Client methods. This affects the two preview features
middlewaresandtransactionApi.middlewaresYou still need to enable the preview feature via the
generatorblock in your Prisma schema to access it:Before
After
transactionApiYou still need to enable the preview feature via the
generatorblock in your Prisma schema to access it:Before
After
Already existing preview features from
2.1.0,2.2.0, and2.3.0Just a quick reminder:
2.1.0we introduced two experimental features, namelyconnectOrCreateandtransactionApi.2.2.0we introducedaggregateApi.2.3.0we introducedmiddlewaresand thedistinctApi.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
🌟 Help us spread the word about Prisma
To help spread the word about Prisma, we'd very much appreciate if you would star this repo 🌟 And if you're excited about the features in this week's release, then help us and share it on Twitter.
Fixes and improvements
prisma@default("")for String fieldsCreateInputandUpdateInputhave different typings for optional relations@relationfield after introspectionoutputis specified ongenerator@@​mapand@mapwith argumentnameloses thenameafter re-introspection@mapwill get option commented if it invalid without map{ where: { non_fk_field: null } }prisma-client-jsmigratelanguage-toolsstudioprisma-enginesRenovate configuration
📅 Schedule: 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.
This PR has been generated by WhiteSource Renovate. View repository job log here.