Releases: XbyOrange/mercury
Releases · XbyOrange/mercury
Stats property
Added
- Add
stats
property containing counters of method actions executions.
Changed
- Upgrade devDependencies
Selectors can return array of sources
Added
- Selectors can now return an array of sources.
- Selectors can now return sources defined as objects containing
query
and/orcatch
property.
Fixed
- Fix Sonar code smell.
Default value callback
Added
- defaultValue argument in Origin Constructor now can be a function. It will be called to obtain the defaultValue, passing to it the current query as argument.
- Add utility for testing catch functions of selector sources.
Sources handler
Added
- Accept options object in Origin constructor as last argument.
- Assign to the
_id
private property the value received in new option "uuid", when received. - Last argument in Selectors now can be an object containing "defaultValue" and/or "uuid" options.
- Add "sources" handler for managing all instantiated mercury sources as a group.
- Add "config" method to Origin and sources handlers. From now, all Origin implementations can define its own
_config
method, which will be called with the resultant config each time the "config" method is called.
Changed
_id
private property now is a hash of default id and default value (if no "uuid" option is received)- Objects without query now will emit "undefined" as "_queryId" property in "cleanAny" events, instead of "null".
Fixed
- Emit
_root
property on cleanAny events of Selectors.
Improve queries interface and events data
Added
- Expose
_root
property in queried instances to allow identify the root instance. - Emit
_root
property on cleanAny events.
Fixed
- Expose custom queries methods in
customQueries
property, as described in documentation. - Expose test.queries properties for concurrent sources.
First public release
- Forked from xByOrange reactive-data-source v1.7.0 private library. (Expose only Origin and Selector in this one)