@prisma/client-engine-runtime 6.16.0-integration-feat-orm-1375-web-client-ts.2 → 6.16.0-integration-feat-orm-1074-package-dev-export.1
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 +8 -8
- package/dist/index.mjs +3 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
52
52
|
var import_decimal2 = require("decimal.js");
|
|
53
53
|
|
|
54
54
|
// src/utils.ts
|
|
55
|
-
var import_decimal =
|
|
55
|
+
var import_decimal = require("decimal.js");
|
|
56
56
|
function assertNever(_, message) {
|
|
57
57
|
throw new Error(message);
|
|
58
58
|
}
|
|
@@ -67,7 +67,7 @@ function doKeysMatch(lhs, rhs) {
|
|
|
67
67
|
if (typeof lhs[key] === typeof rhs[key] && typeof lhs[key] !== "object") {
|
|
68
68
|
return lhs[key] === rhs[key];
|
|
69
69
|
}
|
|
70
|
-
if (import_decimal.
|
|
70
|
+
if (import_decimal.Decimal.isDecimal(lhs[key]) || import_decimal.Decimal.isDecimal(rhs[key])) {
|
|
71
71
|
const lhsDecimal = asDecimal(lhs[key]);
|
|
72
72
|
const rhsDecimal = asDecimal(rhs[key]);
|
|
73
73
|
return lhsDecimal && rhsDecimal && lhsDecimal.equals(rhsDecimal);
|
|
@@ -86,10 +86,10 @@ function doKeysMatch(lhs, rhs) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
function asDecimal(value) {
|
|
89
|
-
if (import_decimal.
|
|
89
|
+
if (import_decimal.Decimal.isDecimal(value)) {
|
|
90
90
|
return value;
|
|
91
91
|
} else if (typeof value === "number" || typeof value === "string") {
|
|
92
|
-
return new import_decimal.
|
|
92
|
+
return new import_decimal.Decimal(value);
|
|
93
93
|
} else {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -439,7 +439,7 @@ function convertCompactedRows(rows, compiledBatch) {
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
// src/interpreter/data-mapper.ts
|
|
442
|
-
var import_decimal3 =
|
|
442
|
+
var import_decimal3 = require("decimal.js");
|
|
443
443
|
var DataMapperError = class extends Error {
|
|
444
444
|
name = "DataMapperError";
|
|
445
445
|
};
|
|
@@ -601,7 +601,7 @@ function mapValue(value, columnName, scalarType, enums) {
|
|
|
601
601
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
602
602
|
}
|
|
603
603
|
case "decimal":
|
|
604
|
-
if (typeof value !== "number" && typeof value !== "string" && !import_decimal3.
|
|
604
|
+
if (typeof value !== "number" && typeof value !== "string" && !import_decimal3.Decimal.isDecimal(value)) {
|
|
605
605
|
throw new DataMapperError(`Expected a decimal in column '${columnName}', got ${typeof value}: ${value}`);
|
|
606
606
|
}
|
|
607
607
|
return { $type: "Decimal", value };
|
|
@@ -1814,7 +1814,7 @@ function evalFieldOperation(op, value, scope, generators) {
|
|
|
1814
1814
|
}
|
|
1815
1815
|
|
|
1816
1816
|
// src/raw-json-protocol.ts
|
|
1817
|
-
var import_decimal4 =
|
|
1817
|
+
var import_decimal4 = require("decimal.js");
|
|
1818
1818
|
function normalizeRawJsonProtocolResponse(response) {
|
|
1819
1819
|
for (let i = 0; i < response.rows.length; i++) {
|
|
1820
1820
|
const row = response.rows[i];
|
|
@@ -1832,7 +1832,7 @@ function normalizeValue(type, value) {
|
|
|
1832
1832
|
case "bigint":
|
|
1833
1833
|
return String(BigInt(value));
|
|
1834
1834
|
case "decimal":
|
|
1835
|
-
return String(new import_decimal4.
|
|
1835
|
+
return String(new import_decimal4.Decimal(value));
|
|
1836
1836
|
case "bigint-array":
|
|
1837
1837
|
return value.map((v) => normalizeValue("bigint", v));
|
|
1838
1838
|
case "decimal-array":
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Decimal as Decimal2 } from "decimal.js";
|
|
3
3
|
|
|
4
4
|
// src/utils.ts
|
|
5
|
-
import Decimal from "decimal.js";
|
|
5
|
+
import { Decimal } from "decimal.js";
|
|
6
6
|
function assertNever(_, message) {
|
|
7
7
|
throw new Error(message);
|
|
8
8
|
}
|
|
@@ -389,7 +389,7 @@ function convertCompactedRows(rows, compiledBatch) {
|
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
// src/interpreter/data-mapper.ts
|
|
392
|
-
import Decimal3 from "decimal.js";
|
|
392
|
+
import { Decimal as Decimal3 } from "decimal.js";
|
|
393
393
|
var DataMapperError = class extends Error {
|
|
394
394
|
name = "DataMapperError";
|
|
395
395
|
};
|
|
@@ -1764,7 +1764,7 @@ function evalFieldOperation(op, value, scope, generators) {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
|
|
1766
1766
|
// src/raw-json-protocol.ts
|
|
1767
|
-
import Decimal4 from "decimal.js";
|
|
1767
|
+
import { Decimal as Decimal4 } from "decimal.js";
|
|
1768
1768
|
function normalizeRawJsonProtocolResponse(response) {
|
|
1769
1769
|
for (let i = 0; i < response.rows.length; i++) {
|
|
1770
1770
|
const row = response.rows[i];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.16.0-integration-feat-orm-
|
|
3
|
+
"version": "6.16.0-integration-feat-orm-1074-package-dev-export.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"nanoid": "5.1.5",
|
|
32
32
|
"ulid": "3.0.0",
|
|
33
33
|
"uuid": "11.1.0",
|
|
34
|
-
"@prisma/debug": "6.16.0-integration-feat-orm-
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.16.0-integration-feat-orm-
|
|
34
|
+
"@prisma/debug": "6.16.0-integration-feat-orm-1074-package-dev-export.1",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.16.0-integration-feat-orm-1074-package-dev-export.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|