This question came up in one of the reddits I'm on. Someone wanted to use an API to figure out the latest version of Angular, in order to evaluate whether or not they were using the most up to date.
This is actually pretty easy to do with an npm command named view.
1npm view @angular/cli version
In this sample, I'm using the Angular CLI, but it should work with any npm package:
This will output the most recent version of the package:
Turning this into a script that compares your current installed version along with the most up to date version will require a bit more work. But, this is clearly the first step.