Releases: jankuca/fluo
v1.0.3
- Added
Publisher#then()
andPublisher#catch()
makingPublisher
a thenable thus making it possible to use actions as a promises.
var action = fluo.createAction({ asyncResult: true });
action.then(function (result) { console.log('resolved: ' + result); });
action.listen(function () {
action.completed('xyz'); // logs 'resolved: xyz'
});
action();
- Renamed
Publisher#promise()
toPublisher#resolve()
and addedPublisher#reject()
which are aliases for triggering thecompleted
andfailed
child actions. - Cleaner npm package.
Introducing Fluo
This is a fork of the Reflux project. Here is a change log describing what is different in Fluo.
v1.0.0
-
Forked and renamed to Fluo.
-
Core refactored to a standard prototype-based model.
- The inheritance between fluo components is now clear.
- It is now possible to leverage the
class
syntax provided by ES6 and CoffeeScript. - Actions are now
instanceof fluo.Action
while remaining callable functors. - The
ListenerMethods
andPublisherMethods
objects were turned into proper prototypes (Listener.prototype
andPublisher.prototype
respectively).
var MyStore = function () { fluo.Store.call(this); }; inherits(MyStore, fluo.Store); MyStore.prototype.getStuff = function () { /* ... */ };
-
Publisher#trigger()
renamed to#triggerSync()
,Publisher#triggerAsync()
renamed to#trigger()
. The default functor behavior is async. -
Publisher#eventLabel
renamed to#eventType
;Action#actionName
renamed to#actionType
. -
Errors about overriding prototype methods are no longer thrown. It is discouraged though to override without sub-classing.
-
Removed the possibility to simply set
#preEmit()
and any other properties onAction
instances after creation. This is due to the action being a functor. It can sill be done viaObject.getPrototypeOf(action).preEmit = …
. -
Removed the
mixins
option of stores. If a user really wants to use this pattern, they can do it after instantiation. -
ListenerMixin
andPublisherMixin
were deprecated.
v1.0.1
- (Brings back stuff which actually did not make sense to remove or change.)
v1.0.2
-
Merged
Publisher#listenAndPromise()
withPublisher#listen()
based on the return value of the registered callback.action.listen(function () { return new Promise(...); });
-
Renamed internal variables in source and tests from
Reflux
tofluo
. -
Removed build results. Travis CI is being used from now on to automatically upload a release for every tag.