mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
CB-12609: checking in updated node_modules
This commit is contained in:
+6
@@ -1,3 +1,9 @@
|
||||
## 1.5.0
|
||||
|
||||
- Q.any gives an error message from the last rejected promise
|
||||
- Throw if callback supplied to "finally" is invalid (@grahamrhay)
|
||||
- Long stack trace improvements, can now construct long stack traces
|
||||
across rethrows.
|
||||
|
||||
## 1.4.1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright 2009–2014 Kristopher Michael Kowal. All rights reserved.
|
||||
Copyright 2009–2017 Kristopher Michael Kowal. All rights reserved.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
|
||||
+6
-13
@@ -1,17 +1,10 @@
|
||||
[](http://travis-ci.org/kriskowal/q)
|
||||
[](http://travis-ci.org/kriskowal/q)
|
||||
[](https://cdnjs.com/libraries/q.js)
|
||||
|
||||
<a href="http://promises-aplus.github.com/promises-spec">
|
||||
<img src="http://kriskowal.github.io/q/q.png"
|
||||
align="right" alt="Q logo" />
|
||||
<img src="http://kriskowal.github.io/q/q.png" align="right" alt="Q logo" />
|
||||
</a>
|
||||
|
||||
*This is Q version 1, from the `v1` branch in Git. This documentation applies to
|
||||
the latest of both the version 1 and version 0.9 release trains. These releases
|
||||
are stable. There will be no further releases of 0.9 after 0.9.7 which is nearly
|
||||
equivalent to version 1.0.0. All further releases of `q@~1.0` will be backward
|
||||
compatible. The version 2 release train introduces significant and
|
||||
backward-incompatible changes and is experimental at this time.*
|
||||
|
||||
If a function cannot return a value or throw an exception without
|
||||
blocking, it can return a promise instead. A promise is an object
|
||||
that represents the return value or the thrown exception that the
|
||||
@@ -80,7 +73,7 @@ The Q module can be loaded as:
|
||||
the [q](https://npmjs.org/package/q) package
|
||||
- An AMD module
|
||||
- A [component](https://github.com/component/component) as ``microjs/q``
|
||||
- Using [bower](http://bower.io/) as `q#1.0.1`
|
||||
- Using [bower](http://bower.io/) as `q#^1.4.1`
|
||||
- Using [NuGet](http://nuget.org/) as [Q](https://nuget.org/packages/q)
|
||||
|
||||
Q can exchange promises with jQuery, Dojo, When.js, WinJS, and more.
|
||||
@@ -386,7 +379,7 @@ return funcs.reduce(Q.when, Q(initialVal));
|
||||
|
||||
### Handling Errors
|
||||
|
||||
One sometimes-unintuive aspect of promises is that if you throw an
|
||||
One sometimes-unintuitive aspect of promises is that if you throw an
|
||||
exception in the fulfillment handler, it will not be caught by the error
|
||||
handler.
|
||||
|
||||
@@ -876,6 +869,6 @@ You can view the results of the Q test suite [in your browser][tests]!
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2009–2015 Kristopher Michael Kowal and contributors
|
||||
Copyright 2009–2017 Kristopher Michael Kowal and contributors
|
||||
MIT License (enclosed)
|
||||
|
||||
|
||||
+15
-15
@@ -14,16 +14,19 @@
|
||||
]
|
||||
],
|
||||
"_from": "q@>=1.4.1 <2.0.0",
|
||||
"_id": "q@1.4.1",
|
||||
"_id": "q@1.5.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/q",
|
||||
"_nodeVersion": "1.8.1",
|
||||
"_nodeVersion": "6.9.5",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/q-1.5.0.tgz_1490148893963_0.4695124195422977"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "kriskowal",
|
||||
"email": "kris.kowal@cixar.com"
|
||||
},
|
||||
"_npmVersion": "2.8.3",
|
||||
"_npmVersion": "3.10.10",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "q@^1.4.1",
|
||||
@@ -38,8 +41,8 @@
|
||||
"/",
|
||||
"/cordova-common"
|
||||
],
|
||||
"_resolved": "http://registry.npmjs.org/q/-/q-1.4.1.tgz",
|
||||
"_shasum": "55705bcd93c5f3673530c2c2cbc0c2b3addc286e",
|
||||
"_resolved": "http://registry.npmjs.org/q/-/q-1.5.0.tgz",
|
||||
"_shasum": "dd01bac9d06d30e6f219aecb8253ee9ebdc308f1",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "q@^1.4.1",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
||||
@@ -85,8 +88,8 @@
|
||||
"test": "./spec"
|
||||
},
|
||||
"dist": {
|
||||
"shasum": "55705bcd93c5f3673530c2c2cbc0c2b3addc286e",
|
||||
"tarball": "https://registry.npmjs.org/q/-/q-1.4.1.tgz"
|
||||
"shasum": "dd01bac9d06d30e6f219aecb8253ee9ebdc308f1",
|
||||
"tarball": "https://registry.npmjs.org/q/-/q-1.5.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
@@ -97,7 +100,7 @@
|
||||
"q.js",
|
||||
"queue.js"
|
||||
],
|
||||
"gitHead": "d373079d3620152e3d60e82f27265a09ee0e81bd",
|
||||
"gitHead": "4fecabe07ff9f3683a3d4548e7f81c2aba693326",
|
||||
"homepage": "https://github.com/kriskowal/q",
|
||||
"keywords": [
|
||||
"q",
|
||||
@@ -113,10 +116,7 @@
|
||||
"browser",
|
||||
"node"
|
||||
],
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/kriskowal/q/raw/master/LICENSE"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "q.js",
|
||||
"maintainers": [
|
||||
{
|
||||
@@ -148,8 +148,8 @@
|
||||
"lint": "jshint q.js",
|
||||
"minify": "grunt",
|
||||
"prepublish": "grunt",
|
||||
"test": "jasmine-node spec && promises-aplus-tests spec/aplus-adapter",
|
||||
"test": "npm ls -s && jasmine-node spec && promises-aplus-tests spec/aplus-adapter && npm run -s lint",
|
||||
"test-browser": "opener spec/q-spec.html"
|
||||
},
|
||||
"version": "1.4.1"
|
||||
"version": "1.5.0"
|
||||
}
|
||||
|
||||
+39
-14
@@ -1,8 +1,8 @@
|
||||
// vim:ts=4:sts=4:sw=4:
|
||||
/*!
|
||||
*
|
||||
* Copyright 2009-2012 Kris Kowal under the terms of the MIT
|
||||
* license found at http://github.com/kriskowal/q/raw/master/LICENSE
|
||||
* Copyright 2009-2017 Kris Kowal under the terms of the MIT
|
||||
* license found at https://github.com/kriskowal/q/blob/v1/LICENSE
|
||||
*
|
||||
* With parts by Tyler Close
|
||||
* Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
|
||||
@@ -190,7 +190,7 @@ var nextTick =(function () {
|
||||
// `setTimeout`. In this case `setImmediate` is preferred because
|
||||
// it is faster. Browserify's `process.toString()` yields
|
||||
// "[object Object]", while in a real Node environment
|
||||
// `process.nextTick()` yields "[object process]".
|
||||
// `process.toString()` yields "[object process]".
|
||||
isNodeJS = true;
|
||||
|
||||
requestTick = function () {
|
||||
@@ -327,6 +327,11 @@ var object_create = Object.create || function (prototype) {
|
||||
return new Type();
|
||||
};
|
||||
|
||||
var object_defineProperty = Object.defineProperty || function (obj, prop, descriptor) {
|
||||
obj[prop] = descriptor.value;
|
||||
return obj;
|
||||
};
|
||||
|
||||
var object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
|
||||
|
||||
var object_keys = Object.keys || function (object) {
|
||||
@@ -377,19 +382,20 @@ function makeStackTraceLong(error, promise) {
|
||||
promise.stack &&
|
||||
typeof error === "object" &&
|
||||
error !== null &&
|
||||
error.stack &&
|
||||
error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1
|
||||
error.stack
|
||||
) {
|
||||
var stacks = [];
|
||||
for (var p = promise; !!p; p = p.source) {
|
||||
if (p.stack) {
|
||||
if (p.stack && (!error.__minimumStackCounter__ || error.__minimumStackCounter__ > p.stackCounter)) {
|
||||
object_defineProperty(error, "__minimumStackCounter__", {value: p.stackCounter, configurable: true});
|
||||
stacks.unshift(p.stack);
|
||||
}
|
||||
}
|
||||
stacks.unshift(error.stack);
|
||||
|
||||
var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n");
|
||||
error.stack = filterStackString(concatedStacks);
|
||||
var stack = filterStackString(concatedStacks);
|
||||
object_defineProperty(error, "stack", {value: stack, configurable: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,6 +522,14 @@ Q.nextTick = nextTick;
|
||||
*/
|
||||
Q.longStackSupport = false;
|
||||
|
||||
/**
|
||||
* The counter is used to determine the stopping point for building
|
||||
* long stack traces. In makeStackTraceLong we walk backwards through
|
||||
* the linked list of promises, only stacks which were created before
|
||||
* the rejection are concatenated.
|
||||
*/
|
||||
var longStackCounter = 1;
|
||||
|
||||
// enable long stacks if Q_DEBUG is set
|
||||
if (typeof process === "object" && process && process.env && process.env.Q_DEBUG) {
|
||||
Q.longStackSupport = true;
|
||||
@@ -588,6 +602,7 @@ function defer() {
|
||||
// At the same time, cut off the first line; it's always just
|
||||
// "[object Promise]\n", as per the `toString`.
|
||||
promise.stack = e.stack.substring(e.stack.indexOf("\n") + 1);
|
||||
promise.stackCounter = longStackCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -597,7 +612,12 @@ function defer() {
|
||||
|
||||
function become(newPromise) {
|
||||
resolvedPromise = newPromise;
|
||||
promise.source = newPromise;
|
||||
|
||||
if (Q.longStackSupport && hasStacks) {
|
||||
// Only hold a reference to the new promise if long stacks
|
||||
// are enabled to reduce memory usage
|
||||
promise.source = newPromise;
|
||||
}
|
||||
|
||||
array_reduce(messages, function (undefined, message) {
|
||||
Q.nextTick(function () {
|
||||
@@ -725,7 +745,7 @@ Promise.prototype.join = function (that) {
|
||||
// TODO: "===" should be Object.is or equiv
|
||||
return x;
|
||||
} else {
|
||||
throw new Error("Can't join: not the same: " + x + " " + y);
|
||||
throw new Error("Q can't join: not the same: " + x + " " + y);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1622,13 +1642,12 @@ function any(promises) {
|
||||
function onFulfilled(result) {
|
||||
deferred.resolve(result);
|
||||
}
|
||||
function onRejected() {
|
||||
function onRejected(err) {
|
||||
pendingCount--;
|
||||
if (pendingCount === 0) {
|
||||
deferred.reject(new Error(
|
||||
"Can't get fulfillment value from any promise, all " +
|
||||
"promises were rejected."
|
||||
));
|
||||
err.message = ("Q can't get fulfillment value from any promise, all " +
|
||||
"promises were rejected. Last error message: " + err.message);
|
||||
deferred.reject(err);
|
||||
}
|
||||
}
|
||||
function onProgress(progress) {
|
||||
@@ -1752,6 +1771,9 @@ Q["finally"] = function (object, callback) {
|
||||
|
||||
Promise.prototype.fin = // XXX legacy
|
||||
Promise.prototype["finally"] = function (callback) {
|
||||
if (!callback || typeof callback.apply !== "function") {
|
||||
throw new Error("Q can't apply finally callback");
|
||||
}
|
||||
callback = Q(callback);
|
||||
return this.then(function (value) {
|
||||
return callback.fcall().then(function () {
|
||||
@@ -1915,6 +1937,9 @@ Promise.prototype.nfcall = function (/*...args*/) {
|
||||
*/
|
||||
Q.nfbind =
|
||||
Q.denodeify = function (callback /*...args*/) {
|
||||
if (callback === undefined) {
|
||||
throw new Error("Q can't wrap an undefined function");
|
||||
}
|
||||
var baseArgs = array_slice(arguments, 1);
|
||||
return function () {
|
||||
var nodeArgs = baseArgs.concat(array_slice(arguments));
|
||||
|
||||
Reference in New Issue
Block a user