fix: sync package.json version with published tags, backfill changelog#101
Conversation
package.json/package-lock.json stayed at 1.0.1 because publish.yml only bumped the version inside its own ephemeral job — the bump was never committed back to main. Tags v1.0.2/v1.0.3 were published to npm with no corresponding CHANGELOG entries, so `--version` and the changelog both misrepresented what was actually shipped (closes #94). - Bump package.json/package-lock.json to 1.0.3 (the latest published tag) - Backfill CHANGELOG.md entries for 1.0.2 and 1.0.3 - auto-tag.yml now bumps package.json itself and commits the release (with [skip ci]) alongside the tag, so this can't drift again Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmYTtFbpbcmFtYv7RbJRFL
…ommit publish.yml checks out Reordering avoids a mismatch with #98's workflow_run trigger: publish.yml checks out github.event.workflow_run.head_sha, which is fixed to the commit that triggered this workflow's run. Committing the version bump before tagging would move the tag onto a commit publish.yml never sees, silently publishing the wrong (stale, already-published) version on every cycle.
|
Found a real bug in combining this with #98 (now merged): #98's Pushed a fix reordering Generated by Claude Code |
Summary
Closes #94.
package.json/package-lock.jsononmainwere still at1.0.1while npm has already shippedv1.0.2andv1.0.3— becausepublish.ymlonly bumped the version inside its own ephemeral job (npm version "$TAG_VERSION" --no-git-tag-version) and never committed that bump back tomain.CHANGELOG.mdwas similarly stuck at1.0.1despite grade-changing rule fixes shipping in between (stricter Permissions-Policy scoring, CSPbase-uri/bare-scheme checks, etc.), with no record of why a CI gate's result might have changed.package.json/package-lock.jsonto1.0.3(the latest published tag) sosecurity-headers --versionreports the truth.CHANGELOG.mdwith[1.0.2]and[1.0.3]entries, called out by PR/issue number, including the grading-relevant changes..github/workflows/auto-tag.yml: it now runsnpm versionitself and commits the release (chore: release vX.Y.Z [skip ci]) alongside the tag it pushes, somainand the published version can no longer drift apart.[skip ci]keeps the release commit from re-triggering CI (and therefore this same workflow).No source/behavior changes to the library itself — only
package.json,package-lock.json,CHANGELOG.md, and the auto-tag workflow.Test plan
npm run typecheckpassesnpm testpasses (85/85)package.jsonandpackage-lock.jsonversions match (1.0.3) and are valid JSON.github/workflows/auto-tag.ymlYAML syntaxmainwill exercise the updated auto-tag workflow end-to-end (commit + tag + push)🤖 Generated with Claude Code
https://claude.ai/code/session_01GmYTtFbpbcmFtYv7RbJRFL
Generated by Claude Code