Repository navigation
fix(global): install the wanted version on update - #3514
Closed
liangmiQwQ wants to merge 5 commits into
Closed
liangmiQwQ wants to merge 5 commits into
liangmiQwQ wants to merge 5 commits into
Conversation
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.
With
latestpointing to1.0.0andnextpointing to1.0.1,vp outdated -greported1.0.1as wanted forpkg@^1. Eachvp update -gthen passed^1back to npm and reinstalled1.0.0. The same issue affected npm aliases. Original report on #3480.Both commands now use
npm view --globalto 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 installs1.0.1, and the second skips it.🤖 Generated with Codex