docs: fix stale Bun references and add systemic doc drift checks#1024
Open
BYK wants to merge 1 commit into
Open
docs: fix stale Bun references and add systemic doc drift checks#1024BYK wants to merge 1 commit into
BYK wants to merge 1 commit into
Conversation
Fix the Bun→Node migration documentation drift with three systemic improvements: 1. Fix generate-docs-sections.ts root cause - Replace extractBunVersion() with extractPnpmVersion() derived from packageManager - Make both version extractors throw on mismatch instead of silent fallback - Update all prerequisite generators to reference Node.js + pnpm - Remove 'or Bun' from library-usage prerequisite 2. Expand generated marker coverage - Wrap DEVELOPMENT.md prerequisites in GENERATED:START/END dev-prereq markers - Wrap DEVELOPMENT.md build section in GENERATED:START/END build-toolchain markers - Wrap contributing.md build section in GENERATED:START/END build-commands markers - Fix remaining stale refs: 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 derives stale patterns from package.json - Reads packageManager field to determine current PM, flags all others - If project migrates from pnpm to yarn, check auto-flags pnpm references - Added to CI lint job 4. Enhance check:fragments with subcommand coverage validation - Check 5: verify fragments mention all subcommands in a route - Handles default commands (sentry local = sentry local serve) - Strips code blocks to avoid false heading matches - Warns by default, --strict flag for hard errors 5. Fill subcommand coverage gaps in fragments - dashboard.md: add revisions, restore examples - cli.md: add defaults, import examples - issue.md: add events subcommand and @latest/@most_frequent selectors Supersedes PR #1022 which found real issues but missed several stale references and lacked systemic prevention.
Contributor
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 64ea954. Configure here.
|
|
||
| // Check 2: For default commands, `sentry <route>` (without subcommand) counts | ||
| if (isDefaultCommand && lower.includes(`sentry ${routeName}`.toLowerCase())) { | ||
| return true; |
Contributor
There was a problem hiding this comment.
Default subcommand check too broad
Low Severity
Check 5 treats the default subcommand as documented when the fragment contains any substring sentry <route>, including longer invocations like sentry issue events. That makes default coverage pass whenever any sibling subcommand is documented, so missing default-subcommand docs may never warn.
Reviewed by Cursor Bugbot for commit 64ea954. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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.tsroot causeextractBunVersion()withextractPnpmVersion()derived frompackageManagerfield2. Expand generated marker coverage
Convert hand-written toolchain-dependent prose into generated sections so it can't drift:
DEVELOPMENT.mdprerequisites →GENERATED:START/END dev-prereqmarkersDEVELOPMENT.mdbuild section →GENERATED:START/END build-toolchainmarkerscontributing.mdbuild section →GENERATED:START/END build-commandsmarkersAlso fix remaining stale refs in:
library-usage.md,plugins/README.md,check-no-deps.ts3. Add generic
check:stale-refstoolchain consistency checkNew
script/check-stale-references.tsthat derives stale patterns frompackage.json— not hardcoded to Bun:packageManagerfield to determine the current PM (pnpm)bun run,yarn remove, etc.) in dev-facing docspackageManagerautomatically makes the check flag everypnpm run/pnpm addreference4. Enhance
check:fragmentswith subcommand coverage validationThe existing check only verified fragment files exist — not that they document all subcommands. New Check 5:
sentry local=sentry local serve)--strictflag for hard errors5. Fill subcommand coverage gaps
dashboard.md: addrevisions,restoreexamplescli.md: adddefaults,importexamplesissue.md: addeventssubcommand and@latest/@most_frequentselectorsVerification
All checks pass:
check:fragments— all subcommands coveredcheck:stale-refs— no stale PM references (23 files scanned)check:docs-sections— all generated sections up to datecheck:deps— error message fixedtypecheck— cleantest:unit— 314 files, 7227 tests pass