Skip to content

BUG: reports wrong for date-based versions (2026.6.11 vs 2026.7.1) #9775

Description

@vikasagarwal101

Description

npm outdated -g --json reports a latest field that does not match the actual dist-tags.latest from the registry. This causes downstream tools (like my update planner sysupdate) to incorrectly flag packages as needing a "downgrade".

Steps to Reproduce

# Install the package at its latest version
npm install -g openclaw@2026.7.1

# Check what npm outdated reports
npm outdated -g --json | jq ".openclaw"

Expected Behavior

npm outdated should report latest: "2026.7.1" since that is the current dist-tags.latest on the registry.

Actual Behavior

{
  "current": "2026.7.1",
  "wanted": "2026.6.11",
  "latest": "2026.6.11",
  "dependent": "global",
  "location": "/home/vikas/.npm-global/lib/node_modules/openclaw"
}

latest is "2026.6.11"incorrect.

Verification

# Registry says latest is 2026.7.1
npm view openclaw dist-tags
# → { latest: "2026.7.1", beta: "2026.7.2-beta.1", alpha: "2026.5.19-alpha.1" }

npm view openclaw version
# → 2026.7.1

npm view openclaw@latest version
# → 2026.7.1

Environment

  • npm version: 11.8.0
  • Node version: (fnm-managed)
  • OS: Linux
  • Package: openclaw (uses date-based versioning: YYYY.M.D)

Hypothesis

The package uses date-based versions (2026.7.1, 2026.6.11). npm may be incorrectly sorting or resolving these when determining the latest version in the outdated command — possibly treating the minor segment as a semver minor where 6.11 > 7.1 numerically at the patch level, or confusing wanted with latest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions