Skip to content

v0.12.0

Compare
Choose a tag to compare
@jeffbski jeffbski released this 10 Apr 19:38
· 193 commits to master since this release

v0.12 has a notable non-breaking change. It's purpose is to deprecate single dispatch form of process hook to prepare for a breaking change in v0.13. In development mode using the single dispatch form of process hook will warn in the console. The single dispatch mode was a source of confusion for users and complexity in the source code.

  • Single dispatch mode - process(deps, dispatch) is deprecated, use the multi-dispatch version process(deps, dispatch, done) calling done when finished dispatching.
  • New option warnTimeout defaults to 60000 (ms == one minute) which warns (in development build only) when the logic exceeds the specified time without completion. Adjust this value or set it to 0 if you have logic that needs to exceed this time or purposefully never ends (like listening to a web socket).

Migration steps

  1. Search for logic with process hook defined that uses dispatch but not done and convert to the multi-dispatch version process(deps, dispatch, done) calling done when finished dispatching. README and docs/api.md have many examples.
  2. For any long running logic or logic that never ends (like those listening to a web socket), set the new option warnTimeout to the milliseconds to wait before warning to the console (defaults to 60000 ms, one minute). For never ending logic, set it to 0 to disable the warning.