mattbrictson / bundle_update_interactive

A stylish interactive mode for Bundler, inspired by `yarn upgrade-interactive`
MIT License
137 stars 3 forks source link

Fix crash when displaying prerelease → final version change #34

Closed mattbrictson closed 1 month ago

mattbrictson commented 1 month ago

When update-interactive tried to format a prerelease → final version number change like this:

7.2.0.rc1 → 7.2.0

It would crash with a KeyError exception:

bundle_update_interactive/cli/row.rb:54:in 'Hash#fetch': key not found: nil (KeyError)
  from bundle_update_interactive/cli/row.rb:54:in 'BundleUpdateInteractive::CLI::Row#apply_semver_highlight'

This PR fixes the underlying bug and adds tests for this scenario.