mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-18 19:52:31 -04:00
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 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user