Skip to content

Corepack should not append hash to version #316

@rotu

Description

@rotu

corepack use and corepack up add build metadata to the version, resulting in a semver string that doesn't match any released version.

e.g. "packageManager": "npm@10.2.0+sha256.c362077587b1e782e5aef3dcf85826399ae552ad66b760e2585c4ac11102243f"

The actual version is simply "10.2.0".

This causes problems for tools that expect to find an existing version: moonrepo/proto#231

Additionally, corepack does not tolerate existing build metadata:

e.g. "packageManager": "npm@9.7.0+some-custom-build"

corepack install
Adding npm@9.7.0+some-custom-build to the cache...
Internal Error: Digest method not supported

Related: npm/cli#1479

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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