Skip to content

Feat/zod v4#24

Merged
coji merged 4 commits intomainfrom
feat/zod_v4
Sep 13, 2025
Merged

Feat/zod v4#24
coji merged 4 commits intomainfrom
feat/zod_v4

Conversation

@coji
Copy link
Owner

@coji coji commented Jul 31, 2025

This pull request primarily updates the project to use zod version 4, along with related dependency and schema changes. It also includes minor configuration updates and cleanup of unused dependencies in the pnpm-lock.yaml file.

Dependency Updates:

  • Updated zod to version 4 in package.json and adjusted its references in pnpm-lock.yaml. This includes updating the @conform-to/zod dependency to be compatible with zod@4.0.14. [1] [2] [3] [4]

Schema Adjustments for zod v4:

  • Updated zod schema definitions in app/routes/$handle+/posts.$id.edit/route.tsx and app/routes/welcome+/create_account/route.tsx to replace required_error with error, aligning with zod v4 syntax. [1] [2]

Codebase Cleanup:

  • Removed unused dependencies and packages from pnpm-lock.yaml, such as zodix, @remix-run/server-runtime, and others. This reduces bloat and ensures compatibility with the updated zod version. [1] [2] [3] [4]

Configuration Updates:

  • Enabled unstable_optimizeDeps in react-router.config.ts to improve dependency optimization.

Minor Changes:

  • Removed trailing whitespace in biome.json.

Summary by CodeRabbit

  • Chores

    • Upgraded validation-related dependencies and removed an unused package.
    • Reformatted a project configuration file for consistent indentation.
    • Enabled an experimental optimization flag in router configuration.
  • Style

    • Standardized validation error message keys for form fields to ensure consistent user-facing errors.

@coderabbitai
Copy link

coderabbitai bot commented Jul 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change updates imports to @conform-to/zod/v4, replaces Zod schema required_error keys with error in two routes, upgrades/removes dependencies in package.json (including Zod v4 and @conform-to packages), reformats biome.json, and adds unstable_optimizeDeps: true to the router config.

Changes

Cohort / File(s) Change Summary
Zod imports & schemas
app/routes/$handle+/posts.$id.edit/route.tsx, app/routes/welcome+/create_account/route.tsx
Updated parseWithZod import paths to @conform-to/zod/v4 and changed Zod string validation error keys from required_error to error.
Dependency updates
package.json
Upgraded @conform-to/react^1.9.1, @conform-to/zod^1.9.1, upgraded zod^4.1.8, and removed zodix.
Formatting-only
biome.json
Reformatted JSON to consistent two-space indentation; no semantic/content changes.
Router config
react-router.config.ts
Added unstable_optimizeDeps: true inside the exported future configuration object.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit hopped through code today,
Swapped imports, nudged some errors away.
JSON neat, packages set anew,
A tiny flag to tune the queue.
Hooray — the build hops light and true! 🐇✨

Pre-merge checks and finishing touches and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Feat/zod v4" is concise, directly related to the main change (upgrading to Zod v4 and associated schema/dependency updates), and clearly communicates the primary intent of the PR to reviewers scanning history. It avoids unnecessary detail and matches the changes described in the provided summaries and objectives.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/zod_v4

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28241a0 and 4b4ce3f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json (2 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jul 31, 2025

Visit the preview URL for this PR (updated for commit 4b4ce3f):

https://remix-spa-example--pr24-feat-zod-v4-t8xouevr.web.app

(expires Sat, 20 Sep 2025 13:26:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 48e666b485811f0b1bcd4fa4838b32a205a3ce05

@coji coji merged commit bf94b3e into main Sep 13, 2025
2 checks passed
@coji coji deleted the feat/zod_v4 branch September 13, 2025 13:26
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.

1 participant