Fix package.json version autocomplete for custom npm registries#314382
Draft
Copilot wants to merge 2 commits into
Draft
Fix package.json version autocomplete for custom npm registries#314382Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
When npm view pack@latest fails for packages in custom registries (e.g., GitLab), fall back to npm view pack using dist-tags.latest to get the latest version. Also implement the ignoreError parameter in runNpmCommand and use it in npmListInstalledVersion so npm ls non-zero exit codes (e.g. from peer dependency issues) don't hide the installed version. Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/23876571-d34b-4127-95dc-5b9ea680adf5 Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix package.json version autocompletion for custom npm registries
Fix package.json version autocomplete for custom npm registries
May 5, 2026
Contributor
Screenshot ChangesBase: Changed (12) |
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.
Since 1.117,
npm view pack@latestfails silently for packages in custom registries (GitLab, Artifactory, etc.) that don't support@latestdist-tag resolution — causing zero version suggestions when editingpackage.json.Changes
npmView: Falls back tonpmViewFallbackwhennpm view pack@latestreturns nothing, instead of propagating the failure tonpmjsView(which also fails for private-only packages)npmViewFallback(new): Runsnpm view pack dist-tags.latest description homepage— avoids@latesttag resolution and omitstimeto prevent fetching timestamps for every published versionrunNpmCommand: Implements theignoreError?: booleanparameter that was documented in its JSDoc but never wired upnpmListInstalledVersion: UsesignoreError=true—npm lsexits non-zero on peer dependency issues even when the package is installed, previously hiding the installed version from hover tooltips