Skip to content

Pass the dist-tag to npm publish explicitly - #139

Merged
dave-hillier merged 1 commit into
mainfrom
fix-release-dist-tag
Jul 29, 2026
Merged

Pass the dist-tag to npm publish explicitly#139
dave-hillier merged 1 commit into
mainfrom
fix-release-dist-tag

Conversation

@dave-hillier

Copy link
Copy Markdown
Owner

Follow-up to #138, from something the first manual publish exposed.

release.yml ran a bare npm publish and trusted publishConfig.tag. That is not honoured by every npm version — on npm 10.9.4 the dry run announced:

npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access (dry-run)

despite publishConfig: {access: "public", tag: "next"}, and npm config get tag confirms it resolves to latest. The first publish only landed on next because the tag was passed explicitly on the command line.

The workflow does npm install -g npm@latest before publishing, so it may well have behaved correctly — but the failure mode is silent, public and awkward to undo: a prerelease becomes what everyone gets from npm install. Worth removing the doubt.

package.json stays the single source of truth for the dist-tag; the new step just reads it so npm cannot fall back to latest.

Verified the workflow still parses (8 steps) and that the expression resolves to next in this checkout.

🤖 Generated with Claude Code

publishConfig.tag is not honoured by every npm version — npm 10.9.4
resolves `latest` regardless, which was caught on the first manual
publish: the dry run announced "with tag latest" despite
publishConfig.tag being "next". The workflow upgrades npm before
publishing so it would probably have been fine, but relying on that is
fragile, and the failure mode is silent and public — a prerelease
becoming the default install.

package.json remains the single source of truth; the new step just reads
it so npm cannot fall back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dave-hillier
dave-hillier merged commit 8b531a0 into main Jul 29, 2026
1 check passed
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