Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>NPM Dep LensNew to Visual Studio Code? Get it now.
NPM Dep Lens

NPM Dep Lens

mortenhoffmanndoff

|
3 installs
| (0) | Free
See npm package updates and peer dependency conflicts at a glance — color-coded inline decorations, one-click upgrades, and compatibility warnings right inside package.json.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NPM Dep Lens 🔍

See npm package updates and peer dependency conflicts at a glance — right inside your package.json.

No more guessing which packages are outdated or whether an upgrade will break something. Just open package.json and it's all right there — color-coded updates, compatibility warnings, and one-click upgrades.


✨ Features

🎨 Color-Coded Inline Decorations

Every dependency in your package.json is annotated with its update status, right next to the version string:

Color Indicator Meaning
🟢 Green ✓ latest Already on the latest version
🟢 Light green ⬆ → x.y.z (patch) Patch update available
🔵 Blue ⬆ → x.y.z (minor) Minor update available
🟡 Yellow ⬆ → x.y.z (major) Major update available
🟣 Purple ⬆ → x.y.z (pre) Pre-release update available
🔴 Red ⚠ → x.y.z ✋ blocked by … Update blocked by peer dependency conflict

⚠️ Peer Dependency Conflict Detection

NPM Dep Lens automatically checks peer dependencies across your entire dependency tree. If upgrading one package would break another, you'll see it immediately:

"vite": "^7.3.2",          ⚠ → 8.1.0  ✋ blocked by vite-plugin-sass-glob-import

No surprise npm install failures. No detective work. Just clear, upfront warnings.

💡 Rich Hover Tooltips

Hover over any package name to see a detailed card with:

  • Current version vs. latest version
  • Update type (major / minor / patch / pre-release)
  • Which packages block the update and why
  • Whether upgrading the blocker would fix the conflict
  • Direct link to the package on npm

📋 CodeLens Section Summaries

A summary line appears above each dependency section (dependencies, devDependencies, optionalDependencies, peerDependencies):

▲ 5 updates available · 1 blocked

Or when everything is current:

✓ All 12 packages up to date

📊 Status Bar

A persistent status bar indicator shows a quick summary at a glance:

NPM: 5↑ 1⚠

Click it to re-run the update check. Turns yellow when blocked updates are detected.

🖥️ Sidebar Panel

NPM Dep Lens adds a dedicated sidebar in the Activity Bar with a full dashboard:

  • Grouped tables — packages organized by section (dependencies, devDependencies, etc.)
  • Version columns — see current version, latest version, and update type at a glance
  • Expandable details — click any major or blocked update to see release notes links, changelogs, and blocker info
  • One-click upgrades — upgrade individual packages directly from the panel
  • Bulk actions:
    • Upgrade All — upgrade every eligible (non-blocked) package at once
    • Upgrade Patches Only — safely upgrade only patch versions

Upgrades edit your package.json and automatically run npm install in the integrated terminal.


🚀 Getting Started

  1. Install the extension from the VS Code Marketplace
  2. Open any project with a package.json
  3. See version info appear inline — that's it!

The extension activates automatically when you open a package.json file.


⌨️ Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "NPM":

Command Description
NPM: Check Package Updates Manually trigger an update check
NPM: Refresh Package Updates (Clear Cache) Clear the 10-minute cache and re-fetch all packages

⚙️ Settings

Configure via Settings → Extensions → NPM or in settings.json:

Setting Default Description
depLens.registryUrl https://registry.npmjs.org NPM registry URL (supports private registries)
depLens.showUpToDate true Show green ✓ latest decoration for up-to-date packages
depLens.checkOnOpen true Automatically check for updates when opening package.json

🔧 How It Works

  1. Parses your package.json to find all dependency sections
  2. Fetches the latest version of each package from the npm registry (in parallel, with a 10-minute cache)
  3. Compares versions using semver to classify update type
  4. Checks peer dependencies of every installed package to detect upgrade conflicts
  5. Displays everything inline via editor decorations, hover tooltips, CodeLens summaries, a status bar item, and a sidebar panel

📦 Supported Dependency Sections

  • dependencies
  • devDependencies
  • optionalDependencies
  • peerDependencies

🤝 Contributing

Found a bug or have a feature request? Open an issue on GitHub.


📄 License

MIT


by mortenhoffmanndoff

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft