Feature: Add pnpm workspace hover#302755
Open
Stanzilla wants to merge 4 commits intomicrosoft:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
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.yamlin both desktop and browser entrypoints. - Add
PnpmWorkspaceHoverProviderto show npm package metadata when hovering catalog keys/versions. - Refactor npm package metadata fetching/formatting into a shared
NpmPackageInfoProviderused by bothpackage.jsonand 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.
cbc5048 to
4ecdbd3
Compare
4ecdbd3 to
280b766
Compare
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:
I also recompiled the extension and re-verified the hover against a real |
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.
This implements #302736