berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: can't query latest version - yarn npm view doesn't work with nested fields

Open yarinsa opened this issue 3 years ago • 0 comments

Self-service

  • [X] I'd be willing to implement a fix

Describe the bug

I would like to query the artifactory for the latest version released. According to npm docs I could do something like yarn npm info {package_name} --fields "dist-tags.latest To get nested properties inside "dist-tags". Yarn returns " The dist-tags.latest field doesn't exist inside {package_name}'s information"

To reproduce

Expected: yarn npm info react --fields dist-tags.latest -> 18.2.0

Actual: yarn npm info react --fields dist-tags.latest -> The dist-tags.latest field doesn't exist inside react's information

Environment

System:
    OS: macOS 12.5.1
    CPU: (8) x64 Apple M1 Pro
  Binaries:
    Node: 16.13.1 - /private/var/folders/n_/c3nqmfn54qnbtq0zgvvcvh4r0000gp/T/xfs-b1e6bf51/node
    Yarn: 3.2.2 - /private/var/folders/n_/c3nqmfn54qnbtq0zgvvcvh4r0000gp/T/xfs-b1e6bf51/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  npmPackages:
    jest: ^26.6.3 => 26.6.3

Additional context

I could use npm view otherwise. But yarn doesn't have "yarn view || yarn npm view". Would be willing to help with that as well

yarinsa avatar Sep 04 '22 07:09 yarinsa