Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Dec 4, 2025

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Change Summary
Prisma version detection simplification
packages/schema/src/cli/actions/init.ts
Removed dynamic peer dependency version parsing; hardcoded getLatestSupportedPrismaVersion() to return '6' with a note that Prisma 7 is untested; deleted pkgJson import.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the reasoning and impact of pinning to Prisma 6 during initialization.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: installing Prisma 6 during init because version 7 is not tested.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cli-init

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (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 truth

Pinning getLatestSupportedPrismaVersion to 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 getPinnedPrismaMajorVersion to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 50bf7b2 and 5978064.

📒 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)

@ymc9 ymc9 merged commit 961603a into dev Dec 4, 2025
8 checks passed
@ymc9 ymc9 deleted the fix/cli-init branch December 4, 2025 01:12
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.

2 participants