Skip to content

fix: make latest alias skip Node.js prereleases - #36

Merged
coreybutler merged 1 commit into
mainfrom
fix/latest-skip-prerelease
Nov 10, 2026
Merged

coreybutler merged 1 commit into
mainfrom
fix/latest-skip-prerelease

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

What

Make the latest alias skip prerelease rows in index.tab (versions containing -) and return the newest stable tag.

Why

Node now publishes alphas at the head of index.tab (e.g. 27.0.0-alpha.0.0.0) before GA. latest took all[0], then Find stripped the suffix to 27.0.0, which does not exist — SHASUMS256.txt 404 (nvm#1554 / nodejs/node#67367).

Testing

  • Unit: TestLatestStableSkipsPrereleaseHead, TestLatestStableEmptyOrOnlyPrerelease
  • Manual expectation: latest → 26.13.0 while alpha leads the catalog

Risk

Low. Only the latest alias path changes; nvm install 27 can still resolve to the alpha line via major matching.

index.tab can lead with alphas (e.g. 27.0.0-alpha) before GA exists. Taking the first row then stripping the suffix resolved latest to a missing 27.0.0 and 404d SHASUMS256.txt (nvm#1554).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
@coreybutler
coreybutler merged commit 41d1ae5 into main Nov 10, 2026
@coreybutler
coreybutler deleted the fix/latest-skip-prerelease branch November 10, 2026 15:56
coreybutler added a commit to nvm-windows/nvm that referenced this pull request Nov 10, 2026
Pulls in nvm-windows/common#36 so `nvm install latest` ignores alpha/rc rows at the head of index.tab (nvm#1554).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
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