Build(deps): Bump zeitwerk from 2.4.2 to 2.5.0 (PR #14670)

Bumps zeitwerk from 2.4.2 to 2.5.0.

Changelog

Sourced from zeitwerk's changelog.

2.5.0 (20 October 2021)

Breaking changes

  • Requires Ruby 2.5.

  • Deletes the long time deprecated preload API. Instead of:

    loader.preload("app/models/user.rb")
    

    just reference the constant on setup:

    loader.on_setup { User }
    

    If you want to eager load a namespace, use the constants API:

    loader.on_setup do
      Admin.constants(false).each { |cname| Admin.const_get(cname) }
    end
    

Bug fixes

  • Fixes a bug in which a certain valid combination of overlapping trees managed by different loaders and ignored directories was mistakenly reported as having conflicting directories.

  • Detects external namespaces defined with Module#autoload. If your project reopens a 3rd party namespace, Zeitwerk already detected it and did not consider the namespace to be managed by the loader (automatically descends, ignored for reloads, etc.). However, the loader did not do that if the namespace had only an autoload in the 3rd party code yet to be executed. Now it does.

Callbacks

  • Implements Zeitwerk::Loader#on_setup, which allows you to configure blocks of code to be executed on setup and on each reload. When the callback is fired, the loader is ready, you can refer to project constants in the block.

    See the documentation for further details.

  • There is a new catch-all Zeitwerk::Loader#on_load that takes no argument and is triggered for all loaded objects:

    loader.on_load do |cpath, value, abspath|
      # ...
    end
    

    Please, remember that if you want to trace the activity of a loader, Zeitwerk::Loader#log! logs plenty of information.

    See the documentation for further details.

... (truncated)

Commits
  • e9fc5de Version 2.5.0
  • bdbd087 Version 2.5.0.beta6
  • 9d16f22 Update CHANGELOG
  • 2ff7cd8 Support the new autoload behaviour in 3.1
  • 7a1c64f Document alternatives to the preload API
  • fb29058 CHANGELOG reorder
  • 615005d Organize CHANGELOG for 2.5.0
  • 1772b55 Version 2.5.0.beta5
  • 2753f0a Let Zeitwer::Loader#eager_load accept a force flag
  • 59735b0 Document warnings about circular dependencies
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don’t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

GitHub