Skip to content

deps: zod 3 → 4, typescript 5 → 6#39

Merged
heznpc merged 1 commit into
mainfrom
deps/zod-4-typescript-6
May 20, 2026
Merged

deps: zod 3 → 4, typescript 5 → 6#39
heznpc merged 1 commit into
mainfrom
deps/zod-4-typescript-6

Conversation

@heznpc

@heznpc heznpc commented May 20, 2026

Copy link
Copy Markdown
Member

Summary

P1 #5 + #6 from the 2026-05-21 modernization audit. Major-version drift on the two largest deps.

Dep Before After Notes
zod ^3.24.0 ^4.4.3 Our usage is minimal (z.enum, z.string().regex(), z.optional(), .describe()) and unaffected by v4 breaking changes (discriminated unions, ZodError API, effect chains). MCP SDK 1.29.0 supports zod v4 via Standard Schema.
typescript ^5.7.0 ^6.0.3 TS 6 tightened global types — added "types": ["node"] to tsconfig.compilerOptions so node:* imports + process + NodeJS namespace resolve. No source changes needed.
tsconfig.json implicit @types/node "types": ["node"] Explicit declaration required by TS 6.

Test plan

  • npm run build — clean
  • npm test — 85/85 pass
  • npm audit --audit-level=moderate — exit 0 (only 5 lows in @anthropic-ai/mcpb transitives remain)
  • CI green on Node 22 + 24

Risk assessment

  • Low — zod usage surface is 5 lines in src/index.ts; all map 1:1 to v4 API.
  • Low — TS 6 type tightening caught at build time, fixed in tsconfig.

P1 from the 2026-05-21 modernization audit.

- zod: ^3.24.0 → ^4.4.3. Our usage is minimal (z.enum, z.string().regex(),
  z.optional(), z.describe()) and unaffected by v4 breaking changes
  (discriminated unions, ZodError API, effect chains). MCP SDK 1.29.0
  supports zod v4 via Standard Schema.
- typescript: ^5.7.0 → ^6.0.3. TS 6 tightened global types — added
  "types": ["node"] to tsconfig.compilerOptions so node:* imports and
  process / NodeJS namespace resolve. No source changes needed.
- description: npm rewrote \u2014 → literal em-dash on touch (cosmetic).

All 85 tests still pass. Build clean on Node 22 + 24 (verified via PR-3
matrix locally).
@heznpc
heznpc merged commit 9aff7b3 into main May 20, 2026
4 checks passed
@heznpc
heznpc deleted the deps/zod-4-typescript-6 branch May 20, 2026 23: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