zod 4.3.0-canary.20251216T031837 → 4.3.0-canary.20251216T172808
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/package.json +1 -1
- package/src/v4/core/schemas.ts +3 -2
- package/v4/core/schemas.cjs +3 -2
- package/v4/core/schemas.js +3 -2
package/package.json
CHANGED
package/src/v4/core/schemas.ts
CHANGED
|
@@ -298,7 +298,8 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
// Lazy initialize ~standard to avoid creating objects for every schema
|
|
302
|
+
util.defineLazy(inst, "~standard", () => ({
|
|
302
303
|
validate: (value: unknown) => {
|
|
303
304
|
try {
|
|
304
305
|
const r = safeParse(inst, value);
|
|
@@ -309,7 +310,7 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
309
310
|
},
|
|
310
311
|
vendor: "zod",
|
|
311
312
|
version: 1 as const,
|
|
312
|
-
};
|
|
313
|
+
}));
|
|
313
314
|
});
|
|
314
315
|
|
|
315
316
|
export { clone } from "./util.js";
|
package/v4/core/schemas.cjs
CHANGED
|
@@ -142,7 +142,8 @@ exports.$ZodType = core.$constructor("$ZodType", (inst, def) => {
|
|
|
142
142
|
return runChecks(result, checks, ctx);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
// Lazy initialize ~standard to avoid creating objects for every schema
|
|
146
|
+
util.defineLazy(inst, "~standard", () => ({
|
|
146
147
|
validate: (value) => {
|
|
147
148
|
try {
|
|
148
149
|
const r = (0, parse_js_1.safeParse)(inst, value);
|
|
@@ -154,7 +155,7 @@ exports.$ZodType = core.$constructor("$ZodType", (inst, def) => {
|
|
|
154
155
|
},
|
|
155
156
|
vendor: "zod",
|
|
156
157
|
version: 1,
|
|
157
|
-
};
|
|
158
|
+
}));
|
|
158
159
|
});
|
|
159
160
|
var util_js_1 = require("./util.cjs");
|
|
160
161
|
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return util_js_1.clone; } });
|
package/v4/core/schemas.js
CHANGED
|
@@ -112,7 +112,8 @@ export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def)
|
|
|
112
112
|
return runChecks(result, checks, ctx);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
// Lazy initialize ~standard to avoid creating objects for every schema
|
|
116
|
+
util.defineLazy(inst, "~standard", () => ({
|
|
116
117
|
validate: (value) => {
|
|
117
118
|
try {
|
|
118
119
|
const r = safeParse(inst, value);
|
|
@@ -124,7 +125,7 @@ export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def)
|
|
|
124
125
|
},
|
|
125
126
|
vendor: "zod",
|
|
126
127
|
version: 1,
|
|
127
|
-
};
|
|
128
|
+
}));
|
|
128
129
|
});
|
|
129
130
|
export { clone } from "./util.js";
|
|
130
131
|
export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
|