Repository navigation
Conversation
Cooldown moved latest to the remaining version with the newest publish time, which could be a prerelease or a backport to an older major, and left other tags pointing at versions it removed. Share the denylist's tag handling: tags naming removed versions are dropped, and latest is moved to the highest remaining stable version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Don't have the bandwidth to re-review this, closing for now. |
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
When cooldown withholds the version
dist-tags.latestpoints at, npm metadata rewriting movedlatestto the remaining version with the newest publish time. That can be:5.0.0-beta.1becomeslatest), or3.xpatch published after4.17.21makeslatestgo from 4.x to 3.x).Other dist-tags (
next,beta, ...) that pointed at withheld versions were left dangling, sonpm install pkg@nexthit a version that is no longer inversions.Repro (3d cooldown):
latest=4.18.0(1d old),next=5.0.0-rc.1(1d old),v3=3.10.2; remaining4.17.21,5.0.0-beta.1,3.10.2. Before:latest=3.10.2,next=5.0.0-rc.1(removed). After:latest=4.17.21,nextdropped,v3kept.Change
The denylist path already did this correctly. This moves its tag fix-up into a shared
removeDistTagshelper and uses it from cooldown too: tags naming a removed version are dropped, andlatestmoves to the highest remaining stable version (newestStableNPMVersion).updateDistTagsLatestandfindNewestVersionare gone.The streaming rewrite shares
applyCooldownFiltering, so it picks this up;TestRewriteStreamMatchesRewritecovers a prerelease-and-backport document.Behaviour change to review
If cooldown removes
latestand only prereleases remain,latestis now dropped (as the denylist already does) instead of moving to the newest prerelease.Tests
TestNPMRewriteMetadataCooldownRetargetsLatest(fails onmain)go build ./...,go vet,go test ./internal/...pass🤖 Generated with Claude Code