@prisma/client-engine-runtime 6.20.0-integration-next.3 → 6.20.0-integration-merge-release-workflows.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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/index.mjs +4 -4
- package/dist/json-protocol.d.ts +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { ArgType } from '@prisma/driver-adapter-utils';
|
|
|
2
2
|
import { Arity } from '@prisma/driver-adapter-utils';
|
|
3
3
|
import { ConnectionInfo } from '@prisma/driver-adapter-utils';
|
|
4
4
|
import { Context } from '@opentelemetry/api';
|
|
5
|
-
import { Decimal } from '
|
|
5
|
+
import { Decimal } from 'decimal.js';
|
|
6
6
|
import type { IsolationLevel } from '@prisma/driver-adapter-utils';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
import { SpanOptions } from '@opentelemetry/api';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ArgType } from '@prisma/driver-adapter-utils';
|
|
|
2
2
|
import { Arity } from '@prisma/driver-adapter-utils';
|
|
3
3
|
import { ConnectionInfo } from '@prisma/driver-adapter-utils';
|
|
4
4
|
import { Context } from '@opentelemetry/api';
|
|
5
|
-
import { Decimal } from '
|
|
5
|
+
import { Decimal } from 'decimal.js';
|
|
6
6
|
import type { IsolationLevel } from '@prisma/driver-adapter-utils';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
import { SpanOptions } from '@opentelemetry/api';
|
package/dist/index.js
CHANGED
|
@@ -49,10 +49,10 @@ __export(index_exports, {
|
|
|
49
49
|
module.exports = __toCommonJS(index_exports);
|
|
50
50
|
|
|
51
51
|
// src/json-protocol.ts
|
|
52
|
-
var
|
|
52
|
+
var import_decimal2 = require("decimal.js");
|
|
53
53
|
|
|
54
54
|
// src/utils.ts
|
|
55
|
-
var
|
|
55
|
+
var import_decimal = __toESM(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 (
|
|
70
|
+
if (import_decimal.default.isDecimal(lhs[key]) || import_decimal.default.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 (
|
|
89
|
+
if (import_decimal.default.isDecimal(value)) {
|
|
90
90
|
return value;
|
|
91
91
|
} else if (typeof value === "number" || typeof value === "string") {
|
|
92
|
-
return new
|
|
92
|
+
return new import_decimal.default(value);
|
|
93
93
|
} else {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -178,7 +178,7 @@ function normalizeTaggedValue({ $type, value }) {
|
|
|
178
178
|
case "DateTime":
|
|
179
179
|
return { $type, value: new Date(value).toISOString() };
|
|
180
180
|
case "Decimal":
|
|
181
|
-
return { $type, value: String(new
|
|
181
|
+
return { $type, value: String(new import_decimal2.Decimal(value)) };
|
|
182
182
|
case "Json":
|
|
183
183
|
return { $type, value: JSON.stringify(JSON.parse(value)) };
|
|
184
184
|
default:
|
|
@@ -221,7 +221,7 @@ function deserializeTaggedValue({ $type, value }) {
|
|
|
221
221
|
case "DateTime":
|
|
222
222
|
return new Date(value);
|
|
223
223
|
case "Decimal":
|
|
224
|
-
return new
|
|
224
|
+
return new import_decimal2.Decimal(value);
|
|
225
225
|
case "Json":
|
|
226
226
|
return JSON.parse(value);
|
|
227
227
|
default:
|
|
@@ -443,7 +443,7 @@ function convertCompactedRows(rows, compiledBatch) {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
// src/interpreter/data-mapper.ts
|
|
446
|
-
var
|
|
446
|
+
var import_decimal3 = __toESM(require("decimal.js"));
|
|
447
447
|
var DataMapperError = class extends Error {
|
|
448
448
|
name = "DataMapperError";
|
|
449
449
|
};
|
|
@@ -605,7 +605,7 @@ function mapValue(value, columnName, scalarType, enums) {
|
|
|
605
605
|
throw new DataMapperError(`Expected a boolean in column '${columnName}', got ${typeof value}: ${value}`);
|
|
606
606
|
}
|
|
607
607
|
case "decimal":
|
|
608
|
-
if (typeof value !== "number" && typeof value !== "string" && !
|
|
608
|
+
if (typeof value !== "number" && typeof value !== "string" && !import_decimal3.default.isDecimal(value)) {
|
|
609
609
|
throw new DataMapperError(`Expected a decimal in column '${columnName}', got ${typeof value}: ${value}`);
|
|
610
610
|
}
|
|
611
611
|
return { $type: "Decimal", value };
|
|
@@ -1811,7 +1811,7 @@ function evalFieldOperation(op, value, scope, generators) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
1813
|
// src/raw-json-protocol.ts
|
|
1814
|
-
var
|
|
1814
|
+
var import_decimal4 = __toESM(require("decimal.js"));
|
|
1815
1815
|
function normalizeRawJsonProtocolResponse(response) {
|
|
1816
1816
|
for (let i = 0; i < response.rows.length; i++) {
|
|
1817
1817
|
const row = response.rows[i];
|
|
@@ -1829,7 +1829,7 @@ function normalizeValue(type, value) {
|
|
|
1829
1829
|
case "bigint":
|
|
1830
1830
|
return String(BigInt(value));
|
|
1831
1831
|
case "decimal":
|
|
1832
|
-
return String(new
|
|
1832
|
+
return String(new import_decimal4.default(value));
|
|
1833
1833
|
case "bigint-array":
|
|
1834
1834
|
return value.map((v) => normalizeValue("bigint", v));
|
|
1835
1835
|
case "decimal-array":
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/json-protocol.ts
|
|
2
|
-
import { Decimal as Decimal2 } from "
|
|
2
|
+
import { Decimal as Decimal2 } from "decimal.js";
|
|
3
3
|
|
|
4
4
|
// src/utils.ts
|
|
5
|
-
import
|
|
5
|
+
import Decimal from "decimal.js";
|
|
6
6
|
function assertNever(_, message) {
|
|
7
7
|
throw new Error(message);
|
|
8
8
|
}
|
|
@@ -393,7 +393,7 @@ function convertCompactedRows(rows, compiledBatch) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// src/interpreter/data-mapper.ts
|
|
396
|
-
import
|
|
396
|
+
import Decimal3 from "decimal.js";
|
|
397
397
|
var DataMapperError = class extends Error {
|
|
398
398
|
name = "DataMapperError";
|
|
399
399
|
};
|
|
@@ -1761,7 +1761,7 @@ function evalFieldOperation(op, value, scope, generators) {
|
|
|
1761
1761
|
}
|
|
1762
1762
|
|
|
1763
1763
|
// src/raw-json-protocol.ts
|
|
1764
|
-
import
|
|
1764
|
+
import Decimal4 from "decimal.js";
|
|
1765
1765
|
function normalizeRawJsonProtocolResponse(response) {
|
|
1766
1766
|
for (let i = 0; i < response.rows.length; i++) {
|
|
1767
1767
|
const row = response.rows[i];
|
package/dist/json-protocol.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.20.0-integration-
|
|
3
|
+
"version": "6.20.0-integration-merge-release-workflows.2",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"@bugsnag/cuid": "3.2.1",
|
|
28
28
|
"@opentelemetry/api": "1.9.0",
|
|
29
29
|
"@paralleldrive/cuid2": "2.2.2",
|
|
30
|
+
"decimal.js": "10.5.0",
|
|
30
31
|
"nanoid": "5.1.5",
|
|
31
32
|
"ulid": "3.0.0",
|
|
32
33
|
"uuid": "11.1.0",
|
|
33
|
-
"@prisma/
|
|
34
|
-
"@prisma/
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.20.0-integration-next.3"
|
|
34
|
+
"@prisma/debug": "6.20.0-integration-merge-release-workflows.2",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.20.0-integration-merge-release-workflows.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|
|
39
|
-
"@types/node": "
|
|
39
|
+
"@types/node": "18.19.76",
|
|
40
40
|
"jest": "29.7.0",
|
|
41
41
|
"jest-junit": "16.0.0"
|
|
42
42
|
},
|