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

Commit

Permalink
chore(release): version bump and dist for 0.6.13
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Aug 15, 2016
1 parent 5f519de commit 1883589
Show file tree
Hide file tree
Showing 12 changed files with 382 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dist/async-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
// Let the parent try to handle the error.
var result = parentZoneDelegate.handleError(targetZone, error);
if (result) {
this._failCallback(error.message ? error.message : 'unknown error');
this._failCallback(error);
this._alreadyErrored = true;
}
return false;
Expand Down
16 changes: 11 additions & 5 deletions dist/fake-async-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
this._scheduler = new Scheduler();
this._microtasks = [];
this._lastError = null;
this._uncaughtPromiseErrors = Promise[Zone['__symbol__']('uncaughtPromiseErrors')];
this.pendingPeriodicTimers = [];
this.pendingTimers = [];
this.properties = { 'FakeAsyncTestZoneSpec': this };
Expand Down Expand Up @@ -205,7 +206,8 @@
this._scheduler.removeScheduledFunctionWithId(id);
};
FakeAsyncTestZoneSpec.prototype._resetLastErrorAndThrow = function () {
var error = this._lastError;
var error = this._lastError || this._uncaughtPromiseErrors[0];
this._uncaughtPromiseErrors.length = 0;
this._lastError = null;
throw error;
};
Expand All @@ -219,15 +221,19 @@
}
};
FakeAsyncTestZoneSpec.prototype.flushMicrotasks = function () {
var _this = this;
FakeAsyncTestZoneSpec.assertInZone();
var flushErrors = function () {
if (_this._lastError !== null || _this._uncaughtPromiseErrors.length) {
// If there is an error stop processing the microtask queue and rethrow the error.
_this._resetLastErrorAndThrow();
}
};
while (this._microtasks.length > 0) {
var microtask = this._microtasks.shift();
microtask();
if (this._lastError !== null) {
// If there is an error stop processing the microtask queue and rethrow the error.
this._resetLastErrorAndThrow();
}
}
flushErrors();
};
FakeAsyncTestZoneSpec.prototype.onScheduleTask = function (delegate, current, target, task) {
switch (task.type) {
Expand Down
11 changes: 6 additions & 5 deletions dist/jasmine-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@
/* 0 */
/***/ function(module, exports) {

/* WEBPACK VAR INJECTION */(function(global) {'use strict';
'use strict';
// Patch jasmine's it and fit functions so that the `done` wrapCallback always resets the zone
// to the jasmine zone, which should be the root zone. (angular/zone.js#91)
if (!Zone) {
throw new Error('zone.js does not seem to be installed');
}
var SET_TIMEOUT = '__zone_symbol__setTimeout';
var _global = typeof window == 'undefined' ? global : window;
// When you have in async test (test with `done` argument) jasmine will
// execute the next test synchronously in the done handler. This makes sense
// for most tests, but now with zones. With zones running next test
Expand All @@ -60,9 +58,13 @@
// it. We override the `clearStack` method which forces jasmine to always
// drain the stack before next test gets executed.
jasmine.QueueRunner = (function (SuperQueueRunner) {
var originalZone = Zone.current;
// Subclass the `QueueRunner` and override the `clearStack` method.
function alwaysClearStack(fn) {
_global[SET_TIMEOUT](fn, 0);
var zone = Zone.current.getZoneWith('JasmineClearStackZone')
|| Zone.current.getZoneWith('ProxyZoneSpec')
|| originalZone;
zone.scheduleMicroTask('jasmineCleanStack', fn);
}
function QueueRunner(options) {
options.clearStack = alwaysClearStack;
Expand All @@ -72,7 +74,6 @@
return QueueRunner;
})(jasmine.QueueRunner);

/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

/***/ }
/******/ ]);
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.

158 changes: 158 additions & 0 deletions dist/proxy-zone.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {

(function () {
var ProxyZoneSpec = (function () {
function ProxyZoneSpec(defaultSpecDelegate) {
if (defaultSpecDelegate === void 0) { defaultSpecDelegate = null; }
this.defaultSpecDelegate = defaultSpecDelegate;
this.name = 'ProxyZone';
this.properties = { 'ProxyZoneSpec': this };
this.propertyKeys = null;
this.setDelegate(defaultSpecDelegate);
}
ProxyZoneSpec.get = function () {
return Zone.current.get('ProxyZoneSpec');
};
ProxyZoneSpec.isLoaded = function () {
return ProxyZoneSpec.get() instanceof ProxyZoneSpec;
};
ProxyZoneSpec.assertPresent = function () {
if (!this.isLoaded()) {
throw new Error("Expected to be running in 'ProxyZone', but it was not found.");
}
return ProxyZoneSpec.get();
};
ProxyZoneSpec.prototype.setDelegate = function (delegateSpec) {
var _this = this;
this._delegateSpec = delegateSpec;
this.propertyKeys && this.propertyKeys.forEach(function (key) { return delete _this.properties[key]; });
this.propertyKeys = null;
if (delegateSpec && delegateSpec.properties) {
this.propertyKeys = Object.keys(delegateSpec.properties);
this.propertyKeys.forEach(function (k) { return _this.properties[k] = delegateSpec.properties[k]; });
}
};
ProxyZoneSpec.prototype.getDelegate = function () {
return this._delegateSpec;
};
ProxyZoneSpec.prototype.resetDelegate = function () {
this.setDelegate(this.defaultSpecDelegate);
};
ProxyZoneSpec.prototype.onFork = function (parentZoneDelegate, currentZone, targetZone, zoneSpec) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onFork(parentZoneDelegate, currentZone, targetZone, zoneSpec);
}
else {
return parentZoneDelegate.fork(targetZone, zoneSpec);
}
};
ProxyZoneSpec.prototype.onIntercept = function (parentZoneDelegate, currentZone, targetZone, delegate, source) {
if (this._delegateSpec && this._delegateSpec.onIntercept) {
return this._delegateSpec.onIntercept(parentZoneDelegate, currentZone, targetZone, delegate, source);
}
else {
return parentZoneDelegate.intercept(targetZone, delegate, source);
}
};
ProxyZoneSpec.prototype.onInvoke = function (parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source) {
if (this._delegateSpec && this._delegateSpec.onInvoke) {
return this._delegateSpec.onInvoke(parentZoneDelegate, currentZone, targetZone, delegate, applyThis, applyArgs, source);
}
else {
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
};
ProxyZoneSpec.prototype.onHandleError = function (parentZoneDelegate, currentZone, targetZone, error) {
if (this._delegateSpec && this._delegateSpec.onHandleError) {
return this._delegateSpec.onHandleError(parentZoneDelegate, currentZone, targetZone, error);
}
else {
return parentZoneDelegate.handleError(targetZone, error);
}
};
ProxyZoneSpec.prototype.onScheduleTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (this._delegateSpec && this._delegateSpec.onScheduleTask) {
return this._delegateSpec.onScheduleTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.scheduleTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onInvokeTask = function (parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs) {
if (this._delegateSpec && this._delegateSpec.onFork) {
return this._delegateSpec.onInvokeTask(parentZoneDelegate, currentZone, targetZone, task, applyThis, applyArgs);
}
else {
return parentZoneDelegate.invokeTask(targetZone, task, applyThis, applyArgs);
}
};
ProxyZoneSpec.prototype.onCancelTask = function (parentZoneDelegate, currentZone, targetZone, task) {
if (this._delegateSpec && this._delegateSpec.onCancelTask) {
return this._delegateSpec.onCancelTask(parentZoneDelegate, currentZone, targetZone, task);
}
else {
return parentZoneDelegate.cancelTask(targetZone, task);
}
};
ProxyZoneSpec.prototype.onHasTask = function (delegate, current, target, hasTaskState) {
if (this._delegateSpec && this._delegateSpec.onHasTask) {
this._delegateSpec.onHasTask(delegate, current, target, hasTaskState);
}
else {
delegate.hasTask(target, hasTaskState);
}
};
return ProxyZoneSpec;
}());
// Export the class so that new instances can be created with proper
// constructor params.
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
})();


/***/ }
/******/ ]);
1 change: 1 addition & 0 deletions dist/proxy-zone.min.js

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

2 changes: 1 addition & 1 deletion dist/wtf.min.js

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

Loading

0 comments on commit 1883589

Please sign in to comment.