Closed homarr-renovate[bot] closed 3 weeks ago
Here's the code health analysis summary for commits f2f31b5..a24559f
. View details on DeepSource β.
Analyzer | Status | Summary | Link |
---|---|---|---|
JavaScript | β Success | View Check β |
π‘ If youβre a repository administrator, you can configure the quality gates from the settings.
Status | Category | Percentage | Covered / Total |
---|---|---|---|
π΅ | Lines | 38.97% | 14522 / 37259 |
π΅ | Statements | 38.97% | 14522 / 37259 |
π΅ | Functions | 35.94% | 376 / 1046 |
π΅ | Branches | 70.93% | 1291 / 1820 |
This PR contains the following updates:
^0.34.1
->^0.35.0
Release Notes
drizzle-team/drizzle-orm (drizzle-orm)
### [`v0.35.0`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.35.0) [Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.34.1...0.35.0) ### Important change after 0.34.0 release #### Updated the init Drizzle database API The API from version 0.34.0 turned out to be unusable and needs to be changed. You can read more about our decisions in [this discussion](https://redirect.github.com/drizzle-team/drizzle-orm/discussions/3097) If you still want to use the new API introduced in 0.34.0, which can create driver clients for you under the hood, you can now do so ```ts import { drizzle } from "drizzle-orm/node-postgres"; const db = drizzle(process.env.DATABASE_URL); // or const db = drizzle({ connection: process.env.DATABASE_URL }); const db = drizzle({ connection: { user: "...", password: "...", host: "...", port: 4321, db: "...", }, }); // if you need to pass logger or schema const db = drizzle({ connection: process.env.DATABASE_URL, logger: true, schema: schema, }); ``` in order to not introduce breaking change - we will still leave support for deprecated API until V1 release. It will degrade autocomplete performance in connection params due to `DatabaseDriver` | `ConnectionParams` types collision, but that's a decent compromise against breaking changes ```ts import { drizzle } from "drizzle-orm/node-postgres"; import { Pool } from "pg"; const client = new Pool({ connectionString: process.env.DATABASE_URL }); const db = drizzle(client); // deprecated but available // new version const db = drizzle({ client: client, }); ``` ### New Features #### New .orderBy() and .limit() functions in update and delete statements SQLite and MySQL You now have more options for the `update` and `delete` query builders in MySQL and SQLite **Example** ```ts await db.update(usersTable).set({ verified: true }).limit(2).orderBy(asc(usersTable.name)); await db.delete(usersTable).where(eq(usersTable.verified, false)).limit(1).orderBy(asc(usersTable.name)); ``` #### New `drizzle.mock()` function There were cases where you didn't need to provide a driver to the Drizzle object, and this served as a workaround ```ts const db = drizzle({} as any) ``` Now you can do this using a mock function ```ts const db = drizzle.mock() ``` There is no valid production use case for this, but we used it in situations where we needed to check types, etc., without making actual database calls or dealing with driver creation. If anyone was using it, please switch to using mocks now ### Internal updates - Upgraded TS in codebase to the version 5.6.3 ### Bug fixes - [\[BUG\]: New $count API error with @neondatabase/serverless](https://redirect.github.com/drizzle-team/drizzle-orm/issues/3081)Configuration
π 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 has been generated by Renovate Bot.