Skip to content

Fix package.json version autocomplete for custom npm registries - #314382

Closed
Martin Aeschlimann (aeschli) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-package-json-autocomplete-issue
Closed

Martin Aeschlimann (aeschli) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-package-json-autocomplete-issue

Conversation

Copilot AI commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Since 1.117, npm view pack@latest fails silently for packages in custom registries (GitLab, Artifactory, etc.) that don't support @latest dist-tag resolution — causing zero version suggestions when editing package.json.

Changes

  • npmView: Falls back to npmViewFallback when npm view pack@latest returns nothing, instead of propagating the failure to npmjsView (which also fails for private-only packages)
  • npmViewFallback (new): Runs npm view pack dist-tags.latest description homepage — avoids @latest tag resolution and omits time to prevent fetching timestamps for every published version
  • runNpmCommand: Implements the ignoreError?: boolean parameter that was documented in its JSDoc but never wired up
  • npmListInstalledVersion: Uses ignoreError=true — npm ls exits non-zero on peer dependency issues even when the package is installed, previously hiding the installed version from hover tooltips

Copilot AI self-assigned this May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 13:15
Copilot AI removed the request for review from Copilot May 5, 2026 13:15
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 <[email protected]>
Copilot AI requested review from Copilot and removed request for Copilot May 5, 2026 13:29
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
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 2493bf0b Current: c1391900

Changed (12)

chat/input/chatInput/Default/Dark
Before After
before after
chat/input/chatInput/Default/Light
Before After
before after
chat/input/chatInput/WithArtifacts/Dark
Before After
before after
chat/input/chatInput/WithFileChanges/Dark
Before After
before after
chat/input/chatInput/WithTodos/Dark
Before After
before after
chat/input/chatInput/WithTodos/Light
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Light
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Dark
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Light
Before After
before after
chat/widget/chatWidget/MultiTurn/Light
Before After
before after
agentSessionsViewer/NeedsInput/Light
Before After
before after

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

package.json doesn't autocomplete versions for packages from custom npm registries since 1.117

2 participants