Skip to content

"Invalid package name" error for pnpm overrides version range #173

@j4k0xb

Description

@j4k0xb

Describe the bug

These overrides were created by pnpm audit --fix:

 "pnpm": {
    "overrides": {
      "esbuild@<=0.24.2": ">=0.25.0",
      "tar-fs@>=2.0.0 <2.1.2": ">=2.1.2"
    }
  },

taze fails to parse the package name and version for tar-fs:

  taze:resolve resolving esbuild@<=0.24.2 +0ms
  taze:resolve resolving =2.0.0 <2.1.2 +1ms
...
> tar-fs@>=2.0.0 <2.1.2 unknown error
Error: Invalid package name: undefined

Reproduction

https://stackblitz.com/edit/stackblitz-starters-4yfgc7jn?file=package.json&view=editor

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

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