You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core-internal): harden the missing-key probe and cover enum-keyed records
- fieldAcceptsMissingKey no longer lets a throwing .transform()/.refine()
escape the probe: depending on the zod build, ~standard.validate(undefined)
either throws synchronously or returns a rejecting Promise whose unhandled
rejection crashes the process during tools/list conversion. Both modes now
conservatively keep the field required, and the Promise branch attaches a
no-op catch so no rejection floats.
- Enum-keyed records (def.type === 'record') also emit a required list zod
does not enforce when the shared value schema is defaulted or
undefined-accepting; the override now drops it (all-or-nothing, since every
key shares the one value schema).
- Move StandardSchemaToJsonSchemaOptions above the conversion function's
JSDoc block so the doc comment re-attaches to the function it describes,
and give the interface its own one-liner.
- Stop overclaiming in the changeset and JSDoc: BigInt values embedded as
defaults or metadata (.default(0n), .meta({default: 1n})) still fail
conversion inside zod's own processors, outside the override's reach.
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments