Bump the npm group with 3 updates (#2303)

* ---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update checked-in dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-05-20 12:17:29 -07:00 committed by GitHub
parent ebd27c09f6
commit b1bd8da5e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
212 changed files with 11182 additions and 16383 deletions

7
node_modules/sinon/README.md generated vendored
View file

@ -39,15 +39,14 @@ via [npm](https://github.com/npm/npm)
$ npm install sinon
or via sinon's browser builds available for download on the [homepage](https://sinonjs.org/releases/). There are also [npm based CDNs](https://sinonjs.org/releases#npm-cdns) one can use.
or via Sinon's browser builds available for download on the [homepage](https://sinonjs.org/releases/).
There are also [npm based CDNs](https://sinonjs.org/releases#npm-cdns) one can use.
## Usage
See the [sinon project homepage](https://sinonjs.org/) for documentation on usage.
If you have questions that are not covered by the documentation, you can [check out the `sinon` tag on Stack Overflow](https://stackoverflow.com/questions/tagged/sinon) or drop by <a href="irc://irc.freenode.net:6667/sinon.js">#sinon.js on irc.freenode.net:6667</a>.
You can also search through the [Sinon.JS mailing list archives](http://groups.google.com/group/sinonjs).
If you have questions that are not covered by the documentation, you can [check out the `sinon` tag on Stack Overflow](https://stackoverflow.com/questions/tagged/sinon).
## Goals

View file

@ -25,7 +25,6 @@ module.exports = function createApi(opts = { sinonXhrLib: nise }) {
restoreObject: require("./sinon/restore-object"),
expectation: require("./sinon/mock-expectation"),
defaultConfig: require("./sinon/util/core/default-config"),
// fake timers
timers: fakeTimers.timers,

View file

@ -30,90 +30,64 @@ function throwsException(fake, error, message) {
}
}
const SKIP_OPTIONS_FOR_YIELDS = {
skipReturn: true,
skipThrows: true,
};
function clear(fake, options) {
fake.fakeFn = undefined;
fake.callsThrough = undefined;
fake.callsThroughWithNew = undefined;
if (!options || !options.skipThrows) {
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.throwArgAt = undefined;
}
fake.callArgAt = undefined;
fake.callbackArguments = undefined;
fake.callbackContext = undefined;
fake.callArgProp = undefined;
fake.callbackAsync = undefined;
if (!options || !options.skipReturn) {
fake.returnValue = undefined;
fake.returnValueDefined = undefined;
fake.returnArgAt = undefined;
fake.returnThis = undefined;
}
fake.resolve = undefined;
fake.resolveThis = undefined;
fake.resolveArgAt = undefined;
fake.reject = undefined;
}
const defaultBehaviors = {
callsFake: function callsFake(fake, fn) {
clear(fake);
fake.fakeFn = fn;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.callsThrough = false;
},
callsArg: function callsArg(fake, index) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callArgAt = index;
fake.callbackArguments = [];
fake.callbackContext = undefined;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
},
callsArgOn: function callsArgOn(fake, index, context) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callArgAt = index;
fake.callbackArguments = [];
fake.callbackContext = context;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
},
callsArgWith: function callsArgWith(fake, index) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callArgAt = index;
fake.callbackArguments = slice(arguments, 2);
fake.callbackContext = undefined;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
},
callsArgOnWith: function callsArgWith(fake, index, context) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callArgAt = index;
fake.callbackArguments = slice(arguments, 3);
fake.callbackContext = context;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
},
usingPromise: function usingPromise(fake, promiseLibrary) {
@ -121,59 +95,73 @@ const defaultBehaviors = {
},
yields: function (fake) {
clear(fake, SKIP_OPTIONS_FOR_YIELDS);
fake.callArgAt = useLeftMostCallback;
fake.callbackArguments = slice(arguments, 1);
fake.callbackContext = undefined;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.fakeFn = undefined;
fake.callsThrough = false;
},
yieldsRight: function (fake) {
clear(fake, SKIP_OPTIONS_FOR_YIELDS);
fake.callArgAt = useRightMostCallback;
fake.callbackArguments = slice(arguments, 1);
fake.callbackContext = undefined;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
fake.fakeFn = undefined;
},
yieldsOn: function (fake, context) {
clear(fake, SKIP_OPTIONS_FOR_YIELDS);
fake.callArgAt = useLeftMostCallback;
fake.callbackArguments = slice(arguments, 2);
fake.callbackContext = context;
fake.callArgProp = undefined;
fake.callbackAsync = false;
fake.callsThrough = false;
fake.fakeFn = undefined;
},
yieldsTo: function (fake, prop) {
clear(fake, SKIP_OPTIONS_FOR_YIELDS);
fake.callArgAt = useLeftMostCallback;
fake.callbackArguments = slice(arguments, 2);
fake.callbackContext = undefined;
fake.callArgProp = prop;
fake.callbackAsync = false;
fake.callsThrough = false;
fake.fakeFn = undefined;
},
yieldsToOn: function (fake, prop, context) {
clear(fake, SKIP_OPTIONS_FOR_YIELDS);
fake.callArgAt = useLeftMostCallback;
fake.callbackArguments = slice(arguments, 3);
fake.callbackContext = context;
fake.callArgProp = prop;
fake.callbackAsync = false;
fake.fakeFn = undefined;
},
throws: throwsException,
throwsException: throwsException,
returns: function returns(fake, value) {
clear(fake);
fake.callsThrough = false;
fake.returnValue = value;
fake.resolve = false;
fake.reject = false;
fake.returnValueDefined = true;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.fakeFn = undefined;
},
returnsArg: function returnsArg(fake, index) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callsThrough = false;
fake.returnArgAt = index;
},
@ -182,33 +170,42 @@ const defaultBehaviors = {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.callsThrough = false;
fake.throwArgAt = index;
},
returnsThis: function returnsThis(fake) {
clear(fake);
fake.returnThis = true;
fake.callsThrough = false;
},
resolves: function resolves(fake, value) {
clear(fake);
fake.returnValue = value;
fake.resolve = true;
fake.resolveThis = false;
fake.reject = false;
fake.returnValueDefined = true;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.fakeFn = undefined;
fake.callsThrough = false;
},
resolvesArg: function resolvesArg(fake, index) {
if (typeof index !== "number") {
throw new TypeError("argument index is not number");
}
clear(fake);
fake.resolveArgAt = index;
fake.returnValue = undefined;
fake.resolve = true;
fake.resolveThis = false;
fake.reject = false;
fake.returnValueDefined = false;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.fakeFn = undefined;
fake.callsThrough = false;
},
rejects: function rejects(fake, error, message) {
@ -221,30 +218,36 @@ const defaultBehaviors = {
} else {
reason = error;
}
clear(fake);
fake.returnValue = reason;
fake.resolve = false;
fake.resolveThis = false;
fake.reject = true;
fake.returnValueDefined = true;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.fakeFn = undefined;
fake.callsThrough = false;
return fake;
},
resolvesThis: function resolvesThis(fake) {
clear(fake);
fake.returnValue = undefined;
fake.resolve = false;
fake.resolveThis = true;
fake.reject = false;
fake.returnValueDefined = false;
fake.exception = undefined;
fake.exceptionCreator = undefined;
fake.fakeFn = undefined;
fake.callsThrough = false;
},
callThrough: function callThrough(fake) {
clear(fake);
fake.callsThrough = true;
},
callThroughWithNew: function callThroughWithNew(fake) {
clear(fake);
fake.callsThroughWithNew = true;
},

View file

@ -134,7 +134,7 @@ fake.resolves = function resolves(value) {
* var f1 = sinon.fake.rejects(":(");
*
* try {
* await ft();
* await f1();
* } catch (error) {
* console.log(error);
* // ":("

View file

@ -243,7 +243,7 @@ function Sandbox(opts = {}) {
*/
function getFakeRestorer(object, property, forceAssignment = false) {
const descriptor = getPropertyDescriptor(object, property);
const value = object[property];
const value = forceAssignment && object[property];
function restorer() {
if (forceAssignment) {

View file

@ -1,21 +0,0 @@
"use strict";
module.exports = {
injectInto: null,
properties: [
"spy",
"stub",
"mock",
"clock",
"server",
"requests",
"fake",
"define",
"replace",
"replaceSetter",
"replaceGetter",
"createStubInstance",
],
useFakeTimers: true,
useFakeServer: true,
};

View file

@ -114,7 +114,7 @@ module.exports = function extend(target, ...sources) {
enumerable: sourceOwnPropertyDescriptor.enumerable,
};
/*
if the sorce has an Accessor property copy over the accessor functions (get and set)
if the source has an Accessor property copy over the accessor functions (get and set)
data properties has writable attribute where as accessor property don't
REF: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties
*/

View file

@ -1,8 +1,18 @@
"use strict";
/* eslint-disable jsdoc/valid-types */
/**
* @typedef {object} PropertyDescriptor
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description
* @property {boolean} configurable defaults to false
* @property {boolean} enumerable defaults to false
* @property {boolean} writable defaults to false
* @property {*} value defaults to undefined
* @property {Function} get defaults to undefined
* @property {Function} set defaults to undefined
*/
/*
* The following type def is strictly an illegal JSDoc, but the expression forms a
* The following type def is strictly speaking illegal in JSDoc, but the expression forms a
* legal Typescript union type and is understood by Visual Studio and the IntelliJ
* family of editors. The "TS" flavor of JSDoc is becoming the de-facto standard these
* days for that reason (and the fact that JSDoc is essentially unmaintained)
@ -13,7 +23,6 @@
* a slightly enriched property descriptor
* @property {boolean} isOwn true if the descriptor is owned by this object, false if it comes from the prototype
*/
/* eslint-enable jsdoc/valid-types */
/**
* Returns a slightly modified property descriptor that one can tell is from the object or the prototype

34
node_modules/sinon/package.json generated vendored
View file

@ -15,7 +15,7 @@
"xhr",
"assert"
],
"version": "17.0.1",
"version": "18.0.0",
"homepage": "https://sinonjs.org/",
"author": "Christian Johansen",
"repository": {
@ -32,7 +32,7 @@
"license": "BSD-3-Clause",
"scripts": {
"test-node": "mocha --recursive -R dot \"test/**/*-test.js\"",
"test-dev": "npm run test-node -- --watch -R min",
"test-dev": "npm run test-node -- -n watch -n watch-path=test --node-option watch-path=lib -R min",
"test-headless": "mochify --no-detect-globals --recursive -R dot --grep WebWorker --invert \"test/**/*-test.js\"",
"test-coverage": "nyc npm run test-headless -- --transform [ babelify --ignore [ test ] --plugins [ babel-plugin-istanbul ] ]",
"test-cloud": "npm run test-headless -- --wd",
@ -51,7 +51,7 @@
"unimported": "unimported .",
"pretest-webworker": "npm run build",
"prebuild": "rimraf pkg && npm run check-dependencies",
"postbuild": "npm run test-esm-support && npm run check-esm-bundle-runs-in-browser",
"postbuild": "npm run test-esm-support ",
"prebuild-docs": "./scripts/update-compatibility.js",
"prepublishOnly": "npm run build",
"prettier:check": "prettier --check '**/*.{js,css,md}'",
@ -74,34 +74,34 @@
"*.mjs": "eslint --quiet --ext mjs --parser-options=sourceType:module"
},
"dependencies": {
"@sinonjs/commons": "^3.0.0",
"@sinonjs/commons": "^3.0.1",
"@sinonjs/fake-timers": "^11.2.2",
"@sinonjs/samsam": "^8.0.0",
"diff": "^5.1.0",
"nise": "^5.1.5",
"supports-color": "^7.2.0"
"diff": "^5.2.0",
"nise": "^6.0.0",
"supports-color": "^7"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@sinonjs/eslint-config": "^4.1.0",
"@babel/core": "^7.24.4",
"@sinonjs/eslint-config": "^5.0.3",
"@sinonjs/eslint-plugin-no-prototype-methods": "^0.1.1",
"@sinonjs/referee": "^10.0.1",
"@studio/changes": "^2.2.0",
"@sinonjs/referee": "^11.0.1",
"@studio/changes": "^3.0.0",
"babel-plugin-istanbul": "^6.1.1",
"babelify": "^10.0.0",
"browserify": "^16.5.2",
"debug": "^4.3.4",
"dependency-check": "^4.1.0",
"lint-staged": "^15.0.2",
"mocha": "^10.2.0",
"lint-staged": "^15.2.2",
"mocha": "^10.4.0",
"mochify": "^9.2.0",
"nyc": "^15.1.0",
"prettier": "^3.0.3",
"puppeteer": "^21.4.0",
"prettier": "^3.2.5",
"puppeteer": "^22.7.1",
"rimraf": "^5.0.5",
"semver": "^7.5.4",
"semver": "^7.6.0",
"shelljs": "^0.8.5",
"unimported": "^1.30.0"
"unimported": "^1.31.0"
},
"files": [
"lib",

5074
node_modules/sinon/pkg/sinon-esm.js generated vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

5074
node_modules/sinon/pkg/sinon.js generated vendored

File diff suppressed because one or more lines are too long