Thinkmill / manypkg

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

Feature request: --only for isolating fix to current directory #130

Open marcodejongh opened 2 years ago

marcodejongh commented 2 years ago

We're building a system for incrementally upgrading our monorep (for which we'll also need https://github.com/Thinkmill/manypkg/issues/13). After a user runs yarn add, we run manypkg fix to make sure the right version was added. But if a dependency is under incremental upgrade that can have unexpected consequences.

pkgA: React@2.0.0
pkgB: React@1.0.0
pkgC: React@1.0.0
pkgD: --

If a developer runs yarn add react in pkgD, manypkg fix will updated all the other React dependencies down to 1.0.0, undoing the incremental upgrade. By adding a --only (open to better names), we want to have manypkg fix only update the current directory, in this case pkgD, so that only pkgD's package.json is fixed.

We're more than happy to contribute this back