-
Notifications
You must be signed in to change notification settings - Fork 877
DR-7287- docs: Create and use new guide about How to use Prisma with Deno #7480
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughA new Deno integration guide is introduced to the documentation, providing step-by-step instructions for using Prisma ORM with Deno, covering initialization, configuration, schema setup, migrations, seeding, and server creation. The guide is registered in the navigation sidebar. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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: 1
🤖 Fix all issues with AI agents
In `@content/800-guides/375-deno.mdx`:
- Around line 93-97: The info block ends with the quoted phrase "My Deno
Project" but lacks terminal punctuation; update the info block by adding a
period at the end of the sentence (i.e., change the ending to "My Deno
Project".) Locate the info block containing the quoted string and append the
missing period so the sentence is properly terminated.
🧹 Nitpick comments (4)
content/800-guides/375-deno.mdx (4)
78-81: Redundantdeno installinvocation.The first
deno install(line 79) is superseded bydeno install --allow-scripts(line 80), which does the same thing plus allows lifecycle scripts (needed for Prisma'spostinstall). Running both is unnecessary — the second command alone is sufficient.Suggested fix
-```terminal -deno install -deno install --allow-scripts -``` +```terminal +deno install --allow-scripts +```
299-327: Consider combiningfindManyandcountinto a single query or noting the extra round-trip.The handler makes two sequential database calls (
findMany+count) whenusers.lengthwould give the same result for an unpaginated query. For a tutorial this is fine functionally, but it may teach a pattern that's wasteful in practice. A brief inline comment noting this would help readers understand the trade-off.
208-219: DuplicatedPrismaClient+ adapter setup inseed.tsvsdb.ts.The seed script (lines 226–235) recreates the exact same
PrismaClient+PrismaPgadapter wiring thatdb.ts(lines 208–219) already exports. While seed scripts sometimes need standalone setup, here both files live in the same project and share the same env var. Importing fromdb.tswould reduce duplication and keep the connection config in one place.That said, if the intent is for the seed script to be fully self-contained (common in many Prisma guides), this is a reasonable trade-off — just worth being intentional about.
Also applies to: 225-235
129-148: Clarify why a direct connection is needed instead of the default Prisma Postgres URL.Section 2.3 instructs users to replace the
DATABASE_URLwith a direct connection string but doesn't explain why this is necessary for Deno specifically (vs. the default connection URL thatprisma init --dbprovides). A one-liner explaining that the Deno runtime with@prisma/adapter-pgrequires a direct PostgreSQL TCP connection string would help readers understand the reasoning rather than just following steps.
Summary by CodeRabbit