I am looking to update the following NPM (v5) dependency in my application from version 1.0.0 to 1.0.1 without any change to my package.json file.
"dependencies": {
"package": "~1.0.0"
},
My current package-lock.json file references the dependency as version 1.0.0, so as expected, running npm install installs version 1.0.0 of the package.
The issue lies when running either npm install [email protected] or npm update package where both commands seem to change how the package version reference in package.json
Is there a single command I can run to achieve a minor version update to only the package-lock.json file?
Thanks in advance!
Run npm update <package>.
This will update it to the latest version that satisfies the requirements specified in your package.json and reflect the update in the package-lock.json.
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