Releases: splitwise/super_diff
Releases · splitwise/super_diff
v0.17.0
What's Changed
Features
- Add official Ruby 3.4 support. #289 by @olleolleolle
Bug fixes
- Fix hash diffing algorithm. #293
Other changes
- Fix bundler gem caching in CI. #289 by @olleolleolle
New Contributors
- @olleolleolle made their first contribution in #289
Full Changelog: v0.16.0...v0.17.0
v0.16.0
What's Changed
Breaking changes
- Dropped support for Ruby 3.0, which reached EOL in April 2024. #280
Features
- Add official Rails 7.1 support. #278
- Add official Rails 7.2 support. #279
- Add official Rails 8.0 support. #281
Bug fixes
- Fix ActiveRecord's
attributes_for_super_diffand tree builders related to Active Records to handle models that do not have a primary key.
#282 by @atranson-electra - Fix failure case for chained matchers. #288
Other changes
- Fix
loggerdependency issues in CI. #277 - Updated permalink to rspec differ in README.md #258 by @sealocal
- Tweak
sqlite3andappraisaldev dependencies. #287
New Contributors
- @atranson-electra made their first contribution in #282
- @sealocal made their first contribution in #276
Full Changelog: v0.15.0...v0.16.0
v0.15.0
What's Changed
Features
- Implement RSpec 3.13.0+ compatibility. #258
Other changes
- Filter super_diff from RSpec backtrace. #275 by @FlorinPopaCodes
New Contributors
- @FlorinPopaCodes made their first contribution in #275
Full Changelog: v0.14.0...v0.15.0
0.14.0
What's Changed
Features
- Improve inspection of Module. #263 by @phorsuedzie
- Fix multiline string diff with blank lines. #266
- Improve inspection of Range objects. #267 by @lucaseras
- Skip diffing of more un-diffable types. #273 by @lucaseras
Other changes
- Switch from Prettier to Rubocop. #269
- Fix outdated reference in documentation. #270 by @emmanuel-ferdman
- Replace Zeus with forking strategy for tests. #271
New Contributors
- @phorsuedzie made their first contribution in #263
- @emmanuel-ferdman made their first contribution in #270
Full Changelog: v0.13.0...v0.14.0
0.13.0
Features
- Add better support for Data object diffing. #259
- Fall back on RSpec color mode when
SuperDiff.configuration.color_enabledis unspecified or nil. #261
Breaking changes
- Removed several
SuperDiff::Csimethods. This will break any code that uses those parts of theSuperDiff::Csi(which is private in general). SuperDiff.configuration.color_enabled = nilused to disable color output. It now allows SuperDiff to determine whether to colorize output based on the environment (namely RSpec color mode and whether stdout is a TTY).
0.12.1
Note that since 0.12.0 has been yanked, changes for this version are listed alongside changes for 0.12.1. Also, changelog entries that were mistakenly omitted for 0.12.0 are included below as well.
Features
- Create a proper space for docs, add info on architecture, and deploy docs to a docsite automatically. (#224, #225, #226, #232, #233, #245)
- The
docs/directory now holds information on contributing, which was previously located atCONTRIBUTING.md, as well as information on using the gem, which was previously located inREADME.md. - However, crucially,
docs/also now includes a breakdown of how this project is structured and how the diffing engine works. This is hopefully helpful to people who want to submit changes to this project. - Additionally, starting with this release, the Markdown files in
docs/will published to a docsite, which can be viewed at https://mcmire.github.io/super_diff. - Publishing of the docsite is automated: when a new release is issued, a new version of the docsite will be published for that release under https://mcmire.github.io/super_diff/releases/RELEASE_VERSION. (https://mcmire.github.io/super_diff will always redirect to the latest release.)
- If any file in
docs/is modified in a pull request, a new version of the docsite will also be automatically deployed just for that pull request, located under https://mcmire.github.io/super_diff/branches/BRANCH_NAME/COMMIT_ID.
- The
- Support the use of primary keys other than
idwhen diffing ActiveRecord models. (#237)
Bug fixes
- Remove rogue
ppstatement (#242)
Other notable changes
- Reorganize codebase (#230)
- To be able to explain the architecture of this project more easily, differs, inspection tree builders, operation tree builders, operation tree flatteners, and operation trees for Ruby have now been relocated under a
Basicfeature module, located inlib/super_diff/basic, which mirrorslib/super_diff/active_record,lib/super_diff/active_support, andlib/super_diff/rspec. - Additionally, all of the files that were previously in
lib/super_diffhave been moved to aCoremodule, and to make the file structure a little flatter,InspectionTreeBuildersin various feature modules have been removed from theObjectInspectionnamespace. - To maintain backward compatibility, all of the original constants still exist, but they've been deprecated, and attempting to use them will result in a warning. They will be removed in a future version.
- For full transparency, here is the list of renames:
- The following constants that were previously available under
SuperDiffare now located underSuperDiff::Core:ColorizedDocumentExtensionsConfigurationGemVersionHelpersImplementationChecksLineRecursionGuardTieredLinesTieredLinesEliderTieredLinesFormatter
- Everything under
SuperDiff::Differsis now underSuperDiff::Basic::Differs - All error classes under
SuperDiff::Errorshave been moved out and are now directly underSuperDiff::Core SuperDiff::ObjectInspection::InspectionTreeis nowSuperDiff::Core::InspectionTree- Everything under
SuperDiff::ObjectInspection::InspectionTreeBuildersis now underSuperDiff::Core::InspectionTreeBuilders - Everything under
SuperDiff::ObjectInspection::Nodesis now underSuperDiff::Core::InspectionTreeNodes - Everything under
SuperDiff::OperationTreeBuildersis now underSuperDiff::Basic::OperationTreeBuilders - Everything under
SuperDiff::OperationTreeFlattenersis now underSuperDiff::Basic::OperationTreeFlatteners - Everything under
SuperDiff::OperationTreesis now underSuperDiff::Basic::OperationTrees - Everything under
SuperDiff::Operationshas been moved out and is now directly underSuperDiff::Core - Everything under
SuperDiff::ActiveRecord::ObjectInspection::InspectionTreeBuildersis now underSuperDiff::ActiveRecord::InspectionTreeBuilders - Everything under
SuperDiff::ActiveSupport::ObjectInspection::InspectionTreeBuildersis now underSuperDiff::ActiveSupport::InspectionTreeBuilders - Everything under
SuperDiff::RSpec::ObjectInspection::InspectionTreeBuildersis now underSuperDiff::RSpec::InspectionTreeBuilders
- The following constants that were previously available under
- To be able to explain the architecture of this project more easily, differs, inspection tree builders, operation tree builders, operation tree flatteners, and operation trees for Ruby have now been relocated under a
Contributors
This release features the following contributors:
Thank you!
0.12.0 [YANKED]
Warning
This release has been yanked, as it included changes that weren't properly
logged in the changelog. This release wasn't ideal as it contained some
leftover print statements, anyway.
Features
- Support the use of primary keys other than
idwhen diffing ActiveRecord
models. (#237)
Contributors
This release features the following contributors:
Thank you!
0.11.0
BREAKING CHANGES
- Change InspectionTree so that it no longer
instance_evals the block it takes. (#210)- If you have a custom InspectionTreeBuilder, you will need to change your
callmethod so that instead of looking like this:it looks something like this instead:def call SuperDiff::ObjectInspection::InspectionTree.new do as_lines_when_rendering_to_lines(collection_bookend: :open) do add_text object.inspect end end end
Note that the following methods yield a new InspectionTree, so the tree needs to be given a new name each time. It is conventional to usedef call SuperDiff::ObjectInspection::InspectionTree.new do |t1| t1.as_lines_when_rendering_to_lines(collection_bookend: :open) do |t2| t2.add_text object.inspect end end end
t1,
t2, etc.:as_lines_when_rendering_to_linesas_prefix_when_rendering_to_linesas_prelude_when_rendering_to_linesas_single_linenestedonly_whenwhen_emptywhen_non_emptywhen_rendering_to_lineswhen_rendering_to_string
- If you have a custom InspectionTreeBuilder, you will need to change your
Features
- Add inspector for RSpec describable matchers not otherwise handled by an explicit inspector. (#203, #219)
- Support diffing date-like objects, e.g.
Datevs.DateorDatevs.DateTime. (#198)
Fixes
- Add inspector for ActiveSupport::OrderedOptions. (#199)
- This prevents the gem from raising an error when the expected value is a Rails response object, e.g.
expect(response).to be_forbidden.
- This prevents the gem from raising an error when the expected value is a Rails response object, e.g.
- Include
extra_failure_linesfrom RSpec metadata in failure output. (#208) - Fix
match_arrayso that it truly accepts a non-array argument, to match RSpec behavior. (#213) - Fix
raise_errorso that it accepts an RSpec matcher argument. (#214)
Improvements
- Improve wording in
raise_errorfailure messages. (#218)
Contributors
This release features the following contributors:
Thank you!
0.10.0
BREAKING CHANGES
- Drop support for Ruby 2.5, 2.6, and 2.7 as well as Rails 5.0, 5.1, and 5.2,
as they have reached (or are about to reach) end-of-life. To use this gem,
you must use at least Ruby 3.x, and if you're using Rails, Rails 6.x. (#187,
#190)
Fixes
- Fix diffing logic for
includematcher so that it knows how to compare fuzzy
matcher objects with other kinds of objects. (#156) - Add a
key_enabledconfiguration option for disabling the key/legend in the
diff output. (#166) - Add a
color_enabledconfiguration option for disabling color. (#138) - Update
super_diff/rails(and, by extension,super_diff/rspec-rails) so
that the ActiveRecord-specific integration isn't loaded if ActiveRecord isn't
available. (#188)