haasourcing.blogg.se

Npm save dependencies to package.json
Npm save dependencies to package.json






Running npm update won’t update the version of those. Some of those updates are major releases. Here’s the list of a few outdated packages in one repository I didn’t update for quite a while:

npm save dependencies to package.json

To discover new releases of the packages, you run npm outdated. If there is a new minor or patch release and we type npm update, the installed version is updated, and the package-lock.json file diligently filled with the new version.

npm save dependencies to package.json

Now those 2 files tell us that we installed version 1.3.1 of cowsay, and our rule for updates is ^1.3.1, which for the npm versioning rules means that npm can update to patch and minor releases: 1.3.2, 1.4.0 and so on.īut not for major version changes that break compatibility, which means, in this example, 2.0 and higher.








Npm save dependencies to package.json