chore: upgrade to zod v4 - #4039
Conversation
🦋 Changeset detectedLatest commit: 502ccd8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughPackage manifests and overrides update Zod versions, peer ranges, and dependency placement across the workspace. Core and webapp schemas switch to explicit string-keyed records and adjust a few field shapes. Webapp routes and components migrate to 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
c60f28b to
d42abf1
Compare
a2298f4 to
a5fccbe
Compare
Preserve retry defaults and JSON Schema optional fields with older Zod permalinks. Keep AI schema types optional for Zod-only consumers without losing tool payload inference.
Allow dependency analysis to recognize the minimum-version test dependency.
Regenerate measurements against the current tool schemas while keeping the existing prefix budgets unchanged.
Clarify that Zod 4 is now the default while supported Zod 3 projects can keep their existing major version.
36c84fb to
502ccd8
Compare
…ev#4896) Adds a pluggable `TranscriptStorage` seam so a `chat.agent` run can own its conversation history across continuations: - Version 2 transcript snapshot + dual-version dashboard reader - The storage option, a read API, and a conformance suite - Run-tail recovery for every `chat.agent` - Compaction and injected-context persistence - A dashboard `TranscriptStorage` over the agent's message rows This collapses the former 5-PR review stack (triggerdotdev#4904, triggerdotdev#4893, triggerdotdev#4894, triggerdotdev#4895) into a single PR after rebasing onto main and migrating to zod v4 (the stack was on zod v3 and conflicted with the zod v4 upgrade triggerdotdev#4039). All prior review threads were addressed on the stack branches. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Zod v4 compatibility
Upgrades the monorepo's internal zod version from 3.x to 4.4.3 and widens the peer
dependency on all published packages to
"^3.25.56 || ^4.0.0".For library consumers
No breaking change if you are on zod 3.25+. The peer dependency range is widened, not
narrowed — your existing zod 3.25+ install continues to satisfy it and the library code
is runtime-compatible with both versions. Zod 4.x is now also supported. Bumped as minor
across all affected packages.
Minimum zod 3 version is 3.25.56 (not 3.0.0).
API compatibility
Zod types appear in the public API of
@trigger.dev/coreand@trigger.dev/redis-worker(generic constraints like
T extends z.ZodTypeAny, exported schema values typed asz.ZodType<T>, andWorkerCatalog's schema field). These types exist in both zod 3 andzod 4, so TypeScript consumers on either version should resolve them without errors —
the shapes are structurally compatible across versions.
If you pass your own zod schemas into library APIs (e.g.
zodfetch,zodShapeStream,WorkerCatalog), schemas from zod 3.25+ and zod 4.x are both accepted.WorkerCatalogusesz.ZodFirstPartySchemaTypes, which is present in zod 4 via acompatibility alias but marked
@deprecated. This is intentional — the type is stillfully functional, and we've left it in place to avoid a breaking API change.
TODO list before merging