← All tasks
javascriptstreamich/memfs #1241Not a task: not reproduced

tslib listed as peer and production dependency in memfs package.json

envgap__streamich__memfs-1241

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
bdee8da7599c7b739bf44b9b1e8485547b89ce07
Manifest
packages/memfs/package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

streamich/memfs #1241 · read the original issue
I'm in the process of updating some dependencies and memfs is a transitive dependency on one of my project's dependencies. When I updated my dependency, the current version of memfs (4.56.10) was added and pnpm started reporting peer dependency warnings due to `tslib`.

```bash
 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

apps/app.admin
└─┬ @rspack/cli 1.7.5
  └─┬ @rspack/dev-server 1.1.5
    └─┬ webpack-dev-server 5.2.2
      └─┬ webpack-dev-middleware 7.4.2
        └─┬ memfs 4.56.10
          ├── ✕ missing peer tslib@2
<snip>
Peer dependencies that should be installed:
  tslib@">=2.0.0 <3.0.0-0"
```

Looking at the `package.json` for the memfs package it looks a little off. `tslib` is listed as a [peer dependency](https://github.com/streamich/memfs/blob/54c7cce612b92075e853defe4c622494d06080df/packages/memfs/package.json#L127) with a version spec of `"2"` and also as a [production dependency](https://github.com/streamich/memfs/blob/54c7cce612b92075e853defe4c622494d06080df/packages/memfs/package.json#L143C5-L143C22) with a version spec of `"^2.0.0"`. 

It's possible that pnpm shouldn't report an unmet peer when the dependency specifying the peer also specifies it as a dependency. However, it seems unintentional for memfs to have `tslib` as both a dependency and a peer dependency as I can't think of a reason why you would need it to be both.

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]