-
Notifications
You must be signed in to change notification settings - Fork 856
update import docs for prisma-client generator #7116
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
WalkthroughUpdates Prisma generator documentation: provider switched to prisma-client, output path adjusted, engineType option added. Example imports updated to extensionless paths. New browser-specific module and files documented, including browser.ts and prismaNamespaceBrowser.ts. Enums now include User. Clarifies browser exports exclude PrismaClient. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests
Comment |
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
Deploying docs with
|
| Latest commit: |
6d7483d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d26d44ef.docs-51g.pages.dev |
| Branch Preview URL: | https://docs-browser-imports.docs-51g.pages.dev |
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)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (3)
11-12: Align output path with later examples for consistencyLater sections use ../src/generated/prisma; mirror that here.
generator client { - provider = "prisma-client" - output = "../generated/prisma" + provider = "prisma-client" + output = "../src/generated/prisma" }
195-204: Clarify the browser module’s export surfaceExplicitly state that the browser entry only exposes types and not any runtime (no PrismaClient, no query engine).
Note that `./generated/prisma/browser` does not expose a `PrismaClient`. +It only exports types intended for frontend usage (no runtime code or query engine).
216-216: Add engineType to the options tableYou show engineType in the code sample, but it’s missing from the table. Add an entry and confirm the default/behavior.
| `importFileExtension` | Inferred from environment | File extension used in **import statements**. Can be `ts`, `mts`, `cts`, `js`, `mjs`, `cjs`, or empty (for bare imports). | +| `engineType` | | Controls engine runtime. Set to `"client"` to generate a client that does not rely on the Rust query engine (see note above). |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx(5 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). (3)
- GitHub Check: runner / linkspector
- GitHub Check: Check internal links
- GitHub Check: Lost Pixel
🔇 Additional comments (4)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (4)
171-173: Extensionless import path looks correctMatches the configured ../src/generated/prisma output and keeps imports consistent.
184-185: Models import path update looks goodConsistent with the new split output structure.
192-193: Verify “User” is actually an enum in this exampleUsing User here suggests it’s an enum, which is uncommon and likely confusing. Prefer a clearly-enum example or drop User.
-import { Role, User } from "./generated/prisma/enums"; +import { Role } from "./generated/prisma/enums";
261-269: File tree updates LGTMAdding browser.ts and prismaNamespaceBrowser.ts accurately reflects the new browser entry.
Summary by CodeRabbit
New Features
Documentation