zod 4.0.0-beta.20250420T053007 → 4.0.0-beta.20250424T163858
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/commonjs/schemas.js +3 -3
- package/dist/esm/schemas.js +3 -3
- package/package.json +2 -2
- package/src/schemas.ts +3 -3
package/dist/commonjs/schemas.js
CHANGED
|
@@ -134,7 +134,7 @@ exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
|
|
134
134
|
],
|
|
135
135
|
});
|
|
136
136
|
};
|
|
137
|
-
inst.clone = (_def) => core.clone(inst, _def
|
|
137
|
+
inst.clone = (_def) => core.clone(inst, _def);
|
|
138
138
|
inst.brand = () => inst;
|
|
139
139
|
inst.register = ((reg, meta) => {
|
|
140
140
|
reg.add(inst, meta);
|
|
@@ -167,8 +167,8 @@ exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
|
|
167
167
|
// meta
|
|
168
168
|
inst.describe = (description) => {
|
|
169
169
|
const cl = inst.clone();
|
|
170
|
-
const meta = core.globalRegistry.get(inst) ?? {};
|
|
171
|
-
meta.
|
|
170
|
+
const meta = { ...(core.globalRegistry.get(inst) ?? {}), description };
|
|
171
|
+
delete meta.id; // do not inherit
|
|
172
172
|
core.globalRegistry.add(cl, meta);
|
|
173
173
|
return cl;
|
|
174
174
|
};
|
package/dist/esm/schemas.js
CHANGED
|
@@ -19,7 +19,7 @@ export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) =>
|
|
|
19
19
|
],
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
inst.clone = (_def) => core.clone(inst, _def
|
|
22
|
+
inst.clone = (_def) => core.clone(inst, _def);
|
|
23
23
|
inst.brand = () => inst;
|
|
24
24
|
inst.register = ((reg, meta) => {
|
|
25
25
|
reg.add(inst, meta);
|
|
@@ -52,8 +52,8 @@ export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) =>
|
|
|
52
52
|
// meta
|
|
53
53
|
inst.describe = (description) => {
|
|
54
54
|
const cl = inst.clone();
|
|
55
|
-
const meta = core.globalRegistry.get(inst) ?? {};
|
|
56
|
-
meta.
|
|
55
|
+
const meta = { ...(core.globalRegistry.get(inst) ?? {}), description };
|
|
56
|
+
delete meta.id; // do not inherit
|
|
57
57
|
core.globalRegistry.add(cl, meta);
|
|
58
58
|
return cl;
|
|
59
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.20250424T163858",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
6
6
|
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@zod/core": "0.
|
|
73
|
+
"@zod/core": "0.9.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"clean": "rm -rf dist",
|
package/src/schemas.ts
CHANGED
|
@@ -113,7 +113,7 @@ export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$construct
|
|
|
113
113
|
],
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
inst.clone = (_def) => core.clone(inst, _def
|
|
116
|
+
inst.clone = (_def) => core.clone(inst, _def);
|
|
117
117
|
inst.brand = () => inst as any;
|
|
118
118
|
inst.register = ((reg: any, meta: any) => {
|
|
119
119
|
reg.add(inst, meta);
|
|
@@ -150,8 +150,8 @@ export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$construct
|
|
|
150
150
|
// meta
|
|
151
151
|
inst.describe = (description) => {
|
|
152
152
|
const cl = inst.clone();
|
|
153
|
-
const meta = core.globalRegistry.get(inst) ?? {};
|
|
154
|
-
meta.
|
|
153
|
+
const meta = { ...(core.globalRegistry.get(inst) ?? {}), description };
|
|
154
|
+
delete meta.id; // do not inherit
|
|
155
155
|
core.globalRegistry.add(cl, meta);
|
|
156
156
|
return cl;
|
|
157
157
|
};
|