vim-package-info icon indicating copy to clipboard operation
vim-package-info copied to clipboard

When package is listed twice, only first instance gets version hint

Open rschristian opened this issue 3 years ago • 0 comments

First off, a big thank you for using this. It's saved me tons of time.

The issue is that the version annotation will only show up for the first (vertical) instance of a package, and the second goes un-annotated. I noticed this when using a Node package that had a peer dependency that was also a dev dependency.

{
  "peerDependencies": {
    "preact": ">=10"
  },
  "devDependencies": {
     "preact": "10.5.13"
  }
}

This is a UI library, though any would work. The idea here being that this library needs Preact >= v10 as a peer dependency, but for testing locally, it installs a version as well.

The second instance will not get a version hint. I think a good fix, if possible, would be to always annotate, not just the first instance. Especially in cases like this, where, in the first instance I don't need / care for a specific version, while in the second I do.

I'll take a look at the source and see if I can't implement this myself, but wanted to post first in case I forget or get distracted.

rschristian avatar May 09 '21 03:05 rschristian