Hey I'm running into a validation failure after bumping zod 4.3.6 → 4.4.3 in our app.
Using @json-render/react@0.18.0 (also checked 0.19.0 on npm, same behaviour, and this is what made me notice the github release mismatch).
The visible field on elements is now being treated as required
import { z } from 'zod';
import { schema } from '@json-render/react';
const catalog = schema.createCatalog({
components: {
Stack: { props: z.object({}), description: 'box', example: {} },
},
actions: {},
});
const result = catalog.validate({
root: 'main',
elements: {
main: { type: 'Stack', props: {}, children: [] },
},
});
console.log(result);
// {
// success: false,
// error: ZodError: [
// {
// code: 'invalid_type',
// expected: 'nonoptional',
// path: [ 'elements', 'main', 'visible' ],
// message: 'Invalid input: expected nonoptional, received undefined'
// }
// ]
// }
On zod 4.3.6 the same call succeeds. Not sure if this is a zod 4.4 compatibility thing or something on our end.
Versions:
- @json-render/core@0.18.0, @json-render/react@0.18.0, @json-render/shadcn@0.18.0, (about to install @json-render/react-email@0.18.0)
- zod@4.4.3 (any 4.4.x reproduces)
- Node 24, pnpm 10
Happy to dig in further if useful
Hey I'm running into a validation failure after bumping zod 4.3.6 → 4.4.3 in our app.
Using @json-render/react@0.18.0 (also checked 0.19.0 on npm, same behaviour, and this is what made me notice the github release mismatch).
The visible field on elements is now being treated as required
On zod 4.3.6 the same call succeeds. Not sure if this is a zod 4.4 compatibility thing or something on our end.
Versions:
Happy to dig in further if useful