Comparing version 0.12.9 to 0.12.10
@@ -1,3 +0,7 @@ | ||
## 0.12.9 | ||
## 0.12.10 | ||
- Update Q from v0.9.0 to v0.9.2 | ||
## 0.12.9 | ||
- Update Q from v0.8.12 to v0.9.0 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "mr", | ||
"version": "0.12.9", | ||
"version": "0.12.10", | ||
"description": "A refresh-only CommonJS module system for browsers, used in Montage", | ||
@@ -5,0 +5,0 @@ "main": "require", |
{ | ||
"name": "q", | ||
"version": "0.9.0", | ||
"version": "0.9.2", | ||
"description": "A library for promises (CommonJS/Promises/A,B,D)", | ||
@@ -47,3 +47,3 @@ "homepage": "https://github.com/kriskowal/q", | ||
"devDependencies": { | ||
"jshint": ">=0.9.1", | ||
"jshint": ">=1.1.0", | ||
"cover": "*", | ||
@@ -50,0 +50,0 @@ "jasmine-node": "1.2.2", |
@@ -47,3 +47,3 @@ // vim:ts=4:sts=4:sw=4: | ||
// RequireJS | ||
} else if (typeof define === "function") { | ||
} else if (typeof define === "function" && define.amd) { | ||
define(definition); | ||
@@ -342,11 +342,2 @@ | ||
function deprecate(callback, name, alternative) { | ||
return function () { | ||
if (typeof console !== "undefined" && typeof console.warn === "function") { | ||
console.warn(name + " is deprecated, use " + alternative + " instead.", new Error("").stack); | ||
} | ||
return callback.apply(callback, arguments); | ||
}; | ||
} | ||
// end of shims | ||
@@ -358,3 +349,3 @@ // beginning of real work | ||
* Passes Q promises through, | ||
* Coerces CommonJS/Promises/A+ promises to Q promises. | ||
* Coerces thenables to Q promises. | ||
*/ | ||
@@ -411,4 +402,7 @@ function Q(value) { | ||
} | ||
value = valueOf(value); // shorten chain | ||
return value; | ||
var nearer = valueOf(value); | ||
if (isPromise(nearer)) { | ||
value = nearer; // shorten chain | ||
} | ||
return nearer; | ||
}; | ||
@@ -649,3 +643,3 @@ | ||
object = valueOf(object); | ||
return isPromise(object) && 'exception' in object; | ||
return isPromise(object) && "exception" in object; | ||
} | ||
@@ -740,3 +734,3 @@ | ||
// promised function. | ||
if (name == null) { // iff name is null or undefined | ||
if (name === null || name === void 0) { | ||
return object.apply(void 0, args); | ||
@@ -1003,3 +997,3 @@ } else { | ||
*/ | ||
Q['return'] = _return; | ||
Q["return"] = _return; | ||
function _return(value) { | ||
@@ -1325,3 +1319,3 @@ throw new QReturnValue(value); | ||
deferred.reject(exception); | ||
}); | ||
}, deferred.notify); | ||
@@ -1345,6 +1339,10 @@ return deferred.promise; | ||
} | ||
var deferred = defer(); | ||
when(promise, undefined, undefined, deferred.notify); | ||
setTimeout(function () { | ||
deferred.resolve(promise); | ||
}, timeout); | ||
return deferred.promise; | ||
@@ -1415,4 +1413,4 @@ } | ||
Q.nbind = nbind; | ||
function nbind(callback/*, ... args*/) { | ||
var baseArgs = array_slice(arguments, 1); | ||
function nbind(callback, thisArg /*, ... args*/) { | ||
var baseArgs = array_slice(arguments, 2); | ||
return function () { | ||
@@ -1423,3 +1421,2 @@ var nodeArgs = baseArgs.concat(array_slice(arguments)); | ||
var thisArg = this; | ||
function bound() { | ||
@@ -1426,0 +1423,0 @@ return callback.apply(thisArg, arguments); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4
135448
2839