mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-06 06:37:29 +00:00
scripts/check-docs-impact.mjs compares the merge base with HEAD on two surfaces and fails when one changed and nothing under docs/ did: - CLI: every visible command, subcommand, flag, alias and flag value type, from scripts/cli-command-tree.ts. The base tree is built in a temporary worktree (bun install + core build), only when packages/cli/src changed outside tests and fixtures. - Public exports: for every package.json that is not private and declares exports (package-subpaths.mjs's rule), its exports subpaths, bin names and the names its root entry exports through `export *` chains, read from git with the TypeScript parser (scripts/public-api-surface.mjs). A PR opts out with the docs-not-needed label or a `docs-impact: none` line in its body, passed in as PR_LABELS / PR_BODY. --dry-run prints the verdict and exits 0; --base-tree/--head-tree take prebuilt trees. The Docs impact workflow runs it on every PR to main, including label and body edits, so changing the opt-out re-runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>