Skip to content

Update ancestry 4.3.3 → 5.1.0 (major)#1071

Open
depfu[bot] wants to merge 1 commit intodevelopfrom
depfu/update/ancestry-5.1.0
Open

Update ancestry 4.3.3 → 5.1.0 (major)#1071
depfu[bot] wants to merge 1 commit intodevelopfrom
depfu/update/ancestry-5.1.0

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Mar 15, 2026

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ ancestry (4.3.3 → 5.1.0) · Repo · Changelog

Release Notes

5.1.0 (from changelog)

  • update_strategy: :sql now works on all databases (SQLite, MySQL, PostgreSQL) #715
  • Introduce depth constraint validation for subtree moves #713 (thx @wilburhimself)
  • Fix: CHANGELOG HTML entity fix #712 (thx @biow0lf)
  • Testing Ruby 4.0 support #709 (thx @fkmy)
  • Tested against Ruby 2.7–4.0 and Rails 6.0–8.1 #716

Deprecations

These class-level accessors still work but are being phased out. We are moving configuration into baked method bodies and away from class variables. If you depend on reading these at runtime, now is a good time to find alternatives:

  • ancestry_column, ancestry_delimiter, depth_cache_column, counter_cache_column, touch_ancestors

Breaking Changes

  • sort_by_ancestry and check_ancestry_integrity! now delegate to _sort_by_ancestry and _check_ancestry_integrity! with an explicit column parameter. The public API is unchanged.

5.0.0 (from changelog)

  • Fix: siblings now excludes self #710 (thx @chikamichi)
  • Introduce orphan_strategy: :none #658
  • Introduce rebuild_counter_cache! to reset counter caches. #663 #668 (thx @RongRongTeng)
  • Introduce in_subtree_of? instance method #680 (thx @instrumentl)
  • Optimize has_siblings? to use exists? #693 (thx @a5-stable)
  • Fix: humanise model name in error messages #700 (thx @labeebklatif)
  • Fix: touch with sql update strategy
  • Introduce update_strategy: :sql hooks for extension developers
  • Added support for virtual depth column
  • Documentation fixes #664 #667 (thx @motokikando, @onerinas)
  • Introduce build_cache_depth_sql!, a sql alternative to build_cache_depth #654
  • Drop ancestry_primary_key_format #649
  • When destroying orphans, going from leafs up to node #635 (thx @brendon)
  • Changed config setters to class readers #633 (thx @kshurov)
  • Split apply_orphan_strategy into multiple methods #632 #633
  • Ruby 3.4 support
  • Rails 8.0 support

Notable features

Depth scopes now work without cache_depth. But please only use this in background jobs. If you need to do this in the ui, please use cache_depth.

build_cache_depth_sql! is quicker than build_cache_depth! (1 query instead of N+1 queries).

Deprecations

  • Option :depth_cache_column is going away. Please use a single key instead: cache_depth: :depth_cach_column_name. cache_depth: true still defaults to ancestry_depth.

Breaking Changes

  • siblings no longer returns self. This is a bug fix, but does change behavior.
  • Dropped support for Rails < 6.1
  • Renamed internal methods to follow Rails conventions: *_before_save methods renamed to *_before_last_save (e.g., child_ancestry_before_save => child_ancestry_before_last_save)
  • Options are no longer set via class methods. Using has_ancestry is now the only way to enable these features. These are all not part of the public API.
    • These are now class level read only accessors
      • ancestry_base_class (introduced 1.1, removed by #633)
      • ancestry_column (introduced 1.2, removed by #633)
      • ancestry_delimiter (introduced 4.3.0, removed by #633)
      • depth_cache_column (introduced 4.3.0, removed by #654)
    • These no longer have any accessors
      • ancestry_format (introduced 4.3.0, removed by #654)
      • orphan_strategy (introduced 1.1, removed by #617)
      • ancestry_primary_key_format (introduced 4.3.0, removed by #649)
      • touch_ancestors (introduced 2.1, removed by TODO)
  • These are seen as internal and may go away:
    • apply_orphan_strategy Please use orphan_strategy: :none and a custom before_destory instead.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ timeout (indirect, 0.6.0 → 0.6.1) · Repo · Changelog

Release Notes

0.6.1

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 15 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added dependencies Pull requests that update a dependency file Technical debt Technical debt labels Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Technical debt Technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants