v0.12.0
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 versionprocess(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
- Search for logic with process hook defined that uses
dispatch
but notdone
and convert to the multi-dispatch versionprocess(deps, dispatch, done)
calling done when finished dispatching. README and docs/api.md have many examples. - 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 to0
to disable the warning.