Skip to content

Conversation

@joojscript
Copy link

@joojscript joojscript commented Nov 23, 2025

Update Prisma Dependencies to make Prisma Runtime a peerDependency, enabling compatibility with all versions (provided by consuming package)

Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.

Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, etc.

If the UI is being changed, please provide screenshots.

When using Prisma 7+, as the @prisma/client runtime dependency is flagged as a dependency and not a peerDependency on package.json, it overwrites the current version, and breaks everything.

The fix is as easy as transferring all the runtime dependencies to peerDependencies.

❯ prisma generate
Loaded Prisma config from prisma.config.ts.

Prisma schema loaded from prisma/schema.prisma
Error: 
✔ Generated Prisma Client (7.0.0) to ./src/generated/prisma in 12ms

Prisma schema validation - (get-dmmf wasm)
Error code: P1012
error: Argument "url" is missing in data source block "db".
  -->  schema.prisma:11
   | 
10 | 
11 | datasource db {
12 |   provider = "postgresql"
13 | }
   | 

Validation Error Count: 1
[Context: getDmmf]

Prisma CLI Version : 6.19.0


error: "prisma" exited with code 1

References

Include any links supporting this change such as a:

  • GitHub Issue/PR number addressed or fixed
  • StackOverflow post
  • Related pull requests/issues from other repos

If there are no references, simply delete this section.

Closes #32

Summary by CodeRabbit

  • Chores
    • Updated Prisma packages to version 7.
    • Adjusted dependency management configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

Update Prisma Dependencies to make Prisma Runtime a peerDependency, enabling compatibility with all versions (provided by consuming package)
@coderabbitai
Copy link

coderabbitai bot commented Nov 23, 2025

Walkthrough

Elementary, the case unfolds with surgical precision. The package configuration has been restructured, promoting Prisma dependencies from the common dependencies to peerDependencies, whilst simultaneously bumping the internal Prisma toolchain to version ^7. The culprit—dependency version conflicts—is thus neutralized with one decisive maneuver.

Changes

Cohort / File(s) Summary
Prisma Peer Dependencies Configuration
package.json
Migrated @prisma/client and prisma to peerDependencies to resolve version conflicts between Prisma 7+ and CLI 6.19; removed prisma from devDependencies
Internal Prisma Toolchain Update
package.json
Updated @prisma/generator-helper and @prisma/internals to version ^7, relocated from previous configuration to align with new dependency structure

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

The modification is confined to a single file with straightforward dependency reorganization following a consistent pattern. No logic changes or multi-file impact.

Poem

🔍 A puzzle of versions, now clearly resolved,

Prisma's true nature in peerDeps evolved,

Toolchain ascended to seventh's new height,

Dependencies realigned—the fix shines bright! ✨

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update Prisma Dependencies' directly and accurately reflects the main change: updating Prisma-related package.json dependencies.
Linked Issues check ✅ Passed The changes fully address the linked issue #32 by moving @prisma/client and prisma from dependencies to peerDependencies, preventing runtime version conflicts.
Out of Scope Changes check ✅ Passed All modifications are strictly scoped to package.json dependency reorganization addressing the Prisma version compatibility issue; no extraneous changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 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 012aa54 and 9b8c879.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Applies to src/prisma-generator.ts : Maintain orchestration of the generation process in src/prisma-generator.ts

Applied to files:

  • package.json
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Applies to src/generate-class.ts : Implement model class creation with class-validator decorators in src/generate-class.ts

Applied to files:

  • package.json
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Applies to tests/schemas/**/*.prisma : Place local test Prisma schemas under tests/schemas/ for generator testing

Applied to files:

  • package.json
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Applies to prisma/schema.prisma : Configure the generator via prisma/schema.prisma (provider, output, swagger, separateRelationFields)

Applied to files:

  • package.json
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Applies to src/index.ts : Keep the Prisma generator handler setup in src/index.ts (entry point)

Applied to files:

  • package.json
📚 Learning: 2025-09-17T01:40:46.965Z
Learnt from: CR
Repo: omar-dulaimi/prisma-class-validator-generator PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-09-17T01:40:46.965Z
Learning: Use Node.js >= 18.18 (or 20.9/22.11+) and TypeScript >= 5.1.0 (project uses 5.8.3)

Applied to files:

  • package.json

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

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.

Prisma 7+ is incompatible with Prisma CLI 6.19

1 participant