Berry: [Bug] plugin-interactive-tools reports invalid latest package version

Created on 31 Jul 2020  Â·  3Comments  Â·  Source: yarnpkg/berry

  • [ ] I'd be willing to implement a fix

Describe the bug

plugin-interactive-tools marks a deprecated version, not tagged as "latest", as "Range/Latest" and suggests updating to it.

The line presented to me in upgrade process:

? Pick the packages you want to upgrade.          Current          Range/Latest
 … 
 > @wojtekmaj/predict-input-value                 â—‰  ^1.0.0        â—¯  ^1.1.0

Quick look at npm api results for this package reveals that:

  • 1.1.0 is indeed highest version number, BUT
  • Tag "latest" is set to 1.0.0:
    "dist-tags": { "latest": "1.0.0" },
  • 1.1.0 is deprecated:
    "versions": { "1.1.0": { "name": "@wojtekmaj/predict-input-value", "version": "1.1.0", … "deprecated": "Mistakenly released" } "1.0.0": { … } },

To Reproduce

I hope the information above is enough, but let me know if you need even more information.

Environment if relevant (please complete the following information):

  • OS: [e.g. OSX, Linux, Windows, ...] macOS
  • Node version [e.g. 8.15.0, 10.15.1, ...] 14.5.0
  • Yarn version [e.g. 2.0.0-rc1, ...] 2.1.1
bug

All 3 comments

Generally, the value of the latest tag doesn't matter except when there's no range at all (so if you put ^1.0, even if latest is set to something before, it doesn't matter).

That being said, we probably should ignore the deprecated versions when there are non-deprecated ones 🤔

...and unless the deprecated version is the one currently installed, to prevent suggesting a downgrade.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mike-Dax picture Mike-Dax  Â·  3Comments

tiansijie picture tiansijie  Â·  4Comments

GaoxinHuang picture GaoxinHuang  Â·  3Comments

danreg picture danreg  Â·  3Comments

Bessonov picture Bessonov  Â·  4Comments