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

Commit

Permalink
chore: bump npm version to 0.6.26
Browse files Browse the repository at this point in the history
  • Loading branch information
alxhub committed Oct 18, 2016
1 parent 431f6f0 commit 21935e8
Show file tree
Hide file tree
Showing 13 changed files with 637 additions and 409 deletions.
7 changes: 7 additions & 0 deletions dist/async-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var AsyncTestZoneSpec = (function () {
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
this._pendingMicroTasks = false;
Expand Down
25 changes: 14 additions & 11 deletions dist/fake-async-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global) {
var Scheduler = (function () {
function Scheduler() {
Expand All @@ -27,13 +34,7 @@
var currentId = id < 0 ? this.nextId++ : id;
var endTime = this._currentTime + delay;
// Insert so that scheduler queue remains sorted by end time.
var newEntry = {
endTime: endTime,
id: currentId,
func: cb,
args: args,
delay: delay
};
var newEntry = { endTime: endTime, id: currentId, func: cb, args: args, delay: delay };
var i = 0;
for (; i < this._schedulerQueue.length; i++) {
var currentEntry = this._schedulerQueue[i];
Expand All @@ -54,23 +55,25 @@
};
Scheduler.prototype.tick = function (millis) {
if (millis === void 0) { millis = 0; }
this._currentTime += millis;
var finalTime = this._currentTime + millis;
while (this._schedulerQueue.length > 0) {
var current = this._schedulerQueue[0];
if (this._currentTime < current.endTime) {
if (finalTime < current.endTime) {
// Done processing the queue since it's sorted by endTime.
break;
}
else {
// Time to run scheduled function. Remove it from the head of queue.
var current_1 = this._schedulerQueue.shift();
this._currentTime = current_1.endTime;
var retval = current_1.func.apply(global, current_1.args);
if (!retval) {
// Uncaught exception in the current scheduled function. Stop processing the queue.
break;
}
}
}
this._currentTime = finalTime;
};
return Scheduler;
}());
Expand Down Expand Up @@ -110,7 +113,7 @@
completers.onError.apply(global);
}
}
// Return true if there were no errors, false otherwise.
// Return true if there were no errors, false otherwise.
return _this._lastError === null;
};
};
Expand Down Expand Up @@ -161,7 +164,7 @@
var id = this._scheduler.nextId;
var completers = { onSuccess: null, onError: this._dequeuePeriodicTimer(id) };
var cb = this._fnAndFlush(fn, completers);
// Use the callback created above to requeue on success.
// Use the callback created above to requeue on success.
completers.onSuccess = this._requeuePeriodicTimer(cb, interval, args, id);
// Queue the callback and dequeue the periodic timer only on error.
this._scheduler.scheduleFunction(cb, interval, args);
Expand Down
53 changes: 33 additions & 20 deletions dist/jasmine-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,51 @@
(factory());
}(this, (function () { 'use strict';

var __extends = (undefined && undefined.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function () {
var __extends = function (d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
// Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs
// in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503)
if (!Zone)
throw new Error("Missing: zone.js");
throw new Error('Missing: zone.js');
if (typeof jasmine == 'undefined')
throw new Error("Missing: jasmine.js");
throw new Error('Missing: jasmine.js');
if (jasmine['__zone_patch__'])
throw new Error("'jasmine' has already been patched with 'Zone'.");
throw new Error('\'jasmine\' has already been patched with \'Zone\'.');
jasmine['__zone_patch__'] = true;
var SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
var ProxyZoneSpec = Zone['ProxyZoneSpec'];
if (!SyncTestZoneSpec)
throw new Error("Missing: SyncTestZoneSpec");
throw new Error('Missing: SyncTestZoneSpec');
if (!ProxyZoneSpec)
throw new Error("Missing: ProxyZoneSpec");
throw new Error('Missing: ProxyZoneSpec');
var ambientZone = Zone.current;
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe` but outside of
// Create a synchronous-only zone in which to run `describe` blocks in order to raise an
// error if any asynchronous operations are attempted inside of a `describe` but outside of
// a `beforeEach` or `it`.
var syncZone = ambientZone.fork(new SyncTestZoneSpec('jasmine.describe'));
// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
// different zones.
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escope the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
var testProxyZone = null;
// Monkey patch all of the jasmine DSL so that each function runs in appropriate zone.
Expand Down Expand Up @@ -87,9 +98,11 @@ var __extends = (undefined && undefined.__extends) || function (d, b) {
// The `done` callback is only passed through if the function expects at least one argument.
// Note we have to make a function with correct number of arguments, otherwise jasmine will
// think that all functions are sync or async.
return (testBody.length == 0)
? function () { return testProxyZone.run(testBody, this); }
: function (done) { return testProxyZone.run(testBody, this, [done]); };
return (testBody.length == 0) ? function () {
return testProxyZone.run(testBody, this);
} : function (done) {
return testProxyZone.run(testBody, this, [done]);
};
}
var QueueRunner = jasmine.QueueRunner;
jasmine.QueueRunner = (function (_super) {
Expand All @@ -105,15 +118,15 @@ var __extends = (undefined && undefined.__extends) || function (d, b) {
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
if (Zone.current !== ambientZone)
throw new Error("Unexpected Zone: " + Zone.current.name);
throw new Error('Unexpected Zone: ' + Zone.current.name);
testProxyZone = ambientZone.fork(new ProxyZoneSpec());
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return _super.prototype.execute.call(_this); });
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return QueueRunner.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
Expand Down
2 changes: 1 addition & 1 deletion dist/jasmine-patch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions dist/long-stack-trace-zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var NEWLINE = '\n';
var SEP = ' ------------- ';
var IGNORE_FRAMES = [];
Expand All @@ -37,9 +44,9 @@ function getStacktraceWithCaughtError() {
// isn't thrown, however it's faster not to actually throw the exception.
var error = getStacktraceWithUncaughtError();
var coughtError = getStacktraceWithCaughtError();
var getStacktrace = error.stack
? getStacktraceWithUncaughtError
: (coughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
var getStacktrace = error.stack ?
getStacktraceWithUncaughtError :
(coughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
function getFrames(error) {
return error.stack ? error.stack.split(NEWLINE) : [];
}
Expand Down Expand Up @@ -100,19 +107,24 @@ Zone['longStackTraceZoneSpec'] = {
stackSetSucceded = true;
}
}
catch (e) { }
var longStack = stackSetSucceded ? null : renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
catch (e) {
}
var longStack = stackSetSucceded ?
null :
renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
if (!stackSetSucceded) {
try {
stackSetSucceded = error.stack = longStack;
}
catch (e) { }
catch (e) {
}
}
if (!stackSetSucceded) {
try {
stackSetSucceded = error.longStack = longStack;
}
catch (e) { }
catch (e) {
}
}
}
return parentZoneDelegate.handleError(targetZone, error);
Expand Down
7 changes: 7 additions & 0 deletions dist/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ProxyZoneSpec = (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
Expand Down
7 changes: 7 additions & 0 deletions dist/sync-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var SyncTestZoneSpec = (function () {
function SyncTestZoneSpec(namePrefix) {
this.runZone = Zone.current;
Expand Down
16 changes: 13 additions & 3 deletions dist/task-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A `TaskTrackingZoneSpec` allows one to track all outstanding Tasks.
*
Expand All @@ -30,9 +37,12 @@ var TaskTrackingZoneSpec = (function () {
};
TaskTrackingZoneSpec.prototype.getTasksFor = function (type) {
switch (type) {
case 'microTask': return this.microTasks;
case 'macroTask': return this.macroTasks;
case 'eventTask': return this.eventTasks;
case 'microTask':
return this.microTasks;
case 'macroTask':
return this.macroTasks;
case 'eventTask':
return this.eventTasks;
}
throw new Error('Unknown task format: ' + type);
};
Expand Down
23 changes: 15 additions & 8 deletions dist/wtf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
(factory());
}(this, (function () { 'use strict';

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global) {


Expand Down Expand Up @@ -40,8 +47,8 @@
WtfZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
var scope = WtfZoneSpec.invokeScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeScope[source]
= wtfEvents.createScope("Zone:invoke:" + source + "(ascii zone)");
scope = WtfZoneSpec.invokeScope[source] =
wtfEvents.createScope("Zone:invoke:" + source + "(ascii zone)");
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source));
};
Expand All @@ -52,8 +59,8 @@
var key = task.type + ':' + task.source;
var instance = WtfZoneSpec.scheduleInstance[key];
if (!instance) {
instance = WtfZoneSpec.scheduleInstance[key]
= wtfEvents.createInstance("Zone:schedule:" + key + "(ascii zone, any data)");
instance = WtfZoneSpec.scheduleInstance[key] =
wtfEvents.createInstance("Zone:schedule:" + key + "(ascii zone, any data)");
}
var retValue = parentZoneDelegate.scheduleTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
Expand All @@ -63,17 +70,17 @@
var source = task.source;
var scope = WtfZoneSpec.invokeTaskScope[source];
if (!scope) {
scope = WtfZoneSpec.invokeTaskScope[source]
= wtfEvents.createScope("Zone:invokeTask:" + source + "(ascii zone)");
scope = WtfZoneSpec.invokeTaskScope[source] =
wtfEvents.createScope("Zone:invokeTask:" + source + "(ascii zone)");
}
return wtfTrace.leaveScope(scope(zonePathName(targetZone)), parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs));
};
WtfZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
var key = task.source;
var instance = WtfZoneSpec.cancelInstance[key];
if (!instance) {
instance = WtfZoneSpec.cancelInstance[key]
= wtfEvents.createInstance("Zone:cancel:" + key + "(ascii zone, any options)");
instance = WtfZoneSpec.cancelInstance[key] =
wtfEvents.createInstance("Zone:cancel:" + key + "(ascii zone, any options)");
}
var retValue = parentZoneDelegate.cancelTask(targetZone, task);
instance(zonePathName(targetZone), shallowObj(task.data, 2));
Expand Down
Loading

0 comments on commit 21935e8

Please sign in to comment.