Releases: raineorshine/npm-check-updates
v17.0.0
Breaking
- Require node >= 18.18.0
- In workspaces mode,
--root
is now set by default (#1353)- To not check the root package.json, use
--no-root
.
- To not check the root package.json, use
- If you have a packageManager field in your package.json, it is now upgraded by default (#1390)
- Use
--dep prod,dev,optional
for the old behavior.
- Use
v17.0.0-1
This is the first prerelease in preparation for the next major v17. It mainly involves a node engines bump and lot of internal dependency upgrades, so if you notice any regressions, please let me know!
Run npx npm-check-updates@v17.0.0-1
to test.
There are a two more breaking/high-risk changes I intend to make for the v17 release, which I will also release as prerelease versions for testing.
Thanks for your help and enjoy! 🍰
Breaking
v16.14.0
v16.13.0
Feature
- Added
--install
option to control auto-install behavior.
Usage:
ncu --install [value]
Default: prompt
Control the auto-install behavior.
always | Runs your package manager's install command automatically after upgrading. |
never | Does not install and does not prompt. |
prompt | Shows a message after upgrading that recommends an install, but does not install. In interactive mode, prompts for install. (default) |
v16.10.0
Feature
- Added
filterResults
option to filter out upgrades based on a user provided function.
filterResults
runs after new versions are fetched, in contrast to filter
and filterVersion
, which run before. This allows you to filter out upgrades with filterResults
based on how the version has changed (e.g. a major version change).
Only available in .ncurc.js or when importing npm-check-updates as a module.
/** Filter out non-major version updates.
@param {string} packageName The name of the dependency.
@param {string} currentVersion Current version declaration (may be range).
@param {SemVer[]} currentVersionSemver Current version declaration in semantic versioning format (may be range).
@param {string} upgradedVersion Upgraded version.
@param {SemVer} upgradedVersionSemver Upgraded version in semantic versioning format.
@returns {boolean} Return true if the upgrade should be kept, otherwise it will be ignored.
*/
filterResults: (packageName, {currentVersion, currentVersionSemver, upgradedVersion, upgradedVersionSemver}) => {
const currentMajorVersion = currentVersionSemver?.[0]?.major
const upgradedMajorVersion = upgradedVersionSemver?.major
if (currentMajorVersion && upgradedMajorVersion) {
return currentMajorVersion < upgradedMajorVersion
}
return true
}
For the SemVer type definition, see: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring
Thanks to mslowiak for this enhancement!
v16.8.0
Feature
- Added
--format lines
$ ncu --format lines
@ava/typescript@^4.0.0
ava@^5.2.0
eslint@^8.36.0
lerna@^6.5.1
typescript@^5.0.2
This is particularly useful for upgrading global modules:
npm install -g $(ncu -g --format lines)
Thanks to @vanodevium for the PR!
v16.4.0
Feature
Added --cacheClear
option for—you guessed it—clearing the cache 🫥.
This brings the suite of cache-related options to:
--cache
: Cache versions to the cache file.--cacheClear
: Clear the default cache, or the cache file specified by --cacheFile.--cacheExpiration <min>
: Cache expiration in minutes (default: 10).--cacheFile <path>
: Filepath for the cache file (default: "~/.ncu-cache.json").
Thanks to @ly3xqhl8g9 whose code is gratefully more lucid than his username.
v16.3.0
Feature
- Added workspace support! 🚢
Upgrade all workspaces:
ncu --workspaces
ncu -ws
Upgrade a single workspace:
ncu --workspace a
ncu -w a
Upgrade more than one workspace:
ncu --workspace a --workspace b
ncu -w a -w b
Upgrade all workspaces AND the root project:
ncu --workspaces --root
Upgrade a single workspace AND the root project:
ncu --workspace a --root
Notes
- If
workspaces
or--workspace
is run in--interactive
mode, ncu will prompt tonpm install
once in the root project rather than separately in each workspace (#1182). - Running
--deep
will not trigger workspace support.
v16.0.0
Breaking
- Automatic detection of package data on stdin has been removed. This feature was deprecated in
v14.0.0
. Add--stdin
for old behavior. (#136) - Wild card filters now apply to scoped packages. Previously,
ncu -f '*vite*'
would not include@vitejs/plugin-react
. Now, filters will match any part of the package name, including the scope. Use a more specific glob or regex expression for old behavior. (#1168)
v15.0.0
Breaking
- node >= 14.14 is now required (#1145)
- Needed to upgrade
update-notifier
with has a moderate severity vulnerability
- Needed to upgrade
- yarn autodetect has been improved (#1148)
- This is a patch, though technically it is breaking. In the obscure case where
--packageManager
is not given, there is nopackage-lock.json
in the current folder, and there is ayarn.lock
in an ancestor directory, npm-check-updates will now use yarn. - More practically, if you needed to specify
--packageManager yarn
explicitly before, you may not have to now
- This is a patch, though technically it is breaking. In the obscure case where