Package Lens Util — npm hover
Package Lens Util shows rich npm registry tooltips when you hover package names inside import/require specifiers (javascript, TypeScript JSX/TSX, Vue/Svelte/Astro <script> blocks, GraphQL tooling strings, .babel-mapped files, and more) as well as dependency keys in package.json.
Requirements
Commands
From the workspace root:
npm install
npm run compile
Pack a .vsix (requires @vscode/vsce):
npm run package
Install from the packaged artifact (adjust the wildcard to your built filename):
npm run install-extension
Try it locally
- Run
npm install and npm run compile after cloning.
- Open this folder in VS Code with File → Open Folder.
- Run Debug: Start Debugging (F5), or launch Run Extension from the Run and Debug view.
- In the Extension Development Host window that opens, open a JS/TS/Vue/
package.json file and hover over a package specifier or dependency key.
Use npm run watch during iteration to continuously rebuild out/.
Settings
| Setting |
Description |
Default |
packageLens.enabled |
Master switch for hover providers |
true |
If you previously used peekPackage.enabled, migrate that key to packageLens.enabled.
Publishing
Confirm publisher in package.json matches your Marketplace publisher id before running vsce publish.
The Marketplace extension id is publisher.name from package.json (for example UmairAliCheema.package-lens-util). The display name (what users see in the Marketplace) must be unique; update displayName in package.json if the upload is rejected as taken.