zod 4.2.0-canary.20250828T181323 → 4.2.0-canary.20250911T000242
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 +4 -1
- package/src/v4/core/versions.ts +1 -1
- package/v4/core/schemas.cjs +3 -1
- package/v4/core/schemas.js +3 -1
- package/v4/core/versions.cjs +1 -1
- package/v4/core/versions.js +1 -1
package/package.json
CHANGED
package/src/v4/core/schemas.ts
CHANGED
|
@@ -1862,6 +1862,7 @@ export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$con
|
|
|
1862
1862
|
|
|
1863
1863
|
const proms: Promise<any>[] = [];
|
|
1864
1864
|
const shape = value.shape;
|
|
1865
|
+
|
|
1865
1866
|
for (const key of value.keys) {
|
|
1866
1867
|
const el = shape[key]!;
|
|
1867
1868
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
@@ -1907,7 +1908,7 @@ export const $ZodObjectJIT: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$
|
|
|
1907
1908
|
}
|
|
1908
1909
|
|
|
1909
1910
|
// A: preserve key order {
|
|
1910
|
-
doc.write(`const newResult = {}
|
|
1911
|
+
doc.write(`const newResult = {};`);
|
|
1911
1912
|
for (const key of normalized.keys) {
|
|
1912
1913
|
const id = ids[key];
|
|
1913
1914
|
const k = util.esc(key);
|
|
@@ -1920,6 +1921,7 @@ export const $ZodObjectJIT: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$
|
|
|
1920
1921
|
})));
|
|
1921
1922
|
}
|
|
1922
1923
|
|
|
1924
|
+
|
|
1923
1925
|
if (${id}.value === undefined) {
|
|
1924
1926
|
if (${k} in input) {
|
|
1925
1927
|
newResult[${k}] = undefined;
|
|
@@ -1927,6 +1929,7 @@ export const $ZodObjectJIT: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$
|
|
|
1927
1929
|
} else {
|
|
1928
1930
|
newResult[${k}] = ${id}.value;
|
|
1929
1931
|
}
|
|
1932
|
+
|
|
1930
1933
|
`);
|
|
1931
1934
|
}
|
|
1932
1935
|
|
package/src/v4/core/versions.ts
CHANGED
package/v4/core/schemas.cjs
CHANGED
|
@@ -864,7 +864,7 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
864
864
|
ids[key] = `key_${counter++}`;
|
|
865
865
|
}
|
|
866
866
|
// A: preserve key order {
|
|
867
|
-
doc.write(`const newResult = {}
|
|
867
|
+
doc.write(`const newResult = {};`);
|
|
868
868
|
for (const key of normalized.keys) {
|
|
869
869
|
const id = ids[key];
|
|
870
870
|
const k = util.esc(key);
|
|
@@ -877,6 +877,7 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
877
877
|
})));
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
+
|
|
880
881
|
if (${id}.value === undefined) {
|
|
881
882
|
if (${k} in input) {
|
|
882
883
|
newResult[${k}] = undefined;
|
|
@@ -884,6 +885,7 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
884
885
|
} else {
|
|
885
886
|
newResult[${k}] = ${id}.value;
|
|
886
887
|
}
|
|
888
|
+
|
|
887
889
|
`);
|
|
888
890
|
}
|
|
889
891
|
doc.write(`payload.value = newResult;`);
|
package/v4/core/schemas.js
CHANGED
|
@@ -833,7 +833,7 @@ export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (i
|
|
|
833
833
|
ids[key] = `key_${counter++}`;
|
|
834
834
|
}
|
|
835
835
|
// A: preserve key order {
|
|
836
|
-
doc.write(`const newResult = {}
|
|
836
|
+
doc.write(`const newResult = {};`);
|
|
837
837
|
for (const key of normalized.keys) {
|
|
838
838
|
const id = ids[key];
|
|
839
839
|
const k = util.esc(key);
|
|
@@ -846,6 +846,7 @@ export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (i
|
|
|
846
846
|
})));
|
|
847
847
|
}
|
|
848
848
|
|
|
849
|
+
|
|
849
850
|
if (${id}.value === undefined) {
|
|
850
851
|
if (${k} in input) {
|
|
851
852
|
newResult[${k}] = undefined;
|
|
@@ -853,6 +854,7 @@ export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (i
|
|
|
853
854
|
} else {
|
|
854
855
|
newResult[${k}] = ${id}.value;
|
|
855
856
|
}
|
|
857
|
+
|
|
856
858
|
`);
|
|
857
859
|
}
|
|
858
860
|
doc.write(`payload.value = newResult;`);
|
package/v4/core/versions.cjs
CHANGED
package/v4/core/versions.js
CHANGED