From ef0fe2c01b44a5e6474a78bc2b8748f3ca3be21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=E1=BA=A3i?= Date: Sun, 10 May 2026 03:16:42 +0700 Subject: [PATCH] docs(cli): fix long and wrong help messages (#405) * docs(cli): trim verbose --reporter doc comments The doc comments on `CliArgs.reporter` and `ReporterType` had grown into multi-paragraph explanations with markdown backticks, internal-attribute notes (`global = true`), and GitHub issue references that all leaked straight into `pacquet --help` output. Match pnpm's terse style: a single short line on the field, no enum-level prose. Per-variant docs already describe what `ndjson` and `silent` do. * docs: re-add docs with improvement * docs: more specific message Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- pacquet/crates/cli/src/cli_args.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pacquet/crates/cli/src/cli_args.rs b/pacquet/crates/cli/src/cli_args.rs index ae4c08ecb8..139c5273d9 100644 --- a/pacquet/crates/cli/src/cli_args.rs +++ b/pacquet/crates/cli/src/cli_args.rs @@ -30,17 +30,7 @@ pub struct CliArgs { #[clap(short = 'C', long, default_value = ".")] pub dir: PathBuf, - /// How install progress is rendered. - /// - /// `ndjson` writes pnpm-shaped log records as newline-delimited JSON - /// to stderr, suitable for piping into `@pnpm/cli.default-reporter`. - /// `silent` drops every event. The default is `silent` until the - /// in-process default renderer lands; the spawn-and-pipe wiring is - /// tracked separately (see #344). - /// - /// `global = true` makes the flag accepted on either side of the - /// subcommand (`pacquet --reporter=ndjson install` and - /// `pacquet install --reporter=ndjson` both work), matching pnpm. + /// Reporter output format. #[clap(long, value_enum, default_value_t = ReporterType::Silent, global = true)] pub reporter: ReporterType, } @@ -50,7 +40,9 @@ pub struct CliArgs { /// Mirrors the names pnpm uses for `--reporter` (`default`, `ndjson`, /// `silent`, `append-only`). Only the variants pacquet currently supports /// are listed; the others land alongside the default-reporter spawn-and- -/// pipe (tracked under #344). +/// pipe (tracked under [#344]). +/// +/// [#344]: https://github.com/pnpm/pacquet/issues/344 #[derive(Debug, Clone, Copy, ValueEnum)] pub enum ReporterType { /// Newline-delimited JSON in pnpm's wire format on stderr.