Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"serialize-error": "^8.1.0",
"sqlstring": "^2.3.3",
"uuid": "^8.3.2",
"zod": "3.25",
"zod": "4.6",
"zod-express-middleware": "^1.4.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major — zod 4 stops serialising issues in 400 responses, which breaks client error handling that reads errors.issues

In zod 4, ZodError.issues is non-enumerable, so res.json(...) (and zod-express-middleware, whose peer dependency is zod ^3.2.0) no longer includes errors.issues. packages/app/src/AuthPage.tsx:98 depends on jsonData[0].errors.issues to show per-field registration errors. Several tests assert response.body[0].errors.issues, e.g. packages/api/src/routers/api/__tests__/dashboard.int.test.ts:1137. packages/api/src/middleware/validation.ts:12 has the same issue. Fix it by replacing zod-express-middleware with a zod-4-aware validator that explicitly sends { issues: error.issues }.

Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond

},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"timestamp-nano": "^1.0.1",
"uplot": "^1.6.31",
"uplot-react": "^1.2.2",
"zod": "3.25"
"zod": "4.6"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 critical — @hookform/resolvers 3.9.0 can't handle zod 4 errors, so form validation throws instead of showing field errors

Before or alongside this bump, upgrade @hookform/resolvers to ^5 (which supports zod 4). In 3.9.0, zodResolver decides whether it caught a validation failure by checking Array.isArray(error?.errors). Zod 4's ZodError no longer has .errors, so the resolver rethrows on any invalid submit. That affects every zodResolver(...) form: DBSearchPage, DBDashboardImportPage, DBSearchPageAlertModal, EditAlertModal, EditTimeChartForm, HeatmapSettingsDrawer and OnClickDrawer.

Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond

},
"devDependencies": {
"@chromatic-com/storybook": "^4.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/common-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"object-hash": "^3.0.0",
"sql-formatter": "^15.7.2",
"sqlstring": "^2.3.3",
"zod": "3.25"
"zod": "4.6"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major — A major zod upgrade with no code migration: every from 'zod' import now gets the v4 API

About 108 files import from 'zod' and none use 'zod/v3', so zod 3.25's v3 API is replaced everywhere. Either temporarily point those imports at 'zod/v3' (still shipped in 4.x) or do the full migration in this PR. That means .errors→.issues, invalid_type_error/errorMap→error, the changed .default()/.optional() semantics in objects, and the deprecated ZodIssueCode.

Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond

},
"devDependencies": {
"@stryker-mutator/core": "^9.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/hdx-eval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ai": "^7.0.116",
"commander": "^12.1.0",
"ms": "^2.1.3",
"zod": "3.25"
"zod": "4.6"
},
"devDependencies": {
"@dotenvx/dotenvx": "^1.51.1",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4790,7 +4790,7 @@ __metadata:
tsconfig-paths: "npm:^4.2.0"
typescript: "npm:^6.0.3"
uuid: "npm:^8.3.2"
zod: "npm:3.25"
zod: "npm:4.6"
zod-express-middleware: "npm:^1.4.0"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -4923,7 +4923,7 @@ __metadata:
typescript: "npm:^6.0.3"
uplot: "npm:^1.6.31"
uplot-react: "npm:^1.2.2"
zod: "npm:3.25"
zod: "npm:4.6"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -5003,7 +5003,7 @@ __metadata:
tsc-alias: "npm:^1.8.8"
tsup: "npm:^8.4.0"
typescript: "npm:^6.0.3"
zod: "npm:3.25"
zod: "npm:4.6"
languageName: unknown
linkType: soft

Expand All @@ -5027,7 +5027,7 @@ __metadata:
tsc-alias: "npm:^1.8.8"
tsx: "npm:^4.19.0"
typescript: "npm:^6.0.3"
zod: "npm:3.25"
zod: "npm:4.6"
bin:
hdx-eval: ./dist/cli.js
languageName: unknown
Expand Down Expand Up @@ -31689,10 +31689,10 @@ __metadata:
languageName: node
linkType: hard

"zod@npm:3.25":
version: 3.25.76
resolution: "zod@npm:3.25.76"
checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c
"zod@npm:4.6":
version: 4.6.6
resolution: "zod@npm:4.6.6"
checksum: 10c0/447a3113bb743c54ab839213ff95e9e8c197cc1206f65270c18aac35aa70c47a5c8cab753be911b574df9a8a9801ea74ed6be776575232cae0084e51dab3e970
languageName: node
linkType: hard

Expand Down
Loading