@prisma/adapter-neon 6.15.0-dev.8 → 6.15.0-integration-fix-prisma-client-dirname-aws-lambda.2

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
@@ -368,11 +368,9 @@ function mapArg(arg, argType) {
368
368
  switch (argType.dbType) {
369
369
  case "TIME":
370
370
  case "TIMETZ":
371
- return formatTime(arg);
372
- case "DATE":
373
- return formatDate(arg);
371
+ return arg.toISOString().split("T")[1];
374
372
  default:
375
- return formatDateTime(arg);
373
+ return arg.toISOString();
376
374
  }
377
375
  }
378
376
  if (typeof arg === "string" && argType.scalarType === "bytes") {
@@ -386,20 +384,6 @@ function mapArg(arg, argType) {
386
384
  }
387
385
  return arg;
388
386
  }
389
- function formatDateTime(date) {
390
- const pad = (n, z = 2) => String(n).padStart(z, "0");
391
- const ms = date.getUTCMilliseconds();
392
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + " " + pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
393
- }
394
- function formatDate(date) {
395
- const pad = (n, z = 2) => String(n).padStart(z, "0");
396
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate());
397
- }
398
- function formatTime(date) {
399
- const pad = (n, z = 2) => String(n).padStart(z, "0");
400
- const ms = date.getUTCMilliseconds();
401
- return pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
402
- }
403
387
 
404
388
  // src/errors.ts
405
389
  function convertDriverError(error) {
package/dist/index.mjs CHANGED
@@ -331,11 +331,9 @@ function mapArg(arg, argType) {
331
331
  switch (argType.dbType) {
332
332
  case "TIME":
333
333
  case "TIMETZ":
334
- return formatTime(arg);
335
- case "DATE":
336
- return formatDate(arg);
334
+ return arg.toISOString().split("T")[1];
337
335
  default:
338
- return formatDateTime(arg);
336
+ return arg.toISOString();
339
337
  }
340
338
  }
341
339
  if (typeof arg === "string" && argType.scalarType === "bytes") {
@@ -349,20 +347,6 @@ function mapArg(arg, argType) {
349
347
  }
350
348
  return arg;
351
349
  }
352
- function formatDateTime(date) {
353
- const pad = (n, z = 2) => String(n).padStart(z, "0");
354
- const ms = date.getUTCMilliseconds();
355
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + " " + pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
356
- }
357
- function formatDate(date) {
358
- const pad = (n, z = 2) => String(n).padStart(z, "0");
359
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate());
360
- }
361
- function formatTime(date) {
362
- const pad = (n, z = 2) => String(n).padStart(z, "0");
363
- const ms = date.getUTCMilliseconds();
364
- return pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
365
- }
366
350
 
367
351
  // src/errors.ts
368
352
  function convertDriverError(error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-neon",
3
- "version": "6.15.0-dev.8",
3
+ "version": "6.15.0-integration-fix-prisma-client-dirname-aws-lambda.2",
4
4
  "description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "postgres-array": "3.0.4",
35
35
  "@neondatabase/serverless": ">0.6.0 <2",
36
- "@prisma/driver-adapter-utils": "6.15.0-dev.8"
36
+ "@prisma/driver-adapter-utils": "6.15.0-integration-fix-prisma-client-dirname-aws-lambda.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@swc/core": "1.11.5",