Repository navigation
fix: v1 dist-tag must be v1-latest — npm rejects v1 - #1829
Merged
Merged
Conversation
#1828 pinned v1 publishes to `--tag v1`, following the runbook (#1804 §1). That tag name is not legal: npm rejects any dist-tag that parses as a SemVer range, and `v1` parses as `1.x`. npm error Tag name must not be a valid SemVer range: v1 Found while running the companion `npm dist-tag add` step, which failed the same way. So the merged flag would not have "published to the wrong tag" — the next v1 security release would have failed to publish at all, and only at release time. `v1-latest` is accepted (verified against semver.validRange, along with `legacy`, which was the other candidate). The workflow comment now records both failure modes so neither the flag nor the specific tag name gets "cleaned up" later. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Txmv2qqv3yeKgRzoqXytzD
This was referenced Jul 28, 2026
This was referenced Aug 22, 2026
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.
Follow-up to #1828, part of #1816.
The bug
#1828 pinned v1 publishes to
--tag v1, straight from the runbook (#1804 §1). That tag name is not legal. npm rejects any dist-tag that parses as a SemVer range, andv1parses as1.x:Found by running the companion
npm dist-tag add ...@1.0.1 v1step, which failed identically.Why this mattered more than it looks
The merged flag would not have published to a wrong tag — the next v1 security release would have failed to publish at all, and only at release time, months from now, mid-incident. The failure mode the original comment warned about (silently stealing
latest) was replaced by a louder but worse-timed one.The fix
v1-latest, verified againstsemver.validRangealong with the other candidate,legacy:v1v1-latestlegacyPicked
v1-latestas self-describing and matching npm's own convention for this case.The workflow comment now records both failure modes — dropping the flag, and "simplifying" the tag back to
v1— so neither gets cleaned up by a future editor.Note for #1816
The issue text still says
v1. The registry-side commands must usev1-latest, and the deprecation message should point there.🤖 Generated with Claude Code
https://claude.ai/code/session_01Txmv2qqv3yeKgRzoqXytzD