10 comments

You can see the installed package version if you Cmd/Ctrl-hover over the version number

 

Ctrl+Space within quotes allows choosing version to install:

 

Note also that you will see more info about installed package on Cmd/Ctrl-hover over the package name:

 

And Ctr+Q on it (View | Quick Documentation) shows the full package description

0

Hi Elena Pogorelova. Thanks for providing that useful info, but the beauty of the "Version lens" is that you can quickly see at a glance across the whole package file which libs are outdated, and what versions they can be updated to which is extremely useful given the frequency of updates.

Is there something similar in the IntelliJ/Webstorm world that you know of that can offer this?

2

You can try the Settings | Languages & Frameworks | Node.js and NPM preferences - this page shows current and latest versions of each installed package, and offers a possibility to upgrade the packages

0

Hrmmm yea that looks promising but does not show all of my dependencies, especially when I have sub-folders with their own `package.json` file. IntelliJ (and other flavours) is a brilliant tool and superior in many ways, but it seems it lacks a cohesive way of managing dependencies in the same way that Version Lens does in VSCode and I find myself firing up VSCode when I want to update dependencies.

Just a summary of what it can do:

  • See status of every dependency, inline, within each package.json file.
  • Shows if dependency is latest, latest patch
  • If dependency is not latest it shows versions for each and allows the dependency to be updated at the click of a button
  • As it does this per-package.json file it's seemless to support more than one

It would be fantastic if there was a plugin within the IDEA world that could pull things together like this, since the capabilities seem to be almost there individually.

0

@bo, not quite the same.

0

Exactly ... the point is ... at a single glance ... view all dependencies, with all latest versions, and all statuses of whether they are up-to-date or not. No clicking required to get that far.

Then from that point you can choose to action whichever ones you want. 

It appears there is nothing similar in the paid version of IntelliJ/Webstorm right now.

1

Plug-in looks great! Nice work and thanks for sharing. Will give it a go.

0

Since 2021.3, you can get non-up-to-date dependencies highlighted in the editor. By default, the new inspection only provides a quick-fix, and doesn’t highlight the outdated package in any way. But you can change the severity of Update package.json dependencies inspection to "weak warning", for example, to make the warnings  more prominent:

 

see https://blog.jetbrains.com/webstorm/2021/11/webstorm-2021-3/#new_inspection_for_updating_dependencies

2

Please sign in to leave a comment.