npm-update-g
v0.1.3
Published
Update outdated global npm packages independently, even when some packages are not in the npm registry.
Downloads
508
Maintainers
Readme
npm-update-g
npm update -g fails if a global package is not part of the npm registry. This utility updates each outdated package independently so one unsupported package does not prevent the others from being attempted.
Usage
Install the utility globally and run:
npm install --global npm-update-g
npm-update-gThe command first runs npm outdated -g --json, then checks the package.json at each reported package's location before updating it. It runs npm update -g <package-name> once for each eligible outdated package.
Package selection
The following packages are skipped:
- Packages with
"private": truein theirpackage.json. - Scoped packages (for example,
@scope/package) whosepublishConfig.accessis set to"restricted".
The publishConfig.access setting is only used for scoped packages. Unscoped packages are not filtered by that setting. A package with missing or invalid metadata is skipped and reported as an error rather than updated.
Eligible packages are updated independently. If one package update fails, an error line is written and the remaining packages continue to be processed. The command exits with a nonzero status if discovery or package metadata inspection fails, or if any attempted update fails.
Output
Interactive terminal output is colorized by status:
✅(green) means a package was updated successfully.💤(yellow) means a package was ignored.❌(red) means discovery, inspection, or update failed.
Colors are omitted when output is redirected or when NO_COLOR is set.
License
MIT licensed
