Skip to content

package-lock.json is not in sync with package.json #504

@Freezystem

Description

@Freezystem

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions