Skip to content

Conversation

dylnclrk
Copy link
Contributor

@dylnclrk dylnclrk commented Aug 4, 2024

Motivation

As discussed in #20, we would like a way to limit the risk of batch updates. The options --minor and --patch could be used to limit gem updates to the highest patch or minor level, which should mean no breaking changes.

Solution

Add the minor and patch options

Todo

  • 🐞 Debug: this doesn't seem to be working when I run it locally
  • 🧪 Figure out a way to test calls to system in bundler_commands_test.rb like the expect_backticks helper. Add tests for BundlerCommands.update_gems_conservatively.
  • 🧪 Add a fixture + integration test to clearly test the patch/minor options (test/bundle_update_interactive_test.rb)
  • 🧹 Review bundler docs and adjust our documentation to communicate that minor/patch level updates will be prioritized (but not guaranteed, I think because of sub-dependencies)
  • 🧹 Tidy the passing around of level in report.rb, is there a better way?
  • 🧹 Tidy to remove rubocop disabling in cli/options.rb

@mattbrictson
Copy link
Owner

@dylnclrk FYI, there are a few recent and forthcoming changes to the codebase that might help out this PR.

Figure out a way to test calls to system in bundler_commands_test.rb

#42 introduces an example of this.

Add a fixture + integration test to clearly test the patch/minor options.

If you want to go full end-to-end on these tests, a new pattern of integration test was added in #41 and will be expanded in #42.

Tidy the passing around of level in report.rb, is there a better way?

I think so! The reporting and bundle-updating concerns are being consolidated into an Updater class in #42. That should be one place where level lives; no more need to pass it around, I think.

@mattbrictson mattbrictson added the ✨ Feature Adds a new feature label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants