Skip to content

fix(docs): use local TypeScript compiler in package manager tabs#8086

Open
futurehua wants to merge 1 commit into
prisma:mainfrom
futurehua:fix-docs-local-tsc
Open

fix(docs): use local TypeScript compiler in package manager tabs#8086
futurehua wants to merge 1 commit into
prisma:mainfrom
futurehua:fix-docs-local-tsc

Conversation

@futurehua

@futurehua futurehua commented Jul 18, 2026

Copy link
Copy Markdown

Summary

  • Prevent package-manager tabs from translating npx tsc into pnpm dlx tsc or yarn dlx tsc.
  • Use the locally installed TypeScript compiler through pnpm tsc and yarn tsc.
  • Preserve the existing npm, Bun, and unrelated dlx conversions.

Fixes #8064.

Why

The documentation installs typescript before running tsc, but npm-to-yarn currently converts npx tsc --init to:

  • pnpm dlx tsc --init
  • yarn dlx tsc --init

Both dlx commands fetch the package named tsc from the registry instead of using the binary from the locally installed typescript package. That registry package is an unrelated deprecated placeholder, so the generated quickstart commands fail.

The fix is applied at the shared command-conversion boundary so every npm code block containing npx tsc produces the correct pnpm and Yarn commands.

Validation

  • Regenerated the Fumadocs sources.
  • Verified the generated commands:
    • npm: npx tsc --init
    • pnpm: pnpm tsc --init
    • yarn: yarn tsc --init
    • Bun: bunx tsc --init
  • pnpm exec oxfmt --check apps/docs/source.config.ts
  • pnpm exec oxlint apps/docs/source.config.ts
  • pnpm --filter docs run types:check

Summary by CodeRabbit

  • Bug Fixes
    • Updated package manager command conversion so TypeScript compiler commands are correctly formatted for pnpm and Yarn documentation examples.

Signed-off-by: futurehua <futurehua@outlook.com>
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

@futurehua is attempting to deploy a commit to the Prisma Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 18, 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 27265a49-4b73-4e15-bc88-581a83c9208e

📥 Commits

Reviewing files that changed from the base of the PR and between 13984ed and 8456c3b.

📒 Files selected for processing (1)
  • apps/docs/source.config.ts

Walkthrough

convertLine now converts npx tsc commands to use pnpm or yarn when generating package-manager-specific documentation.

Changes

TypeScript command conversion

Layer / File(s) Summary
Rewrite TypeScript compiler commands
apps/docs/source.config.ts
convertLine rewrites lines beginning with npx tsc to use the selected package manager for pnpm and yarn conversions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: amanvarshney01

🚥 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 matches the main docs change: using the local TypeScript compiler in package-manager tabs.
Linked Issues check ✅ Passed The conversion now turns npx tsc into pnpm tsc and yarn tsc, matching the linked quickstart fix.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the docs command conversion logic and introduces no unrelated edits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

Quickstart docs suggest pnpm dlx tsc --init / yarn dlx tsc --init which fetch the wrong npm package

1 participant