Skip to content

Commit 36c84fb

Browse files
committed
fix(cli): link unsupported Zod errors to upgrade guidance
Clarify that Zod 4 is now the default while supported Zod 3 projects can keep their existing major version.
1 parent a689396 commit 36c84fb

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.changeset/zod-4-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"@trigger.dev/schema-to-json": minor
1010
---
1111

12-
Add Zod 4 support. You can now use Zod 3.25.56+ or Zod 4.
12+
Trigger.dev now uses Zod 4 by default. Projects using Zod 3.25.56 or later 3.x releases remain supported.
1313

1414
Zod remains a runtime dependency of packages that execute schemas, so existing and new installations continue to receive it automatically. The matching peer dependency range allows package managers to reuse either a compatible Zod 3 or Zod 4 installation from your project.

packages/cli-v3/src/utilities/commandError.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { formatCommandError } from "./commandError.js";
33

44
const expectedMessage = `Your installed Zod version is not supported by Trigger.dev.
55
6-
Trigger.dev requires zod@^3.25.56 or zod@^4.0.0. Upgrade Zod, reinstall your dependencies, and try again.`;
6+
Trigger.dev requires zod@^3.25.56 or zod@^4.0.0. Upgrade Zod, reinstall your dependencies, and try again.
7+
8+
See https://trigger.dev/docs/troubleshooting-zod for upgrade guidance.`;
79

810
describe("formatCommandError", () => {
911
it("explains when the installed Zod package does not export zod/v4", () => {

packages/cli-v3/src/utilities/commandError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const UNSUPPORTED_ZOD_MESSAGE = `Your installed Zod version is not supported by Trigger.dev.
22
3-
Trigger.dev requires zod@^3.25.56 or zod@^4.0.0. Upgrade Zod, reinstall your dependencies, and try again.`;
3+
Trigger.dev requires zod@^3.25.56 or zod@^4.0.0. Upgrade Zod, reinstall your dependencies, and try again.
4+
5+
See https://trigger.dev/docs/troubleshooting-zod for upgrade guidance.`;
46

57
export function formatCommandError(error: unknown): string {
68
if (isUnsupportedZodError(error)) {

0 commit comments

Comments
 (0)