Keep your SPFX and NPM Packages up-to-date

Now the SharePoint Framework has become general available I expect that it requires only to update only the npm packages mostly. A simple upgrade of the installed packages will be enough in future. During the beta phase you add to do manual step in addition to upgrade your project to the latest drop.

In an previous blog post I wrote on how to update from one drop to another with a single npm installation statement.
On my other NodeJS related projects I use another approach to keep my packages updated.
I use a tool named npm-check-updates. Like the name suggests you need to install this tool through npm.

npm install -g npm-check-updates

After the installation you get a new command line tool in your tool belt. You can then use npm-check-updates or simply use ncu in your project folder. This tool will then check if you currently use outdated npm packages in your project. In my case it showed the following screen on an older SPFX project.

NPM Check Updates result of old SharePoint Framework Project

To update all packages I can use this too. Through executing ncu -u all packages on the current folder will be updated to the latest version.
Beside the local installed packages you can use the tool event to check the globally installed packages. Simply call the update checker with ncu -g. This should a list of global packages that are outdated as well as the current version number of your packages.