SukkaW / nolyfill

Speed up your package installation process, reduce your disk usage, and extend the lifespan of your precious SSD.
MIT License
1.11k stars 15 forks source link

pnpm workspace #82

Closed o-az closed 4 months ago

o-az commented 4 months ago

How can I use nolyfill in a pnpm workspace? Currently I get the following error:

pnpm dlx nolyfill

[AggregateError: All promises were rejected] {
  [errors]: [
    Error: ENOENT: no such file or directory, access '/packages/core/yarn.lock'
        at async Object.access (node:internal/fs/promises:608:10)
        at async Promise.any (index 0)
        at async Object.detectPackageManager
        ...
AhmedBaset commented 4 months ago

Do you run it in the root (as level as pnpm-lock.yaml)?

o-az commented 4 months ago

yes but it doesn't apply to workspaces when I run in root

SukkaW commented 4 months ago

@o-az nolyfill already implemented pnpm workspaces finding using the @pnpm/workspace.find-packages package:

https://github.com/SukkaW/nolyfill/blob/691cbef8a23bb7e7c7579369e66f755ed45b1804/packages/tools/cli/src/lockfile/pnpm.ts#L6C53-L6C76

This should allow nolyfill to work w/ pnpm-workspaces-based monorepo.