Skip to content

feat: support -a option in pnpm --help to list all commands#8628

Merged
zkochan merged 11 commits intomainfrom
doc-pnpm-help
Oct 27, 2025
Merged

feat: support -a option in pnpm --help to list all commands#8628
zkochan merged 11 commits intomainfrom
doc-pnpm-help

Conversation

@lvqq
Copy link
Copy Markdown
Member

@lvqq lvqq commented Oct 10, 2024

close #8624

@lvqq lvqq requested a review from zkochan as a code owner October 10, 2024 05:50
@zkochan
Copy link
Copy Markdown
Member

zkochan commented Oct 11, 2024

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 git help and git help -a

@lvqq
Copy link
Copy Markdown
Member Author

lvqq commented Oct 11, 2024

I agree with it. I'd just keep some frequently used ones for default printing

@lvqq lvqq marked this pull request as draft October 11, 2024 09:52
@lvqq lvqq changed the title docs: update descriptions in pnpm --help feat: support -a option in pnpm --help to list all commands Oct 16, 2024
@lvqq lvqq marked this pull request as ready for review October 16, 2024 14:12
@zkochan zkochan requested a review from Copilot October 26, 2025 23:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 -a flag
  • 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.

Comment thread pnpm/src/cmd/help.ts Outdated
}
}
return renderHelp({
description: all ? '' : 'These are common pnpm commands used in various situations, use \'pnpm --help -a\' to list all commands',
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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',

Copilot uses AI. Check for mistakes.
@zkochan zkochan requested a review from Copilot October 27, 2025 00:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread pnpm/src/cmd/help.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zkochan zkochan merged commit 6e9ad42 into main Oct 27, 2025
14 checks passed
@zkochan zkochan deleted the doc-pnpm-help branch October 27, 2025 00:31
Copy link
Copy Markdown

@jericromero23-maker jericromero23-maker left a comment

Choose a reason for hiding this comment

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

😊

vaernion pushed a commit to Arbeidstilsynet/brevgen2 that referenced this pull request Dec 3, 2025
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) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.19.0/10.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.19.0/10.20.0?slim=true)](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 [#&#8203;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 [#&#8203;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 [#&#8203;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
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.

pnpm --help flag not showing an entry related to self-update

4 participants