node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

nupdate

Nupdate License NPM version Dependency Status Build Status

Update node modules dependecy to last version in package.json.

For bower you could use bupdate. Same as:

Install

npm i nupdate -g

How to use?

nupdate spawnify

Options

-v, --version       - show version number and exit
-h, --help          - show help and exit
-D, --dev           - update development dependencies
-E, --save-exact    - save exact version of a dependency
-i, --install       - install dependency after updating
-c, --commit        - create commit with updated dependency
-a, --add           - add absent dependency
-r, --remove        - remove dependency

Use as module

nupdate(name, version, info [, options])

  • name - name of module
  • version - version of a module
  • info - stringified content of package.json
  • options:
    • dev - update devDependencies
    • exact - update to exact version
    • add - add absent dependency
    • remove - remove dependency
const fs = require('fs');
const nupdate = require('nupdate');
 
const info = fs.readFileSync('package.json', 'utf8');
nupdate('eslint', '4.0.0', info);
// returns
{
    "devDendencies": {
        "eslint": "4.0.0"
    }
}

License

MIT