This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
deps(deps): update dependencies (non-major) #128
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:
4.4.0
->4.7.0
4.3.1
->4.7.0
11.1.3
->11.1.4
^0.0.35
->^0.2.0
Release Notes
prisma/prisma
v4.7.0
Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Highlights
Interactive transactions are now Generally Available
After an extensive Preview phase and lots of great feedback from our community, we're excited to announce that
interactiveTransactions
is now Generally Available and production ready! 🚀Interactive transactions allow you to pass an async function into a
$transaction
, and execute any code you like between the individual Prisma Client queries. Once the application reaches the end of the function, the transaction is committed to the database. If your application encounters an error as the transaction is being executed, the function will throw an exception and automatically rollback the transaction.Here are some of the feature highlights we've built:
4.2.0
4.6.0
Here's an example of an interactive transaction with a
Serializable
isolation level:You can now remove the
interactiveTransactions
Preview feature in your schema.Relation mode is Generally Available
This release marks
relationMode="prisma"
as stable for our users working with databases that don't rely on foreign keys to manage relations. 🎉Prisma’s relation mode started as a way to support PlanetScale which does not allow you to create foreign keys for better online migration support. We transformed that into our Referential Integrity Emulation in
3.1.1
when we realised that more users could benefit from it, and then integrated it as the default mode for MongoDB, which generally does not have foreign keys. Prisma needed to use emulation to give the same guarantees.We then realized the feature was more than just referential integrity and affected how relations work. To reflect this, we renamed the feature to relation mode and the
datasource
property torelationMode
in4.5.0
Index warnings for
relationMode = "prisma"
In this release, we've added a warning to our Prisma schema validation that informs you that the lack of foreign keys might result in slower performance — and that you should add an
@@​index
manually to your schema to counter that. This ensures your queries are equally fast in relation modeprisma
as they are with foreign keys.We also added a fix to our VS Code extension to help adding the suggested index with minimal effort:
If you are currently using the Preview feature flag to enable relation mode, you can now remove
referentialIntegrity
from thepreviewFeatures
in yourgenerator client
block in your Prisma schema.For more information, check out our updated relation mode documentation.
Prisma Client Extensions (Preview)
This release adds Preview support for Prisma Client Extensions. This feature introduces new capabilities to customize and extend Prisma Client. Today we are opening up four areas for extending Prisma Client:
model
: add custom methods or fields to your modelsclient
: add client-level methods to Prisma Clientresult
: add custom fields to your query resultsquery
: create custom Prisma Client queriesPrisma Client Extensions are self-contained scripts that can tweak the behavior of models, queries, results, and the client (Prisma Client) as a whole. You can associate a single or multiple extensions with an extended client to mix and match Prisma to your needs.
Prisma Client Extensions enables many use cases such as defining virtual fields, custom validation, and custom queries.
It also enables you to share your client extensions with others and import client extensions developed by others into your project.
For example, given the following schema:
You can create a computed field called
fullName
as follows:We're excited to see what you build with them! For more information, check out our docs and let us know what you think in this GitHub issue.
Multi-schema support for PostgreSQL (Preview)
We're pleased to announce that this release adds support for multi-schema support for PostgreSQL. The ability to query and manage multiple database schemas has been a long-standing feature request from our community.
This release adds support for the following:
If you already have a PostgreSQL database using multiple schemas, you can quickly get up and running using
prisma db pull
— on enabling the Preview feature and specifying the schemas in thedatasource
block similar to the example below.You can get started with defining multiple schemas in your Prisma schema as follows:
Then generate and apply the changes to your database with
prisma migrate dev
.We want to thank all our users for helping us design the feature since the early proposal on GitHub up to our current Preview release.
For further details, refer to our documentation and let us know what you think in this GitHub issue.
Request for feedback
Our Product team is currently running a survey for designing Database Views support for Prisma and we would appreciate your feedback.
Fixes and improvements
Prisma Client
RangeError: Invalid count value
duringnpx prisma generate
withDEBUG=*
on integration buildreferentialIntegrity
binary
engineerror
eventPrisma.TransactionClient
todefault-index.d.ts
findMany
errors withPANIC: index out of bounds: the len is 0 but the index is 0
upsert()
with nested selection errors withcalled
Option::unwrap()on a
Nonevalue
in 4.6.0findUnique
concurrently with different key order causes one of them to return nullfindUniqueOrThrow
via middlewareprisma
/ Reproduction test for prisma#16390Prisma
referentialIntegrity
(renamed torelationMode
)db pull
withmultiSchema
error on schema with 2 models with the same table name but in a different schemarelationMode
: make feature GASetDefault
validation error with warnings whenprovider = "mysql"
andrelationMode = "foreignKeys" | default
relationMode
validation warning messagesprisma validate
&prisma format
Prisma Migrate
prisma migrate dev
Language tools (e.g. VS Code)
@@​ignore
d and fields that are@ignore
dreferentialIntegrity = "prisma"
extensions
whenpostgresqlExtensions
preview feature is setrelationMode
GA - remove preview feature conditionrelationMode="prisma"
, for@relation
: add a warning if there is no index on the field(s)relationMode
: missing foreign keys' indexesPrisma Engines
Credits
Huge thanks to @cmd-johnson, @jsoref, @miguelgargallo for helping!
Prisma Data Platform
We're working on the Prisma Data Platform — a collaborative environment for connecting apps to databases. It includes the following:
Try it out. Let us know what you think!
📺 Join us for another "What's new in Prisma" live stream
Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" live stream.
The stream takes place on YouTube on Thursday, December 1 at 5 pm Berlin | 8 am San Francisco.
v4.6.1
Compare Source
Today, we are issuing the
4.6.1
patch release.Fixes in Prisma Client
findMany
errors withPANIC: index out of bounds: the len is 0 but the index is 0
upsert()
with nested selection errors withcalled
Option::unwrap()on a
Nonevalue
in 4.6.0Fix in Prisma Migrate
v4.6.0
Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Highlights
Interactive Transactions for Prisma Data Proxy (Preview)
In 3.8.0, we disabled the
interactiveTransactions
Preview feature when using the Prisma Data Proxy. This was because the API was not yet supported.In this release, we're removing the limitation. You can now try the Preview version of interactive transactions with the Prisma Data Proxy. Re-generate Prisma Client using
prisma generate --data-proxy
after enabling the Preview feature.Note: The
interactiveTransactions
Preview feature flag is still needed. We will remove this in a future version when the feature is stable.Try it out and let us know your thoughts in our interactive transactions feedback GitHub issue.
Native database level upserts for PostgreSQL, SQLite, and CockroachDB
Prisma’s upsert is one of its most powerful and most convenient APIs. In this release, Prisma will now default to the native database upsert for PostgreSQL, SQLite, and CockroachDB whenever possible.
Prisma will use the native database upsert if:
upsert
'screate
andupdate
optionsupsert
'swhere
optionwhere
option and the unique field in thecreate
option have the same valuePrisma Client's
upsert
operation was implemented on a Prisma-level and did not use the native database implementations like, e.g.,INSERT .. ON CONFLICT .. UPDATE SET
. This allowed Prisma to also upsert nested queries.The Prisma-implementation came at a cost. In some scenarios, it was more likely for a transaction to roll back because of a conflict when multiple
upsert
operations were being executed in parallel, and the multiple queries often took longer than the native database query would have taken.Try it out and let us know what you think. If you run into any issues, don't hesitate to create a GitHub issue.
Relation Mode improvements (Preview)
In 4.5.0, we renamed the "Referential Integrity" Preview feature to "Relation Mode". We also changed the
datasource
property name of the feature torelationMode
.In this release, we fixed all remaining known bugs of
relationMode = "prisma"
and cleaned up our documentation. You can now read about Relation mode on its own documentation page which is up to date with the implementation.If you encounter any problems please comment on our feedback issue. We plan to make this Generally Available soon.
extendedWhereUnique
improvements (Preview)In 4.5.0, we introduced the
extendedWhereUnique
Preview feature to allow filtering for non-unique properties in unique where queries. In this release, we're adding new rules to decide when concurrentfindUnique
queries get batched into afindMany
query.Unfortunately, we forgot to adapt our
findUnique
query batch optimization, which turns multiple concurrentfindUnique
queries into a singlefindMany
query when possible — GitHub issue.Therefore,
findUnique
queries will get batched into afindMany
query if:where: { field: <val>, field1: { equals: <val> } }
)Conversely, suppose the filter object contains any boolean operators, relation filters, or scalar filters that are not using
equals
. Prisma will fall back to executing thefindUnique
queries independently.Let us know your thoughts and share your feedback on the Preview feature in this GitHub issue.
Fixes and improvements
Prisma Client
relationMode=prisma
upsert()
should do ON CONFLICT DO UPDATE/NOTHING in postgresqlbinary
EnginereferentialIntegrity = "prisma"
): MakeNoAction
a synonym/alias ofRestrict
for the emulation, for all databases except PostgreSQL & SQLite.OnDelete: SetNull
withreferentialIntegrity = "prisma"
user.delete()
should fail, but succeeds.Prisma
referentialIntegrity = prisma
not respected when using@@​map()
SetNull
referential action referencing non-optional fieldsreferentialIntegrity
policy is lost during re-introspectionLanguage tools (e.g. VS Code)
Design Partner Program
Are you building data-intensive applications in serverless environments using Prisma? If so, you should join our Design Partner Program to help us build the tools that best fit your workflows!
The Design Partner Program aims to help development teams solve operational, data-related challenges in serverless environments. Specifically, we’re looking to build tools that help with the following problems:
Submit an application through our application form to join the Prisma Design Partner Program to take advantage of new features that you won't have to build or maintain yourselves.
Prisma Data Platform
We're working on the Prisma Data Platform — a collaborative environment for connecting apps to databases. It includes the following:
Try it out. Let us know what you think!
📺 Join us for another "What's new in Prisma" live stream
Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" live stream.
The stream takes place on YouTube on Thursday, November 10 at 5 pm Berlin | 8 am San Francisco.
Credits
Huge thanks to @cmd-johnson for helping!
v4.5.0
Compare Source
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements
Filter for non-unique properties in unique where queries (Preview)
In this release, we are adding support for non-unique properties inside the
where
statement for queries that operate on a unique record (e.g.:findUnique
,update
,delete
, etc.). This was not possible in the past, as we only allowed unique fields as filters inside thewhere
statement for the queries in question.There are use cases where a query that operates on a unique record requires further filtering by non-unique properties. For example, for the following model:
Let’s say that you would like to update the
Article
with anid
of “5”, but only if theversion
equals "1":With
4.5.0
, we are adding support to specify any number of non-unique fields in yourwhere
statement, as long as you have at least one unique field.To use it, enable the Preview feature flag:
To learn more about this feature and about use cases where it can be useful, please check out our documentation. For feedback, please leave a comment on the GitHub issue.
PostgreSQL extension management (Preview)
We are excited to add support for declaring PostgreSQL extensions in the Prisma schema. The feature comes with support for introspection and migrations. This will allow you to adopt, evolve and manage which PostgreSQL database extensions are installed directly from within your Prisma schema.
To try this feature, enable the Preview feature flag:
Now you will be able to use the new
extensions
property in thedatasource
block of your Prisma schema.Please visit our documentation to learn more about this feature or leave a comment with feedback on the GitHub issue.
Change to Referential Integrity — property in
datasource
block renamed torelationMode
(Preview)To prepare Prisma Client’s emulation of relations for general availability, we are releasing several improvements to the
referentialIntegrity
Preview feature.We decided to rename the feature to Relation Mode. We think this closer reflects what this feature does and distinguishes it from integrity management on the database level. The related property in the
datasource
block of the Prisma schema has also been changed fromreferentialIntegrity
torelationMode
.To use it, keep using the old
referentialIntegrity
Preview feature flag:But use the new property name in the
datasource
:We also removed the referential action
NoAction
for PostgreSQL and SQLite when usingrelationMode = "prisma"
as we are not planning to support the details of the database behavior.To learn more about
relationMode
, please check out the documentation or leave a comment on the GitHub issue.Deno for Prisma Client for Data Proxy (Preview)
Deno is an alternative JavaScript runtime that can replace Node.js to run JS and TS apps. It aligns itself closely with web technologies, claims to be secure by default, and supports TypeScript out of the box.
Today we are releasing initial support for Prisma with Deno via an integration for our Prisma Client for Data Proxy. This feature was developed together with the amazing team at Deno 🦕.
To use Prisma Client in a Deno project, add the
deno
Preview feature flag to your Prisma schema and define a folder asoutput
(this is required for Deno):Now you can generate Prisma Client with the Data Proxy using the command
npx prisma generate --data-proxy
. Then use Prisma Client in your Deno script with the following import:You can also deploy an app built and configured like this on Deno Deploy, Deno’s deployment platform. Read this guide in our documentation for a full example and individual steps.
For feedback, please comment on this GitHub issue.
Fixed “Invalid string length” error in Prisma Studio and Prisma Data Platform Data Browser
Many people were having issues with an "Invalid string length" error both in Prisma Studio and Prisma Data Platform Data Browser. This issue can be resolved through this workaround. With this release, the root cause of this issue has been fixed and it should not occur again.
Updated proposal for Client Extensions: request for comments
In
4.3.0
, we shared a proposal for Prisma Client Extensions on Github. We received a lot of great feedback, which we have incorporated into a new proposal.If you’re interested, please head over to the new proposal in GitHub and tell us what you think. Thank you!
Fixes and improvements
Prisma
onDelete: setDefault
referentialIntegrity
modes makes migration history obsoletereferentialIntegrity
andrelationMode
Prisma Client
Prisma Migrate
postgresqlExtensions
:migrate dev
errors withERROR: type "citext" does not exist
when settingextensions = [citext]
Language tools (e.g. VS Code)
relationMode
(previouslyreferentialIntegrity
) in the datasource blockCredits
Huge thanks to @kt3k, @abenhamdine, @jsoref for helping!
vercel/next.js
v11.1.4
Compare Source
remeda/remeda
v0.2.1
Compare Source
Bug Fixes
v0.2.0
Compare Source
Features
v0.1.0
Compare Source
Features
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.