-
-
Couldn't load subscription status.
- Fork 126
chore: downgrade zod to v3 for dev/test env #2236
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
Conversation
📝 WalkthroughWalkthroughUpdated Zod dependency version from ^4.0.0 to ^3.25.0 in the scaffold script and in integration test setups. No changes to logic, control flow, or public APIs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Pre-merge checks (1 passed, 2 warnings)❌ Failed Checks (2 warnings)
✅ Passed Checks (1 passed)
✨ Finishing Touches
🧪 Generate unit tests
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
tests/integration/tests/cli/plugins.test.ts (1)
73-73: Zod v3 downgrade looks good; consider DRY + tighter range for reproducible CI.To avoid version drift across tests and future edits, either:
- Pin patch range, or
- Centralize the version string.
Option A — narrower range:
- 'zod@^3.25.0', + 'zod@~3.25.0',Option B — centralize (use a shared constant):
- 'zod@^3.25.0', + `zod@${TEST_ZOD_RANGE}`,Add once near the top (outside this hunk), or export from a shared helper:
// e.g. tests/integration/tests/cli/share.ts export const TEST_ZOD_RANGE = process.env.TEST_ZOD_RANGE ?? '^3.25.0';script/test-scaffold.ts (1)
23-23: Align Zod version pin in test scaffold; verify Prisma version alignment
- Replace zod@^3.25.0 with zod@~3.25.0 in script/test-scaffold.ts for deterministic installs.
- test-scaffold.ts pins prisma@6.11.x/@prisma/client@6.11.x, whereas plugins.test.ts uses 6.15.x—confirm whether this discrepancy is intentional or if both should be unified.
tests/integration/tests/cli/generate.test.ts (1)
48-49: Good switch to Zod v3; suggest using a shared constant to keep tests in sync.Refactor to pull the version from a single place:
- installPackage('prisma @prisma/client zod@^3.25.0'); + installPackage(`prisma @prisma/client zod@${TEST_ZOD_RANGE}`);And define/export once (outside this hunk), e.g. in ./share:
// tests/integration/tests/cli/share.ts export const TEST_ZOD_RANGE = process.env.TEST_ZOD_RANGE ?? '^3.25.0';This makes future major/minor flips a one-liner.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
packages/plugins/trpc/tests/projects/nuxt-trpc-v10/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/tests/projects/nuxt-trpc-v11/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/tests/projects/t3-trpc-v10/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/tests/projects/t3-trpc-v11/package.jsonis excluded by!**/*.jsonpackages/runtime/package.jsonis excluded by!**/*.jsonpackages/server/package.jsonis excluded by!**/*.jsonpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/*.yamlpnpm-workspace.yamlis excluded by!**/*.yamltests/integration/test-run/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/nextjs/test-project/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/trpc/test-project/package.jsonis excluded by!**/*.json
📒 Files selected for processing (3)
script/test-scaffold.ts(1 hunks)tests/integration/tests/cli/generate.test.ts(1 hunks)tests/integration/tests/cli/plugins.test.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/integration/tests/cli/generate.test.ts (1)
packages/testtools/src/schema.ts (1)
installPackage(68-70)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-test (20.x)
- GitHub Check: dependency-review
- GitHub Check: build-test (20.x)
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
No description provided.