- Message bus integration has been removed from machina core, and now exists as plugins. For integration with postal.js, see machina.postal
- Due to the above change, the only "messaging-related" metadata on an FSM now is the "namespace" value that can be passed as the FSM is created. This value is optional, and will be given a default if none is provided. Messaging plugins can utilize this value as a channel/namespace name and/or topic prefix.
- A "priorState" member has been added to the Fsm.
- build bits updated to latest anvil.js (0.8.9)
- added beginnings of connectivity example
- updated ext dependencies (postal, etc.)
- added bower component.json
- event names are now all lower case
- FSM constructor only handles an eventListeners object (not the old array of strings to pre-populate event names)
- bug fixed where event queue would still be replayed on a state that transitioned during its entry action
- transitioned and transitioning events are now just a single "transition" event
- FSM constructor function supports inheritance via an
extend
function - working mostly identical to backbone.js objects. - FSMs can have a top-level 'catch-all' ("*") handler defined, which would apply to any state, unless the state overrides it with a state-specific catch-all handler.
- FSM states now have an
_onExit
handler. - The
fireEvent
has been removed. Useemit
or thetrigger
alias. This is a breaking API change. - State input handlers can now be a string value (indicating that a transition should occur to a state matching that string value) in addition to a function.
- All internal events have been refactored to emit single argument payloads. This is a breaking API change.
- Fixed a bug in the internal deepExtend method (see this issue).
- The
initialize
call will now receive the arguments passed to the constructor (see this issue). - The commonjs/node.s wrapper now returns a factory, to which you must pass dependencies (underscore, in this case). This is a breaking API change
- The build process now outputs one module that can be used as a commonjs, AMD or standard client lib.
- State handlers can optionally return a string value of the state to which you want to transition.
- Transition events now include an
action
member which contains the "state.handler" value (string) indicating the current action which caused the transition. - Updated license info (still MIT, GPL >= 2.0)
- Removed deprecated anvil dependency references
- Underscore is no longer required to be passed into the factory function for node usage. It will be required behind the scenes if not provided.