Skip to content

Version 0.11.0

Pre-release
Pre-release

Choose a tag to compare

@estherbrunner estherbrunner released this 27 Feb 00:21
· 385 commits to main since this release
0ef1367

Version 0.11.0

Breaking Changes

  • Async computed signals no longer return undefined while not resolved, but a Symbol UNSET typed 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) and nil (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 ok callback if all is well.

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

New Contributors

Full Changelog: https://github.com/zeixcom/cause-effect/commits/v0.11.0