Releases: raineorshine/npm-check-updates
v12.0.0
Breaking
- node >= 12 is required. Time to upgrade that old-ass server you never touch.
peerDependenciesare now excluded by default. Peer dependencies should use the lowest possible version that works. The old behavior encouraged a bad practice of uprading peer dependencies. You can use--dep prod,dev,bundle,optional,peerfor the old behavior (#951).- Dependencies with
>will be converted to>=. The old behavior was causing upgrades to> [latest]which was impossible (#957).
Other
- Typescript! There is a new build process, so if you have any issues with the executable or types, please report. It should be a non-breaking change if I did it correctly (#888).
- When using
npm-check-updatesas a module,vm(versionmanager) is no longer exported. It was previously exposed for testing purposes, but was never part of the official API.
v12.0.0-0
Coming soon...
- Typescript
- Remove unofficial exports
- Bump node >= 12
Early testers are greatly appreciated! In particular, let me know if you use any of the unofficial exports and can provide a case for their retention. Removing them will free up the internal API to do some architectural refactoring down the road.
Full details will be provided in the v12.0.0 release.
v11.5.0
Minor
npm-check-updates will now auto-detect yarn and apply --packageManager yarn when yarn.lock is present and package-lock.json is not present. You can override this by explicitly setting --packageManager npm. It will print "Using yarn" when the auto-detection is triggered.
v11.4.0
v11.2.0
Wildcards and globs can now be used in filters without having to use regex:
ncu react-* # upgrade packages that start with "react-"
ncu \!commander # upgrade everything except "commander"Since special characters are not allowed in package names, this change shouldn't break anything, but please let me know if a filter that was working before v11.2.0 is not now!
Commits
ee27448 Add filter support for wildcards and glob expressions. Fixes #219.
v11.0.0
Breaking
--packageFile- Now interprets its argument as a glob pattern. It is possible that a previously supplied argument may be interepreted differently now (though I'm not aware of specific instances). Due to our conservative release policy we are releasing as a major version upgrade and allowing developers to assess for themselves.
Features
--deep- Run recursively in current working directory. Alias of--packageFile '**/package.json'.
See: #785
v10.0.0
[10.0.0] - 2020-11-08
Breaking
- Specifiying both the
--filteroption and argument filters will now throw an error. Use one or the other. Previously the arguments would override the--filteroption, which made for a confusing result when accidentally not quoting the option in the shell. This change is only breaking for those who are relying on the incorrect behavior of argument filters overriding--filter.
See: #759
v9.0.0
[9.0.0] - 2020-09-10
Breaking
- Versions marked as
deprecatedin npm are now ignored by default. If the latest version is deprecated, the highest non-deprecated version will be suggested. Use--deprecatedto include deprecated versions (old behavior).
v8.0.0
Breaking
--semverLevel majoris now--target minor.--semverLevel minoris now--target patch. This change was made to provide more intuitive semantics for--semverLevel(now--target). Most people assumed it meant the inclusive upper bound, so now it reflects that. a2111f4c2- Programmatic usage:
runnow defaults tosilent: trueinstead ofloglevel: 'silent, unlessloglevelis explicitly specified. If you overrodesilentorloglevel, this may affect the logging behavior. 423e024
Deprecated
Options that controlled the target version (upper bound) of upgrades have been consolidated under --target. The old options are aliased with a deprecation warning and will be removed in the next major version. No functionality has been removed.
--greatest: Renamed to--target greatest--newest: Renamed to--target newest--semverLevel: Renamed to--target
See: 7eca5bf3
Features
Doctor Mode
Usage: ncu --doctor [-u] [options]
Iteratively installs upgrades and runs tests to identify breaking upgrades. Add -u to execute (modifies your package file, lock file, and node_modules).
To be more precise:
- Runs
npm installandnpm testto ensure tests are currently passing. - Runs
ncu -uto optimistically upgrade all dependencies. - If tests pass, hurray!
- If tests fail, restores package file and lock file.
- For each dependency, install upgrade and run tests.
- When the breaking upgrade is found, saves partially upgraded package.json (not including the breaking upgrade) and exits.
Example:
$ ncu --doctor -u
npm install
npm run test
ncu -u
npm install
npm run test
Failing tests found:
/projects/myproject/test.js:13
throw new Error('Test failed!')
^
Now let's identify the culprit, shall we?
Restoring package.json
Restoring package-lock.json
npm install
npm install --no-save [email protected]
npm run test
✓ react 15.0.0 → 16.0.0
npm install --no-save [email protected]
npm run test
✗ react-redux 6.0.0 → 7.0.0
Saving partially upgraded package.json
Github URLs
Added support for GitHub URLs.
See: f0aa792a4
Example:
{
"dependencies": {
"chalk": "https://github.com/chalk/chalk#v2.0.0"
}
}npm aliases
Added support for npm aliases.
See: 0f6f35c
Example:
{
"dependencies": {
"request": "npm:[email protected]"
}
}Owner Changed
Usage: ncu --ownerChanged
Check if the npm user that published the package has changed between current and upgraded version.
Output values:
- Owner changed:
*owner changed* - Owner has not changed: no output
- Owner information not available:
*unknown*
Example:
$ ncu --ownerChanged
Checking /tmp/package.json
[====================] 1/1 100%
mocha ^7.1.0 → ^8.1.3 *owner changed*
Run ncu -u to upgrade package.json