ryanfb / cts-cite-driver

Driver JavaScript app for CTS/CITE integration
http://ryanfb.github.com/cts-cite-driver/
1 stars 3 forks source link

Update github-pages: 221 → 222 (major) #70

Closed depfu[bot] closed 2 years ago

depfu[bot] commented 2 years ago

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?

✳️ github-pages (221 → 222) · Repo

Sorry, we couldn't find anything useful about this release.

↗️ em-websocket (indirect, 0.5.2 → 0.5.3) · Repo · Changelog

Commits

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

↗️ http_parser.rb (indirect, 0.6.0 → 0.8.0) · Repo

Commits

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

↗️ racc (indirect, 1.5.2 → 1.6.0) · Repo · Changelog

Commits

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

↗️ zeitwerk (indirect, 2.4.2 → 2.5.1) · Repo · Changelog

Release Notes

2.5.1 (from changelog)

  • Restores support for namespaces that are not hashable. For example namespaces that override the hash method with a different arity as shown in #188.

2.5.0 (from changelog)

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.

  • The block of the existing Zeitwerk::Loader#on_load receives also the value stored in the constant, and the absolute path to its corresponding file or directory:

    loader.on_load("Service::NotificationsGateway") do |klass, abspath|
      # ...
    end

    Remember that blocks can be defined to take less arguments than passed. So this change is backwards compatible. If you had

    loader.on_load("Service::NotificationsGateway") do
      Service::NotificationsGateway.endpoint = ...
    end

    That works.

  • Implements Zeitwerk::Loader#on_unload, which allows you to configure blocks of code to be executed before a certain class or module gets unloaded:

    loader.on_unload("Country") do |klass, _abspath|
      klass.clear_cache
    end

    These callbacks are invoked during unloading, which happens in an unspecified order. Therefore, they should not refer to reloadable constants.

    You can also be called for all unloaded objects:

    loader.on_unload 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.

Assorted

  • Performance improvements.

  • Documentation improvements.

  • The method Zeitwerk::Loader#eager_load accepts a force flag:

    loader.eager_load(force: true)

    If passed, eager load exclusions configured with do_not_eager_load are not honoured (but ignored files and directories are).

    This may be handy for test suites that eager load in order to ensure all files define the expected constant.

  • Eliminates internal use of File.realpath. One visible consequence is that in logs root dirs are shown as configured if they contain symlinks.

  • When an autoloaded file does not define the expected constant, Ruby clears state differently starting with Ruby 3.1. Unloading has been revised to be compatible with both behaviours.

  • Logging prints a few new traces.

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.


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 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)