feat: support -a option in pnpm --help to list all commands#8628
feat: support -a option in pnpm --help to list all commands#8628
-a option in pnpm --help to list all commands#8628Conversation
|
We have a lot of commands, so I wonder if we should print all of them. Maybe print the most frequently used ones and have a flag for printing the rest? Like how Git has |
|
I agree with it. I'd just keep some frequently used ones for default printing |
pnpm --help-a option in pnpm --help to list all commands
There was a problem hiding this comment.
Pull Request Overview
This PR adds a -a/--all flag to the pnpm --help command that displays all available commands, including advanced ones that are normally hidden. The help system is refactored from a simple function to a full command definition with proper option handling.
Key Changes
- Refactored help command to use CommandDefinition structure with proper CLI options
- Added filtering logic to show/hide advanced commands based on the
-aflag - Extended help text with comprehensive list of previously unlisted commands
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pnpm/src/cmd/help.ts | Core implementation: converts help to CommandDefinition, adds -a flag handling, marks commands as advanced, adds filtering logic |
| pnpm/src/cmd/index.ts | Integrates help as a CommandDefinition in the commands array instead of as a standalone handler |
| pnpm/test/help.spec.ts | Updates test to reflect new help command structure returning a handler result |
| .changeset/popular-suits-repair.md | Documents the feature addition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
| return renderHelp({ | ||
| description: all ? '' : 'These are common pnpm commands used in various situations, use \'pnpm --help -a\' to list all commands', |
There was a problem hiding this comment.
The usage instruction should be pnpm help -a or pnpm -h -a rather than pnpm --help -a. The --help flag typically shows help for the preceding command, so this syntax is inconsistent with standard CLI patterns.
| description: all ? '' : 'These are common pnpm commands used in various situations, use \'pnpm --help -a\' to list all commands', | |
| description: all ? '' : 'These are common pnpm commands used in various situations, use \'pnpm help -a\' to list all commands', |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm)) | [`10.19.0` -> `10.20.0`](https://renovatebot.com/diffs/npm/pnpm/10.19.0/10.20.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pnpm/pnpm (pnpm)</summary> ### [`v10.20.0`](https://github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#10200) [Compare Source](pnpm/pnpm@v10.19.0...v10.20.0) ##### Minor Changes - Support `--all` option in `pnpm --help` to list all commands [#​8628](pnpm/pnpm#8628). ##### Patch Changes - When the `latest` version doesn't satisfy the maturity requirement configured by `minimumReleaseAge`, pick the highest version that is mature enough, even if it has a different major version [#​10100](pnpm/pnpm#10100). - `create` command should not verify patch info. - Set `managePackageManagerVersions` to `false`, when switching to a different version of pnpm CLI, in order to avoid subsequent switches [#​10063](pnpm/pnpm#10063). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or PR is renamed to start with "rebase!". 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Related work items: #30372
close #8624