docs(docs): added bun workspace guide#7469
Conversation
Linear: DR-6971
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
WalkthroughAdds a new Bun workspaces guide for using Prisma, registers the guide in the site sidebar, and removes a template link from the Vercel + Postgres integration doc. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 250-postgres/350-integrations/200-vercel.mdx
|
Deploying docs with
|
| Latest commit: |
12dc30c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a59eafa0.docs-51g.pages.dev |
| Branch Preview URL: | https://docs-docs--bun-workspace-gui.docs-51g.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@content/800-guides/460-bun-workspaces.mdx`:
- Around line 100-108: The Prisma schema's datasource block (datasource db) is
missing the required url field; update the datasource db block in
prisma/schema.prisma to include a url that references the environment variable
(use env("DATABASE_URL")) so Prisma schema validation and CLI commands succeed.
🧹 Nitpick comments (1)
content/800-guides/460-bun-workspaces.mdx (1)
155-176: Align connection string examples with docs convention.Use the template-literal pattern for env-based connection strings in adapter examples for consistency.
Based on learnings, "In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern `const connectionString = `${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.)."♻️ Suggested update (apply in both client.ts and seed.ts snippets)
-import { PrismaPg } from "@prisma/adapter-pg"; - -const adapter = new PrismaPg({ - connectionString: process.env.DATABASE_URL, -}); +import { PrismaPg } from "@prisma/adapter-pg"; + +const connectionString = `${process.env.DATABASE_URL}`; +const adapter = new PrismaPg({ + connectionString, +});Also applies to: 190-200
|
Images automagically compressed by Calibre's image-actions ✨ Compression reduced images by 84.5%, saving 340.4 KB.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@content/800-guides/460-bun-workspaces.mdx`:
- Around line 94-97: Update the description for prisma.config.ts to reflect
Prisma v7's generated template: state that the file imports "dotenv/config" and
uses env("DATABASE_URL") from the prisma/config module (not process.env),
replacing the prior claim that it "uses process.env and expects dotenv";
reference prisma.config.ts, the env("DATABASE_URL") call, and the
"dotenv/config" import so the text matches the actual output of prisma init
--db.
🧹 Nitpick comments (1)
content/800-guides/460-bun-workspaces.mdx (1)
160-162: Use the standard connectionString template-literal pattern in adapter examples.
Keeps consistency across docs and avoids mixing styles in adjacent snippets.Proposed edit (client.ts and seed.ts)
-const adapter = new PrismaPg({ - connectionString: process.env.DATABASE_URL, -}); +const connectionString = `${process.env.DATABASE_URL}`; +const adapter = new PrismaPg({ + connectionString, +}); @@ -const adapter = new PrismaPg({ - connectionString: process.env.DATABASE_URL!, -}); +const connectionString = `${process.env.DATABASE_URL}`; +const adapter = new PrismaPg({ + connectionString, +});Based on learnings: In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern
const connectionString =${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.).Also applies to: 196-198
Linear: DR-6971
Summary by CodeRabbit