Is there a way to manage/sync the version property in package-lock.json file? my situation is as follow:
- When I have a new release, I manually update the version property in
package.json
, commit and push. - On the build server,
npm install
to get all the deps needed by the build server, etc.. - However,
npm install
also update the version property inpackage-lock.json
to match the one in package.json (which is good but too late).
I could have made an npm install
in the first step to get the version property in package-lock.json
in-sync with the one in package.json
then commit and push, but for me this does not make sense (not the purpose of npm install
, someone can simply forget, etc..) . I also know that I should not be manually updating the package-lock.json file.
- Is there a better way to handle this ?
- I'm using NPM version 5.6 and I know in version 5.7 there is a new command
npm ci
which does not alterpackage-lock.json
file but also does not solve the fact that the version needs to be synced, and anyway for now I would like to know if there is a way to handle this in version 5.6.