Skip to content

chore(deps): zod 3→4 major#65

Merged
terraboops merged 4 commits into
mainfrom
deps/zod-4
Jul 6, 2026
Merged

chore(deps): zod 3→4 major#65
terraboops merged 4 commits into
mainfrom
deps/zod-4

Conversation

@terraboops

Copy link
Copy Markdown
Owner

Bumps zod from 3.x to ^4.4.3 in all three packages that declare it: @autonav/core, @autonav/communication-layer, @autonav/pack-server.

Changes

  • zod ^4.4.3 in the 3 package.json files.
  • Coupled: added a scoped root overrides forcing @anthropic-ai/claude-agent-sdk onto zod ^4.4.3 (it declares zod: ^4.0.0 but npm had left it on the invalid hoisted 3.25.76). This unifies on a single hoisted zod 4.4.3 and resolves a dual-instance type clash in the SDK's tool() typing. mintlify's nested zod 3 (via nono-ts) is left untouched.
  • zod 4 API migrations:
    • z.record(z.unknown())z.record(z.string(), z.unknown()) (record now requires key + value schema).
    • result.error.errorsresult.error.issues (ZodError shape).
    • .refine(check, (val) => ({ message })).refine(check, { error: (iss) => ... }) (function-message form removed).
    • Schema introspection in config-describe.ts rewritten for zod 4 internals: _def.typeName_zod.def.type (lowercase discriminators), enum valuesentries, array typeelement, default defaultValue now a value not a factory, descriptions via .description getter.

Test

Commands run from repo root:

  • npm run typecheck (runs npm run build + per-workspace tsc --noEmit) → pass
  • npm test157 pass / 0 fail (autonav 112 pass, communication-layer 45 pass; 22 skipped). pack-server has no test script.

Note: one smoke test (init.smoke.test.ts) can flake under parallel execution due to a shared ~/.claude/skills symlink collision — pre-existing and unrelated to zod; passes in isolation and on rerun.

# Conflicts:
#	package-lock.json
#	packages/autonav/package.json
#	packages/knowledge-pack-server/package.json
@terraboops
terraboops merged commit 04e5dda into main Jul 6, 2026
5 checks passed
@terraboops
terraboops deleted the deps/zod-4 branch July 6, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant