Skip to content

package.json version has invalid 'v' prefix, causes npm outdated false positive #10

@watchdealer-pavel

Description

@watchdealer-pavel

Problem

The published package.json has "version": "v0.3.0" instead of "version": "0.3.0". The v prefix is not valid semver and causes npm -g outdated to always report the package as outdated, even when the latest version is installed:

Package       Current  Wanted  Latest  Location                   Depended by
@upstash/cli   v0.3.0   0.3.0   0.3.0  node_modules/@upstash/cli  global

npm compares the version field in the installed package.json (v0.3.0) against the registry version (0.3.0). Since they don't match as semver, it always flags the package.

Expected behavior

npm -g outdated should not list @upstash/cli when the latest version is installed.

Fix

Remove the v prefix from the version field in package.json:

- "version": "v0.3.0"
+ "version": "0.3.0"

The v prefix convention is for git tags, not for the version field in package.json (per the semver spec and npm docs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions