homarr-labs / homarr

A modern and easy to use dashboard. 14+ integrations. 10K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
https://homarr.dev
MIT License
18 stars 5 forks source link

fix(deps): update dependency drizzle-orm to ^0.35.0 #1302

Closed homarr-renovate[bot] closed 3 weeks ago

homarr-renovate[bot] commented 3 weeks ago

This PR contains the following updates:

Package Type Update Change
drizzle-orm (source) dependencies minor ^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.

deepsource-io[bot] commented 3 weeks ago

Here's the code health analysis summary for commits f2f31b5..a24559f. View details on DeepSource β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ… SuccessView Check β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.
github-actions[bot] commented 3 weeks ago

Coverage Report

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
File CoverageNo changed files found.
Generated in workflow #3259 for commit a24559f by the Vitest Coverage Report Action