nupdate
v14.0.2
Published
Update node module dependency in package.json
Readme
Nupdate

Update node modules dependecy to last version in package.json. For bower you could use bupdate.
Respects commitType = colon | paren from package.json.
Install
npm i nupdate -gHow to use?
Update spawnify to latest version:
nupdate spawnifyUpdate to known version:
nupdate eslint:9.0.0-alpha.0Options
Usage: nupdate [pattern] [options]
Options:
-h, --help display this help and exit
-v, --version output version information and exit
-D, --dev update development dependencies
-E, --save-exact save exact version of dependency
-i, --install install dependency after updating
-c, --commit create commit with updated dependency
-a, --add add absent dependency
-r, --remove remove dependency
-*, --set-any set * as dependency version
--public set publichConfig access='public'
--restricted set publichConfig access='restricted'
--no-verify pass '--no-verify' to git
--all run for all outdated dependenciesUse as module
nupdate(name, version, info [, options])
name- name of moduleversion- version of a moduleinfo- stringified content ofpackage.jsonoptions:dev- update devDependenciesexact- update to exact versionadd- add absent dependencyremove- remove dependencyset-any- set*as dependency version
import fs from 'node:fs';
import nupdate from 'nupdate';
const info = fs.readFileSync('package.json', 'utf8');
nupdate('eslint', '9.0.0:aplha.0', info);
// returns
({
devDendencies: {
eslint: '9.0.0',
},
});License
MIT
