Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcblw/npm-remove-outdated
This is a utility that you can run before npm install to remove outdated dependencies in your node_modules file.
https://github.com/jcblw/npm-remove-outdated
Last synced: 24 days ago
JSON representation
This is a utility that you can run before npm install to remove outdated dependencies in your node_modules file.
- Host: GitHub
- URL: https://github.com/jcblw/npm-remove-outdated
- Owner: jcblw
- Created: 2016-04-03T18:26:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T14:21:43.000Z (over 7 years ago)
- Last Synced: 2024-10-11T14:38:34.720Z (about 1 month ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## NPM remove outdated
[![Build Status](https://travis-ci.org/jcblw/npm-remove-outdated.svg?branch=master)](https://travis-ci.org/jcblw/npm-remove-outdated) [![Coverage Status](https://coveralls.io/repos/github/jcblw/npm-remove-outdated/badge.svg?branch=master)](https://coveralls.io/github/jcblw/npm-remove-outdated?branch=master)
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](https://www.npmjs.com/package/semver)'s satisfies method.
### Development
npm i
npm testIf you contribute plz run `npm test` before making a PR.