Monday, 1 October 2018

Caret range and package-lock.json: how to get latest non-breaking versions with them?

I got what package-lock.json is standing for, but I don't understand how is caret range work after adding this file?

Say I have a package (my-module) that I want to have all new non-breaking versions without specifying new versions manually. I install latest version and this is the result in package.json file:

"my-module": "^4.1.1"

However package-lock.json is also getting updated with fixing the version of my-module to 4.1.1.

Next time a new version comes out of my-module: 4.1.2. Running npm i will not install it as the version in package-lock.json is fixed to the old version.

Question

How can I achieve that npm i will download latest non-breaking version of my-module without creating new package-lock.json file all the time? Did this file just invalidate using caret range?



from Caret range and package-lock.json: how to get latest non-breaking versions with them?

No comments:

Post a Comment