@better-auth/drizzle-adapter 1.6.23 → 1.6.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { DBAdapter, DBAdapterDebugLogOption } from "@better-auth/core/db/adapter";
2
2
  import { BetterAuthOptions } from "@better-auth/core";
3
-
4
3
  //#region src/drizzle-adapter.d.ts
5
4
  interface DB {
6
5
  [key: string]: any;
package/dist/index.mjs CHANGED
@@ -331,7 +331,8 @@ const drizzleAdapter = (db, config) => {
331
331
  async create({ model, data: values }) {
332
332
  const schemaModel = getSchema(model);
333
333
  checkMissingFields(schemaModel, model, values);
334
- return await withReturning(model, db.insert(schemaModel).values(values), values);
334
+ const builder = db.insert(schemaModel).values(values);
335
+ return await withReturning(model, builder, values);
335
336
  },
336
337
  async findOne({ model, where, select, join }) {
337
338
  const schemaModel = getSchema(model);
@@ -466,7 +467,8 @@ const drizzleAdapter = (db, config) => {
466
467
  async update({ model, where, update: values }) {
467
468
  const schemaModel = getSchema(model);
468
469
  const clause = convertWhereClause(where, model);
469
- return await withReturning(model, db.update(schemaModel).set(values).where(...clause), values, where);
470
+ const builder = db.update(schemaModel).set(values).where(...clause);
471
+ return await withReturning(model, builder, values, where);
470
472
  },
471
473
  async updateMany({ model, where, update: values }) {
472
474
  const schemaModel = getSchema(model);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/drizzle-adapter",
3
- "version": "1.6.23",
3
+ "version": "1.6.25",
4
4
  "bugs": {
5
5
  "url": "https://github.com/better-auth/better-auth/issues"
6
6
  },
@@ -40,7 +40,7 @@
40
40
  "peerDependencies": {
41
41
  "@better-auth/utils": "0.4.2",
42
42
  "drizzle-orm": "^0.45.2",
43
- "@better-auth/core": "^1.6.23"
43
+ "@better-auth/core": "^1.6.25"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "drizzle-orm": {
@@ -50,9 +50,9 @@
50
50
  "devDependencies": {
51
51
  "@better-auth/utils": "0.4.2",
52
52
  "drizzle-orm": "^0.45.2",
53
- "tsdown": "0.21.1",
54
- "typescript": "^5.9.3",
55
- "@better-auth/core": "1.6.23"
53
+ "tsdown": "0.22.7",
54
+ "typescript": "^6.0.3",
55
+ "@better-auth/core": "1.6.25"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",