Have you ever been in the situation where you wanted to update your nodejs app dependencies to the latest version? The dependencies and devDependencies defined in package.json? No, okay you are done here. Thanks for reading. Everybody else stay tuned and have a quick look at this little tool that helps to make the update as simple as possible.Updating all your dependencies could be tedious, especially if you have a lot of them. The good news: there is a great solution to get them all updated in one step: npm-check-updates.
I recently found this, when I was looking around in npm land and there it was.
How does it work?
- Install it with
npm install -g npm-check-updatesand it will be installed globally
- cd into your project directory with the package.json of interest
npm-check-updatesto get an overview of all updatable dependencies in your package.json. The dependencies and the devDependencies will be inspected.
"yeoman-generator" can be updated from ~0.16.0 to ~0.17.0-pre (Installed: 0.16.0, Latest: 0.17.0-pre.3)
You can take this information and change your package.json manually, but wait,
npm-check-updatescan do this automatically for you. Run
npm-check-updates -uto update your package.json without any manual interaction.