Skip to content

This is a utility that you can run before npm install to remove outdated dependencies in your node_modules file.

Notifications You must be signed in to change notification settings

jcblw/npm-remove-outdated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM remove outdated

Build Status Coverage Status

This is a utility that will remove outdated dependencies from your node_modules. The reason why this was built is to allow deploy environments easier ways to cache their packages. Right now if you run npm install with a shrink wrap file and you have outdated cached node modules nothing will happen because it assumes the package installed is the correct version of the package. All this script does is check the version of the installed packages against the versions in the shrink-wrap and removes the folder to make npm install treat that as a dependency that has not been installed yet.

Installation

$ npm install -g npm-remove-outdated

thats it :D

Usage

$ npm-remove-outdated && npm install

This package can work with either a npm-shrinkwrap.json file or a package.json file. When using shrinkwrap the version check is an explicit === to the version in the package file. When no shrinkwrap is found the package.json is used. Then the version checking is based off of semver's satisfies method.

Development

npm i
npm test

If you contribute plz run npm test before making a PR.

About

This is a utility that you can run before npm install to remove outdated dependencies in your node_modules file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published