Thinkmill / manypkg

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

Change external mismatch check & fix to most common #119

Closed marcodejongh closed 2 years ago

marcodejongh commented 2 years ago

fixes #117

When a developer adds a new dependency, npm/yarn will add the newest version of the dependency. We want manypkg to fix that newest version to the most commonly used version in the repo, since it is unlikely that a developer adding a new dependency to a package also intends to update the whole repo.

If the dependency range for a dependency all occur once, it will fix to the highest version.

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: df618d108f4f9fbaeb4b94c771febf2406414e70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | @manypkg/cli | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

marcodejongh commented 2 years ago

@mitchellhamilton This should be ready for review. I hadn't thought of the edge-case where all ranges are used the same amount of times, but it was relatively easy to cover off that edge-case, it did lead to me needing a lot more extra tests though.

gautamsi commented 2 years ago

how do I use the previous behavior? I was able to fix one dependency and manypkg would do the rest in a large monorepo. is there a flag or argument to fix to use previous behavior?

emmatown commented 2 years ago

You can use the upgrade command for that