npm init
to initialize the project- we use
axios: "~1.2.4"
in the package.json file- when we run
npm install
package1.2.6
will be installed which is correct as the latest patch will be installed - now if we use
^1.2.4
in package.json and runnpm install
thenode modules
orpackage-lock.json
won’t get updated to1.3.6
which is the intended behaviour based on the usage of^
(why is this happening here?) - now if we use
^1.3.4
in package.json and runnpm install
thenode modules
andpackage-lock.json
both will get updated to use1.3.6
which is the intended behaviour (and I suppose this is correct) - now if we use
1.2.4
or1.3.4
the packages with the version will be installed
- when we run
Also, what is the actual use of the .package-lock.json file?