chore: upgrade zod to 4.5.4 - #3
JAIVIGNESH2002 wants to merge 3 commits into
Conversation
PR Summary by QodoUpgrade Zod to 4.5.4 and migrate validation APIs
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Non-string URL mislabeled missing
|
| .string({ | ||
| required_error: "Feed URL is required.", | ||
| invalid_type_error: "Feed URL must be text.", | ||
| message: "Feed URL is required.", |
There was a problem hiding this comment.
1. Non-string url mislabeled missing 🐞 Bug ≡ Correctness
Replacing both URL error options with one message makes every string type failure say “Feed URL is required,” including a submitted File or other non-string value that should say “Feed URL must be text.” This regresses the schema’s prior distinction and returns the wrong validation feedback from addFeedAction.
Agent Prompt
## Issue description
Preserve the separate required and invalid-type messages when migrating the URL schema to Zod 4.
## Issue Context
Zod 4 replaces `required_error` and `invalid_type_error` with an `error` callback that can inspect whether `issue.input` is `undefined`. A single `message` applies the required message to all invalid input types.
## Fix Focus Areas
- src/lib/validation.ts[4-8]
- test/validation.test.ts[16-23]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
UpgradePilot verified zod from 3.25.76 to 4.5.4.
Verification evidence: