Dmitry Mylnikov
Dmitry Mylnikov

Reputation: 93

Is there an extension in Visual studio code to get actually installed versions of packages from package.json?

In WebStorm there's a great way to know which version of a package actually installed in your node_modules, by ctrl+hovering on the package name in package.json. Is there an extension with a similar funtionality in VS code? Tried this one https://marketplace.visualstudio.com/items?itemName=ldd-vs-code.better-package-json But it seems abandoned

Upvotes: 7

Views: 9035

Answers (2)

Binyamin Regev
Binyamin Regev

Reputation: 1030

You can also consider using Package Json Upgrade. It doesn't load your screen with information, e.g., if you have the latest then it will not show anything. Also, upgrades are colored according to severity (in the screenshot it is an old project that I did not upgrade for a long time and just upgraded Axios and react-scripts to demonstrate how it shows when you have the latest version.

enter image description here

Upvotes: 6

Patrick Kenny
Patrick Kenny

Reputation: 6417

The VersionLens extension can do this.

To get it to automatically show the versions like WebStorm:

  1. Install the extension.
  2. In the extension list, click the gear and choose Extension settings.
  3. Scroll to the bottom and check the box for Show on startup.

Then restart VSCode. It won't show the versions instantly because it has to analyze the dependencies, but they will show up after awhile.

Upvotes: 10

Related Questions