Recently I wanted to update each dependency in
package.json to the latest version. I didn’t want to do that manually. After some research I found that npm package npm-check-updates (
Find newer versions of dependencies than what your package.json or bower.json allows) comes in handy.
Here are the steps which I did:
$ npm install -g npm-check-updates $ npm-check-updates -u $ npm install
-u option means upgrade your
package.json automatically. Here is the result of running
While automatic updates of npm packages is a good idea then there are situations where it can’t be used as easy as it looks.
- Corporate rules. Yes, every time you install something you need to get approval from the law department. Even for the same package, but just newer version. The license in between may be changed and that’s why this needs to be verified.
- Sometimes there are situations where you want to keep fixed version of npm packages in order to keep all the same packages across all the team members.