Skip to content

fix(events): use zod 4 two-argument z.record so the build type-checks - #26

Merged
mattdecrevel merged 1 commit into
mainfrom
fix/zod4-record
Nov 22, 2026
Merged

mattdecrevel merged 1 commit into
mainfrom
fix/zod4-record

Conversation

@mattdecrevel

Copy link
Copy Markdown
Owner

What broke

#20 (the npm-security group) moved loop to zod 4. Zod 4 removed the single-argument z.record(value), so lib/events/schemas.ts fails type checking and every production build since #20 has errored on Vercel (dpl_Daq3hnJPAGAGCcS1zXwP4Vrkhr3F). The live site is still on the last good deploy.

It got through because CI only runs tests, and Vercel skips dependabot/** branches, so nothing type-checked the PR.

Change

  • z.record(z.unknown()) → z.record(z.string(), z.unknown()). Same runtime result (checked: both shapes parse identically under zod 4.6.7).
  • test-service.yml gains a tsc --noEmit step, so a type error fails CI instead of only a deploy.

Verified locally

  • tsc --noEmit: clean (was 1 error on main)
  • pnpm lint: clean
  • pnpm test: 147/147
  • pnpm build (with VERCEL_ENV=preview): succeeds

Generated by Claude Code

Zod 4 dropped the single-argument z.record(value). The npm-security bump
(#20) moved loop to zod 4, and every production build since has failed at
next build's type check. The parse result is unchanged: the old call
already accepted string keys at runtime.

CI now runs tsc, because CI only ran tests and Vercel skips Dependabot
branches, so nothing checked types before merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uau5YjL2L7Vm7xh3B7jzUX
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
loop Ready Ready Preview Nov 22, 2026 4:41pm UTC

Request Review

@mattdecrevel
mattdecrevel marked this pull request as ready for review November 22, 2026 17:17
@mattdecrevel
mattdecrevel merged commit 5087d29 into main Nov 22, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1a45ef9b Deployed Nov 22, 2026 by vercel[bot]
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.

2 participants