Commit 9944f44
authored
chore: upgrade to zod v4 (#4039)
## 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/core` and
`@trigger.dev/redis-worker`
(generic constraints like `T extends z.ZodTypeAny`, exported schema
values typed as
`z.ZodType<T>`, and `WorkerCatalog`'s schema field). These types exist
in both zod 3 and
zod 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.
`WorkerCatalog` uses `z.ZodFirstPartySchemaTypes`, which is present in
zod 4 via a
compatibility alias but marked `@deprecated`. This is intentional — the
type is still
fully functional, and we've left it in place to avoid a breaking API
change.
## TODO list before merging
- [x] bump @trigger.dev/platform dep to 1.2.1 when that becomes
available1 parent 0350e00 commit 9944f44
181 files changed
Lines changed: 1418 additions & 760 deletions
File tree
- .changeset
- apps
- supervisor
- webapp
- app
- components
- billing
- errors
- metrics
- runs/v3
- schedules
- models
- presenters/v3
- routes
- _app.orgs.$organizationSlug.invite
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.branches
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables.new
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.$fingerprint
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules.$scheduleParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.general
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.integrations
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam
- _app.orgs.$organizationSlug.settings._index
- _app.orgs.$organizationSlug.settings.billing-limits
- _app.orgs.$organizationSlug.settings.private-connections.new
- _app.orgs.$organizationSlug.settings.team
- _app.orgs.$organizationSlug_.projects.new
- _app.orgs.new
- account._index
- account.tokens
- login._index
- login.sso
- resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules.new
- resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete
- services
- routeBuilders
- utils
- v3
- services
- utils
- vercel
- test
- helpers
- internal-packages
- clickhouse
- src
- client
- compute
- src
- dashboard-agent-contracts/src
- dashboard-agent
- src
- __snapshots__
- emails
- run-engine
- src/batch-queue
- schedule-engine
- webhook-sources/src
- packages
- cli-v3
- src
- cli
- commands
- entryPoints/managed
- mcp/tools
- utilities
- core
- src
- schemas
- v3
- apiClient
- runEngineWorker
- supervisor
- workload
- schemas
- serverOnly
- sessionStreams
- types
- utils
- redis-worker
- src
- fair-queue
- tests
- mollifier
- schema-to-json
- src
- tests
- trigger-sdk
- src/v3
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments