Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update dependency drizzle-orm to v0.36.4 #36

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 26, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
drizzle-orm (source) 0.36.3 -> 0.36.4 age adoption passing confidence

Release Notes

drizzle-team/drizzle-orm (drizzle-orm)

v0.36.4

Compare Source

New Package: drizzle-seed

[!NOTE]
drizzle-seed can only be used with [email protected] or higher. Versions lower than this may work at runtime but could have type issues and identity column issues, as this patch was introduced in [email protected]

Full Reference

The full API reference and package overview can be found in our official documentation

Basic Usage

In this example we will create 10 users with random names and ids

import { pgTable, integer, text } from "drizzle-orm/pg-core";
import { drizzle } from "drizzle-orm/node-postgres";
import { seed } from "drizzle-seed";

const users = pgTable("users", {
  id: integer().primaryKey(),
  name: text().notNull(),
});

async function main() {
  const db = drizzle(process.env.DATABASE_URL!);
  await seed(db, { users });
}

main();

Options

count

By default, the seed function will create 10 entities.
However, if you need more for your tests, you can specify this in the seed options object

await seed(db, schema, { count: 1000 });

seed

If you need a seed to generate a different set of values for all subsequent runs, you can define a different number
in the seed option. Any new number will generate a unique set of values

await seed(db, schema, { seed: 12345 });

The full API reference and package overview can be found in our official documentation

Features

Added OVERRIDING SYSTEM VALUE api to db.insert()

If you want to force you own values for GENERATED ALWAYS AS IDENTITY columns, you can use OVERRIDING SYSTEM VALUE

As PostgreSQL docs mentions

In an INSERT command, if ALWAYS is selected, a user-specified value is only accepted if the INSERT statement specifies OVERRIDING SYSTEM VALUE. If BY DEFAULT is selected, then the user-specified value takes precedence

await db.insert(identityColumnsTable).overridingSystemValue().values([
  { alwaysAsIdentity: 2 },
]);

Added .$withAuth() API for Neon HTTP driver

Using this API, Drizzle will send you an auth token to authorize your query. It can be used with any query available in Drizzle by simply adding .$withAuth() before it. This token will be used for a specific query

Examples

const token = 'HdncFj1Nm'

await db.$withAuth(token).select().from(usersTable);
await db.$withAuth(token).update(usersTable).set({ name: 'CHANGED' }).where(eq(usersTable.name, 'TARGET'))

Bug Fixes


Configuration

📅 Schedule: Branch creation - "after 10:00 before 18:00 every weekday" in timezone Asia/Tokyo, 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the deps Update dependencies label Nov 26, 2024
@renovate renovate bot enabled auto-merge (squash) November 26, 2024 05:19
Copy link
Contributor Author

renovate bot commented Nov 26, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
Scope: all 7 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 56, reused 0, downloaded 0, added 0
Progress: resolved 64, reused 0, downloaded 0, added 0
Progress: resolved 151, reused 0, downloaded 0, added 0
Progress: resolved 190, reused 0, downloaded 0, added 0
Progress: resolved 248, reused 0, downloaded 0, added 0
Progress: resolved 400, reused 0, downloaded 0, added 0
Progress: resolved 472, reused 0, downloaded 0, added 0
Progress: resolved 501, reused 0, downloaded 0, added 0
Progress: resolved 534, reused 0, downloaded 0, added 0
Progress: resolved 571, reused 0, downloaded 0, added 0
Progress: resolved 622, reused 0, downloaded 0, added 0
Progress: resolved 706, reused 0, downloaded 0, added 0
Progress: resolved 732, reused 0, downloaded 0, added 0
Progress: resolved 822, reused 0, downloaded 0, added 0
Progress: resolved 1018, reused 0, downloaded 0, added 0
Progress: resolved 1046, reused 0, downloaded 0, added 0
 WARN  8 deprecated subdependencies found: @babel/[email protected], @babel/[email protected], @esbuild-kit/[email protected], @esbuild-kit/[email protected], [email protected], [email protected], [email protected], [email protected]
Progress: resolved 1074, reused 0, downloaded 0, added 0
Progress: resolved 1074, reused 0, downloaded 0, added 0, done
 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
└─┬ eslint-plugin-import 2.29.1
  └── ✕ unmet peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8": found 9.15.0

apps/web
├─┬ eslint-plugin-import 2.29.1
│ └── ✕ unmet peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8": found 9.15.0
├─┬ @typescript-eslint/parser 7.17.0
│ └── ✕ unmet peer eslint@^8.56.0: found 9.15.0
├─┬ eslint-config-next 14.2.18
│ ├── ✕ unmet peer eslint@"^7.23.0 || ^8.0.0": found 9.15.0
│ ├─┬ eslint-plugin-import 2.29.1
│ │ └── ✕ unmet peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8": found 9.15.0
│ ├─┬ @typescript-eslint/eslint-plugin 7.17.0
│ │ ├── ✕ unmet peer eslint@^8.56.0: found 9.15.0
│ │ ├─┬ @typescript-eslint/utils 7.17.0
│ │ │ └── ✕ unmet peer eslint@^8.56.0: found 9.15.0
│ │ └─┬ @typescript-eslint/type-utils 7.17.0
│ │   └── ✕ unmet peer eslint@^8.56.0: found 9.15.0
│ └─┬ eslint-plugin-react-hooks 4.6.2
│   └── ✕ unmet peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0": found 9.15.0
└─┬ @typescript-eslint/eslint-plugin 8.15.0
  └── ✕ unmet peer @typescript-eslint/parser@"^8.0.0 || ^8.0.0-alpha.0": found 7.17.0

hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.


@Karibash Karibash force-pushed the deps/drizzle-orm-0.x branch from 7c56202 to 5529baa Compare November 27, 2024 03:53
@renovate renovate bot merged commit 1d107f7 into main Nov 27, 2024
3 checks passed
@renovate renovate bot deleted the deps/drizzle-orm-0.x branch November 27, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps Update dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants