Thinkmill / manypkg

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

Configurable fix behaviour #117

Closed marcodejongh closed 2 years ago

marcodejongh commented 2 years ago

👋 Hey old Thinkmill friends,

We're adopting manypkg in atlassian-frontend as a replacement for Bolt. The auto-fix behaviour is awesome, but for dependencies, it fixes to the highest version in the repo. We'd like it to be configurable to fixing the most used version in the repo.

Because the failure mode of this check usually is because of someone running a unversioned dependency add in a workspace:

#inside package/packageA
yarn add react

This would add the latest version of React, whereas they probably just wanted the version in use in the repo. As usually someone adding a dependency to their package does not mean they also want to upgrade the whole repo.

Happy to contribute this back if this is a change the team is willing to accept.

emmatown commented 2 years ago

I think the behavior you're describing is basically always what you want so I'd be happy to accept a PR changing the behavior to that.