Do you need to update a bunch of packages? Do they all have a similar scope* or name?

npm-check-updates checks the packages listed in your package.json file, and prints out a list of the packages that can be updated to the latest version.

To install:

npm install -g npm-check-updates

Then, run it in your project folder:

ncu 

You’ll get some output that looks a little something like this:

If you want it to automatically bump the versions in your package.json file you can pass in the update parameter:

ncu -u

You can also run it with a regex string if you are just curious about a certain scope or package:

ncu '/^@npm.*$/' -u

Remember to run npm install afterwards to actually install the packages since npm-check-updates will just update your package.json file!


*PS: scopes in npm are useful if you need to group packages by your organization. In the following example "npm" is the scope.

@npm/package-name