Open ammmze opened 4 years ago
Oh...but actually just realized npm doesn't appear to have a cache of packages there anymore. Hence #9 ... guess we need to see how to get to npm's newer cache stuff
The npm cache documentation mentions list
...
Used to add, list, or clean the npm cache folder.
But npm cache list
is not a valid command :\
Edit: Which explains why someone created this
Sorry...just pushed another update. It now incorporates an npm search
to find packages. And it also includes local files in npm install
which should resolve #5
Update: I'm not sure when npm switched their cache storage, but it's not as simple as just loading a file list anymore. And npm doesn't expose a way directly to get the cache list, so I had to put a little script together that uses the
cacache
library that the npm cache uses under the hood to get a package list.It's not the quickest thing in the world. I just finished setting up a new machine from scratch, so my cache is pretty small and it still takes several seconds to get that list. So I also added the zsh caching mechanism to cache the package list.
This should resolve #9.
Update #2: Perform
npm search
for packages to install. Include local files to resolve #5Original: in scenarios where people have
ls
aliased asls --color=auto
or something can cause errors like this when trying to complete annpm install <tab>
:So this just helps cover edge cases to prevent this from breaking.