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 npm-check-updates:

npm check update result

Update

Thanks to Eric Elliot tweet I have tested updtr and it works like a charm! Thanks for the link. Here is the result of my local update npm packages:

Update result made by updtr

Notes

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.

  1. 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.
  2. 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.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Comments

You can leave a response, or trackback from your own site.

Before you add comment see for rules.

Leave a Reply

Your email address will not be published. Required fields are marked *

1p0b6d