Releases: nx-js/observer-util
Releases · nx-js/observer-util
v4.2.2
v4.2.1
Fixes
- Fixed object values in ES6 collections (Map, Set, WeakMap, WeakSet) not being wrapped by observables when requested from inside reactions. (This caused reactions not running in some cases when an ES6 collection was part of an observable store.)
v4.2.0
Features
- Symbol keyed and function valued properties are also observables. (Well known symbol keyed props are still not observables and they will likely never be).
- Mutations in reactions are no longer forbidden and reactions may trigger other reactions. Infinite loops are cut in case of the default scheduler, but they may occur for custom schedulers - based on its implementation.
Fixes
- Nesting reactions works properly from now on.
v4.1.3
Fixes
- @BenoitZugmeyer Fixed using none primitive keys in observable ES6 data structures (Map, Set, WeakMap, WeakSet).
v4.1.2
Fixes
- Improved built-in detection. It should not throw errors for built-ins with internal slots anymore.
- Do not violate Proxy invariant for none writable, none configurable object valued properties. These are silently not reactive, instead of throwing an error from now on.
v4.1.1
Fixes
- Fixed an infinite loop issue with the new debugger
v4.1.0
Features
- Added a debugger option to
observe
. - Added typescript type definitions.
Fixes
- Added reactivity for
has
/in
operations. - Never trigger a reaction more than once for a single operation.
- Fixed reactivity in case of mutating sparse arrays at an unused index, which is smaller then the arrays length.
Others
- Removed dynamic type checks, use TypeScript for type safety.
v4.0.1
Fixes
- Removed package-lock
v4.0.0
Breaking changes
- Removed
unqueue
, use the observescheduler
option instead with anadd
anddelete
method. - Removed
exec
,observe
returns a reaction - that you can call directly - instead. - Removed
observable.$raw
, use theraw(observable)
function instead to get the raw object. - Reactions are executed synchronously on observable mutations by default. You can get back the old behavior by using a custom
scheduler
option inobserve
. - Removed
nextTick
, it is not needed anymore in case of synchronous reaction scheduling.
Features
- Added the
raw
function, which returns the raw object when an observable is passed to it. - Added a second options argument to
observe
, which can make it lazy or use a custom reaction scheduler. observe
returns a reaction function, which is a transparent proxy of the original function. Call this function, instead ofexec(fn)
.
Fixes
- DOM Nodes won’t throw when they are wrapped by observables.
- Out of bound array mutations will correctly trigger length observers.
- Fixed a memory leak in case of very dynamic functions (lots of conditionals and loops).