@prisma/adapter-neon 7.11.0-dev.7 → 7.11.0-dev.8

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
@@ -294,14 +294,17 @@ function normalize_array(element_normalizer) {
294
294
  function normalize_numeric(numeric) {
295
295
  return numeric;
296
296
  }
297
+ function expandYear(value) {
298
+ return value.replace(/^(\d{5,})(?=-)/, (_, year) => `+${year.padStart(6, "0")}`);
299
+ }
297
300
  function normalize_date(date) {
298
- return date;
301
+ return expandYear(date);
299
302
  }
300
303
  function normalize_timestamp(time) {
301
- return `${time.replace(" ", "T")}+00:00`;
304
+ return expandYear(`${time.replace(" ", "T")}+00:00`);
302
305
  }
303
306
  function normalize_timestamptz(time) {
304
- return time.replace(" ", "T").replace(/[+-]\d{2}(:\d{2})?$/, "+00:00");
307
+ return expandYear(time.replace(" ", "T").replace(/[+-]\d{2}(:\d{2})?$/, "+00:00"));
305
308
  }
306
309
  function normalize_time(time) {
307
310
  return time;
package/dist/index.mjs CHANGED
@@ -257,14 +257,17 @@ function normalize_array(element_normalizer) {
257
257
  function normalize_numeric(numeric) {
258
258
  return numeric;
259
259
  }
260
+ function expandYear(value) {
261
+ return value.replace(/^(\d{5,})(?=-)/, (_, year) => `+${year.padStart(6, "0")}`);
262
+ }
260
263
  function normalize_date(date) {
261
- return date;
264
+ return expandYear(date);
262
265
  }
263
266
  function normalize_timestamp(time) {
264
- return `${time.replace(" ", "T")}+00:00`;
267
+ return expandYear(`${time.replace(" ", "T")}+00:00`);
265
268
  }
266
269
  function normalize_timestamptz(time) {
267
- return time.replace(" ", "T").replace(/[+-]\d{2}(:\d{2})?$/, "+00:00");
270
+ return expandYear(time.replace(" ", "T").replace(/[+-]\d{2}(:\d{2})?$/, "+00:00"));
268
271
  }
269
272
  function normalize_time(time) {
270
273
  return time;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-neon",
3
- "version": "7.11.0-dev.7",
3
+ "version": "7.11.0-dev.8",
4
4
  "description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,10 +33,10 @@
33
33
  "dependencies": {
34
34
  "postgres-array": "3.0.4",
35
35
  "@neondatabase/serverless": ">0.6.0 <2",
36
- "@prisma/driver-adapter-utils": "7.11.0-dev.7"
36
+ "@prisma/driver-adapter-utils": "7.11.0-dev.8"
37
37
  },
38
38
  "devDependencies": {
39
- "@prisma/debug": "7.11.0-dev.7"
39
+ "@prisma/debug": "7.11.0-dev.8"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "DEV=true tsx helpers/build.ts",