Skip to content

v3.0.0 Pre-release

Pre-release
Pre-release
Compare
Choose a tag to compare
@flux627 flux627 released this 05 Nov 18:13
· 265 commits to develop since this release

This release enables the ability to change sets of Updater and Effects facilitated by the interface HandlerVersion. HandlerVersions have a versionName string, and also Updater and Effect arrays. When you instantiate an implementation of AbstractActionHandler, you give it an array of HandlerVersions. By default, it will load either the one named v1 or the first one, if one by that name does not exist. To change versions, simply return a string from your Updater's apply function. If a HandlerVersion exists with a versionName as the returned string, it will switch to that HandlerVersion.

Breaking changes

  • Interfaces have been updated/restructured
    • There is now a parent interface ActionListener that Updater and Effect interfaces inherit from
    • Updater's run attribute has been renamed to apply; new optional revert attribute
    • New optional onRollback parameter on Effect
    • New HandlerVersion interface
    • IndexState now requires an additional handlerVersionName attribute
    • IndexState now keeps track of isReplay state
  • AbstractActionHandler
    • Constructor now takes an array of HandlerVersions instead of Updater and Effect arrays
    • updateIndexState now takes a handlerVersionName parameter
    • runUpdaters has been renamed to applyUpdaters
    • When the apply method on Updaters return a value, this signals runUpdaters to update the HandlerVersion to the returned versionName
    • To accommodate changing HandlerVersions in the middle of a block, runEffects now takes a versionedActions argument to decide which effects to run

Bugfixes

  • Example now successfully recovers from micro-forks