Repository navigation
Version 0.11.0
Pre-release
Pre-release
Version 0.11.0
Breaking Changes
- Async computed signals no longer return
undefinedwhile not resolved, but a SymbolUNSETtyped as the type of the signal. - Computed signals no longer return the last cached value if an error occurred but instead re-throw the error.
New Features
- Case matching syntax for
effect():- Instead of a single callback, first parameter can be an object with
ok(happy path, required),err(error handling, optional) andnil(unset value, optional) keys and callbacks to handle each case. - Rest parameters can be signal variables, for which Cause & Effect will catch errors or unset values and pass their values as parameters to the
okcallback if all is well.
- Instead of a single callback, first parameter can be an object with
Bugfixes
- Memoized computed signals with an unchanged value block propagation of upstream changes now correctly.
- Prevent circular dependencies if iteration counts exceeds 1000 runs. (Cause & Effect allows circular dependencies that settle at some point, but we prevent it now when the number of iterations reach a dimension that can hardly be intentional.)
Docs & Tests
- Enhanced README
- Extended tests to cover API changes, new features and bugfixes
What's Changed
- Feature/v0.11.0 by @estherbrunner in #2
- Bugfix/memoization propagation by @estherbrunner in #1
New Contributors
- @estherbrunner made their first contribution in #2
Full Changelog: https://github.com/zeixcom/cause-effect/commits/v0.11.0