Skip to content

Keep repeated help output independent of command registrations - #65

Open
xiehuanyi wants to merge 1 commit into
lukeed:masterfrom
xiehuanyi:fix/repeatable-help
Open

xiehuanyi wants to merge 1 commit into
lukeed:masterfrom
xiehuanyi:fix/repeatable-help

Conversation

@xiehuanyi

Copy link
Copy Markdown

Repeated prog.help() or prog.help('build') calls append another [options] to Usage and duplicate global/help/version options. The help renderer changes the stored command usage and options on each call.

Assemble local display options and usage, keeping the registered command metadata intact. A public-API regression alternates global and command help and checks identical output plus one options suffix and one copy of each flag.

Validation: all five new assertions fail on unchanged master. After npm run build, the complete Tape suite passes 599 assertions on Node 14.21.3. The built CommonJS export also produces identical repeated help; git diff --check passes. Windows and the Node 6 minimum were not exercised. Generated bundles are excluded from the change.

AI disclosure: OpenAI Codex assisted with investigation, implementation, regression tests, and this description.

AI-assisted implementation and verification using OpenAI Codex.
Copilot AI balanced review requested due to automatic review settings October 10, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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