
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
node-modules-cache
Advanced tools
Skip npm install if cached node_modules matches current package.json and optionally package-lock.json
This tool is useful for entirely skipping npm install if currently existing node_modules has been built from the same package.json and optionally package-lock.json.
This if often the case on CI such as Codeship, Gitlab CI or Drone.IO where caching whole node_modules is a common pattern.
Minimum Node 6 is required.
npm install -g node-modules-cache
or
wget https://rush.sh/I7cG88_dKzPzn0v+Z5hQK6DxDa4/node-modules-cache -O /usr/local/bin/node-modules-cache
The below will run npm install automatically if our cached package.json/package-lock.json have changed.
node-modules-cache install # you can pass any extra parameters you would pass to npm install
It is equivalent to more manual usage:
node-modules-cache check || (npm install && node-modules-cache set)
If you want to reinstall all modules when the cache is invalid then use:
node-modules-cache reinstall
which is equivalent to:
node-modules-cache check || (rm -rf node_modules && npm install && node-modules-cache set)
MIT
FAQs
Skip npm install if cached node_modules matches current package.json and optionally package-lock.json
The npm package node-modules-cache receives a total of 4 weekly downloads. As such, node-modules-cache popularity was classified as not popular.
We found that node-modules-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.