Skip to content

Releases: raineorshine/npm-check-updates

v17.0.0

31 Jul 12:14
Compare
Choose a tag to compare

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.
  • 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.

v17.0.0-1

14 Mar 20:36
Compare
Choose a tag to compare
v17.0.0-1 Pre-release
Pre-release

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 [email protected] 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

  • 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.
  • Convert from CommonJS to ESM (#1358)
  • Replace pacote with npm-registry-fetch (#1329)

v16.14.0

13 Sep 01:15
Compare
Choose a tag to compare

bun

Feature

  • Added experimental support for bun package manager.
  • Automatically used if bun.lockb is detected.
  • Assistance needed to test it out on different platforms.
$ ncu --packageManager bun
$ ncu -p bun

Thanks to @ImBIOS for the PR!

v16.13.0

22 Aug 15:58
Compare
Choose a tag to compare

Feature

  • Added --install option to control auto-install behavior.

Usage:

ncu --install [value]

Default: prompt

Control the auto-install behavior.

alwaysRuns your package manager's install command automatically after upgrading.
neverDoes not install and does not prompt.
promptShows a message after upgrading that recommends an install, but does not install. In interactive mode, prompts for install. (default)

v16.10.0

02 Apr 03:18
Compare
Choose a tag to compare

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

22 Mar 20:37
Compare
Choose a tag to compare

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

14 Nov 13:22
Compare
Choose a tag to compare

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

23 Sep 17:22
Compare
Choose a tag to compare

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 to npm install once in the root project rather than separately in each workspace (#1182).
  • Running --deep will not trigger workspace support.

v16.0.0

23 Jul 13:51
Compare
Choose a tag to compare

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

30 Jun 13:43
Compare
Choose a tag to compare

Breaking

  • node >= 14.14 is now required (#1145)
    • Needed to upgrade update-notifier with has a moderate severity vulnerability
  • 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 no package-lock.json in the current folder, and there is a yarn.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