Skip to content

[BUG] npm outdated should not include packages where the current version == wanted #3409

@glen-84

Description

@glen-84

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running npm outdated, I see multiple packages where the current version is exactly equal to the wanted version, and where both are greater than the latest version.

These are often pre-releases or releases that have not been tagged as the latest, but I can't think of any reason why someone would be interested in seeing this information, when they've obviously made a conscious decision to install a later version.

Example output:

Package                   Current         Wanted  Latest  Location                         Depended by
sass                      1.32.12         1.34.1  1.34.1  node_modules/sass                client@
vue                         3.1.1          3.1.1  2.6.14  node_modules/vue                 client@
vue-loader                 16.2.0         16.2.0  15.9.7  node_modules/vue-loader          client@
vue-meta            3.0.0-alpha.9  3.0.0-alpha.9   2.4.0  node_modules/vue-meta            client@
vue-router                  4.0.8          4.0.8   3.5.1  node_modules/vue-router          client@
vuetify             3.0.0-alpha.5  3.0.0-alpha.5   2.5.3  node_modules/vuetify             client@
vuex                        4.0.1          4.0.1   3.6.2  node_modules/vuex                client@
webpack-dev-server   4.0.0-beta.3   4.0.0-beta.3  3.11.2  node_modules/webpack-dev-server  client@

Only the first item in this list is useful. The rest are already up-to-date.

Expected Behavior

I expected to only see the first item in the above list. The other items are useless noise.

Steps To Reproduce

  1. Install some pre-release packages, or packages not tagged as latest.
  2. Run npm outdated
  3. Observe these packages being listed, even though they're already up-to-date.

Environment

  • OS: Windows 10
  • Node: 14.17.0
  • npm: 7.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions