sindresorhus / has-yarn

Check if a project is using Yarn
MIT License
100 stars 7 forks source link

Add support for Yarn workspaces #11

Open slorber opened 3 years ago

slorber commented 3 years ago

This package assumes yarn.lock is in cwd folder, which is not always the case for Yarn workspaces, and result will depend on how you run the command:

I suggest to also look for a Yarn workspace in parent folders, and look for a lock file there too

michael-gates-techngs commented 2 years ago

This is especially true for Yarn 3 where there is only a single yarn.lock file at the root of the monorepo.