-
Notifications
You must be signed in to change notification settings - Fork 152
refactor(rivetkit): migrate granularly to zod v4 #4121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(rivetkit): migrate granularly to zod v4 #4121
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: Migrate to zod v4SummaryThis PR updates zod imports from Code Quality ✅Positive aspects:
Issues Found 🔴1. Incomplete Migration - CriticalThe following files still use
Impact: This creates inconsistency in the codebase and may cause issues depending on how zod v4 handles backward compatibility. Recommendation: Update these files to use 2. Package Version Mismatch - MediumThe Impact: This creates a version conflict in the workspace, potentially leading to multiple zod versions being installed or resolution issues. Recommendation: Update 3. Unexplained Dependency DowngradesThe PR description mentions downgrading:
Issue: No explanation is provided for why these downgrades were necessary as part of the zod migration. Recommendation: Either:
Performance Considerations
|
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/traces
@rivetkit/workflow-engine
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
Graphite Automations"Test" took an action on this PR • (02/05/26)1 assignee was added to this PR based on Kacper Wojciechowski's automation. |
55c8a8a to
73b4513
Compare
1a82d71 to
440850e
Compare
| @@ -1,5 +1,5 @@ | |||
| import type { Client } from "rivetkit"; | |||
| import { z } from "zod"; | |||
| import { z } from "zod/v4"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import change from 'zod' to 'zod/v4' is causing TypeScript module resolution errors. TypeScript cannot find the module 'zod/v4'. Instead of changing the import path, update the Zod dependency version in package.json and keep importing from 'zod' directly.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
440850e to
96a52dc
Compare
73b4513 to
464d190
Compare
Merge activity
|
# Description Updated all imports of `zod` to use the more specific `zod/v4` path across the RivetKit TypeScript codebase. This change ensures consistent versioning of the Zod library throughout the project. Also downgraded the CodeMirror commands package from version 6.9.0 to 6.8.1 and TypeScript from 5.9.3 to 5.9.2 in the dependencies. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? The existing test suite has been run to verify that the import path changes don't affect functionality. ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes

Description
Updated all imports of
zodto use the more specificzod/v4path across the RivetKit TypeScript codebase. This change ensures consistent versioning of the Zod library throughout the project.Also downgraded the CodeMirror commands package from version 6.9.0 to 6.8.1 and TypeScript from 5.9.3 to 5.9.2 in the dependencies.
Type of change
How Has This Been Tested?
The existing test suite has been run to verify that the import path changes don't affect functionality.
Checklist: