Skip to content

ci: use --frozen-lockfile in the publish version bump#180

Merged
JohnMcLear merged 1 commit intomasterfrom
ci/frozen-lockfile-in-version-bump
Apr 17, 2026
Merged

ci: use --frozen-lockfile in the publish version bump#180
JohnMcLear merged 1 commit intomasterfrom
ci/frozen-lockfile-in-version-bump

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

The publish workflow ran plain pnpm i before pnpm version patch. If the lockfile was slightly out of sync, that install updated pnpm-lock.yaml and left the tree dirty; pnpm version patch silently skipped creating the git tag but still wrote the new version into package.json, and the subsequent git push --atomic <branch> vX.Y.Z failed with src refspec vX.Y.Z does not match any. Using --frozen-lockfile keeps the tree clean so the tag gets created.

The publish workflow ran a plain `pnpm i` before `pnpm version patch`.
If the lockfile was even slightly out of sync with package.json (easy
to happen when a dependency bump is merged via PR), that install
updated pnpm-lock.yaml and left the working tree dirty. `pnpm version
patch` silently declines to create a git tag in a dirty tree but
still writes the new version into package.json, and the subsequent
`git push --atomic <branch> vX.Y.Z` fails with:

  error: src refspec vX.Y.Z does not match any

— blocking the publish. Using `--frozen-lockfile` keeps the tree
clean; if the lockfile really is out of sync, the install fails
loudly (which is what we want — the fix is to update the lockfile in
a PR, not silently during publish).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit b4476e0 into master Apr 17, 2026
2 checks passed
@JohnMcLear JohnMcLear deleted the ci/frozen-lockfile-in-version-bump branch April 17, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant