Skip to content

Commit

Permalink
chore(all): prepare release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Dec 3, 2016
1 parent 677e793 commit 0aefb57
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 74 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-event-aggregator",
"version": "1.0.0",
"version": "1.0.1",
"description": "A lightweight pub/sub messaging system for app-wide or per-object loosely coupled events.",
"keywords": [
"aurelia",
Expand Down
32 changes: 20 additions & 12 deletions dist/amd/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ define(['exports', 'aurelia-logging'], function (exports, _aureliaLogging) {
return Handler;
}();

function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

var EventAggregator = exports.EventAggregator = function () {
function EventAggregator() {

Expand All @@ -70,24 +86,16 @@ define(['exports', 'aurelia-logging'], function (exports, _aureliaLogging) {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
};
Expand Down
32 changes: 20 additions & 12 deletions dist/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ class Handler {
}
}

function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

/**
* Represents a disposable subsciption to an EventAggregator event.
*/
Expand Down Expand Up @@ -56,24 +72,16 @@ export class EventAggregator {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
}
Expand Down
32 changes: 20 additions & 12 deletions dist/commonjs/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ var Handler = function () {
return Handler;
}();

function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

var EventAggregator = exports.EventAggregator = function () {
function EventAggregator() {

Expand All @@ -56,24 +72,16 @@ var EventAggregator = exports.EventAggregator = function () {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
};
Expand Down
33 changes: 21 additions & 12 deletions dist/es2015/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ let Handler = class Handler {
}
};


function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

export let EventAggregator = class EventAggregator {
constructor() {
this.eventLookup = {};
Expand All @@ -35,24 +52,16 @@ export let EventAggregator = class EventAggregator {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
}
Expand Down
32 changes: 20 additions & 12 deletions dist/native-modules/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ var Handler = function () {
return Handler;
}();

function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

export var EventAggregator = function () {
function EventAggregator() {

Expand All @@ -43,24 +59,16 @@ export var EventAggregator = function () {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
};
Expand Down
32 changes: 20 additions & 12 deletions dist/system/aurelia-event-aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ System.register(['aurelia-logging'], function (_export, _context) {



function invokeCallback(callback, data, event) {
try {
callback(data, event);
} catch (e) {
logger.error(e);
}
}

function invokeHandler(handler, data) {
try {
handler.handle(data);
} catch (e) {
logger.error(e);
}
}

function includeEventsIn(obj) {
var ea = new EventAggregator();

Expand Down Expand Up @@ -79,24 +95,16 @@ System.register(['aurelia-logging'], function (_export, _context) {
subscribers = subscribers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i](data, event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeCallback(subscribers[i], data, event);
}
}
} else {
subscribers = this.messageHandlers.slice();
i = subscribers.length;

try {
while (i--) {
subscribers[i].handle(event);
}
} catch (e) {
logger.error(e);
while (i--) {
invokeHandler(subscribers[i], event);
}
}
};
Expand Down
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="1.0.1"></a>
## [1.0.1](https://github.com/aurelia/event-aggregator/compare/1.0.0...v1.0.1) (2016-12-03)


### Bug Fixes

* **index:** handle errors per callback invocation ([dc7819f](https://github.com/aurelia/event-aggregator/commit/dc7819f))



<a name="1.0.0"></a>
# [1.0.0](https://github.com/aurelia/event-aggregator/compare/1.0.0-rc.1.0.0...v1.0.0) (2016-07-27)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-event-aggregator",
"version": "1.0.0",
"version": "1.0.1",
"description": "A lightweight pub/sub messaging system for app-wide or per-object loosely coupled events.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 0aefb57

Please sign in to comment.