A VS Code extension that checks installed npm package versions against package.json declarations and notifies you about mismatches. Fully local — no external API calls.
Features
🔍 Version Mismatch Detection
- Scans all
package.jsonfiles in your workspace - Compares installed versions (from
node_modules) against declared ranges: exact,^,~,>=,<=, ranges - Highlights mismatched lines directly in the editor with inline diagnostics
📢 Smart Notifications
Single file with mismatches:
⚠️ Update dependencies
From .\frontend\package.json
[Run "pnpm install"] [Open file]
Multiple files with mismatches:
⚠️ Update dependencies
From .\frontend\package.json
.\backend\package.json
[View and install...]
- "Run install" button shows PM-specific command (
npm install,yarn install,pnpm install,bun install) - "View and install" opens a QuickPick dialog with checkboxes — select which packages to install
- Install runs sequentially in a single terminal
⚡ Automatic Checks
- On file open — checks when a
package.jsonis opened (debounced) - On file edit — re-checks after editing (debounced 5s)
- On Git branch switch — re-checks all
package.jsonin workspace - Periodic — re-checks visible editors every 30s (configurable)
- Manual —
NPM Deps: Check all dependenciescommand
📦 Multi-Manager Support
Automatically detects the package manager via lock files or packageManager field:
npm(package-lock.json)yarn(yarn.lock)pnpm(pnpm-lock.yaml)bun(bun.lockb)
🛠 Code Actions
- Install dependencies — runs
npm install(or yarn/pnpm/bun) in the terminal
⚙️ Configurable
All features can be toggled via VS Code settings (npmDepsChecker.*):
- Enable/disable the entire extension
- Control which events trigger checks (open, edit, git switch, periodic)
- Adjust debounce timing
- Toggle notifications and diagnostics
Commands
| Command | Title | Description |
|---|---|---|
extension.checkNpmDeps |
NPM Deps: Check all dependencies | Run a full check of all package.json files |
extension.installNpmDeps |
NPM Deps: Install dependencies | Run install in the directory of a package.json |
extension.openDiagnosticFile |
NPM Deps: Open diagnostic file | Open the problematic file from a notification |
Settings
| Setting | Default | Description |
|---|---|---|
npmDepsChecker.enabled |
true |
Enable or disable the extension |
npmDepsChecker.checkOnFileOpen |
true |
Check on file open |
npmDepsChecker.checkOnFileEdit |
true |
Check on file edit (5s debounce) |
npmDepsChecker.checkOnGitSwitch |
true |
Check on Git branch switch |
npmDepsChecker.periodicCheckEnabled |
true |
Periodic check (30s) |
npmDepsChecker.showNotifications |
true |
Show warning notifications |
npmDepsChecker.openDebounceMs |
300 |
Debounce delay on open (ms) |
npmDepsChecker.editDebounceMs |
5000 |
Debounce delay on edit (ms) |
npmDepsChecker.periodicCheckIntervalMs |
30000 |
Periodic check interval (ms) |
npmDepsChecker.features.peerDepsAnalysis |
true |
Analyze peerDependencies |
Requirements
- VS Code 1.85.0 or higher
- Node.js and the package manager of your project (npm, yarn, pnpm, or bun)
How It Works
- The extension scans all
**/package.jsonfiles in your workspace (excludingnode_modules) - For each dependency, it reads the installed version from
node_modules/<package>/package.json - It compares the installed version against the declared semver range using its own semver engine
- Mismatches are shown as inline diagnostics in the editor
- Notifications guide you to fix the issues
No data is sent to any external service. All checks are performed locally.
Release Notes
See CHANGELOG.md for full history.
License
MIT