ci: commit package-lock.json in the release PR#87
Merged
Conversation
npm version bumps the lockfile alongside package.json, but the release commit only staged package.json and CHANGELOG.md, so the lockfile version drifted (stuck at 1.8.4 across v1.9.0/v1.9.1). Stage package-lock.json too.
Contributor
Coverage Report
File CoverageNo changed files found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release workflow runs
npm version <type> --no-git-tag-version, which bumps bothpackage.jsonandpackage-lock.json. But the "Create release branch and commit" step only stagedpackage.jsonandCHANGELOG.md, so the lockfile version was never committed.As a result the lockfile's
versionfield drifted — it sat at1.8.4through the v1.9.0 and v1.9.1 releases whilepackage.jsonmoved on.This is harmless for publishing (the lockfile isn't published and
npm cidoesn't fail on the root version field), but it's a hygiene issue: a freshnpm installproduces a spurious lockfile diff.Fix
Stage
package-lock.jsonin the release commit too.The current release PR (v1.10.0, #86) has already had its lockfile synced manually; this keeps every future release in sync automatically.