You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 instructingupdate-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:
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.
The text was updated successfully, but these errors were encountered: