@orpc/zod 1.15.6 → 1.15.7
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.mjs +2 -2
- package/dist/zod4/index.mjs +2 -2
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { custom, ZodFirstPartyTypeKind } from 'zod/v3';
|
|
2
2
|
import wcmatch from 'wildcard-match';
|
|
3
|
-
import { isObject, NullProtoObj, guard, toArray } from '@orpc/shared';
|
|
3
|
+
import { isObject, NullProtoObj, guard, parseBigIntString, DEFAULT_MAX_BIGINT_DIGITS, toArray } from '@orpc/shared';
|
|
4
4
|
import { JsonSchemaXNativeType } from '@orpc/json-schema';
|
|
5
5
|
import { JSONSchemaFormat } from '@orpc/openapi';
|
|
6
6
|
import escapeStringRegexp from 'escape-string-regexp';
|
|
@@ -353,7 +353,7 @@ function zodCoerceInternal(schema, value) {
|
|
|
353
353
|
return value;
|
|
354
354
|
}
|
|
355
355
|
function safeToBigInt(value) {
|
|
356
|
-
return
|
|
356
|
+
return parseBigIntString(value, DEFAULT_MAX_BIGINT_DIGITS) ?? value;
|
|
357
357
|
}
|
|
358
358
|
function safeToNumber(value) {
|
|
359
359
|
const num = Number(value);
|
package/dist/zod4/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isObject, NullProtoObj,
|
|
1
|
+
import { isObject, NullProtoObj, parseBigIntString, DEFAULT_MAX_BIGINT_DIGITS, intercept, toArray } from '@orpc/shared';
|
|
2
2
|
import { JsonSchemaXNativeType } from '@orpc/json-schema';
|
|
3
3
|
import { JSONSchemaFormat, JSONSchemaContentEncoding } from '@orpc/openapi';
|
|
4
4
|
import { registry, globalRegistry, util } from 'zod/v4/core';
|
|
@@ -249,7 +249,7 @@ class experimental_ZodSmartCoercionPlugin {
|
|
|
249
249
|
return Number.isNaN(num) || num.toString() !== value ? value : num;
|
|
250
250
|
}
|
|
251
251
|
#stringToBigInt(value) {
|
|
252
|
-
return
|
|
252
|
+
return parseBigIntString(value, DEFAULT_MAX_BIGINT_DIGITS) ?? value;
|
|
253
253
|
}
|
|
254
254
|
#stringToBoolean(value) {
|
|
255
255
|
const lower = value.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/zod",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
],
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"zod": ">=3.25.0",
|
|
33
|
-
"@orpc/contract": "1.15.
|
|
34
|
-
"@orpc/server": "1.15.
|
|
33
|
+
"@orpc/contract": "1.15.7",
|
|
34
|
+
"@orpc/server": "1.15.7"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"escape-string-regexp": "^5.0.0",
|
|
38
38
|
"wildcard-match": "^5.1.4",
|
|
39
|
-
"@orpc/
|
|
40
|
-
"@orpc/openapi": "1.15.
|
|
41
|
-
"@orpc/
|
|
39
|
+
"@orpc/json-schema": "1.15.7",
|
|
40
|
+
"@orpc/openapi": "1.15.7",
|
|
41
|
+
"@orpc/shared": "1.15.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"zod": "^4.6.2"
|