local-npm/local-npm

Optimistically cache tarballs when packages change?

Open

#102 opened on 2016年2月16日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)JavaScript (1,133 stars) (101 forks)batch import
enhancementhelp wanted

説明

When you install lodash@^4.0.0, then local-npm will cache and store 4.0.0 for future npm installs.

However, if 4.0.1 is published after you npm install, then local-npm will find out about it via the changes feed, but it will not download the actual tarballs.

So if you then go offline and try to npm install again, it will fail because local-npm knows that there is a newer version that matches your version range, but it hasn't been downloaded yet.

Question: should local-npm optimistically cache every version of Lodash that gets published, simply because you once installed lodash@^4.0.0?

Pros: more likely to work offline, less likely to cause unexpected errors, fits the "standard" pattern of caret- and tilde-versioning.

Cons: Potentially a lot of network traffic and a lot of wasted disk spaces for module versions that you might never use.

コントリビューターガイド