Skip to content

fix(frontend): upgrade zod to 4.6.7, clearing the last npm audit finding (#132) - #135

Merged
amar-python merged 1 commit into
mainfrom
fix/132-zod-4
Oct 28, 2026
Merged

amar-python merged 1 commit into
mainfrom
fix/132-zod-4

Conversation

@amar-python

Copy link
Copy Markdown
Owner

Refs #132. This clears the last npm audit finding: zod below 4.6.6 can exhaust memory while validating oversized constrained collections (high).

Changes

  • zod goes from ^3.24.2 to ^4.6.7. TanStack Start and @hookform/resolvers now share that one copy, so the lock file no longer carries a separate zod 3.
  • csv.functions.ts: zod 4 needs a key schema for z.record. The table rows schema becomes z.record(z.string(), previewRowValueSchema). This is the only z.record in the code; the other schemas need no change.
  • New test table-rows-contract.test.ts. That schema had no test before. The new test fails when the cell schema is loosened to z.any(): I checked, and it reported 1 failed, 1 passed.

Verification (npm 10.9.9, Node 22.23.4)

Check Result
npm ci from scratch 503 packages added, 0 vulnerabilities
npm audit 0 vulnerabilities
vitest 13 files, 141 tests passed. That's 139 before, plus the 2 new tests
tsc --noEmit 0 errors
eslint on the changed files 0 problems
Production build (NITRO_PRESET=node-server) Built
Chromium on the production server / redirects to /auth, which renders 3 inputs. Its console errors are the existing hydration errors in #133

#132 stays open until this is merged and npm audit on main is clean.


Generated by Claude Code

…ng (#132)

zod below 4.6.6 can exhaust memory while validating oversized
constrained collections. zod 4 needs a key schema for z.record,
so the table rows schema now passes z.string(). A new contract
test covers that schema; it fails if the cell schema is loosened.

npm audit: 0 vulnerabilities. vitest 141 passed. tsc 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YPoXzBSj89ZHgw7nfTmbB
@amar-python
amar-python merged commit f679f8d into main Oct 28, 2026
3 checks passed
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