Thinkmill / manypkg

☔️ An umbrella for your monorepo
MIT License
884 stars 48 forks source link

Incompatibility with Yarn 2's workspace protocol? #104

Open WaldoJeffers opened 3 years ago

WaldoJeffers commented 3 years ago

Hello,

Thanks for this great CLI tool!

What I see I've just started using it, and it seems manypkg reports an error when the root of a monorepo uses Yarn 2's workspace protocol :workspace

This an example error report:

☔️ error root has a dependency on @private/library@workspace:libraries/library
but the version of @private/library in the repo is 3.16.13
which is not within range of the depended on version,
please update the dependency version

Expected In this case, I would expect manypkg not to report an error, since the root will naturally use the latest available version.

What do you think?

WaldoJeffers commented 2 years ago

Hello,

Any thoughts on this? cc @mitchellhamilton @Andarist

It's currently preventing us from using manypkg because of this. I could definitely do a PR if you agree on the expected behaviour. Or close this issue if it's never going to happen?

Andarist commented 2 years ago

I think supporting the workspace protocol is a good idea. Could you prepare a failing test first so we could check the very exact situation in which this failure can happen? The fix for the issue could be then added on top of this PR.