@prisma/client-engine-runtime 7.2.0-integration-fix-enums-mapped-types-v7.2 → 7.2.0

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
@@ -604,7 +604,7 @@ function mapValue(value, columnName, scalarType, enums) {
604
604
  throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
605
605
  }
606
606
  }
607
- if (Array.isArray(value)) {
607
+ if (Array.isArray(value) || value instanceof Uint8Array) {
608
608
  for (const byte of value) {
609
609
  if (byte !== 0) return true;
610
610
  }
@@ -1301,17 +1301,6 @@ function serializeRawValue(value, type) {
1301
1301
  throw new Error(`Cannot serialize value of type ${typeof value} as JsonArray`);
1302
1302
  }
1303
1303
  return value.map((v) => serializeRawValue(v, import_driver_adapter_utils2.ColumnTypeEnum.Json));
1304
- case import_driver_adapter_utils2.ColumnTypeEnum.Bytes:
1305
- if (Array.isArray(value)) {
1306
- return new Uint8Array(value);
1307
- } else {
1308
- throw new Error(`Cannot serialize value of type ${typeof value} as Bytes`);
1309
- }
1310
- case import_driver_adapter_utils2.ColumnTypeEnum.BytesArray:
1311
- if (!Array.isArray(value)) {
1312
- throw new Error(`Cannot serialize value of type ${typeof value} as BytesArray`);
1313
- }
1314
- return value.map((v) => serializeRawValue(v, import_driver_adapter_utils2.ColumnTypeEnum.Bytes));
1315
1304
  case import_driver_adapter_utils2.ColumnTypeEnum.Boolean:
1316
1305
  switch (typeof value) {
1317
1306
  case "boolean":
package/dist/index.mjs CHANGED
@@ -553,7 +553,7 @@ function mapValue(value, columnName, scalarType, enums) {
553
553
  throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
554
554
  }
555
555
  }
556
- if (Array.isArray(value)) {
556
+ if (Array.isArray(value) || value instanceof Uint8Array) {
557
557
  for (const byte of value) {
558
558
  if (byte !== 0) return true;
559
559
  }
@@ -1250,17 +1250,6 @@ function serializeRawValue(value, type) {
1250
1250
  throw new Error(`Cannot serialize value of type ${typeof value} as JsonArray`);
1251
1251
  }
1252
1252
  return value.map((v) => serializeRawValue(v, ColumnTypeEnum.Json));
1253
- case ColumnTypeEnum.Bytes:
1254
- if (Array.isArray(value)) {
1255
- return new Uint8Array(value);
1256
- } else {
1257
- throw new Error(`Cannot serialize value of type ${typeof value} as Bytes`);
1258
- }
1259
- case ColumnTypeEnum.BytesArray:
1260
- if (!Array.isArray(value)) {
1261
- throw new Error(`Cannot serialize value of type ${typeof value} as BytesArray`);
1262
- }
1263
- return value.map((v) => serializeRawValue(v, ColumnTypeEnum.Bytes));
1264
1253
  case ColumnTypeEnum.Boolean:
1265
1254
  switch (typeof value) {
1266
1255
  case "boolean":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client-engine-runtime",
3
- "version": "7.2.0-integration-fix-enums-mapped-types-v7.2",
3
+ "version": "7.2.0",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,10 +30,10 @@
30
30
  "nanoid": "5.1.5",
31
31
  "ulid": "3.0.0",
32
32
  "uuid": "11.1.0",
33
- "@prisma/client-runtime-utils": "7.2.0-integration-fix-enums-mapped-types-v7.2",
34
- "@prisma/driver-adapter-utils": "7.2.0-integration-fix-enums-mapped-types-v7.2",
35
- "@prisma/debug": "7.2.0-integration-fix-enums-mapped-types-v7.2",
36
- "@prisma/sqlcommenter": "7.2.0-integration-fix-enums-mapped-types-v7.2"
33
+ "@prisma/client-runtime-utils": "7.2.0",
34
+ "@prisma/debug": "7.2.0",
35
+ "@prisma/driver-adapter-utils": "7.2.0",
36
+ "@prisma/sqlcommenter": "7.2.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jest": "29.5.14",