Skip to content

Release 0.5.2

Choose a tag to compare

@github-actions github-actions released this 09 Mar 23:27
· 250 commits to main since this release
8f85505

0.5.2 Release Notes

Zod v4

dyna-record now uses Zod v4 for runtime schema validation, upgraded from Zod v3. All validation behavior, public APIs, and TypeScript types remain unchanged — this is a dependency-only upgrade with no changes to how you define entities, decorators, or schemas.

What changed

The only consumer-facing change is the shape of Zod issue objects inside ValidationError.cause. If your code catches ValidationError and inspects the cause array directly, note the following Zod v4 differences:

Zod v3 Zod v4
Missing field message "Required" "Invalid input: expected string, received undefined"
Wrong type message "Expected string, received number" "Invalid input: expected string, received number"
Issue received field Present Removed
Invalid enum code "invalid_enum_value" "invalid_value"
Enum options field options: [...] values: [...]

If you only check for instanceof ValidationError and read .message, no changes are needed.