Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
3
node_modules/sinon/lib/sinon.js
generated
vendored
3
node_modules/sinon/lib/sinon.js
generated
vendored
|
|
@ -4,7 +4,6 @@ var behavior = require("./sinon/behavior");
|
|||
var createSandbox = require("./sinon/create-sandbox");
|
||||
var extend = require("./sinon/util/core/extend");
|
||||
var fakeTimers = require("./sinon/util/fake-timers");
|
||||
var format = require("./sinon/util/core/format");
|
||||
var nise = require("nise");
|
||||
var Sandbox = require("./sinon/sandbox");
|
||||
var stub = require("./sinon/stub");
|
||||
|
|
@ -19,8 +18,6 @@ var apiMethods = {
|
|||
expectation: require("./sinon/mock-expectation"),
|
||||
defaultConfig: require("./sinon/util/core/default-config"),
|
||||
|
||||
setFormatter: format.setFormatter,
|
||||
|
||||
// fake timers
|
||||
timers: fakeTimers.timers,
|
||||
|
||||
|
|
|
|||
8
node_modules/sinon/lib/sinon/assert.js
generated
vendored
8
node_modules/sinon/lib/sinon/assert.js
generated
vendored
|
|
@ -5,7 +5,7 @@ var calledInOrder = require("@sinonjs/commons").calledInOrder;
|
|||
var createMatcher = require("@sinonjs/samsam").createMatcher;
|
||||
var orderByFirstCall = require("@sinonjs/commons").orderByFirstCall;
|
||||
var timesInWords = require("./util/core/times-in-words");
|
||||
var format = require("./util/core/format");
|
||||
var inspect = require("util").inspect;
|
||||
var stringSlice = require("@sinonjs/commons").prototypes.string.slice;
|
||||
var globalObject = require("@sinonjs/commons").global;
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ function createAssertObject() {
|
|||
var msg;
|
||||
if (typeof count !== "number") {
|
||||
msg =
|
||||
`expected ${format(count)} to be a number ` +
|
||||
`expected ${inspect(count)} to be a number ` +
|
||||
`but was of type ${typeof count}`;
|
||||
failAssertion(this, msg);
|
||||
} else if (method.callCount !== count) {
|
||||
|
|
@ -206,8 +206,8 @@ function createAssertObject() {
|
|||
} else {
|
||||
var formatted = [
|
||||
"expected value to match",
|
||||
` expected = ${format(expectation)}`,
|
||||
` actual = ${format(actual)}`,
|
||||
` expected = ${inspect(expectation)}`,
|
||||
` actual = ${inspect(actual)}`,
|
||||
];
|
||||
|
||||
failAssertion(this, join(formatted, "\n"));
|
||||
|
|
|
|||
9
node_modules/sinon/lib/sinon/blob.js
generated
vendored
9
node_modules/sinon/lib/sinon/blob.js
generated
vendored
|
|
@ -1,9 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
exports.isSupported = (function () {
|
||||
try {
|
||||
return Boolean(new Blob());
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
1
node_modules/sinon/lib/sinon/default-behaviors.js
generated
vendored
1
node_modules/sinon/lib/sinon/default-behaviors.js
generated
vendored
|
|
@ -269,6 +269,7 @@ var defaultBehaviors = {
|
|||
Object.defineProperty(rootStub.rootObj, rootStub.propName, {
|
||||
value: newVal,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable:
|
||||
rootStub.shadowsPropOnPrototype ||
|
||||
isPropertyConfigurable(rootStub.rootObj, rootStub.propName),
|
||||
|
|
|
|||
18
node_modules/sinon/lib/sinon/mock-expectation.js
generated
vendored
18
node_modules/sinon/lib/sinon/mock-expectation.js
generated
vendored
|
|
@ -9,7 +9,7 @@ var match = require("@sinonjs/samsam").createMatcher;
|
|||
var stub = require("./stub");
|
||||
var assert = require("./assert");
|
||||
var deepEqual = require("@sinonjs/samsam").deepEqual;
|
||||
var format = require("./util/core/format");
|
||||
var inspect = require("util").inspect;
|
||||
var valueToString = require("@sinonjs/commons").valueToString;
|
||||
|
||||
var every = arrayProto.every;
|
||||
|
|
@ -166,7 +166,7 @@ var mockExpectation = {
|
|||
|
||||
if (!args) {
|
||||
mockExpectation.fail(
|
||||
`${this.method} received no arguments, expected ${format(
|
||||
`${this.method} received no arguments, expected ${inspect(
|
||||
expectedArguments
|
||||
)}`
|
||||
);
|
||||
|
|
@ -174,9 +174,9 @@ var mockExpectation = {
|
|||
|
||||
if (args.length < expectedArguments.length) {
|
||||
mockExpectation.fail(
|
||||
`${this.method} received too few arguments (${format(
|
||||
`${this.method} received too few arguments (${inspect(
|
||||
args
|
||||
)}), expected ${format(expectedArguments)}`
|
||||
)}), expected ${inspect(expectedArguments)}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -185,9 +185,9 @@ var mockExpectation = {
|
|||
args.length !== expectedArguments.length
|
||||
) {
|
||||
mockExpectation.fail(
|
||||
`${this.method} received too many arguments (${format(
|
||||
`${this.method} received too many arguments (${inspect(
|
||||
args
|
||||
)}), expected ${format(expectedArguments)}`
|
||||
)}), expected ${inspect(expectedArguments)}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ var mockExpectation = {
|
|||
function (expectedArgument, i) {
|
||||
if (!verifyMatcher(expectedArgument, args[i])) {
|
||||
mockExpectation.fail(
|
||||
`${this.method} received wrong arguments ${format(
|
||||
`${this.method} received wrong arguments ${inspect(
|
||||
args
|
||||
)}, didn't match ${String(expectedArguments)}`
|
||||
);
|
||||
|
|
@ -204,9 +204,9 @@ var mockExpectation = {
|
|||
|
||||
if (!deepEqual(args[i], expectedArgument)) {
|
||||
mockExpectation.fail(
|
||||
`${this.method} received wrong arguments ${format(
|
||||
`${this.method} received wrong arguments ${inspect(
|
||||
args
|
||||
)}, expected ${format(expectedArguments)}`
|
||||
)}, expected ${inspect(expectedArguments)}`
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
20
node_modules/sinon/lib/sinon/proxy-call.js
generated
vendored
20
node_modules/sinon/lib/sinon/proxy-call.js
generated
vendored
|
|
@ -4,7 +4,7 @@ var arrayProto = require("@sinonjs/commons").prototypes.array;
|
|||
var match = require("@sinonjs/samsam").createMatcher;
|
||||
var deepEqual = require("@sinonjs/samsam").deepEqual;
|
||||
var functionName = require("@sinonjs/commons").functionName;
|
||||
var sinonFormat = require("./util/core/format");
|
||||
var inspect = require("util").inspect;
|
||||
var valueToString = require("@sinonjs/commons").valueToString;
|
||||
|
||||
var concat = arrayProto.concat;
|
||||
|
|
@ -14,6 +14,11 @@ var map = arrayProto.map;
|
|||
var reduce = arrayProto.reduce;
|
||||
var slice = arrayProto.slice;
|
||||
|
||||
/**
|
||||
* @param proxy
|
||||
* @param text
|
||||
* @param args
|
||||
*/
|
||||
function throwYieldError(proxy, text, args) {
|
||||
var msg = functionName(proxy) + text;
|
||||
if (args.length) {
|
||||
|
|
@ -203,13 +208,13 @@ var callProto = {
|
|||
}
|
||||
|
||||
formattedArgs = map(this.args, function (arg) {
|
||||
return sinonFormat(arg);
|
||||
return inspect(arg);
|
||||
});
|
||||
|
||||
callStr = `${callStr + join(formattedArgs, ", ")})`;
|
||||
|
||||
if (typeof this.returnValue !== "undefined") {
|
||||
callStr += ` => ${sinonFormat(this.returnValue)}`;
|
||||
callStr += ` => ${inspect(this.returnValue)}`;
|
||||
}
|
||||
|
||||
if (this.exception) {
|
||||
|
|
@ -250,6 +255,15 @@ Object.defineProperty(callProto, "stack", {
|
|||
|
||||
callProto.invokeCallback = callProto.yield;
|
||||
|
||||
/**
|
||||
* @param proxy
|
||||
* @param thisValue
|
||||
* @param args
|
||||
* @param returnValue
|
||||
* @param exception
|
||||
* @param id
|
||||
* @param errorWithCallStack
|
||||
*/
|
||||
function createProxyCall(
|
||||
proxy,
|
||||
thisValue,
|
||||
|
|
|
|||
4
node_modules/sinon/lib/sinon/proxy.js
generated
vendored
4
node_modules/sinon/lib/sinon/proxy.js
generated
vendored
|
|
@ -6,7 +6,7 @@ var functionToString = require("./util/core/function-to-string");
|
|||
var proxyCall = require("./proxy-call");
|
||||
var proxyCallUtil = require("./proxy-call-util");
|
||||
var proxyInvoke = require("./proxy-invoke");
|
||||
var sinonFormat = require("./util/core/format");
|
||||
var inspect = require("util").inspect;
|
||||
|
||||
var push = arrayProto.push;
|
||||
var forEach = arrayProto.forEach;
|
||||
|
|
@ -126,7 +126,7 @@ var proxyApi = {
|
|||
if (typeof formatter === "function") {
|
||||
return String(formatter(spyInstance, args));
|
||||
} else if (!isNaN(parseInt(specifier, 10))) {
|
||||
return sinonFormat(args[specifier - 1]);
|
||||
return inspect(args[specifier - 1]);
|
||||
}
|
||||
|
||||
return `%${specifier}`;
|
||||
|
|
|
|||
10
node_modules/sinon/lib/sinon/spy-formatters.js
generated
vendored
10
node_modules/sinon/lib/sinon/spy-formatters.js
generated
vendored
|
|
@ -4,7 +4,7 @@ var arrayProto = require("@sinonjs/commons").prototypes.array;
|
|||
var color = require("./color");
|
||||
var match = require("@sinonjs/samsam").createMatcher;
|
||||
var timesInWords = require("./util/core/times-in-words");
|
||||
var sinonFormat = require("./util/core/format");
|
||||
var inspect = require("util").inspect;
|
||||
var jsDiff = require("diff");
|
||||
|
||||
var join = arrayProto.join;
|
||||
|
|
@ -85,7 +85,7 @@ module.exports = {
|
|||
message += "\n";
|
||||
|
||||
var calledArgMessage =
|
||||
j < calledArgs.length ? sinonFormat(calledArg) : "";
|
||||
j < calledArgs.length ? inspect(calledArg) : "";
|
||||
if (match.isMatcher(expectedArg)) {
|
||||
message += colorSinonMatchText(
|
||||
expectedArg,
|
||||
|
|
@ -94,7 +94,7 @@ module.exports = {
|
|||
);
|
||||
} else {
|
||||
var expectedArgMessage =
|
||||
j < expectedArgs.length ? sinonFormat(expectedArg) : "";
|
||||
j < expectedArgs.length ? inspect(expectedArg) : "";
|
||||
var diff = jsDiff.diffJson(
|
||||
calledArgMessage,
|
||||
expectedArgMessage
|
||||
|
|
@ -126,7 +126,7 @@ module.exports = {
|
|||
var objects = [];
|
||||
|
||||
for (var i = 0, l = spyInstance.callCount; i < l; ++i) {
|
||||
push(objects, sinonFormat(spyInstance.thisValues[i]));
|
||||
push(objects, inspect(spyInstance.thisValues[i]));
|
||||
}
|
||||
|
||||
return join(objects, ", ");
|
||||
|
|
@ -135,7 +135,7 @@ module.exports = {
|
|||
"*": function (spyInstance, args) {
|
||||
return join(
|
||||
map(args, function (arg) {
|
||||
return sinonFormat(arg);
|
||||
return inspect(arg);
|
||||
}),
|
||||
", "
|
||||
);
|
||||
|
|
|
|||
22
node_modules/sinon/lib/sinon/util/core/format.js
generated
vendored
22
node_modules/sinon/lib/sinon/util/core/format.js
generated
vendored
|
|
@ -1,22 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var inspect = require("util").inspect;
|
||||
var customFormatter;
|
||||
|
||||
function format() {
|
||||
if (customFormatter) {
|
||||
return customFormatter.apply(null, arguments);
|
||||
}
|
||||
|
||||
return inspect.apply(inspect, arguments);
|
||||
}
|
||||
|
||||
format.setFormatter = function (aCustomFormatter) {
|
||||
if (typeof aCustomFormatter !== "function") {
|
||||
throw new Error("format.setFormatter must be called with a function");
|
||||
}
|
||||
|
||||
customFormatter = aCustomFormatter;
|
||||
};
|
||||
|
||||
module.exports = format;
|
||||
21
node_modules/sinon/lib/sinon/util/core/get-config.js
generated
vendored
21
node_modules/sinon/lib/sinon/util/core/get-config.js
generated
vendored
|
|
@ -1,21 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var defaultConfig = require("./default-config");
|
||||
var hasOwnProperty =
|
||||
require("@sinonjs/commons").prototypes.object.hasOwnProperty;
|
||||
|
||||
module.exports = function getConfig(custom) {
|
||||
var config = {};
|
||||
var prop;
|
||||
var kustom = custom || {};
|
||||
|
||||
for (prop in defaultConfig) {
|
||||
if (hasOwnProperty(defaultConfig, prop)) {
|
||||
config[prop] = hasOwnProperty(kustom, prop)
|
||||
? kustom[prop]
|
||||
: defaultConfig[prop];
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
16
node_modules/sinon/lib/sinon/util/core/restore.js
generated
vendored
16
node_modules/sinon/lib/sinon/util/core/restore.js
generated
vendored
|
|
@ -1,16 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var isRestorable = require("./is-restorable");
|
||||
var walk = require("./walk");
|
||||
|
||||
module.exports = function restore(object) {
|
||||
if (object !== null && typeof object === "object") {
|
||||
walk(object, function (prop) {
|
||||
if (isRestorable(object[prop])) {
|
||||
object[prop].restore();
|
||||
}
|
||||
});
|
||||
} else if (isRestorable(object)) {
|
||||
object.restore();
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue