Skip to content

Commit c60318e

Browse files
committed
cli dep zod4, update changelog
1 parent b0460ed commit c60318e

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
@@ -68,8 +68,7 @@
6868
"rimraf": "^6.0.1",
6969
"ts-essentials": "10.0.1",
7070
"tshy": "^3.0.2",
71-
"tsx": "4.17.0",
72-
"zod": "4.4.3"
71+
"tsx": "4.17.0"
7372
},
7473
"scripts": {
7574
"clean": "rimraf dist .tshy .tshy-build .turbo",
@@ -147,6 +146,7 @@
147146
"tinyglobby": "^0.2.10",
148147
"ws": "^8.18.0",
149148
"xdg-app-paths": "^8.3.0",
149+
"zod": "4.4.3",
150150
"zod-validation-error": "^5.0.0"
151151
},
152152
"engines": {
@@ -160,8 +160,5 @@
160160
"default": "./dist/esm/index.js"
161161
}
162162
}
163-
},
164-
"peerDependencies": {
165-
"zod": "^3.25.0 || ^4.0.0"
166163
}
167164
}

0 commit comments

Comments
 (0)