diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 6416eae2ef..d8b2f05077 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -461,34 +461,28 @@ } }, "node_modules/@sinonjs/commons": { - "version": "1.8.0", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "6.0.1", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.7.0" } }, - "node_modules/@sinonjs/formatio": { - "version": "5.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "node_modules/@sinonjs/samsam": { - "version": "5.0.3", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.6.0", "lodash.get": "^4.4.2", @@ -497,8 +491,9 @@ }, "node_modules/@sinonjs/text-encoding": { "version": "0.7.1", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true }, "node_modules/@szmarczak/http-timer": { "version": "1.1.2", @@ -596,15 +591,6 @@ "@sinonjs/fake-timers": "^7.1.0" } }, - "node_modules/@types/sinon/node_modules/@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, "node_modules/@types/tmp": { "version": "0.1.0", "license": "MIT" @@ -1801,9 +1787,10 @@ "license": "ISC" }, "node_modules/diff": { - "version": "4.0.2", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -3455,8 +3442,9 @@ }, "node_modules/isarray": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, "node_modules/isexe": { "version": "2.0.0", @@ -3549,9 +3537,10 @@ } }, "node_modules/just-extend": { - "version": "4.1.0", - "dev": true, - "license": "MIT" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true }, "node_modules/keyv": { "version": "3.1.0", @@ -3657,8 +3646,9 @@ }, "node_modules/lodash.get": { "version": "4.4.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true }, "node_modules/lodash.islength": { "version": "4.0.1", @@ -3897,12 +3887,13 @@ "license": "MIT" }, "node_modules/nise": { - "version": "4.0.3", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/fake-timers": "^7.0.4", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" @@ -4262,8 +4253,9 @@ }, "node_modules/path-to-regexp": { "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, - "license": "MIT", "dependencies": { "isarray": "0.0.1" } @@ -4964,17 +4956,17 @@ "license": "ISC" }, "node_modules/sinon": { - "version": "9.0.2", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.2.tgz", + "integrity": "sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^1.7.2", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.2", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" }, "funding": { "type": "opencollective", @@ -4983,16 +4975,18 @@ }, "node_modules/sinon/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/sinon/node_modules/supports-color": { - "version": "7.1.0", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, diff --git a/node_modules/@sinonjs/commons/.circleci/config.yml b/node_modules/@sinonjs/commons/.circleci/config.yml deleted file mode 100644 index 36edd0916f..0000000000 --- a/node_modules/@sinonjs/commons/.circleci/config.yml +++ /dev/null @@ -1,97 +0,0 @@ -version: 2.1 - -references: - x-workdir: &work-dir - working_directory: ~/source - - x-save-workspace: &persist-step - persist_to_workspace: - root: ~/source - paths: - - . - - x-attach: &attach-step - attach_workspace: - at: . - -jobs: - install-dependencies: - <<: *work-dir - docker: - - image: circleci/node:10 - environment: - HUSKY_SKIP_INSTALL: 1 - steps: - - checkout - - restore_cache: - keys: - - v1-npm-{{ checksum "package-lock.json" }} - - run: - name: Install dependencies - command: | - if [ ! -d node_modules ]; then - npm ci - fi - - save_cache: - key: v1-npm-{{ checksum "package-lock.json" }} - paths: - - node_modules - - *persist-step - - lint: - <<: *work-dir - docker: - - image: node - steps: - - *attach-step - - run: - name: lint - command: npm run lint - - node-8: - docker: - - image: circleci/node:8 - steps: - - *attach-step - - run: - name: Test - command: npm test - - node-10: - docker: - - image: circleci/node:10 - steps: - - *attach-step - - run: - name: Test - command: npm test - - node-12: - docker: - - image: circleci/node:12 - steps: - - *attach-step - - run: - name: Test with coverage - command: npm run test-check-coverage - - run: - name: Upload coverage report - command: bash <(curl -s https://codecov.io/bash) -F unit -s coverage/lcov.info - -workflows: - version: 2 - commons-circle-ci: - jobs: - - install-dependencies - - lint: - requires: - - install-dependencies - - node-8: - requires: - - install-dependencies - - node-10: - requires: - - install-dependencies - - node-12: - requires: - - install-dependencies diff --git a/node_modules/@sinonjs/commons/.editorconfig b/node_modules/@sinonjs/commons/.editorconfig deleted file mode 100644 index 5e0c1cfe7c..0000000000 --- a/node_modules/@sinonjs/commons/.editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -; EditorConfig file: http://EditorConfig.org -; Install the "EditorConfig" plugin into your editor to use - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -# Matches the exact files either package.json or .travis.yml -[{package.json, .travis.yml}] -indent_style = space -indent_size = 2 - -; Needed if doing `git add --patch` to edit patches -[*.diff] -trim_trailing_whitespace = false diff --git a/node_modules/@sinonjs/commons/.eslintignore b/node_modules/@sinonjs/commons/.eslintignore deleted file mode 100644 index 612687ae33..0000000000 --- a/node_modules/@sinonjs/commons/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/* diff --git a/node_modules/@sinonjs/commons/.eslintrc.yaml b/node_modules/@sinonjs/commons/.eslintrc.yaml deleted file mode 100644 index e050e68e89..0000000000 --- a/node_modules/@sinonjs/commons/.eslintrc.yaml +++ /dev/null @@ -1,52 +0,0 @@ -extends: - - sinon - - 'plugin:prettier/recommended' - -env: - browser: true - node: true - -globals: - ArrayBuffer: false - Map: false - Promise: false - Set: false - Symbol: false - -plugins: - - ie11 - - local-rules - -rules: - strict: [error, 'global'] - # authors are expected to understand function hoisting - no-use-before-define: off - - ie11/no-collection-args: error - ie11/no-for-in-const: error - ie11/no-loop-func: warn - ie11/no-weak-collections: error - local-rules/no-prototype-methods: error - -overrides: - - files: '*.test.*' - plugins: - - mocha - env: - mocha: true - rules: - max-nested-callbacks: - - warn - - 6 - mocha/handle-done-callback: error - mocha/no-exclusive-tests: error - mocha/no-global-tests: error - mocha/no-hooks-for-single-case: off - mocha/no-identical-title: error - mocha/no-mocha-arrows: error - mocha/no-nested-tests: error - mocha/no-return-and-callback: error - mocha/no-sibling-hooks: error - mocha/no-skipped-tests: error - mocha/no-top-level-hooks: error - local-rules/no-prototype-methods: off diff --git a/node_modules/@sinonjs/commons/.prettierrc b/node_modules/@sinonjs/commons/.prettierrc deleted file mode 100644 index 5fcd8a70c4..0000000000 --- a/node_modules/@sinonjs/commons/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} diff --git a/node_modules/@sinonjs/commons/CHANGES.md b/node_modules/@sinonjs/commons/CHANGES.md index 48ca3919e6..9d306954d8 100644 --- a/node_modules/@sinonjs/commons/CHANGES.md +++ b/node_modules/@sinonjs/commons/CHANGES.md @@ -1,5 +1,37 @@ # Changes +## 1.8.3 + +- [`6af2d0c`](https://github.com/sinonjs/commons/commit/6af2d0cf33e9fd1e4aaef5308fd16a9cd78a5782) + Bump y18n from 4.0.0 to 4.0.1 (dependabot[bot]) + > + > Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. + > - [Release notes](https://github.com/yargs/y18n/releases) + > - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) + > - [Commits](https://github.com/yargs/y18n/commits) + > + > Signed-off-by: dependabot[bot] + +_Released on 2021-04-08._ + +## 1.8.2 + +- [`6b7a796`](https://github.com/sinonjs/commons/commit/6b7a796ffc088b43dc283cc4477a7d641720dc96) + Add .d.ts files to package (Morgan Roderick) + > + > In order to improve the experience of TypeScript users, we are compiling + > `.d.ts` files from the JSDoc and distributing them with the package + > + +_Released on 2021-01-13._ + +## 1.8.1 + +- [`07b9e7a`](https://github.com/sinonjs/commons/commit/07b9e7a1d784771273a9a58d74945bbc7319b5d4) + Optimize npm package size (Uladzimir Havenchyk) + +_Released on 2020-07-17._ + ## 1.8.0 - [`4282205`](https://github.com/sinonjs/commons/commit/4282205343a4dcde2a35ccf2a8c2094300dad369) diff --git a/node_modules/@sinonjs/commons/CODE_OF_CONDUCT.md b/node_modules/@sinonjs/commons/CODE_OF_CONDUCT.md deleted file mode 100644 index 6e092c455f..0000000000 --- a/node_modules/@sinonjs/commons/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,84 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by e-mailing any or all of [Morgan Roderick](mailto:morgan@roderick.dk), [Max Antoni](mailto:mail@maxantoni.de), [Carl-Erik Kopseng](mailto:carlerik@gmail.com). All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of actions. - -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, -available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/node_modules/@sinonjs/commons/README.md b/node_modules/@sinonjs/commons/README.md index 61d659dca7..9c420ba5d3 100644 --- a/node_modules/@sinonjs/commons/README.md +++ b/node_modules/@sinonjs/commons/README.md @@ -8,9 +8,9 @@ Simple functions shared among the sinon end user libraries ## Rules -* Follows the [Sinon.JS compatibility](https://github.com/sinonjs/sinon/blob/master/CONTRIBUTING.md#compatibility) -* 100% test coverage -* Code formatted using [Prettier](https://prettier.io) -* No side effects welcome! (only pure functions) -* No platform specific functions -* One export per file (any bundler can do tree shaking) +- Follows the [Sinon.JS compatibility](https://github.com/sinonjs/sinon/blob/master/CONTRIBUTING.md#compatibility) +- 100% test coverage +- Code formatted using [Prettier](https://prettier.io) +- No side effects welcome! (only pure functions) +- No platform specific functions +- One export per file (any bundler can do tree shaking) diff --git a/node_modules/@sinonjs/commons/eslint-local-rules.js b/node_modules/@sinonjs/commons/eslint-local-rules.js deleted file mode 100644 index 0e08122f21..0000000000 --- a/node_modules/@sinonjs/commons/eslint-local-rules.js +++ /dev/null @@ -1,81 +0,0 @@ -/* eslint-disable jsdoc/require-jsdoc, jsdoc/no-undefined-types */ -"use strict"; - -function getPrototypeMethods(prototype) { - /* eslint-disable local-rules/no-prototype-methods */ - return Object.getOwnPropertyNames(prototype).filter(function(name) { - return ( - typeof prototype[name] === "function" && - prototype.hasOwnProperty(name) - ); - }); -} - -var DISALLOWED_ARRAY_PROPS = getPrototypeMethods(Array.prototype); - -var DISALLOWED_OBJECT_PROPS = getPrototypeMethods(Object.prototype); - -module.exports = { - // rule to disallow direct use of prototype methods of builtins - "no-prototype-methods": { - meta: { - docs: { - description: "disallow calling prototype methods directly", - category: "Possible Errors", - recommended: false, - url: "https://eslint.org/docs/rules/no-prototype-builtins" - }, - - schema: [] - }, - - create: function(context) { - /** - * Reports if a disallowed property is used in a CallExpression - * - * @param {ASTNode} node The CallExpression node. - * @returns {void} - */ - function disallowBuiltIns(node) { - if ( - node.callee.type !== "MemberExpression" || - node.callee.computed || - // allow static method calls - node.callee.object.name === "Array" || - node.callee.object.name === "Object" - ) { - return; - } - var propName = node.callee.property.name; - - if (DISALLOWED_OBJECT_PROPS.indexOf(propName) > -1) { - context.report({ - message: - "Do not access {{obj}} prototype method '{{prop}}' from target object.", - loc: node.callee.property.loc.start, - data: { - obj: "Object", - prop: propName - }, - node: node - }); - } else if (DISALLOWED_ARRAY_PROPS.indexOf(propName) > -1) { - context.report({ - message: - "Do not access {{obj}} prototype method '{{prop}}' from target object.", - loc: node.callee.property.loc.start, - data: { - obj: "Array", - prop: propName - }, - node: node - }); - } - } - - return { - CallExpression: disallowBuiltIns - }; - } - } -}; diff --git a/node_modules/@sinonjs/commons/lib/every.js b/node_modules/@sinonjs/commons/lib/every.js index c390397691..08274b4d9d 100644 --- a/node_modules/@sinonjs/commons/lib/every.js +++ b/node_modules/@sinonjs/commons/lib/every.js @@ -12,7 +12,7 @@ module.exports = function every(obj, fn) { var pass = true; try { - /* eslint-disable-next-line local-rules/no-prototype-methods */ + // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods obj.forEach(function() { if (!fn.apply(this, arguments)) { // Throwing an error is the only way to break `forEach` diff --git a/node_modules/@sinonjs/commons/lib/prototypes/README.md b/node_modules/@sinonjs/commons/lib/prototypes/README.md index 16d60c8ec4..aff3d914dc 100644 --- a/node_modules/@sinonjs/commons/lib/prototypes/README.md +++ b/node_modules/@sinonjs/commons/lib/prototypes/README.md @@ -22,7 +22,6 @@ console.log(answer); // => 2 ``` - ## With cached references ```js diff --git a/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js index fd1e6d6a47..0560a00114 100644 --- a/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js +++ b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js @@ -3,7 +3,7 @@ var call = Function.call; module.exports = function copyPrototypeMethods(prototype) { - /* eslint-disable local-rules/no-prototype-methods */ + // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods return Object.getOwnPropertyNames(prototype).reduce(function(result, name) { // ignore size because it throws from Map if ( diff --git a/node_modules/@sinonjs/commons/lib/value-to-string.js b/node_modules/@sinonjs/commons/lib/value-to-string.js index cbe7aea0e4..fb14782be5 100644 --- a/node_modules/@sinonjs/commons/lib/value-to-string.js +++ b/node_modules/@sinonjs/commons/lib/value-to-string.js @@ -8,7 +8,7 @@ */ function valueToString(value) { if (value && value.toString) { - /* eslint-disable-next-line local-rules/no-prototype-methods */ + // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods return value.toString(); } return String(value); diff --git a/node_modules/@sinonjs/commons/package.json b/node_modules/@sinonjs/commons/package.json index 6526574814..345e2c05ef 100644 --- a/node_modules/@sinonjs/commons/package.json +++ b/node_modules/@sinonjs/commons/package.json @@ -1,14 +1,19 @@ { "name": "@sinonjs/commons", - "version": "1.8.0", + "version": "1.8.3", "description": "Simple functions shared among the sinon end user libraries", "main": "lib/index.js", + "types": "./types/index.d.ts", "scripts": { + "build": "rm -rf types && tsc", "lint": "eslint .", "precommit": "lint-staged", "test": "mocha --recursive -R dot \"lib/**/*.test.js\"", "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100", "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test", + "prepublishOnly": "npm run build", + "prettier:check": "prettier --check '**/*.{js,css,md}'", + "prettier:write": "prettier --write '**/*.{js,css,md}'", "preversion": "npm run test-check-coverage", "version": "changes --commits --footer", "postversion": "git push --follow-tags && npm publish" @@ -17,6 +22,10 @@ "type": "git", "url": "git+https://github.com/sinonjs/commons.git" }, + "files": [ + "lib", + "types" + ], "author": "", "license": "BSD-3-Clause", "bugs": { @@ -24,11 +33,11 @@ }, "homepage": "https://github.com/sinonjs/commons#readme", "lint-staged": { - "*.js": [ - "eslint" - ] + "*.{js,css,md}": "prettier --check", + "*.js": "eslint" }, "devDependencies": { + "@sinonjs/eslint-plugin-no-prototype-methods": "^0.1.0", "@sinonjs/referee-sinon": "7.0.2", "@studio/changes": "^2.0.0", "eslint": "^6.1.0", @@ -36,7 +45,6 @@ "eslint-config-sinon": "^4.0.0", "eslint-plugin-ie11": "^1.0.0", "eslint-plugin-jsdoc": "^22.1.0", - "eslint-plugin-local-rules": "^0.1.0", "eslint-plugin-mocha": "^6.1.1", "eslint-plugin-prettier": "^3.0.0", "husky": "4.2.3", @@ -45,9 +53,15 @@ "lint-staged": "10.1.1", "mocha": "7.1.0", "nyc": "15.0.0", - "prettier": "^1.14.3" + "prettier": "^1.14.3", + "typescript": "^4.1.3" }, "dependencies": { "type-detect": "4.0.8" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } } \ No newline at end of file diff --git a/node_modules/@sinonjs/commons/types/called-in-order.d.ts b/node_modules/@sinonjs/commons/types/called-in-order.d.ts new file mode 100644 index 0000000000..1a4508be95 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/called-in-order.d.ts @@ -0,0 +1,36 @@ +export = calledInOrder; +/** + * A Sinon proxy object (fake, spy, stub) + * + * @typedef {object} SinonProxy + * @property {Function} calledBefore - A method that determines if this proxy was called before another one + * @property {string} id - Some id + * @property {number} callCount - Number of times this proxy has been called + */ +/** + * Returns true when the spies have been called in the order they were supplied in + * + * @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments + * @returns {boolean} true when spies are called in order, false otherwise + */ +declare function calledInOrder(spies: SinonProxy[] | SinonProxy, ...args: any[]): boolean; +declare namespace calledInOrder { + export { SinonProxy }; +} +/** + * A Sinon proxy object (fake, spy, stub) + */ +type SinonProxy = { + /** + * - A method that determines if this proxy was called before another one + */ + calledBefore: Function; + /** + * - Some id + */ + id: string; + /** + * - Number of times this proxy has been called + */ + callCount: number; +}; diff --git a/node_modules/@sinonjs/commons/types/class-name.d.ts b/node_modules/@sinonjs/commons/types/class-name.d.ts new file mode 100644 index 0000000000..df3687b9b2 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/class-name.d.ts @@ -0,0 +1,8 @@ +export = className; +/** + * Returns a display name for a value from a constructor + * + * @param {object} value A value to examine + * @returns {(string|null)} A string or null + */ +declare function className(value: object): (string | null); diff --git a/node_modules/@sinonjs/commons/types/deprecated.d.ts b/node_modules/@sinonjs/commons/types/deprecated.d.ts new file mode 100644 index 0000000000..81a35bf836 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/deprecated.d.ts @@ -0,0 +1,3 @@ +export function wrap(func: Function, msg: string): Function; +export function defaultMsg(packageName: string, funcName: string): string; +export function printWarning(msg: string): undefined; diff --git a/node_modules/@sinonjs/commons/types/every.d.ts b/node_modules/@sinonjs/commons/types/every.d.ts new file mode 100644 index 0000000000..bcfa64e017 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/every.d.ts @@ -0,0 +1,2 @@ +declare function _exports(obj: object, fn: Function): boolean; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/function-name.d.ts b/node_modules/@sinonjs/commons/types/function-name.d.ts new file mode 100644 index 0000000000..f27d519a9f --- /dev/null +++ b/node_modules/@sinonjs/commons/types/function-name.d.ts @@ -0,0 +1,2 @@ +declare function _exports(func: Function): string; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/global.d.ts b/node_modules/@sinonjs/commons/types/global.d.ts new file mode 100644 index 0000000000..0f54a635dc --- /dev/null +++ b/node_modules/@sinonjs/commons/types/global.d.ts @@ -0,0 +1,7 @@ +export = globalObject; +/** + * A reference to the global object + * + * @type {object} globalObject + */ +declare var globalObject: object; diff --git a/node_modules/@sinonjs/commons/types/index.d.ts b/node_modules/@sinonjs/commons/types/index.d.ts new file mode 100644 index 0000000000..7d675b1819 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/index.d.ts @@ -0,0 +1,17 @@ +export const global: any; +export const calledInOrder: typeof import("./called-in-order"); +export const className: typeof import("./class-name"); +export const deprecated: typeof import("./deprecated"); +export const every: (obj: any, fn: Function) => boolean; +export const functionName: (func: Function) => string; +export const orderByFirstCall: typeof import("./order-by-first-call"); +export const prototypes: { + array: any; + function: any; + map: any; + object: any; + set: any; + string: any; +}; +export const typeOf: (value: any) => string; +export const valueToString: typeof import("./value-to-string"); diff --git a/node_modules/@sinonjs/commons/types/order-by-first-call.d.ts b/node_modules/@sinonjs/commons/types/order-by-first-call.d.ts new file mode 100644 index 0000000000..a9a6037d0d --- /dev/null +++ b/node_modules/@sinonjs/commons/types/order-by-first-call.d.ts @@ -0,0 +1,26 @@ +export = orderByFirstCall; +/** + * A Sinon proxy object (fake, spy, stub) + * + * @typedef {object} SinonProxy + * @property {Function} getCall - A method that can return the first call + */ +/** + * Sorts an array of SinonProxy instances (fake, spy, stub) by their first call + * + * @param {SinonProxy[] | SinonProxy} spies + * @returns {SinonProxy[]} + */ +declare function orderByFirstCall(spies: SinonProxy[] | SinonProxy): SinonProxy[]; +declare namespace orderByFirstCall { + export { SinonProxy }; +} +/** + * A Sinon proxy object (fake, spy, stub) + */ +type SinonProxy = { + /** + * - A method that can return the first call + */ + getCall: Function; +}; diff --git a/node_modules/@sinonjs/commons/types/prototypes/array.d.ts b/node_modules/@sinonjs/commons/types/prototypes/array.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/array.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/copy-prototype.d.ts b/node_modules/@sinonjs/commons/types/prototypes/copy-prototype.d.ts new file mode 100644 index 0000000000..1479b93cf9 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/copy-prototype.d.ts @@ -0,0 +1,2 @@ +declare function _exports(prototype: any): any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/function.d.ts b/node_modules/@sinonjs/commons/types/prototypes/function.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/function.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/index.d.ts b/node_modules/@sinonjs/commons/types/prototypes/index.d.ts new file mode 100644 index 0000000000..0026d6c2f5 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/index.d.ts @@ -0,0 +1,7 @@ +export declare const array: any; +declare const _function: any; +export { _function as function }; +export declare const map: any; +export declare const object: any; +export declare const set: any; +export declare const string: any; diff --git a/node_modules/@sinonjs/commons/types/prototypes/map.d.ts b/node_modules/@sinonjs/commons/types/prototypes/map.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/map.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/object.d.ts b/node_modules/@sinonjs/commons/types/prototypes/object.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/object.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/set.d.ts b/node_modules/@sinonjs/commons/types/prototypes/set.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/set.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/prototypes/string.d.ts b/node_modules/@sinonjs/commons/types/prototypes/string.d.ts new file mode 100644 index 0000000000..1cce635071 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/prototypes/string.d.ts @@ -0,0 +1,2 @@ +declare const _exports: any; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/type-of.d.ts b/node_modules/@sinonjs/commons/types/type-of.d.ts new file mode 100644 index 0000000000..fc72887c0e --- /dev/null +++ b/node_modules/@sinonjs/commons/types/type-of.d.ts @@ -0,0 +1,2 @@ +declare function _exports(value: any): string; +export = _exports; diff --git a/node_modules/@sinonjs/commons/types/value-to-string.d.ts b/node_modules/@sinonjs/commons/types/value-to-string.d.ts new file mode 100644 index 0000000000..19b086cd28 --- /dev/null +++ b/node_modules/@sinonjs/commons/types/value-to-string.d.ts @@ -0,0 +1,8 @@ +export = valueToString; +/** + * Returns a string representation of the value + * + * @param {*} value + * @returns {string} + */ +declare function valueToString(value: any): string; diff --git a/node_modules/@sinonjs/fake-timers/CHANGELOG.md b/node_modules/@sinonjs/fake-timers/CHANGELOG.md index 73851553a3..d7d53d4f7e 100644 --- a/node_modules/@sinonjs/fake-timers/CHANGELOG.md +++ b/node_modules/@sinonjs/fake-timers/CHANGELOG.md @@ -1,4 +1,79 @@ +7.1.2 / 2021-05-28 +================== + + * Fix #382 by making config fields optional (#383) + * Fix #347 : Support util.promisify + +7.1.1 / 2021-05-27 +================== + + * Fix JSDoc for createClock + +7.1.0 / 2021-05-20 +================== + + * Remove Safari from Sauce Lab (ref #380) + * Bump hosted-git-info from 2.6.0 to 2.8.9 + * Bump handlebars from 4.7.6 to 4.7.7 + * Bump lodash from 4.17.19 to 4.17.21 + * Add in latest Safari and evergreen Edge + * Drop IE11 and Safari 9 + * chore: add type tests (#373) + * remove constructor types + * use globalThis to avoid conflicts + * Update yargs-parser + * Update mkdirp + * Upgrade jsdom + * Upgrade mochify to latest + * Upgrade Mocha to latest + * Bump y18n from 4.0.0 to 4.0.1 + * make config optional + * add a bunch more types + +7.0.5 / 2021-04-11 +================== + + * Fix up some clock types in JSDoc (becomes `.d.ts`) (#370) + * Fix refresh arguments forwarding (#369) + +7.0.4 / 2021-04-08 +================== + + * Fix usage with TypeScript + +7.0.3 / 2021-03-02 +================== + + * Removing the use of eval in Node.js (#331) + * Drop Node 8 + * Add docs about typings (#357) + +7.0.2 / 2021-01-18 +================== + + * Make config options optional in TypeScript defs (#354) + +7.0.1 / 2021-01-14 +================== + + * Update README section about browser use + +7.0.0 / 2021-01-12 +================== + + * Remove bundle from package. If you're loading `fake-timers` via + script tag, you'll now have to provide your own bundled version + * Add .d.ts files to package + * Revert "Add stack trace to code recursively scheduling timers" (#338) + * Remove unnecessary durations and use globals + * Support timeout.refresh in node environments + * Fix #319: Error message changed to TypeError + * Fix #319: The use of 'eval' has been removed + * Fix #304: clearTimeout clears setInterval and clearInterval clears setTimeout + * Remove config.target (#318) + + 6.0.1 / 2020-03-24 ================== diff --git a/node_modules/@sinonjs/fake-timers/README.md b/node_modules/@sinonjs/fake-timers/README.md index d8f3c1285e..81ca7b47af 100644 --- a/node_modules/@sinonjs/fake-timers/README.md +++ b/node_modules/@sinonjs/fake-timers/README.md @@ -14,6 +14,28 @@ wait. `@sinonjs/fake-timers` is extracted from [Sinon.JS](https://github.com/sinonjs/sinon.js) and targets the [same runtimes](https://sinonjs.org/releases/latest/#supported-runtimes). +## Help us get our TypeScript definitions production ready! + +In version 7 we introduced TypeScript definitions that are generated from our JSDoc. This makes importing types from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/sinonjs__fake-timers/index.d.ts) superfluous, but we have just gotten started and we need your work for this to be up to the same quality. Until that happens typings from DefinitelyTyped still can be used: + +```sh +npm install -D @types/sinonjs__fake-timers +``` + +Add this to tsconfig.json + +``` +{ + "compilerOptions": { + ... + "paths": { + ... + "@sinonjs/fake-timers": ["node_modules/@types/sinonjs__fake-timers"] + } + } +} +``` + ## Installation `@sinonjs/fake-timers` can be used in both Node and browser environments. Installation is as easy as @@ -22,11 +44,7 @@ wait. npm install @sinonjs/fake-timers ``` -If you want to use `@sinonjs/fake-timers` in a browser you can use [the pre-built -version](https://github.com/sinonjs/fake-timers/blob/master/fake-timers.js) available in the repo -and the npm package. Using npm you only need to reference `./node_modules/@sinonjs/fake-timers/fake-timers.js` in your `