chore(deps): update dependency drizzle-kit to ^0.30.0 #135
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:
^0.27.0->^0.30.0Release Notes
drizzle-team/drizzle-orm (drizzle-kit)
v0.30.0Compare Source
Breaking Changes
The Postgres timestamp mapping has been changed to align all drivers with the same behavior.
❗ We've modified the
postgres.jsdriver instance to always return strings for dates, and then Drizzle will provide you with either strings of mapped dates, depending on the selectedmode. The only issue you may encounter is that once you provide the `postgres.js`` driver instance inside Drizzle, the behavior of this object will change for dates, which will always be strings.We've made this change as a minor release, just as a warning, that:
If you were using timestamps and were waiting for a specific response, the behavior will now be changed.
When mapping to the driver, we will always use
.toISOStringfor both timestamps with timezone and without timezone.If you were using the
postgres.jsdriver outside of Drizzle, allpostgres.jsclients passed to Drizzle will have mutated behavior for dates. All dates will be strings in the response.Parsers that were changed for
postgres.js.Ideally, as is the case with almost all other drivers, we should have the possibility to mutate mappings on a per-query basis, which means that the driver client won't be mutated. We will be reaching out to the creator of the
postgres.jslibrary to inquire about the possibility of specifying per-query mapping interceptors and making this flow even better for all users.If we've overlooked this capability and it is already available with `postgres.js``, please ping us in our Discord!
A few more references for timestamps without and with timezones can be found in our docs
Bug fixed in this release
Big thanks to @Angelelz!
v0.29.1Compare Source
Fixes
New Features/Helpers
🎉 Detailed JSDoc for all query builders in all dialects - thanks @realmikesolo
You can now access more information, hints, documentation links, etc. while developing and using JSDoc right in your IDE. Previously, we had them only for filter expressions, but now you can see them for all parts of the Drizzle query builder
🎉 New helpers for aggregate functions in SQL - thanks @L-Mario564
Here is a list of functions and equivalent using
sqltemplatecount
countDistinct
avg
avgDistinct
sum
sumDistinct
max
min
New Packages
🎉 ESLint Drizzle Plugin
For cases where it's impossible to perform type checks for specific scenarios, or where it's possible but error messages would be challenging to understand, we've decided to create an ESLint package with recommended rules. This package aims to assist developers in handling crucial scenarios during development
Install
You can install those packages for typescript support in your IDE
Usage
Create a
.eslintrc.ymlfile, adddrizzleto theplugins, and specify the rules you want to use. You can find a list of all existing rules belowAll config
This plugin exports an
allconfig that makes use of all rules (except for deprecated ones).At the moment,
allis equivalent torecommendedRules
enforce-delete-with-where: Enforce using
deletewith the.where()clause in the.delete()statement. Most of the time, you don't need to delete all rows in the table and require some kind ofWHEREstatements.Error Message:
Optionally, you can define a
drizzleObjectNamein the plugin options that accept astringorstring[]. This is useful when you have objects or classes with a delete method that's not from Drizzle. Such adeletemethod will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete method comes from this object:Example, config 1:
Example, config 2:
enforce-update-with-where: Enforce using
updatewith the.where()clause in the.update()statement. Most of the time, you don't need to update all rows in the table and require some kind ofWHEREstatements.Error Message:
Optionally, you can define a
drizzleObjectNamein the plugin options that accept astringorstring[]. This is useful when you have objects or classes with a delete method that's not from Drizzle. Such asupdatemethod will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete method comes from this object:Example, config 1:
Example, config 2:
v0.29.0Compare Source
New Dialects
🎉
SingleStoredialect is now available in DrizzleThanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle
You can check out our Getting started guides to try SingleStore!
New Drivers
🎉
SQLite Durable Objectsdriver is now available in DrizzleYou can now query SQLite Durable Objects in Drizzle!
For the full example, please check our Get Started Section
v0.28.1Compare Source
Bug fixes
v0.28.0Compare Source
Improvements
Bug Fixes
v0.27.2Compare Source
drizzle-orm/supabaseConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.