Skip to content

fix: limit bun flag to prisma init - #7976

Merged
AmanVarshney01 merged 3 commits into
mainfrom
aman/prisma-bun-init-command-fences
Jun 24, 2026
Merged

fix: limit bun flag to prisma init#7976
AmanVarshney01 merged 3 commits into
mainfrom
aman/prisma-bun-init-command-fences

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Limit Bun package-manager conversion so --bun is only added for prisma init commands.
  • Keep other Bun-rendered Prisma commands as plain bunx prisma ....
  • Update Bun-related docs examples to use npm package-manager fences so tabs render consistently.

Validation

  • pnpm --filter docs types:check
  • pnpm exec oxfmt --check apps/site/source.config.ts apps/blog/source.config.ts apps/docs/source.config.ts apps/eclipse/source.config.ts
  • Focused conversion cases for prisma init, generate, migrate, db seed, and studio
  • Focused searches for non-init bunx --bun prisma usages

Summary by CodeRabbit

  • Bug Fixes
    • Improved command conversion so Bun-related package and Prisma examples are rewritten more consistently, including clearer handling for Prisma initialization.
  • Documentation
    • Updated several guides and references to use npm/npx-style commands instead of Bun-specific examples.
    • Clarified Bun usage notes for Prisma, including when to use the Bun runtime during initialization.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jun 24, 2026 11:59am
docs Ready Ready Preview, Comment Jun 24, 2026 11:59am
eclipse Ready Ready Preview, Comment Jun 24, 2026 11:59am
site Ready Ready Preview, Comment Jun 24, 2026 11:59am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 185a3d95-ee14-458a-ab12-b8f361053872

📥 Commits

Reviewing files that changed from the base of the PR and between 8f1aa7c and 4d88dc5.

📒 Files selected for processing (1)
  • apps/docs/content/docs/guides/deployment/bun-workspaces.mdx
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/content/docs/guides/deployment/bun-workspaces.mdx

Walkthrough

Four source.config.ts files (blog, docs, eclipse, site) gain a two-step chained regex in the Bun command conversion: a special-case rewrite for bun x prisma... initbunx --bun ..., then a generic bun x bunx fallback. Corresponding documentation guides (Bun runtime, Elysia, Bun workspaces, Prisma CLI reference) switch base command examples from bun/bunx to npm/npx, and narrow the --bun flag guidance to prisma init specifically.

Changes

Bun Command Normalization

Layer / File(s) Summary
Bun conversion regex in all source.config files
apps/blog/source.config.ts, apps/docs/source.config.ts, apps/eclipse/source.config.ts, apps/site/source.config.ts
Replaces the single non-global bun x bunx rewrite with two chained global/multiline replacements: a special-case for bun x prisma(@Version)? initbunx --bun ..., then a generic bun x bunx fallback for all remaining matches.
Guide command examples switched from bun to npm/npx
apps/docs/content/docs/guides/runtimes/bun.mdx, apps/docs/content/docs/guides/frameworks/elysia.mdx, apps/docs/content/docs/guides/deployment/bun-workspaces.mdx
All scaffolding, dependency install, Prisma init/migrate/generate/seed, and dev-server command snippets switch from bun/bunx to npm/npx. The Bun tab output is then produced by the source.config conversion logic.
Prisma CLI reference docs: --bun flag scoped to prisma init
apps/docs/content/docs/orm/reference/prisma-config-reference.mdx, apps/docs/content/docs/orm/v6/reference/prisma-config-reference.mdx, apps/docs/content/docs/orm/v6/tools/prisma-cli.mdx
Updates guidance in current and v6 reference pages to recommend bunx --bun prisma init only for prisma init, removing the broader Node.js-fallback explanation tied to the CLI shebang.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • prisma/web#7934: Modifies the same Bun command-conversion logic in apps/blog/source.config.ts to rewrite bun x to bunx --bun, directly preceding this PR's more targeted prisma init special-case regex addition.
🚥 Pre-merge checks | ✅ 5
✅ 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 clearly captures the main change: restricting the Bun flag to Prisma init commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

55 links: ✅ 18 OK | 🚫 0 errors | 🔀 5 redirects | 👻 32 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 18
🔀 Redirected 5
👻 Excluded 32
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@argos-ci

argos-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 changed Jun 24, 2026, 12:06 PM

@AmanVarshney01
AmanVarshney01 marked this pull request as ready for review June 24, 2026 11:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/guides/deployment/bun-workspaces.mdx`:
- Around line 260-262: The Next.js workspace setup example uses the npm
forwarding form with unnecessary extra args, which can break Bun flag
passthrough. Update the example in the bun-workspaces guide to use bun create
next-app@latest web --yes directly, so the command matches Bun’s expected CLI
behavior and avoids the extra -- --yes forwarding. Keep the change scoped to the
setup snippet in the bun-workspaces documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 07ff4d27-90b4-42c3-bb01-ecc4bc22575f

📥 Commits

Reviewing files that changed from the base of the PR and between 9311655 and 8f1aa7c.

📒 Files selected for processing (10)
  • apps/blog/source.config.ts
  • apps/docs/content/docs/guides/deployment/bun-workspaces.mdx
  • apps/docs/content/docs/guides/frameworks/elysia.mdx
  • apps/docs/content/docs/guides/runtimes/bun.mdx
  • apps/docs/content/docs/orm/reference/prisma-config-reference.mdx
  • apps/docs/content/docs/orm/v6/reference/prisma-config-reference.mdx
  • apps/docs/content/docs/orm/v6/tools/prisma-cli.mdx
  • apps/docs/source.config.ts
  • apps/eclipse/source.config.ts
  • apps/site/source.config.ts

Comment thread apps/docs/content/docs/guides/deployment/bun-workspaces.mdx Outdated
@AmanVarshney01
AmanVarshney01 merged commit 7ad9022 into main Jun 24, 2026
17 checks passed
@AmanVarshney01
AmanVarshney01 deleted the aman/prisma-bun-init-command-fences branch June 24, 2026 12:05
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