镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

chore(deps): bump zod from 3.25.76 to 4.6.6 - #3459

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/zod-4.6.6
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/zod-4.6.6

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 23, 2026

Copy link
Copy Markdown
Contributor

Bumps zod from 3.25.76 to 4.6.6.

Release notes

Sourced from zod's releases.

v4.6.6

Six malicious commits pushed to main on September 21 with a compromised git credential were reverted the same day in #6620 and have since been removed from the history of main. None were ever published to npm. The npm provenance for 4.6.6 names 284243fb, the pre-rewrite copy of 9c219833 with identical contents.

Commits:

  • 0cd3af5e9f50ad11bbcd4407a46a21b8848ba574 docs: load the en locale directly in Zod Mini
  • 9d5e60f162997b764b40d45aa02481888db50dea docs: import locales from zod/locales, not z.locales
  • 34a626f307871ecbb0123947559328dc52ed5e3e docs: tighten the z.locales tree-shaking note
  • 74304ce5b5796b5edb9a88ceb8e170b6ea3e82df release: stage npm versions instead of publishing them (#6622)
  • b2ef983e0711ff6517d6020b021071e2e5653efa docs: add Code for Japan to bronze sponsors
  • 8fb2faf0584828a6a027d8279db36f6f52784462 docs: crop the Code for Japan logo and list it first in bronze
  • bacad518c41610d654658172d325874bf0ee6290 docs: square the Code for Japan logo to match the other bronze tiles
  • c42596bd1c87e941d7241d10e012c5c196adcc10 release: hold the run on the release-approval environment until the staged versions are approved (#6638)
  • a2ba4a67986a3e6b2b131be30084a2f460d9ea67 fix(types): declare record output and input as members, not base type arguments (#6645)
  • a0ebf970f2d752e5f58527cd2942ff48be4f46bd fix(v4): check array, set and map size bounds before parsing elements (#6652)
  • 529f78dd9431b07f49647fee3aa0819b3f8b66b7 4.6.6
  • 9c219833c3a3764fa1f1ea9c5ecec8254a63c0b1 ci: stage at verbose so a failed OIDC token exchange says why

v4.6.5

Commits:

  • d2b135cfb7a3582b9eb515756b9166bcb9521f4a docs: add the 4.6.x patch highlights to the 4.6 post
  • f1448f7cee00df9fe1e9ad84a000aa1828cc8bc1 docs: fold the 4.6.x patch highlights into the 4.6 post's own sections
  • de65a5cb39ed22a507fac935788f718fa88d104f docs: lead the properties section with the check and add a Zod Mini tab (#6598)
  • 56222cd1532c07bcb91b67df529cab4c0a215330 feat(instanceof): key the .properties() shape off the instance type (#6600)
  • ca0229a404818290e6cdcfefcd7eb2d04bcbb543 Revert "feat: add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI (#6595)"
  • cc4cd4ee9c52fcaa10964e48cc144541e41a5ed9 Revert "Revert "feat: add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI (#6595)""
  • 0f3f5ee3ca56c7574bf849e54f79e9a6e02562ee 4.6.5
  • 59bbc03e10c636b9eb3c393dfeb552819774ec21 chore: re-pin the integration peers to the workspace zod after the 4.6.5 bump

v4.6.4

A patch on top of 4.6.3.

  • d6bc1e30 feat: add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI (#6595)
  • ad32d751 perf: z.url() rejects an invalid URL with URL.canParse() instead of a throwing constructor, about 50x faster; fewer allocations on the validation path (#6588)
  • 2bb08717 chore: re-pin the integration peers to the workspace zod after the 4.6.4 bump
  • f6e1701a chore(deps): bump next to 15.5.25 and vite to 7.3.6 (#6153)

v4.6.3

A patch on top of 4.6.2.

  • 413cce9a fix(v4): make z.properties() a check again (#6594) — removes the standalone z.properties() schema from 4.6.0; z.instanceof().properties() and .check(...z.properties()) are unchanged
  • 75d63ee1 docs: show only the .properties() method form in the 4.6 post
  • 46da9572 docs: match the error-message examples to what the parsers emit

v4.6.2

A patch on top of 4.6.1.

... (truncated)

Commits
  • 9c21983 ci: stage at verbose so a failed OIDC token exchange says why
  • 529f78d 4.6.6
  • a0ebf97 fix(v4): check array, set and map size bounds before parsing elements (#6652)
  • a2ba4a6 fix(types): declare record output and input as members, not base type argumen...
  • c42596b release: hold the run on the release-approval environment until the staged ve...
  • bacad51 docs: square the Code for Japan logo to match the other bronze tiles
  • 8fb2faf docs: crop the Code for Japan logo and list it first in bronze
  • b2ef983 docs: add Code for Japan to bronze sponsors
  • 74304ce release: stage npm versions instead of publishing them (#6622)
  • 34a626f docs: tighten the z.locales tree-shaking note
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for zod since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.6.6.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Commits](colinhacks/zod@v3.25.76...v4.6.6)

---
updated-dependencies:
- dependency-name: zod
  dependency-version: 4.6.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 23, 2026
@greptile-apps

greptile-apps Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

PR author is in the excluded authors list.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Error Error Oct 23, 2026 7:29pm UTC
hyperdx-storybook Ready Ready Preview Oct 23, 2026 7:29pm UTC

Request Review

@github-actions github-actions Bot added the review/tier-1 Trivial — auto-merge candidate once CI passes label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🟢 Tier 1 — Trivial

Docs, images, lock files, a dependency bump, or an automated release. No functional code changes detected.

Why this tier:

  • Bot author: dependabot[bot]

Additional context: spans packages but only 6 prod lines — under the 100-line cross-layer bar, 1 file(s) in private internal-tooling packages, excluded from the line count

Review process: Auto-merge once CI passes. No human review required.
SLA: Resolves automatically.

Stats
  • Production files changed: 3
  • Production lines changed: 6
  • Branch: dependabot/npm_and_yarn/zod-4.6.6
  • Author: dependabot[bot]

To override this classification, remove the review/tier-1 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 114 in total (1.41%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

Comment thread packages/app/package.json
"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

Comment thread packages/api/package.json
"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

"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

@github-actions

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 critical or 🟠 major in code this PR adds or changes: fix before asking for review.
  • 🔵 minor in code this PR changes: your call. Fix if small, otherwise reply.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    severity. Reply with one sentence; if it is critical, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

6 finding(s): 🔴 2 critical · 🟠 4 major · 🔵 0 minor

3 posted as inline comment(s) on the changed lines. 3 listed below.

Findings outside the changed lines

  • 🔴 packages/api/src/mcp/utils/errors.ts:89 — ZodError.errors no longer exists in zod 4, so these error paths crash or print undefined → Replace .error.errors with .error.issues at every call site. The upgrade turns each one into TypeError: Cannot read properties of undefined, or undefined in JSON output, exactly when validation fails. Call sites: formatZodIssues here, packages/api/src/controllers/sources.ts:98, packages/app/src/theme/index.ts:97 (theme validation runs at module load), packages/api/src/mcp/tools/sources/saveSource.ts:68, packages/api/src/mcp/tools/alerts/saveWebhook.ts:126 and packages/api/src/mcp/tools/dashboards/patchDashboard.ts:170.
  • 🟠 packages/api/src/mcp/tools/dashboards/schemas.ts:66 — zod 4 removed invalid_type_error, so the custom rejection messages are silently dropped → Use zod 4's error param instead, e.g. z.never({ error: rejectTileWhereMessage }). Without that, callers get the generic "Invalid input" text instead of the guidance written for them. Same problem at lines 72, packages/api/src/mcp/tools/alerts/schemas.ts:68, and packages/api/src/utils/zod.ts:1087 and :1198.
  • 🟠 packages/api/src/routers/external-api/v2/utils/dashboards.ts:1907 — z.ZodEffects doesn't exist in zod 4, so the API package won't type-check → In zod 4, .superRefine returns the same ZodObject type, so change the return annotation to z.ZodObject<...> (or let TypeScript infer it). Also check other v3-only types such as ZodEffects and _def.typeName across the packages.

Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 0 passed • 0 skipped • 128s

Status Count
✅ Passed 0
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 0

Tests ran across 4 shards in parallel.

View full report →

@github-actions

Copy link
Copy Markdown
Contributor

Deep Review

Scope: zod 3.25.76 → 4.6.6 (major bump) across packages/api, packages/app, packages/common-utils, packages/hdx-eval + yarn.lock. The diff changes only version strings; no application code was migrated and no tests were added.

Why this needs scrutiny: a version-string diff understates the blast radius. zod 4 is a major release with breaking changes (error-message strings, ZodError issue shape, .default() semantics, deprecated string-format validators). 108 files import zod, and shared schemas live in common-utils/dist/types, consumed by all four packages. Two ecosystem bridges that sit on top of zod were not upgraded alongside it.

🔴 P0/P1 — must fix

  • packages/api/package.json:66 — zod-express-middleware@1.4.0 declares peerDependencies: { zod: "^3.2.0" }, which zod 4.6.6 no longer satisfies; this middleware validates API requests and forwards safeParse errors to clients, and zod 4 changed the ZodError issue shape and default messages, altering validation-error response bodies.
    • Fix: Upgrade to a zod-4-compatible request validator (or replace the middleware) and verify the API validation-error response contract against existing consumers.
  • packages/app/package.json:39 — @hookform/resolvers stays pinned at 3.9.0 while zod jumps to 4.6, but zod-4 support in that library only landed in 3.10.0 (via the zod/v4 entry point), so the 17 zodResolver form-validation call sites run a resolver built for the zod-3 API against zod-4 schemas.
    • Fix: Bump @hookform/resolvers to a zod-4-compatible release and smoke-test the forms that use zodResolver.
  • packages/common-utils/package.json:29 — The major bump lands with no code migration, no new tests, and no evidence the typecheck/test suite was run against zod 4; shared schemas in common-utils/dist/types feed api, app, and hdx-eval, so a silent inference or parsing change propagates repo-wide.
    • Fix: Run a full typecheck and the existing test suite across all four packages against zod 4.6 and resolve breakages before merge.

🟡 P2 — recommended

  • packages/api/src/utils/pagination.ts:33 — .default() semantics changed in zod 4 (the default is now the output value and short-circuits transforms/coercion), so .default() chained with z.coerce/.transform() can resolve to a different value or type than under zod 3; verify the z.coerce.number().default(...) and .transform() sites (api/src/utils/zod.ts, api/src/mcp/tools/*/schemas.ts, common-utils/src/types.ts:3321, app/src/DBDashboardImportPage.tsx:440).
    • Fix: Audit each .default() that chains with coercion/transform and switch to .prefault() where the zod-3 (parse-the-default) behavior is required.
  • packages/common-utils/src/__tests__/types.test.ts — Tests across common-utils, api, and app assert on zod validation output; zod 4 changed default error-message strings and issue structure, so any assertion on zod error text or issues/errors shape regresses, and no new test was added to cover the upgrade.
    • Fix: Run the suite against zod 4 and update assertions that depend on zod-generated error strings or issue shapes.
🔵 P3 nitpicks (1)
  • packages/common-utils/src/types.ts:13 — Deprecated zod-3 APIs remain in use (z.nativeEnum, .merge(), string-format .email()/.url()/.datetime(), and the invalid_type_error error param at api/src/utils/zod.ts:1087/1198 and api/src/mcp/tools/*/schemas.ts); these still function in 4.6 but are deprecated and will warn.
    • Fix: Migrate to the zod-4 equivalents (z.enum, object spread/extend, top-level z.email()/z.url(), unified error param) in a follow-up.

Reviewers (8 dispatched): correctness, kieran-typescript, api-contract, testing, adversarial, maintainability, previous-comments, learnings-researcher. Previous-comments confirmed the 2 prior PR comments are automated bot noise (greptile, vercel) with no actionable feedback. Learnings-researcher found no prior zod/dependency-bump learnings in the repo.

Coverage caveat: Synthesis was finalized before 6 of the 8 reviewers returned, so the findings above are grounded in orchestrator-level lockfile/peer-dependency and source analysis plus the two completed reviewers; they do not reflect the pending correctness/typescript/api-contract/testing/adversarial/maintainability detail passes.

Testing gaps: No test exercises the zod-4 upgrade; the existing suite was not demonstrably run against zod 4 (deps are not installed in this checkout). A green CI typecheck + test run across all four packages is the minimum gate before merge.

Verdict: Not ready to merge as-is — a major-version dependency bump landed without code migration, without updating the zod-express-middleware and @hookform/resolvers bridges, and without a verified build/test run.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

This branch had an error being deployed

1 failed and 1 active deployments
Preview – hyperdx-storybook — c2854bf7 Deployed Oct 23, 2026 by vercel[bot]
Preview – hyperdx-oss — c2854bf7 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code review/tier-1 Trivial — auto-merge candidate once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants