I have a package.json that contains the following settings for the dependencies:
"dependencies": {
  "bootstrap": "3.1.1",
  "electron": "1.3.1"
}
I know there are newer versions for boostrap and electron.
I was asking myself: Is there a way to find out if newer versions of the dependencies exists?
In Bower.io I would sipmly run bower list which lists installed packages and possible updates and then run bower update -S to install the updates.
Is there similar workflow in npm?
A way that directly installs newer versions is
"dependencies": {
  "bootstrap": "^3.1.1",
  "electron": "^1.3.1"
}
and running npm up. But there seems to be no command that only lists possible updates for the packages.
You can check with this command
npm outdated
To check it globally Run the following command
npm outdated -g --depth=0
Check more info here
After checking update all outdated package
npm update
Get the list of availables npm packages updates :
https://www.npmjs.com/package/npm-check-updates
Update the packages :
https://docs.npmjs.com/cli/update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With