There are many ways to upgrade our projects npm packages or even check what are the very latest versions but how can we do this without leaving the command line? Heading to the browser and going back and forth is out of question here. We need to tackle that kind of tasks fast after all and without headaches, right?

The most efficient way to do so is through yarn and the following command:

yarn upgrade-interactive --latest

After typing it we ‘ll see a nice interactive menu that provides a great insight and helps us getting done with it in a matter of clicks:

This report has lots of details for the more demanding developers and provides even the urls for the packages repos themselves. Also, different colors are used in order to prevent us from an unwanted upgrade to a major version that is going to break our build.

We can move up & down with the our keys, select an upgrade with the backspace and hit enter to finish the whole process.

Of course this change will be saved in package.json and yarn.lock too:

So that’s it. As far as i know npm doesn’t offer this great utility by default but there are some 3d party packages that can provide a helping hand if you are not a friend of yarn (really? anyways…).