Skip to content

fix(uninstall): keep sibling prerelease installs distinct - #34

Merged
coreybutler merged 1 commit into
mainfrom
fix/uninstall-exact-prerelease
Nov 16, 2026
Merged

coreybutler merged 1 commit into
mainfrom
fix/uninstall-exact-prerelease

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

Summary

  • Exact uninstalls now identify installs by CanonicalVersion (keeps -alpha/-rc), so nvm uninstall 27.0.0-alpha.0.0.0 no longer matches every 27.0.0-* folder.
  • Active/fallback selection uses the same full-tag identity, so uninstalling one alpha no longer clears a sibling alpha that is current.
  • Regression tests cover sibling alpha directory matching and active-version retention (nvm-windows/nvm#1561).

Test plan

  • go test ./installer/ -run 'TestFindInstalledVersionDirsKeepsSiblingPrereleasesDistinct|TestPrepareActiveForUninstallLeavesSiblingPrereleaseActive|TestPrepareActiveForUninstallChoosesLatestSemverFallback'
  • Manual: install 27.0.0-alpha.0.0.0 + 27.0.0-alpha.0.1.0, nvm use the latter, nvm uninstall 27.0.0-alpha.0.0.0 — only the requested alpha is removed; active stays 27.0.0-alpha.0.1.0.

NormalizeVersion stripped -alpha/-rc suffixes, so uninstalling one
27.0.0-alpha build removed every install sharing that x.y.z core and
cleared the active sibling (nvm-windows/nvm#1561). Key identity by
CanonicalVersion for exact uninstalls and active fallback selection.
@coreybutler
coreybutler merged commit 02fe4ae into main Nov 16, 2026
5 of 6 checks passed
coreybutler added a commit to nvm-windows/nvm that referenced this pull request Nov 16, 2026
Pulls nvm-windows/cli#34 so uninstalling one Node.js alpha no longer
removes sibling alphas that share the same x.y.z core (nvm#1561).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
coreybutler added a commit to nvm-windows/nvm that referenced this pull request Nov 16, 2026
Pulls nvm-windows/cli#34 so uninstalling one Node.js alpha no longer
removes sibling alphas that share the same x.y.z core (nvm#1561).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
coreybutler added a commit to nvm-windows/nvm that referenced this pull request Nov 16, 2026
* chore: pin cli for exact prerelease uninstall matching

Pulls nvm-windows/cli#34 so uninstalling one Node.js alpha no longer
removes sibling alphas that share the same x.y.z core (nvm#1561).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>

* chore: pin cli for exact prerelease uninstall matching

Pulls nvm-windows/cli#34 so uninstalling one Node.js alpha no longer
removes sibling alphas that share the same x.y.z core (nvm#1561).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>

---------

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