-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change external mismatch check & fix to most common #119
Change external mismatch check & fix to most common #119
Conversation
fixes Thinkmill#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 ranges for a dependency all occur once, it will fix to the highest version.
🦋 Changeset detectedLatest commit: df618d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a changeset?
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 |
You can use the upgrade command for that |
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.