yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.35k stars 1.1k forks source link

[Bug?]: Running `yarn explain peer-requirements` results in error: "Not enough positional arguments." #6401

Open dclowd9901 opened 2 months ago

dclowd9901 commented 2 months ago

Self-service

Describe the bug

According to yarn docs: https://yarnpkg.com/cli/explain/peer-requirements

Screenshot 2024-07-18 at 11 28 12 AM

However, when trying to run this command, we see this error:

$ yarn explain peer-requirements
Unknown Syntax Error: Not enough positional arguments.

$ yarn explain peer-requirements <hash>

To reproduce

  1. Install Yarn 4.3.1
  2. Initialize a package
  3. Run command yarn explain peer-dependencies

Environment

System:
  OS: MacOS Sonoma 14.5
  CPU: Apple M1 Max
Binaries:
  Node: 20.13.1
  Yarn: 4.3.1
  npm: 10.5.2

Additional context

No response

dclowd9901 commented 1 month ago

Looking at the source, it's possible this is an issue with Clipanion. Digging in a bit more.

dclowd9901 commented 1 month ago

OK, it looks like upgrading clipanion to 4.0.0-rc.3 fixes this issue. Is there already work started on this? I could open a PR...