@prisma/adapter-d1 6.9.0-dev.5 → 6.9.0-dev.50

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.js CHANGED
@@ -209,17 +209,17 @@ function convertDriverError(error) {
209
209
  } else if (stripped.startsWith("no such table")) {
210
210
  return {
211
211
  kind: "TableDoesNotExist",
212
- table: stripped.split(": ").pop()
212
+ table: stripped.split(": ").at(1)
213
213
  };
214
214
  } else if (stripped.startsWith("no such column")) {
215
215
  return {
216
216
  kind: "ColumnNotFound",
217
- column: stripped.split(": ").pop()
217
+ column: stripped.split(": ").at(1)
218
218
  };
219
219
  } else if (stripped.includes("has no column named ")) {
220
220
  return {
221
221
  kind: "ColumnNotFound",
222
- column: stripped.split("has no column named ").pop()
222
+ column: stripped.split("has no column named ").at(1)
223
223
  };
224
224
  }
225
225
  return {
@@ -235,8 +235,8 @@ function isDbError(error) {
235
235
  // src/utils.ts
236
236
  function cleanArg(arg, argType) {
237
237
  if (arg !== null) {
238
- if (argType === "Int64") {
239
- const asInt56 = Number.parseInt(arg);
238
+ if (argType === "Int64" || typeof arg === "bigint") {
239
+ const asInt56 = Number.parseInt(`${arg}`);
240
240
  if (!Number.isSafeInteger(asInt56)) {
241
241
  throw new Error(`Invalid Int64-encoded value received: ${arg}`);
242
242
  }
package/dist/index.mjs CHANGED
@@ -175,17 +175,17 @@ function convertDriverError(error) {
175
175
  } else if (stripped.startsWith("no such table")) {
176
176
  return {
177
177
  kind: "TableDoesNotExist",
178
- table: stripped.split(": ").pop()
178
+ table: stripped.split(": ").at(1)
179
179
  };
180
180
  } else if (stripped.startsWith("no such column")) {
181
181
  return {
182
182
  kind: "ColumnNotFound",
183
- column: stripped.split(": ").pop()
183
+ column: stripped.split(": ").at(1)
184
184
  };
185
185
  } else if (stripped.includes("has no column named ")) {
186
186
  return {
187
187
  kind: "ColumnNotFound",
188
- column: stripped.split("has no column named ").pop()
188
+ column: stripped.split("has no column named ").at(1)
189
189
  };
190
190
  }
191
191
  return {
@@ -201,8 +201,8 @@ function isDbError(error) {
201
201
  // src/utils.ts
202
202
  function cleanArg(arg, argType) {
203
203
  if (arg !== null) {
204
- if (argType === "Int64") {
205
- const asInt56 = Number.parseInt(arg);
204
+ if (argType === "Int64" || typeof arg === "bigint") {
205
+ const asInt56 = Number.parseInt(`${arg}`);
206
206
  if (!Number.isSafeInteger(asInt56)) {
207
207
  throw new Error(`Invalid Int64-encoded value received: ${arg}`);
208
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-d1",
3
- "version": "6.9.0-dev.5",
3
+ "version": "6.9.0-dev.50",
4
4
  "description": "Prisma's driver adapter for Cloudflare D1",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@cloudflare/workers-types": "4.20250214.0",
39
39
  "ky": "1.7.5",
40
- "@prisma/driver-adapter-utils": "6.9.0-dev.5"
40
+ "@prisma/driver-adapter-utils": "6.9.0-dev.50"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "DEV=true tsx helpers/build.ts",