Yarn: Yarn offline cache is difficult to search

Created on 20 Apr 2017  Â·  7Comments  Â·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

feature

What is the current behavior?
yarn cache ls is difficult to search. This makes it tough to confirm that a package exists in the local cache. For instance:

$ yarn cache ls | wc -l
  241

(requires manually looking for the package since yarn cache ls | grep <name> doesn't work - this is probably a separate bug.)

A workaround is to use an intermediate file and grep -

$ yarn cache ls > yarncache.txt
$ grep "immutable" yarncache.txt
  immutable                                               3.8.1        npm      https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2

For local dependancies yarn list <name> does the trick, but this is not implemented for yarn cache ls

What is the expected behavior?

$ yarn cache ls immutable
  yarn cache v0.23.2
  Name        Version      Registry Resolved      
  immutable   3.8.1        npm      https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2

Please mention your node.js, yarn and operating system version.

$ node -v
  v7.9.0
$ yarn --version
  0.23.2
$ system_profiler SPSoftwareDataType | grep "System Version"
  System Version: macOS 10.12.4 (16E195)
cat-feature good first issue help wanted triaged

All 7 comments

Nice idea, send a PR

cc @helloandre do you want to do this one too? :)

@helloandre if you want to tackle this be my guest, otherwise I'm happy to take a stab at it.

The rules of dibs work here, don't wait, @amcgee, send a PR :)

@amcgee @bestander I put a PR for this. I hope that is okay.

+1 thanks @philquinn I got sidetracked

On Thu, Sep 28, 2017, 15:28 Phil Quinn notifications@github.com wrote:

@amcgee https://github.com/amcgee @bestander
https://github.com/bestander I put a PR for this. I hope that is okay.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/3200#issuecomment-332836001, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA52sGrVrXCIPPrDfyERK9trwJrQLhDuks5sm58DgaJpZM4NCfZB
.

Was this page helpful?
0 / 5 - 0 ratings