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

Idea: --patch and --minor flags to limit scope of updates #20

Open
mattbrictson opened this issue Jul 31, 2024 · 0 comments
Open

Idea: --patch and --minor flags to limit scope of updates #20

mattbrictson opened this issue Jul 31, 2024 · 0 comments

Comments

@mattbrictson
Copy link
Owner

mattbrictson commented Jul 31, 2024

When updating gems in a project that is far behind in its dependency versions, update-interactive will suggest updating everything to the latest version, which is risky. It would nice to limit that risk by instructing update-interactive to bump versions by patch level only, avoiding the riskier minor and major updates.

For example, consider a lock file that currently has rack 2.2.7. The latest version of rack is 3.1.7, but updating by a major version is risky. Instead, we'd like to update to the latest 2.2.x version first, which is 2.2.9.

Currently, the only way to do this is to manually add rack to the Gemfile to limit the scope of updates:

gem "rack", "< 2.3", # or "~> 2.2.7"

And then run bundle update-interactive.

Instead, I propose this could be accomplished by passing a --patch flag, so that no manual Gemfile edits are needed:

# Limit updates to patch version changes (exclude minor and major updates)
bundle update-interactive --patch

Essentially this would be an interactive version of a feature Bundler already provides via bundle update --patch.

Likewise we could offer a --minor flag to allow patch and minor upgrades, excluding major ones.

Originally discussed in #19.

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

1 participant