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.0
2.3.0
->2.8.0
Release Notes
prisma/prisma
v2.8.0
Compare Source
Today, we are excited to share the
2.8.0
stable 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!
findFirst
While the
findMany
API 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
findOne
API returns single items, but it only allows for filtering by unique fields.In version
2.8.0
, we introducefindFirst
- giving you the full power offindMany
filters while only returning the first item that matches the filter criteria.So instead of this:
You can now do this:
All filters available for
findMany
are also available infindFirst
.Case insensitive filters for PostgreSQL are now stable
In
2.5.0
we 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 theinsensitiveFilters
feature flag in the Prisma Client generator any more:generator client { provider = "prisma-client-js" - previewFeatures = ["insensitiveFilters"] }
The new
mode
option you can pass tofindMany
influences the corresponding filter (e.g.contains
orstartsWith
) but doesn't change the return type of thefindMany
query.mode
can 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 theinsensitive
mode.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
C
collation).📚 Documentation: Case sensitivity / Case-sensitive filtering
Already existing preview features from previous releases
Just a quick reminder:
2.6.0
we introduced one preview feature, namelyatomicNumberOperations
.2.1.0
we introduced two preview features, namelyconnectOrCreate
andtransactionApi
.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
prisma
set
next dev
findFirst
APIprisma-client-js
language-tools
prisma-fmt
binary path in vscode optionsstudio
prisma-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.1
Compare Source
Today, we are issuing the
2.7.1
patch release.Fixes
Prisma Client JS
Prisma Studio
v2.7.0
Compare Source
Today we are excited to share the
2.7.0
stable 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 studio
command without the previously required--experimental
flag:Join the #prisma-studio channel in the Prisma Slack and let us know how you like Prisma Studio! 🙌
Configure Prisma schema location via
package.json
for more flexibilityPreviously, your
schema.prisma
file needed to be available at a specific location when running Prisma CLI commands or provided via the--schema
option when invoking a Prisma CLI command.With this release, you can configure the location of your Prisma schema via a
prisma
property in yourpackage.json
:The provided location in
package.json
will 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--schema
option when invoking a Prisma CLI command.📚 Documentation: Prisma schema file location
Already existing preview features from previous releases
Just a quick reminder:
2.6.0
we introduced one preview feature, namelyatomicNumberOperations
.2.5.0
we introduced one preview feature, namelyinsensitiveFilters
.2.1.0
we introduced two preview features, namelyconnectOrCreate
andtransactionApi
.In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
Feedbac
k 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
--schema
argprisma init
with unknown parameter just outputsnull
set
on nested update on 2.6.0introspect
command in v2.6.x does not remembercuid()
defaults for a field and user-defined @relationname
propertyintrospect --force
does not workprisma-client-js
migrate
language-tools
client/index.d.ts
should not show a notificationstudio
null
Save Changes
will always failprisma-engines
Credits
Huge thanks to @bre7, @rahul3v, @jasonkuhrt and @Weakky for helping!
v2.6.2
Compare Source
Today, we are issuing the
2.6.2
patch release.Fixes
Prisma Client JS
v2.6.1
Compare Source
Today, we are issuing the
2.6.1
patch release.Fixes
Prisma Client JS
set
on nested update on 2.6.0 #3503v2.6.0
Compare Source
Today we are excited to share the
2.6.0
stable 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@map
or@@​map
as 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-reintrospection
already. After getting tested as a preview feature for a few releases, we are excited to promote this functionality to be the default behavior ofprisma introspect
into this stable release.Note that you can opt-out of this behavior by using the new
--force
flag: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
update
With today's release, we introduce atomic number operations for
update
queries 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
atomicNumberOperations
like so:Usage
We are introducing five atomic operations for
Int
andFloat
fields :increment: x
: Addsx
to the current valuedecrement: x
: Subtractsx
from the current valuemultiply: x
: Multiplies the current value byx
divide: x
: Divides the current value byx
set: 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.0
we introduced one preview feature, namelyinsensitiveFilters
.2.1.0
we introduced two preview features, namelyconnectOrCreate
andtransactionApi
.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
prisma
prisma/.env
leads to confusing error messageprisma generate
stack overflow on a large schemanode_modules/.prisma/client/index.d.ts
introspect
@updatedAt
prisma-client-js
PrismaClient
constructormigrate
Error querying the database: near ",": syntax error
save
outputs connection strings if included in schema filelanguage-tools
[]
instead of""
when using autocompletionstudio
middlewares
were removed, you can now safely remove them from your schema.prisma.prisma
not@prisma/cli
skip
can be set to negativeprisma-engines
Credits
Huge thanks to @peter50216 for helping!
v2.5.1
Compare Source
Today, we are issuing the
2.5.1
patch release.Fixes
Prisma Client JS
Studio
v2.5.0
Compare Source
Today we are excited to share the
2.5.0
stable 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
distinct
and 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:
middlewares
distinct
aggregationsApi
This means you can omit the respective feature flags in the
generator
block 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
$use
method.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
distinct
Prisma Client allows you to filter duplicate rows from the response to a
findMany
query using thedistinct
option:📚 Documentation: Distinct
Aggregations with
aggregate
Prisma Client allows you to perform aggregations operations on the number fields (such as
Int
andFloat
) 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.0
we 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
insensitiveFilters
like so:Usage
The new
mode
option you can pass tofindMany
influences the corresponding filter (e.g.contains
orstartsWith
) but doesn't change the return type of thefindMany
query.mode
can 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 theinsensitive
mode.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
,distinct
andaggregationApi
removedAs 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.0
Just a quick reminder:
2.1.0
we introduced two experimental features, namelyconnectOrCreate
andtransactionApi
.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
Option::unwrap()
on aNone
value', libs/datamodel/core/src/validator/validate.rs:178:29npx prisma introspect
errors with[libs/sql-schema-describer/src/mysql.rs:353:27] column_name
on indexes using expressions (MySQL 8.0.13+)prisma -v
npx
prefix when being triggered vianpx prisma
itselfStudio
command intocli
packageTransaction
is still a reserved word in 2.4.1prisma-client-js
migrate
language-tools
studio
prisma-engines
repository_dispatch
toworkflow_dispatch
to enable running branchesv2.4.1
Compare Source
Today, we are issuing the
2.4.1
patch 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.0
Order by multiple fields in
2.4.1
v2.4.0
Compare Source
Today, we are issuing the
2.4.0
stable 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
orderBy
object 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
users
are 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
$executeRaw
Still in preview
$use
$transaction
The preview methods have already been renamed, the pre-existing methods like
connect
are 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
middlewares
andtransactionApi
As mentioned above, we ar changing the names of some the top-level Prisma Client methods. This affects the two preview features
middlewares
andtransactionApi
.middlewares
You still need to enable the preview feature via the
generator
block in your Prisma schema to access it:Before
After
transactionApi
You still need to enable the preview feature via the
generator
block in your Prisma schema to access it:Before
After
Already existing preview features from
2.1.0
,2.2.0
, and2.3.0
Just a quick reminder:
2.1.0
we introduced two experimental features, namelyconnectOrCreate
andtransactionApi
.2.2.0
we introducedaggregateApi
.2.3.0
we introducedmiddlewares
and 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 fieldsCreateInput
andUpdateInput
have different typings for optional relations@relation
field after introspectionoutput
is specified ongenerator
@@​map
and@map
with argumentname
loses thename
after re-introspection@map
will get option commented if it invalid without map{ where: { non_fk_field: null } }
prisma-client-js
migrate
language-tools
studio
prisma-engines
Renovate 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.