zod 3.25.40 → 3.25.41
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/cjs/v4/classic/external.js +11 -1
- package/dist/cjs/v4/classic/schemas.js +2 -4
- package/dist/cjs/v4/mini/external.js +10 -1
- package/dist/cjs/v4/mini/schemas.js +2 -4
- package/dist/esm/v4/classic/external.js +6 -0
- package/dist/esm/v4/classic/schemas.js +0 -2
- package/dist/esm/v4/mini/external.js +5 -0
- package/dist/esm/v4/mini/schemas.js +0 -2
- package/dist/types/v4/classic/external.d.ts +4 -0
- package/dist/types/v4/classic/schemas.d.ts +0 -2
- package/dist/types/v4/mini/external.d.ts +3 -0
- package/dist/types/v4/mini/schemas.d.ts +0 -2
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.locales = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.function = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
|
|
32
|
+
exports.coerce = exports.iso = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.locales = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.function = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
|
|
33
33
|
exports.core = __importStar(require("zod/v4/core"));
|
|
34
34
|
__exportStar(require("./schemas.js"), exports);
|
|
35
35
|
__exportStar(require("./checks.js"), exports);
|
|
@@ -56,3 +56,13 @@ Object.defineProperty(exports, "formatError", { enumerable: true, get: function
|
|
|
56
56
|
Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return core_2.flattenError; } });
|
|
57
57
|
Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return core_2.toJSONSchema; } });
|
|
58
58
|
Object.defineProperty(exports, "locales", { enumerable: true, get: function () { return core_2.locales; } });
|
|
59
|
+
// iso
|
|
60
|
+
// must be exported from top-level
|
|
61
|
+
// https://github.com/colinhacks/zod/issues/4491
|
|
62
|
+
var iso_js_1 = require("./iso.js");
|
|
63
|
+
Object.defineProperty(exports, "ZodISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodISODateTime; } });
|
|
64
|
+
Object.defineProperty(exports, "ZodISODate", { enumerable: true, get: function () { return iso_js_1.ZodISODate; } });
|
|
65
|
+
Object.defineProperty(exports, "ZodISOTime", { enumerable: true, get: function () { return iso_js_1.ZodISOTime; } });
|
|
66
|
+
Object.defineProperty(exports, "ZodISODuration", { enumerable: true, get: function () { return iso_js_1.ZodISODuration; } });
|
|
67
|
+
exports.iso = __importStar(require("./iso.js"));
|
|
68
|
+
exports.coerce = __importStar(require("./coerce.js"));
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType =
|
|
27
|
-
exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable =
|
|
26
|
+
exports.ZodOptional = exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
|
|
27
|
+
exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = void 0;
|
|
28
28
|
exports.string = string;
|
|
29
29
|
exports.email = email;
|
|
30
30
|
exports.guid = guid;
|
|
@@ -110,8 +110,6 @@ const core_1 = require("zod/v4/core");
|
|
|
110
110
|
const checks = __importStar(require("./checks.js"));
|
|
111
111
|
const iso = __importStar(require("./iso.js"));
|
|
112
112
|
const parse = __importStar(require("./parse.js"));
|
|
113
|
-
exports.iso = __importStar(require("./iso.js"));
|
|
114
|
-
exports.coerce = __importStar(require("./coerce.js"));
|
|
115
113
|
exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
|
116
114
|
core.$ZodType.init(inst, def);
|
|
117
115
|
inst.def = def;
|
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.locales = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.function = exports.$brand = exports.$input = exports.$output = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
|
|
29
|
+
exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.function = exports.$brand = exports.$input = exports.$output = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
|
|
30
30
|
exports.core = __importStar(require("zod/v4/core"));
|
|
31
31
|
__exportStar(require("./parse.js"), exports);
|
|
32
32
|
__exportStar(require("./schemas.js"), exports);
|
|
@@ -49,3 +49,12 @@ Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function
|
|
|
49
49
|
Object.defineProperty(exports, "locales", { enumerable: true, get: function () { return core_1.locales; } });
|
|
50
50
|
/** A special constant with type `never` */
|
|
51
51
|
// export const NEVER = {} as never;
|
|
52
|
+
// iso
|
|
53
|
+
exports.iso = __importStar(require("./iso.js"));
|
|
54
|
+
var iso_js_1 = require("./iso.js");
|
|
55
|
+
Object.defineProperty(exports, "ZodMiniISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODateTime; } });
|
|
56
|
+
Object.defineProperty(exports, "ZodMiniISODate", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODate; } });
|
|
57
|
+
Object.defineProperty(exports, "ZodMiniISOTime", { enumerable: true, get: function () { return iso_js_1.ZodMiniISOTime; } });
|
|
58
|
+
Object.defineProperty(exports, "ZodMiniISODuration", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODuration; } });
|
|
59
|
+
// coerce
|
|
60
|
+
exports.coerce = __importStar(require("./coerce.js"));
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ZodMiniTransform = exports.ZodMiniFile = exports.ZodMiniLiteral = exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniUnion = exports.ZodMiniObject = exports.ZodMiniArray = exports.ZodMiniDate = exports.ZodMiniVoid = exports.ZodMiniNever = exports.ZodMiniUnknown = exports.ZodMiniAny = exports.ZodMiniNull = exports.ZodMiniUndefined = exports.ZodMiniSymbol = exports.ZodMiniBigIntFormat = exports.ZodMiniBigInt = exports.ZodMiniBoolean = exports.ZodMiniNumberFormat = exports.ZodMiniNumber = exports.ZodMiniJWT = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniCIDRv6 = exports.ZodMiniCIDRv4 = exports.ZodMiniIPv6 = exports.ZodMiniIPv4 = exports.ZodMiniKSUID = exports.ZodMiniXID = exports.ZodMiniULID = exports.ZodMiniCUID2 = exports.ZodMiniCUID = exports.ZodMiniNanoID = exports.ZodMiniEmoji = exports.ZodMiniURL = exports.ZodMiniUUID = exports.ZodMiniGUID = exports.ZodMiniEmail = exports.ZodMiniStringFormat = exports.ZodMiniString = exports.ZodMiniType =
|
|
27
|
-
exports.stringbool = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault =
|
|
26
|
+
exports.ZodMiniNullable = exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = exports.ZodMiniLiteral = exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniUnion = exports.ZodMiniObject = exports.ZodMiniArray = exports.ZodMiniDate = exports.ZodMiniVoid = exports.ZodMiniNever = exports.ZodMiniUnknown = exports.ZodMiniAny = exports.ZodMiniNull = exports.ZodMiniUndefined = exports.ZodMiniSymbol = exports.ZodMiniBigIntFormat = exports.ZodMiniBigInt = exports.ZodMiniBoolean = exports.ZodMiniNumberFormat = exports.ZodMiniNumber = exports.ZodMiniJWT = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniCIDRv6 = exports.ZodMiniCIDRv4 = exports.ZodMiniIPv6 = exports.ZodMiniIPv4 = exports.ZodMiniKSUID = exports.ZodMiniXID = exports.ZodMiniULID = exports.ZodMiniCUID2 = exports.ZodMiniCUID = exports.ZodMiniNanoID = exports.ZodMiniEmoji = exports.ZodMiniURL = exports.ZodMiniUUID = exports.ZodMiniGUID = exports.ZodMiniEmail = exports.ZodMiniStringFormat = exports.ZodMiniString = exports.ZodMiniType = void 0;
|
|
27
|
+
exports.stringbool = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = void 0;
|
|
28
28
|
exports.string = string;
|
|
29
29
|
exports.email = email;
|
|
30
30
|
exports.guid = guid;
|
|
@@ -112,8 +112,6 @@ exports.json = json;
|
|
|
112
112
|
const core = __importStar(require("zod/v4/core"));
|
|
113
113
|
const core_1 = require("zod/v4/core");
|
|
114
114
|
const parse = __importStar(require("./parse.js"));
|
|
115
|
-
exports.coerce = __importStar(require("./coerce.js"));
|
|
116
|
-
exports.iso = __importStar(require("./iso.js"));
|
|
117
115
|
exports.ZodMiniType = core.$constructor("ZodMiniType", (inst, def) => {
|
|
118
116
|
if (!inst._zod)
|
|
119
117
|
throw new Error("Uninitialized schema in mixin ZodMiniType.");
|
|
@@ -9,3 +9,9 @@ import { config } from "zod/v4/core";
|
|
|
9
9
|
import en from "zod/v4/locales/en.js";
|
|
10
10
|
config(en());
|
|
11
11
|
export { globalRegistry, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, locales, } from "zod/v4/core";
|
|
12
|
+
// iso
|
|
13
|
+
// must be exported from top-level
|
|
14
|
+
// https://github.com/colinhacks/zod/issues/4491
|
|
15
|
+
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
|
16
|
+
export * as iso from "./iso.js";
|
|
17
|
+
export * as coerce from "./coerce.js";
|
|
@@ -3,8 +3,6 @@ import { util } from "zod/v4/core";
|
|
|
3
3
|
import * as checks from "./checks.js";
|
|
4
4
|
import * as iso from "./iso.js";
|
|
5
5
|
import * as parse from "./parse.js";
|
|
6
|
-
export * as iso from "./iso.js";
|
|
7
|
-
export * as coerce from "./coerce.js";
|
|
8
6
|
export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
|
|
9
7
|
core.$ZodType.init(inst, def);
|
|
10
8
|
inst.def = def;
|
|
@@ -5,3 +5,8 @@ export * from "./checks.js";
|
|
|
5
5
|
export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, locales, } from "zod/v4/core";
|
|
6
6
|
/** A special constant with type `never` */
|
|
7
7
|
// export const NEVER = {} as never;
|
|
8
|
+
// iso
|
|
9
|
+
export * as iso from "./iso.js";
|
|
10
|
+
export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.js";
|
|
11
|
+
// coerce
|
|
12
|
+
export * as coerce from "./coerce.js";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as core from "zod/v4/core";
|
|
2
2
|
import { util } from "zod/v4/core";
|
|
3
3
|
import * as parse from "./parse.js";
|
|
4
|
-
export * as coerce from "./coerce.js";
|
|
5
|
-
export * as iso from "./iso.js";
|
|
6
4
|
export const ZodMiniType = /*@__PURE__*/ core.$constructor("ZodMiniType", (inst, def) => {
|
|
7
5
|
if (!inst._zod)
|
|
8
6
|
throw new Error("Uninitialized schema in mixin ZodMiniType.");
|
|
@@ -6,3 +6,7 @@ export * from "./parse.js";
|
|
|
6
6
|
export * from "./compat.js";
|
|
7
7
|
export type { infer, output, input } from "zod/v4/core";
|
|
8
8
|
export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, locales, } from "zod/v4/core";
|
|
9
|
+
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
|
10
|
+
export * as iso from "./iso.js";
|
|
11
|
+
export type { ZodCoercedString, ZodCoercedNumber, ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, } from "./coerce.js";
|
|
12
|
+
export * as coerce from "./coerce.js";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as core from "zod/v4/core";
|
|
2
2
|
import { util } from "zod/v4/core";
|
|
3
3
|
import * as parse from "./parse.js";
|
|
4
|
-
export * as iso from "./iso.js";
|
|
5
|
-
export * as coerce from "./coerce.js";
|
|
6
4
|
export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
|
|
7
5
|
addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
|
|
8
6
|
}
|
|
@@ -5,3 +5,6 @@ export * from "./checks.js";
|
|
|
5
5
|
export type { infer, output, input } from "zod/v4/core";
|
|
6
6
|
export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, locales, } from "zod/v4/core";
|
|
7
7
|
/** A special constant with type `never` */
|
|
8
|
+
export * as iso from "./iso.js";
|
|
9
|
+
export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.js";
|
|
10
|
+
export * as coerce from "./coerce.js";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as core from "zod/v4/core";
|
|
2
2
|
import { util } from "zod/v4/core";
|
|
3
|
-
export * as coerce from "./coerce.js";
|
|
4
|
-
export * as iso from "./iso.js";
|
|
5
3
|
type SomeType = core.$ZodType;
|
|
6
4
|
export interface ZodMiniType<out Output = unknown, out Input = unknown> extends core.$ZodType<Output, Input> {
|
|
7
5
|
check(...checks: (core.CheckFn<this["_zod"]["output"]> | core.$ZodCheck<this["_zod"]["output"]>)[]): this;
|
package/package.json
CHANGED