Skip to content

Releases: jankuca/fluo

v1.0.3

22 Feb 15:25
Compare
Choose a tag to compare
  • Added Publisher#then() and Publisher#catch() making Publisher 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() to Publisher#resolve() and added Publisher#reject() which are aliases for triggering the completed and failed child actions.
  • Cleaner npm package.

Introducing Fluo

21 Feb 19:16
Compare
Choose a tag to compare

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 and PublisherMethods objects were turned into proper prototypes (Listener.prototype and Publisher.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 on Action instances after creation. This is due to the action being a functor. It can sill be done via Object.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 and PublisherMixin were deprecated.

v1.0.1

  • (Brings back stuff which actually did not make sense to remove or change.)

v1.0.2

  • Merged Publisher#listenAndPromise() with Publisher#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 to fluo.

  • Removed build results. Travis CI is being used from now on to automatically upload a release for every tag.