From 967cf8a6e6660f9c37574a8b74369348f319d927 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Thu, 12 Feb 2015 15:21:14 -0500 Subject: [PATCH] chore(all): prepare release 0.5.2 --- bower.json | 2 +- dist/amd/http-client.js | 7 +++++-- dist/commonjs/http-client.js | 7 +++++-- dist/es6/http-client.js | 5 +++-- dist/system/http-client.js | 7 +++++-- doc/CHANGELOG.md | 8 ++++++++ package.json | 2 +- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index 93dcbe0..be16540 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-http-client", - "version": "0.5.1", + "version": "0.5.2", "description": "A simple, restful, message-based wrapper around XMLHttpRequest.", "keywords": [ "aurelia", diff --git a/dist/amd/http-client.js b/dist/amd/http-client.js index 4cd5f04..11d8319 100644 --- a/dist/amd/http-client.js +++ b/dist/amd/http-client.js @@ -22,8 +22,11 @@ define(["exports", "./headers", "./request-builder", "./http-request-message", " client.pendingRequests.splice(index, 1); client.isRequesting = client.pendingRequests.length > 0; - if (!client.isRequesting && client.onRequestsComplete) { - client.onRequestsComplete(); + if (!client.isRequesting) { + var evt = new window.CustomEvent("aurelia-http-client-requests-drained", { bubbles: true, cancelable: true }); + setTimeout(function () { + return document.dispatchEvent(evt); + }, 1); } } diff --git a/dist/commonjs/http-client.js b/dist/commonjs/http-client.js index 27fd046..48017cf 100644 --- a/dist/commonjs/http-client.js +++ b/dist/commonjs/http-client.js @@ -25,8 +25,11 @@ function trackRequestEnd(client, processor) { client.pendingRequests.splice(index, 1); client.isRequesting = client.pendingRequests.length > 0; - if (!client.isRequesting && client.onRequestsComplete) { - client.onRequestsComplete(); + if (!client.isRequesting) { + var evt = new window.CustomEvent("aurelia-http-client-requests-drained", { bubbles: true, cancelable: true }); + setTimeout(function () { + return document.dispatchEvent(evt); + }, 1); } } diff --git a/dist/es6/http-client.js b/dist/es6/http-client.js index 95d4f6c..af0d4a6 100644 --- a/dist/es6/http-client.js +++ b/dist/es6/http-client.js @@ -14,8 +14,9 @@ function trackRequestEnd(client, processor){ client.pendingRequests.splice(index, 1); client.isRequesting = client.pendingRequests.length > 0; - if(!client.isRequesting && client.onRequestsComplete){ - client.onRequestsComplete(); + if(!client.isRequesting){ + var evt = new window.CustomEvent('aurelia-http-client-requests-drained', { bubbles: true, cancelable: true }); + setTimeout(() => document.dispatchEvent(evt), 1); } } diff --git a/dist/system/http-client.js b/dist/system/http-client.js index 31ada19..e5c5eb1 100644 --- a/dist/system/http-client.js +++ b/dist/system/http-client.js @@ -15,8 +15,11 @@ System.register(["./headers", "./request-builder", "./http-request-message", "./ client.pendingRequests.splice(index, 1); client.isRequesting = client.pendingRequests.length > 0; - if (!client.isRequesting && client.onRequestsComplete) { - client.onRequestsComplete(); + if (!client.isRequesting) { + var evt = new window.CustomEvent("aurelia-http-client-requests-drained", { bubbles: true, cancelable: true }); + setTimeout(function () { + return document.dispatchEvent(evt); + }, 1); } } diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index fcfedbb..327275e 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +### 0.5.2 (2015-02-12) + + +#### Bug Fixes + +* **event:** switch from hook to event ([01628f42](http://github.com/aurelia/http-client/commit/01628f42884c899ea5b6cc64ac118e5c8f9413c1)) + + ### 0.5.1 (2015-02-12) diff --git a/package.json b/package.json index 1ac629b..f028fb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-http-client", - "version": "0.5.1", + "version": "0.5.2", "description": "A simple, restful, message-based wrapper around XMLHttpRequest.", "keywords": [ "aurelia",