Skip to content

fix(global): install the wanted version on update - #3514

Closed
liangmiQwQ wants to merge 5 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/global-wanted-resolution
Closed

liangmiQwQ wants to merge 5 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/global-wanted-resolution

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

With latest pointing to 1.0.0 and next pointing to 1.0.1, vp outdated -g reported 1.0.1 as wanted for pkg@^1. Each vp update -g then passed ^1 back to npm and reinstalled 1.0.0. The same issue affected npm aliases. Original report on #3480.

Both commands now use npm view --global to resolve the saved spec. A range selects the highest matching version, and a named tag selects the version it points to. The update installs that exact version and keeps the requested spec for future updates. In this example the first update installs 1.0.1, and the second skips it.

🤖 Generated with Codex

@liangmiQwQ liangmiQwQ changed the title fix(global): resolve wanted ranges with npm's install resolver fix(global): resolve wanted versions with npm's install resolver Nov 22, 2026
@liangmiQwQ liangmiQwQ changed the title fix(global): resolve wanted versions with npm's install resolver fix(global): install the wanted version on update Nov 22, 2026
@liangmiQwQ liangmiQwQ closed this Nov 23, 2026
@liangmiQwQ
liangmiQwQ deleted the liang/codex/global-wanted-resolution branch November 23, 2026 12:47
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