chore(deps): bump zod from 3.25.76 to 4.4.3 in /ui - #61
Conversation
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
📝 WalkthroughWalkthroughThe UI package zod dependency is bumped from v3 to v4. This is a major version upgrade that may introduce breaking changes requiring code updates in validation logic throughout the UI codebase. ChangesZod Dependency Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/package.json`:
- Line 74: The project upgraded zod to v4.4.3 but still depends on
`@hookform/resolvers`@^3.10.0 which is incompatible; update the dependency
"`@hookform/resolvers`" in package.json to "^5.0.0" (or later), run npm/yarn
install to refresh lockfile, and re-test any usage of zodResolver in your form
components to ensure runtime compatibility.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7d63f05e-9e46-4a6e-9d23-37bcdfd8a37f
⛔ Files ignored due to path filters (1)
ui/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
ui/package.json
| "vaul": "^1.1.2", | ||
| "xlsx": "^0.18.5", | ||
| "zod": "^3.25.76", | ||
| "zod": "^4.4.3", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find z.record() usage - now requires both key and value schemas
rg -nP --type=ts --type=tsx -C3 'z\.record\s*\(' ui/
# Find z.function() usage - API completely redesigned
rg -nP --type=ts --type=tsx -C3 'z\.function\s*\(' ui/
# Find .default() usage - behavior changed
rg -nP --type=ts --type=tsx -C3 '\.default\s*\(' ui/
# Find z.number() and .int() usage - validation tightened
rg -nP --type=ts --type=tsx -C3 'z\.number\s*\(' ui/
# Find z.uuid() usage - now strict RFC validation
rg -nP --type=ts --type=tsx -C3 'z\.uuid\s*\(' ui/
# Find custom error handling - unified error parameter in v4
rg -nP --type=ts --type=tsx -C3 'errorMap|ZodError' ui/Repository: saidaz24-meet/peptide_prediction
Length of output: 244
🌐 Web query:
Is @hookform/resolvers version 3.10.0 compatible with Zod v4?
💡 Result:
No, @hookform/resolvers version 3.10.0 is not compatible with Zod v4 [1]. @hookform/resolvers version 3.10.0 was released in January 2025 [2], prior to the widespread adoption and full support of Zod v4 in the React Hook Form ecosystem. Zod v4 introduced significant changes to its type system and internal architecture, which caused compatibility issues with older versions of the zodResolver [3]. To use Zod v4 with React Hook Form, you must upgrade to @hookform/resolvers version 5.0.0 or later, which includes official support for Zod v4 [1]. If you are unable to upgrade the resolver package, a common workaround is to use the standardSchemaResolver from @hookform/resolvers, as Zod v4 schemas are compatible with the Standard Schema specification [1].
Citations:
- 1: Zod 4 support react-hook-form/resolvers#768
- 2: https://www.npmjs.com/package/@hookform/resolvers?activeTab=versions
- 3: Zod v4 no longer working with hookform/resolvers? colinhacks/zod#4992
🏁 Script executed:
# Check `@hookform/resolvers` version in package.json
cat ui/package.json | grep -A2 -B2 "`@hookform/resolvers`"Repository: saidaz24-meet/peptide_prediction
Length of output: 230
🏁 Script executed:
# Search for Zod usage patterns in ui directory (corrected - no unrecognized type)
# Use generic search to find actual usage
rg 'z\.(record|function|number|uuid|default)\s*\(' ui/ -A2 -B1 || echo "No matches found"
# Also check for ZodError or errorMap usage
rg '(ZodError|errorMap)' ui/ -A2 -B1 || echo "No matches found"Repository: saidaz24-meet/peptide_prediction
Length of output: 110
🏁 Script executed:
# Search for zod imports in ui directory
rg "from ['\"]zod['\"]|import.*zod|require.*zod" ui/ || echo "No zod imports found"
# Check if zod is used anywhere in ui
rg "zod" ui/ -i | head -20 || echo "No zod references found"
# Check if there's a monorepo structure with other packages
find . -maxdepth 2 -name "package.json" -type f | head -10Repository: saidaz24-meet/peptide_prediction
Length of output: 473
🏁 Script executed:
# Check if `@hookform/resolvers` is actually used in ui code
rg "from ['\"]`@hookform/resolvers`|import.*`@hookform/resolvers`|require.*`@hookform/resolvers`" ui/ -A2 || echo "No `@hookform/resolvers` imports found"
# Also search for zodResolver specifically (common usage pattern)
rg "zodResolver" ui/ -A2 || echo "No zodResolver usage found"
# Check for any react-hook-form usage
rg "useForm|FormProvider|Controller" ui/ | head -10 || echo "No react-hook-form usage found"Repository: saidaz24-meet/peptide_prediction
Length of output: 1110
Zod v4 requires @hookform/resolvers upgrade to v5.0.0+.
The upgrade to Zod v4.4.3 introduces a version mismatch with the installed @hookform/resolvers@^3.10.0. Version 3.10.0 is incompatible with Zod v4 and will fail at runtime if zodResolver is used. Upgrade to @hookform/resolvers@^5.0.0 or later, which includes official Zod v4 support.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ui/package.json` at line 74, The project upgraded zod to v4.4.3 but still
depends on `@hookform/resolvers`@^3.10.0 which is incompatible; update the
dependency "`@hookform/resolvers`" in package.json to "^5.0.0" (or later), run
npm/yarn install to refresh lockfile, and re-test any usage of zodResolver in
your form components to ensure runtime compatibility.
|
Coupled with #63 (@hookform/resolvers 5 requires zod 4). Holding open as the migration tracker — will land as one chunk in Wave 3 (zod-v4-migration). v4 changed error format (.issues shape), .refine signature, removed .deepPartial() — green CI doesn't prove runtime schema-error UX is unchanged. Do not merge solo. |
Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.4.3. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v3.25.76...v4.4.3) --- updated-dependencies: - dependency-name: zod dependency-version: 4.4.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
ee9d4c6 to
6c3c7f0
Compare
|
Deferred to Alex's Week-3 triage per docs/active/OPERATOR_COOKBOOK.md § 'Merge a Dependabot PR safely'. Reason: this is a MAJOR version bump (or has failing CI) and needs human eyes on breaking changes before merge. Do not auto-merge. |
Bumps zod from 3.25.76 to 4.4.3.
Release notes
Sourced from zod's releases.
... (truncated)
Commits
1fb56a5docs: document release procedure in AGENTS.mdf3c9ec04.4.3c2be4f8fix(v4): generalize optin/fallback to transform; restore preprocess on absent...1cab693fix(v4): restore catch handling for absent object keys (#5937) (#5939)b8dffe9docs: remove Numeric and Speakeasy (2+ missed monthly cycles)9195250docs: remove Mintlify from bronze sponsors (churned)2c70332docs: normalize bronze sponsor logos to github avatar pattern7391be8docs: prune lapsed silver/bronze sponsors and add active ones2aeec83docs: prune lapsed gold sponsors and rebalance logo sizing4c2fa95docs: use Zernio primary wordmark for gold sponsor logoMaintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for zod since your current version.