Repository navigation
fix: generate valid zod v3 types for enums, unions, and non-empty arrays - #92
Merged
Merged
Conversation
Lightning00Blade
approved these changes
Sep 21, 2026
OrKoN
added a commit
that referenced
this pull request
Sep 21, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.12](cddlconv-v0.1.11...cddlconv-v0.1.12) (2026-09-21) ### Bug Fixes * generate valid zod v3 types for enums, unions, and non-empty arrays ([#92](#92)) ([4cc5d36](4cc5d36)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sadym-chromium
added a commit
that referenced
this pull request
Sep 29, 2026
Alternative to #96 - Emit Zod v4-compatible TypeScript type annotations in `--format zod` and document the `--format <type-script|zod>` CLI flag in `README.md`. - Commit 4cc5d36 (#92) switched enum, union, and non-empty array type annotations to Zod v3 syntax, breaking compilation against Zod v4 even though `--format zod` already targets Zod v4 (e.g., `z.ZodURL` / `z.url()`). - Emit `z.ZodUnion<readonly [...]>`, record-based `z.ZodEnum<{ [K]: K }>`, and single-parameter `z.ZodArray<T>`. Fixes #95
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regression introduced in #90