Skip to content

fix: generate valid zod v3 types for enums, unions, and non-empty arrays - #92

Merged
OrKoN merged 1 commit into
mainfrom
orkon/fix-types
Sep 21, 2026
Merged

OrKoN merged 1 commit into
mainfrom
orkon/fix-types

Conversation

@OrKoN

@OrKoN OrKoN commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Regression introduced in #90

@OrKoN
OrKoN merged commit 4cc5d36 into main Sep 21, 2026
7 checks passed
@OrKoN
OrKoN deleted the orkon/fix-types branch September 21, 2026 09:22
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants