Skip to content

Feature: Add pnpm workspace hover#302755

Open
Stanzilla wants to merge 4 commits intomicrosoft:mainfrom
Stanzilla:investigate/pnpm-workspace-hover
Open

Feature: Add pnpm workspace hover#302755
Stanzilla wants to merge 4 commits intomicrosoft:mainfrom
Stanzilla:investigate/pnpm-workspace-hover

Conversation

@Stanzilla
Copy link

@Stanzilla Stanzilla commented Mar 18, 2026

This implements #302736

Code-2026-03-18-16 40 21

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds npm package metadata hovers for pnpm-workspace.yaml catalog entries by reusing the npm extension’s existing registry/npm view lookup logic.

Changes:

  • Register a new hover provider for pnpm-workspace.yaml in both desktop and browser entrypoints.
  • Add PnpmWorkspaceHoverProvider to show npm package metadata when hovering catalog keys/versions.
  • Refactor npm package metadata fetching/formatting into a shared NpmPackageInfoProvider used by both package.json and pnpm workspace hovers.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
extensions/npm/src/npmMain.ts Registers pnpm workspace hover provider in the desktop extension activation.
extensions/npm/src/npmBrowserMain.ts Registers pnpm workspace hover provider in the web extension activation.
extensions/npm/src/features/pnpmWorkspaceHover.ts Implements YAML-aware hover provider for catalog / catalogs entries.
extensions/npm/src/features/packageJSONContribution.ts Refactors to reuse shared npm package metadata provider.
extensions/npm/src/features/packageInfo.ts New shared provider for npm package metadata lookup and hover markdown formatting.
extensions/npm/package.json Extends activation events to include YAML / pnpm workspace scenarios.

You can also share your feedback on Copilot code review. Take the survey.

@Stanzilla Stanzilla force-pushed the investigate/pnpm-workspace-hover branch from cbc5048 to 4ecdbd3 Compare March 18, 2026 15:01
@Stanzilla Stanzilla force-pushed the investigate/pnpm-workspace-hover branch from 4ecdbd3 to 280b766 Compare March 18, 2026 15:04
@Stanzilla
Copy link
Author

Added a follow-up commit with focused coverage for the pnpm workspace hover path.

It extracts the pnpm workspace target resolution into a small helper and adds unit tests covering:

  • top-level catalog entries
  • nested catalogs entries
  • ignoring unrelated sections / section headers

I also recompiled the extension and re-verified the hover against a real pnpm-workspace.yaml in an extension-development host.

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.

3 participants