Skip to content

Commit 753b413

Browse files
committed
cli dep zod4, update changelog
1 parent f78a354 commit 753b413

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎.changeset/zod-4-support.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
"@trigger.dev/schema-to-json": minor
77
---
88

9-
Add zod v4 compatibility. The `zod` peer dependency is widened to `^3.25.0 || ^4.0.0`, so projects can use zod 3.25+ or zod 4. Internal code was updated for zod v4 API changes (`ZodError.errors` → `.issues`, single-arg `z.record` → keyed, unified `error` option, `z.ZodSchema`/`z.AnyZodObject` → `z.ZodType`/`z.ZodObject`, `z.any()` object fields made `.optional()` to preserve v3 inference). No runtime behavior change for existing zod 3 users.
9+
Add zod v4 support. You can now use zod 3.25+ or zod 4 (the minimum zod 3 version is now 3.25.0). `zod` is now a peer dependency of `@trigger.dev/core`, `@trigger.dev/sdk`, `@trigger.dev/redis-worker`, and `@trigger.dev/schema-to-json`, so it shares a single copy with your project; if you depend on `@trigger.dev/core` directly, add `zod` to your own dependencies.
10+
11+
The published type declarations are built against zod 4. If you are still on zod 3, keep `skipLibCheck: true` in your tsconfig (the default in Trigger.dev's templates).

‎packages/cli-v3/package.json‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
"find-up": "^7.0.0",
6161
"rimraf": "^6.0.1",
6262
"tshy": "^4.1.3",
63-
"tsx": "4.17.0",
64-
"zod": "4.4.3"
63+
"tsx": "4.17.0"
6564
},
6665
"scripts": {
6766
"clean": "rimraf dist .tshy .tshy-build .turbo",
@@ -129,14 +128,12 @@
129128
"tinyexec": "^0.3.1",
130129
"tinyglobby": "^0.2.10",
131130
"xdg-app-paths": "^8.3.0",
131+
"zod": "4.4.3",
132132
"zod-validation-error": "^5.0.0"
133133
},
134134
"engines": {
135135
"node": ">=18.20.0"
136136
},
137-
"peerDependencies": {
138-
"zod": "^3.25.0 || ^4.0.0"
139-
},
140137
"exports": {
141138
"./package.json": "./package.json",
142139
".": {

0 commit comments

Comments
 (0)