-
Notifications
You must be signed in to change notification settings - Fork 270
Description
You can notice that your package.json and you package.lock.json are out of sync and display different versions of the package, respectively 2.0.14 and 2.0.12.
When publishing a new version you can use the npm version <patch|minor|major> command to avoid package lock desynchronization. It will, update the package version accordingly and create a dedicated tagged commit.
see official documentation.
the usage is simple (example for a patch):
npm version patch -m "Upgrade to %s"
you can also add preversion and postversion script to automatically build, then push tags:
{
"scripts": {
"preversion": "npm run build && git add -A"
"postversion": "git push && git push --tags"
}
}Tags are great to track version changes in your git history.
If you want me to, I can help you make a PR to create automated github actions that build, release, and publish your package to NPM.
It also will greatly improve your package security to avoid malicious code injection, see official documentation.
Regards