Skip to content

Commit db347e2

Browse files
committed
Explain versions better, with table
1 parent f764c80 commit db347e2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ npm install zod-from-json-schema
1414

1515
## Zod 3 vs 4
1616

17-
Prior to Zod officially releasing an official v4 package, Zod v4 was available in the Zod 3.x branches, i.e. ^3.25.25. This package maintains legacy version 3/4 support in the 0.x version and Zod 4 support (with the official Zod 4 release) in the 1.x version.
17+
Zod 4 is available both as the package version 4, but also as part of the version 3 packages. We support both, as well as Zod 3. Here's which version of this package to use:
1818

19-
- If you need Zod 4, you can use the ^0.5.0 branch or the ^0.4.0 branches of this repo
20-
- If you need Zod 3, use the latest version that's less than 0.4.0 (at the of writing that's 0.0.5). It supports a smaller subsets of JSON Schema.
19+
|Zod|zod-from-json-schema|
20+
|---|--------------------|
21+
| v4 proper | latest |
22+
| v4 via 3.x | ^0.4.2 |
23+
| v3 | ^0.0.5 |
24+
25+
Note that the older package for Zod 3 supports a smaller subset of JSON schema than the latest. New features will only be added to the latest.
2126

2227
## Usage
2328

0 commit comments

Comments
 (0)