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

Commit ce47cfb

Browse files
committed
chore: release v0.7.8
1 parent 8b2543e commit ce47cfb

23 files changed

+1685
-634
lines changed

Diff for: CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
<a name="0.7.8"></a>
2+
## [0.7.8](https://github.com/angular/zone.js/compare/v0.7.6...0.7.8) (2017-03-10)
3+
4+
5+
### Bug Fixes
6+
7+
* **core:** remove debugger ([#639](https://github.com/angular/zone.js/issues/639)) ([0534b19](https://github.com/angular/zone.js/commit/0534b19))
8+
* **error:** fix [#618](https://github.com/angular/zone.js/issues/618), ZoneAwareError should copy Error's static propeties ([#647](https://github.com/angular/zone.js/issues/647)) ([2d30914](https://github.com/angular/zone.js/commit/2d30914))
9+
* **jasmine:** support "pending" `it` clauses with no test body ([96cb3d0](https://github.com/angular/zone.js/commit/96cb3d0)), closes [#659](https://github.com/angular/zone.js/issues/659)
10+
* **minification:** fix [#607](https://github.com/angular/zone.js/issues/607) to change catch variable name to error/err ([#609](https://github.com/angular/zone.js/issues/609)) ([33d0d8d](https://github.com/angular/zone.js/commit/33d0d8d))
11+
* **node:** patch crypto as macroTask and add test cases for crypto, remove http patch ([#612](https://github.com/angular/zone.js/issues/612)) ([9e81037](https://github.com/angular/zone.js/commit/9e81037))
12+
* **package:** use fixed version typescript,clang-format and jasmine ([#650](https://github.com/angular/zone.js/issues/650)) ([84459f1](https://github.com/angular/zone.js/commit/84459f1))
13+
* **patch:** check timer patch return undefined ([#628](https://github.com/angular/zone.js/issues/628)) ([47962df](https://github.com/angular/zone.js/commit/47962df))
14+
* **patch:** fix [#618](https://github.com/angular/zone.js/issues/618), use zoneSymbol as property name to avoid name conflict ([#645](https://github.com/angular/zone.js/issues/645)) ([fcd8be5](https://github.com/angular/zone.js/commit/fcd8be5))
15+
* **task:** findEventTask should return Task array ([#633](https://github.com/angular/zone.js/issues/633)) ([14c7a6f](https://github.com/angular/zone.js/commit/14c7a6f))
16+
* **task:** fix [#638](https://github.com/angular/zone.js/issues/638), eventTask/Periodical task should not be reset after cancel in running state ([#642](https://github.com/angular/zone.js/issues/642)) ([eb9250d](https://github.com/angular/zone.js/commit/eb9250d))
17+
* **timers:** cleanup task reference when exception ([#637](https://github.com/angular/zone.js/issues/637)) ([2594940](https://github.com/angular/zone.js/commit/2594940))
18+
* **webapi:** refactor webapi to not import util.ts directly ([8b2543e](https://github.com/angular/zone.js/commit/8b2543e)), closes [#652](https://github.com/angular/zone.js/issues/652)
19+
* **xhr:** fix [#657](https://github.com/angular/zone.js/issues/657), sometimes xhr will fire onreadystatechange with done twice ([#658](https://github.com/angular/zone.js/issues/658)) ([36c0899](https://github.com/angular/zone.js/commit/36c0899))
20+
* **zonespec:** don't throw and exception when setInterval is called within a async test zone ([#641](https://github.com/angular/zone.js/issues/641)) ([c07560f](https://github.com/angular/zone.js/commit/c07560f))
21+
22+
23+
### Features
24+
25+
* add Zone.root api ([#601](https://github.com/angular/zone.js/issues/601)) ([9818139](https://github.com/angular/zone.js/commit/9818139))
26+
* allow tasks to be canceled and rescheduled on different zone in a zone delegate ([#629](https://github.com/angular/zone.js/issues/629)) ([76c6ebf](https://github.com/angular/zone.js/commit/76c6ebf))
27+
* make fetch() zone-aware without triggering extra requests or uncatchable errors. ([#622](https://github.com/angular/zone.js/issues/622)) ([6731ad0](https://github.com/angular/zone.js/commit/6731ad0))
28+
* **bluebird:** patch bluebird promise and treat it as microtask ([#655](https://github.com/angular/zone.js/issues/655)) ([e783bfa](https://github.com/angular/zone.js/commit/e783bfa))
29+
* **electron/nw:** fix [#533](https://github.com/angular/zone.js/issues/533), in electron/nw.js, we may need to patch both browser API and nodejs API, so we need a zone-mix.js to contains both patched API. ([6d31734](https://github.com/angular/zone.js/commit/6d31734))
30+
* **longStackTraceSpec:** handled promise rejection can also render longstacktrace ([#631](https://github.com/angular/zone.js/issues/631)) ([a4c6525](https://github.com/angular/zone.js/commit/a4c6525))
31+
* **promise:** fix [#621](https://github.com/angular/zone.js/issues/621), add unhandledRejection handler and ignore consoleError ([#627](https://github.com/angular/zone.js/issues/627)) ([f3547cc](https://github.com/angular/zone.js/commit/f3547cc))
32+
33+
134
<a name="0.7.6"></a>
235
## [0.7.6](https://github.com/angular/zone.js/compare/v0.7.4...0.7.6) (2017-01-17)
336

Diff for: dist/async-test.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**
@@ -61,13 +61,6 @@ var AsyncTestZoneSpec = (function () {
6161
}
6262
return false;
6363
};
64-
AsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, currentZone, targetZone, task) {
65-
if (task.type == 'macroTask' && task.source == 'setInterval') {
66-
this._failCallback('Cannot use setInterval from within an async zone test.');
67-
return;
68-
}
69-
return delegate.scheduleTask(targetZone, task);
70-
};
7164
AsyncTestZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
7265
delegate.hasTask(target, hasTaskState);
7366
if (hasTaskState.change == 'microTask') {

Diff for: dist/fake-async-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

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

Diff for: dist/jasmine-patch.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**
@@ -98,11 +98,11 @@
9898
// The `done` callback is only passed through if the function expects at least one argument.
9999
// Note we have to make a function with correct number of arguments, otherwise jasmine will
100100
// think that all functions are sync or async.
101-
return (testBody.length == 0) ? function () {
102-
return testProxyZone.run(testBody, this);
103-
} : function (done) {
101+
return testBody && (testBody.length ? function (done) {
104102
return testProxyZone.run(testBody, this, [done]);
105-
};
103+
} : function () {
104+
return testProxyZone.run(testBody, this);
105+
});
106106
}
107107
var QueueRunner = jasmine.QueueRunner;
108108
jasmine.QueueRunner = (function (_super) {

Diff for: dist/jasmine-patch.min.js

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

Diff for: dist/long-stack-trace-zone.js

+27-10
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**
@@ -18,6 +18,10 @@
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+
/**
22+
* @fileoverview
23+
* @suppress {globalThis}
24+
*/
2125
var NEWLINE = '\n';
2226
var SEP = ' ------------- ';
2327
var IGNORE_FRAMES = [];
@@ -36,17 +40,17 @@ function getStacktraceWithCaughtError() {
3640
try {
3741
throw getStacktraceWithUncaughtError();
3842
}
39-
catch (e) {
40-
return e;
43+
catch (err) {
44+
return err;
4145
}
4246
}
4347
// Some implementations of exception handling don't create a stack trace if the exception
4448
// isn't thrown, however it's faster not to actually throw the exception.
4549
var error = getStacktraceWithUncaughtError();
46-
var coughtError = getStacktraceWithCaughtError();
50+
var caughtError = getStacktraceWithCaughtError();
4751
var getStacktrace = error.stack ?
4852
getStacktraceWithUncaughtError :
49-
(coughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
53+
(caughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
5054
function getFrames(error) {
5155
return error.stack ? error.stack.split(NEWLINE) : [];
5256
}
@@ -77,6 +81,19 @@ function renderLongStackTrace(frames, stack) {
7781
Zone['longStackTraceZoneSpec'] = {
7882
name: 'long-stack-trace',
7983
longStackTraceLimit: 10,
84+
// add a getLongStackTrace method in spec to
85+
// handle handled reject promise error.
86+
getLongStackTrace: function (error) {
87+
if (!error) {
88+
return undefined;
89+
}
90+
var task = error[Zone['__symbol__']('currentTask')];
91+
var trace = task && task.data && task.data[creationTrace];
92+
if (!trace) {
93+
return error.stack;
94+
}
95+
return renderLongStackTrace(trace, error.stack);
96+
},
8097
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
8198
var currentTask = Zone.currentTask;
8299
var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
@@ -107,7 +124,7 @@ Zone['longStackTraceZoneSpec'] = {
107124
stackSetSucceeded = true;
108125
}
109126
}
110-
catch (e) {
127+
catch (err) {
111128
}
112129
var longStack = stackSetSucceeded ?
113130
null :
@@ -116,14 +133,14 @@ Zone['longStackTraceZoneSpec'] = {
116133
try {
117134
stackSetSucceeded = error.stack = longStack;
118135
}
119-
catch (e) {
136+
catch (err) {
120137
}
121138
}
122139
if (!stackSetSucceeded) {
123140
try {
124141
stackSetSucceeded = error.longStack = longStack;
125142
}
126-
catch (e) {
143+
catch (err) {
127144
}
128145
}
129146
}

Diff for: dist/long-stack-trace-zone.min.js

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

Diff for: dist/mocha-patch.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**
@@ -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

Diff for: dist/proxy.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**

Diff for: dist/sync-test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
(function (global, factory) {
9-
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10-
typeof define === 'function' && define.amd ? define(factory) :
11-
(factory());
9+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
10+
typeof define === 'function' && define.amd ? define(factory) :
11+
(factory());
1212
}(this, (function () { 'use strict';
1313

1414
/**

0 commit comments

Comments
 (0)