Package Exports
- npm-up
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-up) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
npm-up
A lightweight tool to check the latest version of dependent npm packages for a project and do whatever you want.
Installation
npm i npm-up -gUsage
run
npm-up [options]in a project directory with apackage.jsonfile.For example:npm-up -abIf no options are set, it will only check the latest version and do nothing but display.run
npm-up -gto check globally install npm packages.
commands:
clean clean cache
dump dump cacheOptions:
-h, --help output usage information
-v, --ver Display the current version of npm-up
-g, --global Check global packages
-w, --writeback Write updated version info back to package.json
-i, --install Install the newest version of the packages that need to be updated.
-l, --lock Lock the version of the package in package.json, with no version prefix.
--lock-all Lock, even * version
-a, --all alias for -wil.
--no-cache do not use version cache.
-b, --backup [fileName] BackUp package.json before write back, default is package.bak.json.
-d, --dep Check dependencies only.
-D, --dev Check devDependencies only.
-s, --silent Do not log any infomation.
-e, --exclude <list> Excluded packages list, split by comma
-o, --only <list> Only check the packages list, split by commaVersion Pattern
Fully support semantic version. Eg:
*
^1.5.4
~2.3
0.9.7
0.5.0-alpha1
'' //regard as *Notice that ranges version may be override by Caret Ranges(^) when written back, and will be updated only when the latest version is greater than all the versions possible in the range.
>= 1.0.0 <= 1.5.4 // Version Range
1.2 - 2.3.4 // Hyphen Ranges
1.x // X-Ranges- However, the semantic meaning of the prefix and suffix may somehow ignored, because I just want the latest version.
- If the version declared in the
package.jsonis not recognizable, the corresponding package will be excluded. - More info: https://docs.npmjs.com/misc/semver
Rules
- Take 3 versions into consideration for one package:
- Version declared in
package.json. - Version of the package installed.
- The latest version of the package.
- Version declared in
- If a package is not installed, only
package.jsonwill be updated, and the package itself won't be installed. - If the version is
*inpackage.json, it will not be overwritten, even when the flaglockis set. If you really want to change a*version, use--lock-allflag. - The preifx(only
^ * ~) of the version will be preserved when written back, unless flaglockis set. - If the version installed is not the same as the version declared in
package.json, there comes a warning. - Installed version is preferred.