NPM Version Dropdown in package.json
See outdated npm packages and update them with a single click. Or view a list of the available versions in a dropdown straight inside the VS code editor
Built with ❤️ by Farshad Hemmati at Legalfina
---
Features
Color-coded version indicators
The extension displays the latest available version inline, color-coded by update scope:
| Color |
Meaning |
Example |
| Light blue |
Major update |
1.x.x → 2.x.x |
| Orange |
Minor update |
1.1.x → 1.2.x |
| Green |
Patch update |
1.1.1 → 1.1.2 |
| Red |
Version not found |
Invalid or unpublished version |
Version dropdown
Click the dropdown icon next to any package to browse all available versions. The list is sorted newest-first, with the latest stable version pre-selected.
- Packages are fetched in parallel
- Results are cached to avoid redundant requests
- Uses npm's abbreviated metadata endpoint
- Duplicate requests for the same package are deduplicated
Usage
Open any package.json file. The extension activates automatically and shows version indicators next to outdated dependencies. Click the indicator or the dropdown icon to select a different version.
All dependency sections are supported: dependencies, devDependencies, peerDependencies, and optionalDependencies.
Commands
| Command |
Description |
NPM Version Lens: Refresh |
Clear cache and re-fetch all package versions |
NPM Version Lens: Show All Versions |
Open version dropdown for the package at cursor |
Requirements
- VS Code 1.85.0+
- Internet connection (to query the npm registry)
FAQ
No version indicators are showing up
Make sure the file is named package.json, check your internet connection, and try running "NPM Version Lens: Refresh" from the command palette.
A package isn't showing as outdated
It may already be on the latest version, use an unsupported version format (git://, file:, etc.), or not exist on the public npm registry.
Private registries
Only the public npm registry is supported. Private registry support is planned.
Known issues
- Large
package.json files (100+ dependencies) may take a few seconds on first load.
- Scoped packages (
@org/package) are supported but may be slightly slower to fetch.
Contributing
Contributions are welcome. Fork the repository, create a feature branch, and open a pull request.
License
MIT — see LICENSE for details.