mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-27 17:35:30 -04:00
* fix: parse bare color as boolean flag Bare --color was treated as an enum-only option, so nopt could consume the following flag as its value. This prevented command-specific shorthands such as run --parallel from expanding when --color preceded them. Accept boolean values for the color option, and add parser/config regression coverage for the shorthand case. Co-authored-by: OpenAI Codex <codex@openai.com> * test: remove tautological color type metadata test Per review feedback, the assertion only restated the type metadata; the behavior is already covered by the parser regression test and the color-normalization test. * fix: keep with current dispatch working after a boolean global flag Bare `--color` now parses as a boolean flag, which enables forms like `pnpm --color with current <cmd>`. The `with current` rewrite skipped any occurrence whose preceding token was a long flag without `=`, assuming it consumed `with` as its value. For boolean flags that is wrong, so the lookup returned -1 and pnpm threw MISSING_WITH_CURRENT_CMD. Skip only when the preceding long option actually takes a value, based on the option type metadata; boolean flags and `--no-` negations no longer hide the command. --------- Co-authored-by: OpenAI Codex <codex@openai.com> Co-authored-by: Zoltan Kochan <z@kochan.io>