Skip to content

Commit 79d4d80

Browse files
authored
v4.0.0 (#4844)
* Update docs for zod@4 * Exclude tests * Update /mini entrypoint * Add locales, switch from /v4-mini to /mini * Update play * Update attw * Update resolution tests * Update release.yml * Add versioning.mdx * Update docs * 4.0.0 * Fix lint
1 parent e7f20c2 commit 79d4d80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+439
-231
lines changed

.cursor/rules/zod-project-guide.mdc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ This is the Zod TypeScript-first schema validation library project. The project
4040
### Publishing
4141
- `pnpm prepublishOnly` - Run tests and build before publishing
4242
- `pnpm publish:jsr` - Publish to JSR (dry run)
43-
- `pnpm pub:beta` - Publish beta version
4443

4544
## Key Files
4645

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ jobs:
4040
uses: JS-DevTools/npm-publish@v3
4141
with:
4242
token: ${{ secrets.NPM_TOKEN }}
43-
dry-run: false
43+
# dry-run: true
4444
provenance: true
4545
package: ./packages/zod
4646

47+
- run: pnpm jsr publish --allow-slow-types # --dry-run
48+
working-directory: ./packages/zod
49+
4750
- name: Post-publish
4851
if: ${{ steps.publish.outputs.type }}
4952
run: |

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
33
git status;
44
exit 1
55
fi
6-
pnpm semver-check
6+
pnpm check:semver
77
lint-staged --verbose

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
33
git status;
44
exit 1
55
fi
6-
pnpm semver-check
6+
pnpm check:semver
77
pnpm test

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@biomejs/biome": "^1.9.4",
2020
"@types/benchmark": "^2.1.5",
2121
"@types/node": "^20.17.30",
22+
"@types/semver": "^7.7.0",
2223
"@web-std/file": "^3.0.3",
2324
"arktype": "^2.1.19",
2425
"benchmark": "^2.1.4",
@@ -46,7 +47,7 @@
4647
"vitest": "^2.1.9",
4748
"zod": "workspace:*",
4849
"zod3": "npm:zod@~3.24.0",
49-
"zshy": "^0.0.12"
50+
"zshy": "^0.0.13"
5051
},
5152
"lint-staged": {
5253
"packages/*/src/**/*.ts": [
@@ -82,7 +83,6 @@
8283
"publish:jsr": "jsr publish --dry-run",
8384
"bundle:rollup": "rollup -c",
8485
"bundle:esbuild": "esbuild --bundle ./scratch/input.ts --outfile=./scratch/out_esbuild.js --bundle --format=esm",
85-
"pub:beta": "pnpm run -r pub:beta",
86-
"semver-check": "tsx scripts/semver-check.ts"
86+
"check:semver": "tsx scripts/check-semver.ts"
8787
}
8888
}

packages/bench/error-handling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { makeData } from "./benchUtil.js";
22
import { metabench } from "./metabench.js";
33

44
import * as z4 from "zod/v4";
5-
import * as z from "zod";
5+
import * as z from "zod/v3";
66

77
const a = z4.object({ a: z4.string() });
88
const b = z.object({ a: z.string() });

packages/bench/jit-union.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { makeData, randomPick, randomString } from "./benchUtil.js";
22
import { metabench } from "./metabench.js";
33

4-
import * as z4 from "zod/v4-mini";
4+
import * as z4 from "zod/mini";
55

66
const z4fields = {
77
data1: z4.string(),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy