You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix stale Bun references and add systemic doc drift checks (#1024)
## Summary
Fix the Bun→Node migration documentation drift with systemic
improvements that prevent this class of error from recurring.
**Supersedes #1022** — that PR found real issues but missed several
stale references and lacked systemic prevention.
## Changes
### 1. Fix `generate-docs-sections.ts` root cause
- Replace `extractBunVersion()` with `extractPnpmVersion()` derived from
`packageManager` field
- **Make both version extractors throw on mismatch** instead of silently
falling back — this is the core systemic fix that prevents the generator
from ever silently producing wrong output again
- Update all prerequisite generators to reference Node.js + pnpm
- Remove "or Bun" from library-usage prerequisite
### 2. Expand generated marker coverage
Convert hand-written toolchain-dependent prose into generated sections
so it can't drift:
- `DEVELOPMENT.md` prerequisites → `GENERATED:START/END dev-prereq`
markers
- `DEVELOPMENT.md` build section → `GENERATED:START/END build-toolchain`
markers
- `contributing.md` build section → `GENERATED:START/END build-commands`
markers
Also fix remaining stale refs in: `library-usage.md`,
`plugins/README.md`, `check-no-deps.ts`
### 3. Add generic `check:stale-refs` toolchain consistency check
New `script/check-stale-references.ts` that **derives stale patterns
from `package.json`** — not hardcoded to Bun:
- Reads `packageManager` field to determine the current PM (`pnpm`)
- Flags all other PMs' dev commands (`bun run`, `yarn remove`, etc.) in
dev-facing docs
- **If the project ever migrates from pnpm to something else**, changing
`packageManager` automatically makes the check flag every `pnpm run` /
`pnpm add` reference
- Added to CI lint job
### 4. Enhance `check:fragments` with subcommand coverage validation
The existing check only verified fragment files exist — not that they
document all subcommands. New Check 5:
- Verifies each fragment mentions all subcommands in the route (via
heading or code reference)
- Handles default commands (`sentry local` = `sentry local serve`)
- Strips fenced code blocks to avoid false heading matches from bash
comments
- Warns by default, `--strict` flag for hard errors
### 5. Fill subcommand coverage gaps
- `dashboard.md`: add `revisions`, `restore` examples
- `cli.md`: add `defaults`, `import` examples
- `issue.md`: add `events` subcommand and `@latest`/`@most_frequent`
selectors
## Verification
All checks pass:
- `check:fragments` — all subcommands covered
- `check:stale-refs` — no stale PM references (23 files scanned)
- `check:docs-sections` — all generated sections up to date
- `check:deps` — error message fixed
- `typecheck` — clean
- `test:unit` — 314 files, 7227 tests pass
Copy file name to clipboardExpand all lines: docs/src/fragments/commands/cli.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,52 @@ The CLI detects how it was installed and uses the appropriate upgrade method:
61
61
62
62
Nightly builds are only available as standalone binaries (via the curl install method). Switching to nightly from a package manager install will automatically migrate to a standalone binary.
0 commit comments