chore: upgrade zod to 4.5.4 - #2
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. Validation messages become generic
|
| required_error: "Feed URL is required.", | ||
| invalid_type_error: "Feed URL must be text.", | ||
| }) | ||
| .string() |
There was a problem hiding this comment.
1. Validation messages become generic 🐞 Bug ≡ Correctness
Replacing the configured string schemas with bare z.string() removes the explicit required/type messages, so malformed add-feed submissions now return Zod's generic type errors instead of messages such as “Feed URL is required.” The server action passes raw FormData values into this schema and returns those issue messages directly to the user.
Agent Prompt
## Issue description
Restore the custom required/type validation messages removed during the Zod 4 migration.
## Issue Context
`addFeedAction` validates raw `FormData` and displays schema issue messages directly. Use Zod 4's unified `error` customization API (or equivalent schema logic) to preserve the previous URL and category messages.
## Fix Focus Areas
- src/lib/validation.ts[3-12]
- src/app/actions.ts[23-30]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| "rss-parser": "3.13.0", | ||
| "undici": "7.29.0", | ||
| "zod": "3.25.76" | ||
| "zod": "^4.5.4" |
There was a problem hiding this comment.
2. Pinned dependency now floats 🐞 Bug ☼ Reliability
Changing Zod to ^4.5.4 allows later 4.x releases to be selected when the lockfile is regenerated, violating the repository's explicit requirement that Zod remain pinned and making validation behavior dependent on install timing. This upgrade should change the pinned baseline to exactly 4.5.4, not introduce a version range.
Agent Prompt
## Issue description
Replace the floating Zod range with an exact version.
## Issue Context
Repository guidance identifies Zod as an intentional dependency pin. Keep the upgraded baseline deterministic by using `4.5.4` in both package manifests/lock metadata.
## Fix Focus Areas
- package.json[30-30]
- package-lock.json[20-20]
ⓘ 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: