fix(cli): install Prisma 6 during init since 7 is not tested#2316
Conversation
📝 WalkthroughWalkthroughThe CLI initialization logic for Prisma version detection was simplified by hardcoding the supported version to '6' instead of dynamically reading peer dependency specifications from package.json. The previous version parsing logic was removed, with a comment noting that Prisma 7 is not tested. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/schema/src/cli/actions/init.ts (1)
80-83: Hardcoded Prisma major version is fine for now; consider future‑proofing the helper name/source of truthPinning
getLatestSupportedPrismaVersionto return'6'with a comment matches the PR goal and makes the behavior explicit. The only concern is future drift: once Prisma 7+ is tested or peerDependencies are updated, this helper may be easy to forget.Two low‑effort options to reduce that risk:
- Rename to something like
getPinnedPrismaMajorVersionto better reflect that it’s deliberately static, or- Derive this value from a single shared constant (e.g., in a config/module used both by peerDependencies generation and CLI) so version bumps happen in one place.
Not blocking, but worth considering before Prisma 7 support lands.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/schema/src/cli/actions/init.ts(1 hunks)
⏰ 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). (4)
- GitHub Check: build-test (20.x)
- GitHub Check: dependency-review
- GitHub Check: build-test (20.x)
- GitHub Check: build-test (20.x)
No description provided.