npm comprobar versión del paquete
local packages:
~$ npm list
globally installed packages:
~$ npm list -g
specific package:
~$ npm list <package>
versión npm
npm install -g npm@latest
instalar un paquete npm
npm install package-name
To save as a dependency:
npm install package-name --save
versión del paquete npm
// How to increment your project version
Ex: 1.0.0
* npm version patch ---> 1.0.1
* npm version minor ---> 1.1.0
* npm version major ---> 2.0.0
npm version [<newversion> | major | minor | patch | premajor |
preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
qué significa la versión " * " en la dependencia de paquetes npm
Finally there is the *, which while available, isn’t used as often. The primary reason for its less frequent use is the fact that it acts as a stand in for either the major, minor, or patch number and catches any version number for the place that it represents. For example a dependency with a version of * would equate to any version that was greater than or equal to 0.0.0, while 1.* would allow versions greater than or equal to 1.0.0 and less than 2.0.0.
cómo instalar la última versión del paquete npm
//For global packages
npm i -g <package name>@latest
npm i -g express@latest
//For loacal packages
npm outdated
npm update
//Manually updating local packages
npm i <package name>@latest
npm update "react" "react-dom"