Skip to content
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

Feature Request: Option Flag to always use Highest Semver Range #129

Open
fbartho opened this issue Jan 6, 2022 · 1 comment
Open

Feature Request: Option Flag to always use Highest Semver Range #129

fbartho opened this issue Jan 6, 2022 · 1 comment

Comments

@fbartho
Copy link
Contributor

fbartho commented Jan 6, 2022

Currently, manypkg check and manypkg fix decide to resolve dependency versions based on the most commonly witnessed range in the repo. -- Only when there are equal quantities of each range specifier do we select the highest range:

if(acc[1] === value[1]) {
// If all dependency ranges occurances are equal, pick the highest.
// It's impossible to infer intention of the developer
// when all ranges occur an equal amount of times
const highestRange = highest([acc[0], value[0]]);
return [ highestRange, acc[1] ];
}

Would we support a flag --use-highest-range on each command to force this algorithm to select the highest range for a given dependency?

Alternative: add a .manypkg.config.json this and other flags?

I'm happy to contribute this code change if a maintainer can indicate if they'd accept an appropriate PR implementing this.

@jrolfs
Copy link

jrolfs commented Feb 5, 2022

I also prefer this behavior and would be happy to help.

I do worry, though, that y'all are trying to avoid introducing unnecessary configuration... if so is there another recommended way to upgrade a dependency accross an entire monorepo to a specified range?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants