Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 8db0159

Browse files
committed
chore: release v0.8.0
1 parent d3c59d0 commit 8db0159

11 files changed

+72
-65
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="0.8.0"></a>
2+
# [0.8.0](https://github.com/angular/zone.js/compare/v0.7.8...0.8.0) (2017-03-10)
3+
4+
5+
6+
### Features
7+
8+
* Upgrade TypeScript to v2.2.1
9+
10+
11+
112
<a name="0.7.8"></a>
213
## [0.7.8](https://github.com/angular/zone.js/compare/v0.7.6...0.7.8) (2017-03-10)
314

dist/fake-async-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
return function () {
9999
var args = [];
100100
for (var _i = 0; _i < arguments.length; _i++) {
101-
args[_i - 0] = arguments[_i];
101+
args[_i] = arguments[_i];
102102
}
103103
fn.apply(global, args);
104104
if (_this._lastError === null) {

dist/mocha-patch.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
it: Mocha.it
4949
};
5050
function modifyArguments(args, syncTest, asyncTest) {
51-
var _loop_1 = function(i) {
51+
var _loop_1 = function (i) {
5252
var arg = args[i];
5353
if (typeof arg === 'function') {
5454
// The `done` callback is only passed through if the function expects at
@@ -103,7 +103,6 @@
103103
};
104104
return modifyArguments(args, syncTest, asyncTest);
105105
}
106-
107106
context.describe = context.suite = Mocha.describe = function () {
108107
return mochaOriginal.describe.apply(this, wrapDescribeInZone(arguments));
109108
};

dist/wtf.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* found in the LICENSE file at https://angular.io/license
2020
*/
2121
(function (global) {
22-
23-
2422
// Detect and setup WTF.
2523
var wtfTrace = null;
2624
var wtfEvents = null;
@@ -87,13 +85,13 @@
8785
return retValue;
8886
};
8987

90-
WtfZoneSpec.forkInstance = wtfEnabled && wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)');
91-
WtfZoneSpec.scheduleInstance = {};
92-
WtfZoneSpec.cancelInstance = {};
93-
WtfZoneSpec.invokeScope = {};
94-
WtfZoneSpec.invokeTaskScope = {};
9588
return WtfZoneSpec;
9689
}());
90+
WtfZoneSpec.forkInstance = wtfEnabled && wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)');
91+
WtfZoneSpec.scheduleInstance = {};
92+
WtfZoneSpec.cancelInstance = {};
93+
WtfZoneSpec.invokeScope = {};
94+
WtfZoneSpec.invokeTaskScope = {};
9795
function shallowObj(obj, depth) {
9896
if (!depth)
9997
return null;

dist/wtf.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zone-mix.js

+18-19
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* Use of this source code is governed by an MIT-style license that can be
1919
* found in the LICENSE file at https://angular.io/license
2020
*/
21-
2221
var Zone$1 = (function (global) {
2322
if (global['Zone']) {
2423
throw new Error('Zone already loaded.');
@@ -182,7 +181,8 @@ var Zone$1 = (function (global) {
182181
else {
183182
task.runCount = 0;
184183
this._updateTaskCount(task, -1);
185-
reEntryGuard && task._transitionTo(notScheduled, running, notScheduled);
184+
reEntryGuard &&
185+
task._transitionTo(notScheduled, running, notScheduled);
186186
}
187187
_currentZoneFrame = _currentZoneFrame.parent;
188188
_currentTask = previousTask;
@@ -229,9 +229,9 @@ var Zone$1 = (function (global) {
229229
zoneDelegates[i]._updateTaskCount(task.type, count);
230230
}
231231
};
232-
Zone.__symbol__ = __symbol__;
233232
return Zone;
234233
}());
234+
Zone.__symbol__ = __symbol__;
235235
var DELEGATE_ZS = {
236236
name: '',
237237
onHasTask: function (delegate, _, target, hasTaskState) {
@@ -240,9 +240,7 @@ var Zone$1 = (function (global) {
240240
onScheduleTask: function (delegate, _, target, task) {
241241
return delegate.scheduleTask(target, task);
242242
},
243-
onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) {
244-
return delegate.invokeTask(target, task, applyThis, applyArgs);
245-
},
243+
onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },
246244
onCancelTask: function (delegate, _, target, task) {
247245
return delegate.cancelTask(target, task);
248246
}
@@ -551,7 +549,7 @@ var Zone$1 = (function (global) {
551549
}
552550
}
553551
while (_uncaughtPromiseErrors.length) {
554-
var _loop_1 = function() {
552+
var _loop_1 = function () {
555553
var uncaughtPromiseError = _uncaughtPromiseErrors.shift();
556554
try {
557555
uncaughtPromiseError.zone.runGuarded(function () {
@@ -844,9 +842,9 @@ var Zone$1 = (function (global) {
844842
}
845843
if (NativePromise) {
846844
patchThen(NativePromise);
847-
var fetch = global['fetch'];
848-
if (typeof fetch == 'function') {
849-
global['fetch'] = zoneify(fetch);
845+
var fetch_1 = global['fetch'];
846+
if (typeof fetch_1 == 'function') {
847+
global['fetch'] = zoneify(fetch_1);
850848
}
851849
}
852850
// This is not part of public API, but it is usefull for tests, so we expose it.
@@ -1181,7 +1179,7 @@ var Zone$1 = (function (global) {
11811179
* @fileoverview
11821180
* @suppress {undefinedVars,globalThis}
11831181
*/
1184-
var zoneSymbol = function (n) { return ("__zone_symbol__" + n); };
1182+
var zoneSymbol = function (n) { return "__zone_symbol__" + n; };
11851183
var _global$1 = typeof window === 'object' && window || typeof self === 'object' && self || global;
11861184
function bindArguments(args, source) {
11871185
for (var i = args.length - 1; i >= 0; i--) {
@@ -1193,7 +1191,7 @@ function bindArguments(args, source) {
11931191
}
11941192
function patchPrototype(prototype, fnNames) {
11951193
var source = prototype.constructor['name'];
1196-
var _loop_1 = function(i) {
1194+
var _loop_1 = function (i) {
11971195
var name_1 = fnNames[i];
11981196
var delegate = prototype[name_1];
11991197
if (delegate) {
@@ -1483,8 +1481,8 @@ function makeZoneAwareListeners(fnName) {
14831481
return [];
14841482
}
14851483
return target[EVENT_TASKS]
1486-
.filter(function (task) { return task.data.eventName === eventName; })
1487-
.map(function (task) { return task.data.handler; });
1484+
.filter(function (task) { return task.data['eventName'] === eventName; })
1485+
.map(function (task) { return task.data['handler']; });
14881486
};
14891487
}
14901488
var zoneAwareAddEventListener = makeZoneAwareAddListener(ADD_EVENT_LISTENER, REMOVE_EVENT_LISTENER);
@@ -1984,7 +1982,7 @@ var unboundKey = zoneSymbol('unbound');
19841982
// for `onwhatever` properties and replace them with zone-bound functions
19851983
// - Chrome (for now)
19861984
function patchViaCapturingAllTheEvents() {
1987-
var _loop_1 = function(i) {
1985+
var _loop_1 = function (i) {
19881986
var property = eventNames[i];
19891987
var onproperty = 'on' + property;
19901988
self.addEventListener(property, function (event) {
@@ -2091,7 +2089,7 @@ function patchXHR(window) {
20912089
return pendingTask;
20922090
}
20932091
function scheduleTask(task) {
2094-
self[XHR_SCHEDULED] = false;
2092+
XMLHttpRequest[XHR_SCHEDULED] = false;
20952093
var data = task.data;
20962094
// remove existing event listener
20972095
var listener = data.target[XHR_LISTENER];
@@ -2102,7 +2100,7 @@ function patchXHR(window) {
21022100
if (data.target.readyState === data.target.DONE) {
21032101
// sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
21042102
// readyState=4 multiple times, so we need to check task state here
2105-
if (!data.aborted && self[XHR_SCHEDULED] && task.state === 'scheduled') {
2103+
if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === 'scheduled') {
21062104
task.invoke();
21072105
}
21082106
}
@@ -2113,7 +2111,7 @@ function patchXHR(window) {
21132111
data.target[XHR_TASK] = task;
21142112
}
21152113
sendNative.apply(data.target, data.args);
2116-
self[XHR_SCHEDULED] = true;
2114+
XMLHttpRequest[XHR_SCHEDULED] = true;
21172115
return task;
21182116
}
21192117
function placeholderCallback() { }
@@ -2177,7 +2175,8 @@ function findPromiseRejectionHandler(evtName) {
21772175
if (_global['PromiseRejectionEvent']) {
21782176
Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =
21792177
findPromiseRejectionHandler('unhandledrejection');
2180-
Zone[zoneSymbol('rejectionHandledHandler')] = findPromiseRejectionHandler('rejectionhandled');
2178+
Zone[zoneSymbol('rejectionHandledHandler')] =
2179+
findPromiseRejectionHandler('rejectionhandled');
21812180
}
21822181

21832182
/**

dist/zone-node.js

+11-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* Use of this source code is governed by an MIT-style license that can be
1919
* found in the LICENSE file at https://angular.io/license
2020
*/
21-
2221
var Zone$1 = (function (global) {
2322
if (global['Zone']) {
2423
throw new Error('Zone already loaded.');
@@ -182,7 +181,8 @@ var Zone$1 = (function (global) {
182181
else {
183182
task.runCount = 0;
184183
this._updateTaskCount(task, -1);
185-
reEntryGuard && task._transitionTo(notScheduled, running, notScheduled);
184+
reEntryGuard &&
185+
task._transitionTo(notScheduled, running, notScheduled);
186186
}
187187
_currentZoneFrame = _currentZoneFrame.parent;
188188
_currentTask = previousTask;
@@ -229,9 +229,9 @@ var Zone$1 = (function (global) {
229229
zoneDelegates[i]._updateTaskCount(task.type, count);
230230
}
231231
};
232-
Zone.__symbol__ = __symbol__;
233232
return Zone;
234233
}());
234+
Zone.__symbol__ = __symbol__;
235235
var DELEGATE_ZS = {
236236
name: '',
237237
onHasTask: function (delegate, _, target, hasTaskState) {
@@ -240,9 +240,7 @@ var Zone$1 = (function (global) {
240240
onScheduleTask: function (delegate, _, target, task) {
241241
return delegate.scheduleTask(target, task);
242242
},
243-
onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) {
244-
return delegate.invokeTask(target, task, applyThis, applyArgs);
245-
},
243+
onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { return delegate.invokeTask(target, task, applyThis, applyArgs); },
246244
onCancelTask: function (delegate, _, target, task) {
247245
return delegate.cancelTask(target, task);
248246
}
@@ -551,7 +549,7 @@ var Zone$1 = (function (global) {
551549
}
552550
}
553551
while (_uncaughtPromiseErrors.length) {
554-
var _loop_1 = function() {
552+
var _loop_1 = function () {
555553
var uncaughtPromiseError = _uncaughtPromiseErrors.shift();
556554
try {
557555
uncaughtPromiseError.zone.runGuarded(function () {
@@ -844,9 +842,9 @@ var Zone$1 = (function (global) {
844842
}
845843
if (NativePromise) {
846844
patchThen(NativePromise);
847-
var fetch = global['fetch'];
848-
if (typeof fetch == 'function') {
849-
global['fetch'] = zoneify(fetch);
845+
var fetch_1 = global['fetch'];
846+
if (typeof fetch_1 == 'function') {
847+
global['fetch'] = zoneify(fetch_1);
850848
}
851849
}
852850
// This is not part of public API, but it is usefull for tests, so we expose it.
@@ -1181,7 +1179,7 @@ var Zone$1 = (function (global) {
11811179
* @fileoverview
11821180
* @suppress {undefinedVars,globalThis}
11831181
*/
1184-
var zoneSymbol = function (n) { return ("__zone_symbol__" + n); };
1182+
var zoneSymbol = function (n) { return "__zone_symbol__" + n; };
11851183
var _global$1 = typeof window === 'object' && window || typeof self === 'object' && self || global;
11861184

11871185

@@ -1460,8 +1458,8 @@ function makeZoneAwareListeners(fnName) {
14601458
return [];
14611459
}
14621460
return target[EVENT_TASKS]
1463-
.filter(function (task) { return task.data.eventName === eventName; })
1464-
.map(function (task) { return task.data.handler; });
1461+
.filter(function (task) { return task.data['eventName'] === eventName; })
1462+
.map(function (task) { return task.data['handler']; });
14651463
};
14661464
}
14671465
var zoneAwareAddEventListener = makeZoneAwareAddListener(ADD_EVENT_LISTENER, REMOVE_EVENT_LISTENER);

0 commit comments

Comments
 (0)