If I am always using definite versions of packages inside my package.json, what is the need of package-lock.json. Or other way to put this question is , If someone wants to use package-lock.json, why can't they just use definite versions of packages(1.2.3 and not ^1.2.3) inside package.json.
The use of package-lock.json optimize the installation process because the full dependency tree is already calculated :
optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages. doc
And as @imjared mentionned, definite versions of package can still have dependencies on caret versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With