Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out if new versions of npm-packages exists

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.

like image 854
Edward Avatar asked Oct 30 '25 22:10

Edward


2 Answers

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

like image 137
abdulbarik Avatar answered Nov 02 '25 11:11

abdulbarik


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

like image 33
Kevin Grosgojat Avatar answered Nov 02 '25 13:11

Kevin Grosgojat