From 0c546fc4ef6c7f419f9b243f7696c7ca4d32d7e6 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 22 Aug 2021 16:28:03 -0400 Subject: [PATCH 1/2] Doodles: attempt to add ESLint, round 3 --- README.md | 32 +- dtslint.json | 121 +- package-lock.json | 2694 ++++++++++++++++++++++++++++++++++--- package.json | 12 +- src/checks.ts | 148 -- src/index.ts | 185 +-- src/lint.ts | 235 +--- src/parseTsconfigFiles.ts | 42 + src/updateConfig.ts | 249 ---- test/test.js | 26 +- tslint.json | 17 - 11 files changed, 2582 insertions(+), 1179 deletions(-) delete mode 100644 src/checks.ts create mode 100644 src/parseTsconfigFiles.ts delete mode 100644 src/updateConfig.ts delete mode 100644 tslint.json diff --git a/README.md b/README.md index 691933ca..6f1c1af0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ `dtslint` tests a TypeScript declaration file for style and correctness. -It will install `typescript` and `tslint` for you, so this is the only tool you need to test a type definition. +It will install `typescript` and `eslint` for you, so this is the only tool you need to test a type definition. Lint rules new to dtslint are documented in the [docs](docs) directory. @@ -16,7 +16,6 @@ Use [`--declaration`](http://www.typescriptlang.org/docs/handbook/compiler-optio If you are a library author, read below. - ## Add types for a library (not on DefinitelyTyped) [`dts-gen`](https://github.com/Microsoft/dts-gen#readme) may help, but is not required. @@ -25,14 +24,12 @@ Create a `types` directory. (Name is arbitrary.) Add `"types": "types"` to your `package.json`. Read more on bundling types [here](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html). - #### `types/index.d.ts` Only `index.d.ts` needs to be published to NPM. Other files are just for testing. Write your type definitions here. Refer to the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html) or `dts-gen`'s templates for how to do this. - #### `types/tsconfig.json` ```json5 @@ -57,31 +54,26 @@ Refer to the [handbook](http://www.typescriptlang.org/docs/handbook/declaration- You may extend `"lib"` to, for example, `["es6", "dom"]` if you need those typings. You may also have to add `"target": "es6"` if using certain language features. - -#### `types/tslint.json` +#### `types/eslintrc.json` If you are using the default rules, this is optional. If present, this will override `dtslint`'s [default](https://github.com/Microsoft/dtslint/blob/master/dtslint.json) settings. -You can specify new lint [rules](https://palantir.github.io/tslint/rules/), or disable some. An example: +You can specify new lint [configuration](https://eslint.org/docs/user-guide/configuring), or disable some. An example: ```json5 { - "extends": "dtslint/dtslint.json", // Or "dtslint/dt.json" if on DefinitelyTyped + "extends": "dtslint/dtslint.json", "rules": { - "semicolon": false, - "indent": [true, "tabs"] + "@typescript-eslint/no-floating-promises": false } } ``` - #### `types/test.ts` You can have any number of test files you want, with any names. See below on what to put in them. - - ## Write tests A test file should be a piece of sample code that tests using the library. Tests are type-checked, but not run. @@ -102,7 +94,6 @@ f(2); // $ExpectType void f("one"); ``` - ## Specify a TypeScript version Normally packages will be tested using TypeScript 2.0. @@ -115,7 +106,6 @@ To use a newer version, specify it by including a comment like so: For DefinitelyTyped packages, this should go just under the header (on line 5). For bundled typings, this can go on any line (but should be near the top). - ## Run tests - `npm install --save-dev dtslint` @@ -131,14 +121,6 @@ Use your locally installed version of TypeScript. ```sh dtslint --localTs node_modules/typescript/lib types ``` -- `--expectOnly` - -Disable all the lint rules except the one that checks for type correctness. - -```sh -dtslint --expectOnly types -``` - # Contributing @@ -152,7 +134,6 @@ npm run watch ## Test Use `npm run test` to run all tests. -To run a single test: `node node_modules/tslint/bin/tslint --rules-dir bin/rules --test test/expect`. ## Publish @@ -164,8 +145,11 @@ To run a single test: `node node_modules/tslint/bin/tslint --rules-dir bin/rules This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## FAQ + I'm getting an error about a missing typescript install. + ``` Error: Cannot find module '/node_modules/dtslint/typescript-installs/3.1/node_modules/typescript` ``` + Package lock files such as `yarn.lock` and `package-lock.json` may cause this issue because of our github dependency on `"definitelytyped-header-parser": "github:Microsoft/definitelytyped-header-parser#production"`, which contains the list of typescript versions to install. To fix this, try deleting your lock file and re-installing. diff --git a/dtslint.json b/dtslint.json index 5bdb8202..3c9f6ee2 100644 --- a/dtslint.json +++ b/dtslint.json @@ -1,131 +1,30 @@ { - "extends": "tslint:all", + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking" + ], "rulesDirectory": "./bin/rules", "rules": { // Custom rules "expect": true, "export-just-namespace": true, + "no-any-union": true, "no-bad-reference": true, "no-const-enum": true, "no-dead-reference": true, "no-import-default-of-export-equals": true, "no-padding": true, - "redundant-undefined": true, "no-relative-import-in-test": true, - "strict-export-declare-modifiers": true, - "no-any-union": true, "no-single-declare-module": true, "no-unnecessary-generics": true, "no-useless-files": true, + "npm-naming": true, "prefer-declare-function": true, + "redundant-undefined": true, + "strict-export-declare-modifiers": true, "trim-file": true, "unified-signatures": true, - "void-return": true, - "npm-naming": true, - - "comment-format": [true, "check-space"], // But not check-uppercase or check-lowercase - "interface-name": [true, "never-prefix"], - "max-line-length": [true, 200], - "member-access": [true, "no-public"], - "no-consecutive-blank-lines": true, - "no-unnecessary-callback-wrapper": true, - "no-namespace": [true, "allow-declarations"], - "object-literal-key-quotes": [true, "as-needed"], - "one-line": [ - true, - "check-catch", - "check-finally", - "check-else", - "check-open-brace", - "check-whitespace" - ], - "one-variable-per-declaration": [true, "ignore-for-loop"], - "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], - "prefer-template": [true, "allow-single-concat"], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-module", - "check-separator", - "check-type", - "check-typecast" - ], - - // TODO? - "align": false, // TODO - "arrow-parens": false, - "arrow-return-shorthand": true, // TODO: "multiline" - "linebreak-style": false, // TODO - "no-void-expression": [true, "ignore-arrow-function-shorthand"], - "no-any": false, // TODO - "no-floating-promises": false, // TODO: https://github.com/palantir/tslint/issues/2879 - "no-import-side-effect": false, - "no-this-assignment": false, - "no-unbound-method": false, // TODO? - "no-unsafe-any": false, // TODO - "no-restricted-globals": false, - "number-literal-format": false, // TODO - "promise-function-async": false, - "restrict-plus-operands": false, // TODO - "return-undefined": false, // TODO - "switch-final-break": false, // TODO - "prefer-method-signature": false, // TODO? - - // Pretty sure we don't want these - "binary-expression-operand-order": false, - "class-name": false, - "completed-docs": false, - "curly": false, - "cyclomatic-complexity": false, - "deprecation": false, - "file-name-casing": false, - "forin": false, - "indent": false, - "match-default-export-name": false, - "max-classes-per-file": false, - "max-file-line-count": false, - "member-ordering": false, - "newline-before-return": false, - "newline-per-chained-call": false, - "no-bitwise": false, - "no-console": false, - "no-default-export": false, - "no-empty": false, - "no-implicit-dependencies": false, // See https://github.com/palantir/tslint/issues/3364 - "no-inferred-empty-object-type": false, - "no-magic-numbers": false, - "no-non-null-assertion": false, - "no-null-keyword": false, - "no-parameter-properties": false, - "no-parameter-reassignment": false, - "no-reference": false, // But see no-bad-reference - "no-require-imports": false, - "no-shadowed-variable": false, - "no-string-literal": false, - "no-submodule-imports": false, - "no-tautology-expression": false, - "no-unused-expression": false, - "no-unused-variable": false, - "no-use-before-declare": false, - "object-literal-sort-keys": false, - "ordered-imports": false, - "prefer-function-over-method": false, - "quotemark": false, - "strict-boolean-expressions": false, - "strict-type-predicates": false, - "switch-default": false, - "trailing-comma": false, - "triple-equals": [true, "allow-null-check"], - "typedef": false, - "type-literal-delimiter": false, - "variable-name": false, - "increment-decrement": false, - "unnecessary-constructor": false, - "unnecessary-else": false, - "no-angle-bracket-type-assertion": false, - "no-default-import": false, - "callable-types": false + "void-return": true } } diff --git a/package-lock.json b/package-lock.json index 95d5d610..13ea567a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,19 @@ { "name": "dtslint", - "version": "4.1.4", + "version": "4.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "4.1.4", + "version": "4.1.5", "license": "MIT", "dependencies": { - "@definitelytyped/header-parser": "^0.0.86", - "@definitelytyped/typescript-versions": "^0.0.86", - "@definitelytyped/utils": "^0.0.86", - "dts-critic": "^3.3.9", + "@definitelytyped/header-parser": "latest", + "@definitelytyped/typescript-versions": "latest", + "@definitelytyped/utils": "latest", + "@typescript-eslint/eslint-plugin": "^4.19.1", + "@typescript-eslint/parser": "^4.19.0", + "dts-critic": "latest", "fs-extra": "^6.0.1", "json-stable-stringify": "^1.0.1", "strip-json-comments": "^2.0.1", @@ -23,14 +25,18 @@ "dtslint": "bin/index.js" }, "devDependencies": { + "@types/eslint": "^7.2.7", "@types/fs-extra": "^5.0.2", "@types/json-stable-stringify": "^1.0.32", "@types/node": "14.0.x", "@types/strip-json-comments": "^0.0.28", "@types/yargs": "^15.0.3", - "@typescript-eslint/eslint-plugin": "^4.11.1", - "@typescript-eslint/parser": "^4.11.1", - "eslint": "^7.16.0", + "@typescript-eslint/eslint-plugin": "^4.19.1", + "@typescript-eslint/eslint-plugin-tslint": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", + "eslint": "^7.32.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsdoc": "^32.3.0", "typescript": "next" }, "engines": { @@ -121,15 +127,15 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", @@ -140,18 +146,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "dependencies": { - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -159,17 +153,31 @@ "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, "engines": { - "node": ">=8" + "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", @@ -210,6 +218,22 @@ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, + "node_modules/@types/eslint": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "dev": true + }, "node_modules/@types/fs-extra": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.1.0.tgz", @@ -264,22 +288,99 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", - "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz", + "integrity": "sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", - "debug": "^4.1.1", + "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.2", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin-tslint": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-4.29.2.tgz", + "integrity": "sha512-/GGR7yw3HpLRwiyyNCIbegBinX1DMShBnkzlO6PqdGZw0mPa4HTDcuILXFg327/oCn/632xt4CbS8dX44lfTGQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.29.2", + "lodash": "^4.17.21" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0", + "tslint": "^5.0.0 || ^6.0.0", + "typescript": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz", + "integrity": "sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.2.tgz", + "integrity": "sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz", + "integrity": "sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { @@ -310,20 +411,149 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", - "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz", + "integrity": "sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/scope-manager": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz", + "integrity": "sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/types": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.2.tgz", + "integrity": "sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz", + "integrity": "sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz", + "integrity": "sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, "node_modules/@typescript-eslint/parser": { @@ -434,10 +664,13 @@ } }, "node_modules/acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } }, "node_modules/ajv": { "version": "6.12.6", @@ -500,6 +733,25 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -509,6 +761,23 @@ "node": ">=8" } }, + "node_modules/array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -696,6 +965,19 @@ "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -854,6 +1136,15 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/comment-parser": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -935,6 +1226,18 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1114,6 +1417,63 @@ "node": ">=8.6" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1123,28 +1483,32 @@ } }, "node_modules/eslint": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", - "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", + "glob-parent": "^5.1.2", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", @@ -1153,7 +1517,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -1162,7 +1526,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -1171,69 +1535,272 @@ }, "engines": { "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" + "debug": "^3.2.7", + "resolve": "^1.20.0" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" + "ms": "^2.1.1" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint-module-utils": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", "dev": true, + "dependencies": { + "debug": "^3.2.7", + "pkg-dir": "^2.0.0" + }, "engines": { "node": ">=4" } }, - "node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "node_modules/eslint-plugin-import": { + "version": "2.24.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.1.tgz", + "integrity": "sha512-KSFWhNxPH8OGJwpRJJs+Z7I0a13E2iFQZJIvSnCu6KUs4qmgAm3xN9GYBCSoiGWmwA7gERZPXqYQjcoCROnYhQ==", "dev": true, + "dependencies": { + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.6.2", + "find-up": "^2.0.0", + "has": "^1.0.3", + "is-core-module": "^2.6.0", + "minimatch": "^3.0.4", + "object.values": "^1.1.4", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.10.1" + }, "engines": { - "node": ">=8" + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/eslint-plugin-import/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "32.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.4.tgz", + "integrity": "sha512-xSWfsYvffXnN0OkwLnB7MoDDDDjqcp46W7YlY1j7JyfAQBQ+WnGCfLov3gVNZjUGtK9Otj8mEhTZTqJu4QtIGA==", + "dev": true, + "dependencies": { + "comment-parser": "1.1.5", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.21", + "regextras": "^0.7.1", + "semver": "^7.3.5", + "spdx-expression-parse": "^3.0.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { "node": ">=8" } }, @@ -1268,6 +1835,18 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1596,6 +2175,11 @@ "node": ">=0.6" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -1626,6 +2210,20 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1663,15 +2261,18 @@ } }, "node_modules/globals": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", "dev": true, "dependencies": { "type-fest": "^0.20.2" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globby": { @@ -1725,6 +2326,17 @@ "node": ">=6" } }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -1744,6 +2356,15 @@ "node": ">=0.10.0" } }, + "node_modules/has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -1752,6 +2373,33 @@ "node": ">=4" } }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -1802,6 +2450,9 @@ }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { @@ -1827,6 +2478,92 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1860,6 +2597,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1869,6 +2618,67 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1912,6 +2722,24 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "node_modules/jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true, + "bin": { + "jsdoctypeparser": "bin/jsdoctypeparser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "node_modules/json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1941,6 +2769,27 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5/node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -1981,6 +2830,21 @@ "node": ">= 0.8.0" } }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -1998,6 +2862,24 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2171,6 +3053,59 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2263,6 +3198,19 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/parsimmon": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.16.0.tgz", @@ -2321,6 +3269,173 @@ "node": ">=8.6" } }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2371,6 +3486,112 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -2399,6 +3620,15 @@ "node": ">=8" } }, + "node_modules/regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true, + "engines": { + "node": ">=0.1.14" + } + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2452,11 +3682,15 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "node_modules/resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dependencies": { + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-from": { @@ -2550,6 +3784,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -2577,6 +3825,9 @@ }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/slice-ansi/node_modules/ansi-styles": { @@ -2589,6 +3840,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/slice-ansi/node_modules/color-convert": { @@ -2718,6 +3972,32 @@ "node": ">=0.10.0" } }, + "node_modules/string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -2730,6 +4010,15 @@ "node": ">=0.10.0" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -2747,30 +4036,36 @@ } }, "node_modules/table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "dependencies": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10.0.0" } }, "node_modules/table/node_modules/ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/table/node_modules/ansi-regex": { @@ -2913,6 +4208,23 @@ "node": ">=0.8" } }, + "node_modules/tsconfig-paths": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "dev": true, + "dependencies": { + "json5": "^2.2.0", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "node_modules/tslib": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.0.tgz", @@ -3003,9 +4315,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "node_modules/typescript": { - "version": "4.3.0-dev.20210406", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.0-dev.20210406.tgz", - "integrity": "sha512-GQ6DfMTuUsy9oWOjrzBNL/aLgVy6ef/vS1j0iILTaaAc0tojeMIs5LNQMVc0aclcuuKnzuv9jXrBcpc045JWgQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3014,6 +4326,21 @@ "node": ">=4.2.0" } }, + "node_modules/unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -3094,6 +4421,22 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -3485,15 +4828,15 @@ } }, "@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", @@ -3501,29 +4844,31 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true } } }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@nodelib/fs.scandir": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", @@ -3555,6 +4900,22 @@ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, + "@types/eslint": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "dev": true + }, "@types/fs-extra": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.1.0.tgz", @@ -3609,21 +4970,46 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", - "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz", + "integrity": "sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", - "debug": "^4.1.1", + "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.2", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz", + "integrity": "sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" + } + }, + "@typescript-eslint/types": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.2.tgz", + "integrity": "sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz", + "integrity": "sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.29.2", + "eslint-visitor-keys": "^2.0.0" + } + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -3644,18 +5030,98 @@ } } }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-4.29.2.tgz", + "integrity": "sha512-/GGR7yw3HpLRwiyyNCIbegBinX1DMShBnkzlO6PqdGZw0mPa4HTDcuILXFg327/oCn/632xt4CbS8dX44lfTGQ==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.29.2", + "lodash": "^4.17.21" + } + }, "@typescript-eslint/experimental-utils": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", - "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz", + "integrity": "sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz", + "integrity": "sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" + } + }, + "@typescript-eslint/types": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.2.tgz", + "integrity": "sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz", + "integrity": "sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz", + "integrity": "sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.29.2", + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } } }, "@typescript-eslint/parser": { @@ -3738,10 +5204,11 @@ "dev": true }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} }, "ajv": { "version": "6.12.6", @@ -3795,12 +5262,36 @@ "sprintf-js": "~1.0.2" } }, + "array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + } + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -3962,6 +5453,16 @@ "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4091,6 +5592,12 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "comment-parser": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4157,6 +5664,15 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4296,34 +5812,82 @@ "ansi-colors": "^4.1.1" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", - "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", + "glob-parent": "^5.1.2", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", @@ -4332,7 +5896,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -4341,7 +5905,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -4386,6 +5950,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4427,6 +5997,172 @@ } } }, + "eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.24.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.1.tgz", + "integrity": "sha512-KSFWhNxPH8OGJwpRJJs+Z7I0a13E2iFQZJIvSnCu6KUs4qmgAm3xN9GYBCSoiGWmwA7gERZPXqYQjcoCROnYhQ==", + "dev": true, + "requires": { + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.6.2", + "find-up": "^2.0.0", + "has": "^1.0.3", + "is-core-module": "^2.6.0", + "minimatch": "^3.0.4", + "object.values": "^1.1.4", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.10.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "eslint-plugin-jsdoc": { + "version": "32.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.4.tgz", + "integrity": "sha512-xSWfsYvffXnN0OkwLnB7MoDDDDjqcp46W7YlY1j7JyfAQBQ+WnGCfLov3gVNZjUGtK9Otj8mEhTZTqJu4QtIGA==", + "dev": true, + "requires": { + "comment-parser": "1.1.5", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.21", + "regextras": "^0.7.1", + "semver": "^7.3.5", + "spdx-expression-parse": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -4678,6 +6414,11 @@ "rimraf": "2" } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -4705,6 +6446,17 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -4736,9 +6488,9 @@ } }, "globals": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -4785,6 +6537,14 @@ "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -4800,11 +6560,32 @@ } } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -4837,35 +6618,94 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "has": "^1.0.3" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-extglob": { "version": "2.1.1", @@ -4891,12 +6731,55 @@ "is-extglob": "^2.1.1" } }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4937,6 +6820,18 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -4966,6 +6861,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -5000,6 +6912,18 @@ "type-check": "~0.4.0" } }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -5014,6 +6938,24 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -5155,6 +7097,41 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5226,6 +7203,16 @@ "callsites": "^3.0.0" } }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, "parsimmon": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.16.0.tgz", @@ -5269,6 +7256,132 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5307,6 +7420,89 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + } + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -5334,6 +7530,12 @@ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, + "regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -5378,10 +7580,11 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "requires": { + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, @@ -5454,6 +7657,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -5597,6 +7811,26 @@ "strip-ansi": "^3.0.0" } }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -5606,6 +7840,12 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5617,21 +7857,23 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "requires": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" }, "dependencies": { "ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -5756,6 +7998,25 @@ "punycode": "^2.1.1" } }, + "tsconfig-paths": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "dev": true, + "requires": { + "json5": "^2.2.0", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, "tslib": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.0.tgz", @@ -5830,9 +8091,21 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "4.3.0-dev.20210406", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.0-dev.20210406.tgz", - "integrity": "sha512-GQ6DfMTuUsy9oWOjrzBNL/aLgVy6ef/vS1j0iILTaaAc0tojeMIs5LNQMVc0aclcuuKnzuv9jXrBcpc045JWgQ==" + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==" + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, "universalify": { "version": "0.1.2", @@ -5899,6 +8172,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", diff --git a/package.json b/package.json index 886ae186..2a2d4311 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,8 @@ "@definitelytyped/header-parser": "latest", "@definitelytyped/typescript-versions": "latest", "@definitelytyped/utils": "latest", + "@typescript-eslint/eslint-plugin": "^4.19.1", + "@typescript-eslint/parser": "^4.19.0", "dts-critic": "latest", "fs-extra": "^6.0.1", "json-stable-stringify": "^1.0.1", @@ -42,14 +44,18 @@ "typescript": ">= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev" }, "devDependencies": { + "@types/eslint": "^7.2.7", "@types/fs-extra": "^5.0.2", "@types/json-stable-stringify": "^1.0.32", "@types/node": "14.0.x", "@types/strip-json-comments": "^0.0.28", "@types/yargs": "^15.0.3", - "@typescript-eslint/eslint-plugin": "^4.11.1", - "@typescript-eslint/parser": "^4.11.1", - "eslint": "^7.16.0", + "@typescript-eslint/eslint-plugin": "^4.19.1", + "@typescript-eslint/eslint-plugin-tslint": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", + "eslint": "^7.32.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsdoc": "^32.3.0", "typescript": "next" }, "engines": { diff --git a/src/checks.ts b/src/checks.ts deleted file mode 100644 index dc725362..00000000 --- a/src/checks.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { makeTypesVersionsForPackageJson } from "@definitelytyped/header-parser"; -import { TypeScriptVersion } from "@definitelytyped/typescript-versions"; -import assert = require("assert"); -import { pathExists } from "fs-extra"; -import { join as joinPaths } from "path"; - -import { getCompilerOptions, readJson } from "./util"; - -export async function checkPackageJson( - dirPath: string, - typesVersions: ReadonlyArray, -): Promise { - const pkgJsonPath = joinPaths(dirPath, "package.json"); - const needsTypesVersions = typesVersions.length !== 0; - if (!await pathExists(pkgJsonPath)) { - if (needsTypesVersions) { - throw new Error(`${dirPath}: Must have 'package.json' for "typesVersions"`); - } - return; - } - - const pkgJson = await readJson(pkgJsonPath) as Record; - - if ((pkgJson as any).private !== true) { - throw new Error(`${pkgJsonPath} should set \`"private": true\``); - } - - if (needsTypesVersions) { - assert.strictEqual((pkgJson as any).types, "index", `"types" in '${pkgJsonPath}' should be "index".`); - const expected = makeTypesVersionsForPackageJson(typesVersions); - assert.deepEqual((pkgJson as any).typesVersions, expected, - `"typesVersions" in '${pkgJsonPath}' is not set right. Should be: ${JSON.stringify(expected, undefined, 4)}`); - } - - for (const key in pkgJson) { // tslint:disable-line forin - switch (key) { - case "private": - case "dependencies": - case "license": - // "private"/"typesVersions"/"types" checked above, "dependencies" / "license" checked by types-publisher, - break; - case "typesVersions": - case "types": - if (!needsTypesVersions) { - throw new Error(`${pkgJsonPath} doesn't need to set "${key}" when no 'ts3.x' directories exist.`); - } - break; - default: - throw new Error(`${pkgJsonPath} should not include field ${key}`); - } - } -} - -export interface DefinitelyTypedInfo { - /** "../" or "../../" or "../../../". This should use '/' even on windows. */ - readonly relativeBaseUrl: string; -} -export async function checkTsconfig(dirPath: string, dt: DefinitelyTypedInfo | undefined): Promise { - const options = await getCompilerOptions(dirPath); - - if (dt) { - const { relativeBaseUrl } = dt; - - const mustHave = { - module: "commonjs", - noEmit: true, - forceConsistentCasingInFileNames: true, - baseUrl: relativeBaseUrl, - typeRoots: [relativeBaseUrl], - types: [], - }; - - for (const key of Object.getOwnPropertyNames(mustHave) as Array) { - const expected = mustHave[key]; - const actual = options[key]; - if (!deepEquals(expected, actual)) { - throw new Error(`Expected compilerOptions[${JSON.stringify(key)}] === ${JSON.stringify(expected)}`); - } - } - - for (const key in options) { // tslint:disable-line forin - switch (key) { - case "lib": - case "noImplicitAny": - case "noImplicitThis": - case "strict": - case "strictNullChecks": - case "noUncheckedIndexedAccess": - case "strictFunctionTypes": - case "esModuleInterop": - case "allowSyntheticDefaultImports": - // Allow any value - break; - case "target": - case "paths": - case "jsx": - case "jsxFactory": - case "experimentalDecorators": - case "noUnusedLocals": - case "noUnusedParameters": - // OK. "paths" checked further by types-publisher - break; - default: - if (!(key in mustHave)) { - throw new Error(`Unexpected compiler option ${key}`); - } - } - } - } - - if (!("lib" in options)) { - throw new Error('Must specify "lib", usually to `"lib": ["es6"]` or `"lib": ["es6", "dom"]`.'); - } - - if ("strict" in options) { - if (options.strict !== true) { - throw new Error('When "strict" is present, it must be set to `true`.'); - } - - for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) { - if (key in options) { - throw new TypeError(`Expected "${key}" to not be set when "strict" is \`true\`.`); - } - } - } else { - for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) { - if (!(key in options)) { - throw new Error(`Expected \`"${key}": true\` or \`"${key}": false\`.`); - } - } - } - - if (options.types && options.types.length) { - throw new Error( - 'Use `/// ` directives in source files and ensure ' + - 'that the "types" field in your tsconfig is an empty array.'); - } -} - -function deepEquals(expected: unknown, actual: unknown): boolean { - if (expected instanceof Array) { - return actual instanceof Array - && actual.length === expected.length - && expected.every((e, i) => deepEquals(e, actual[i])); - } else { - return expected === actual; - } -} diff --git a/src/index.ts b/src/index.ts index 2b57b51e..ac94e0c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,22 +1,14 @@ #!/usr/bin/env node -import { parseTypeScriptVersionLine } from "@definitelytyped/header-parser"; -import { AllTypeScriptVersion, TypeScriptVersion } from "@definitelytyped/typescript-versions"; -import assert = require("assert"); -import { readdir, readFile, stat } from "fs-extra"; -import { basename, dirname, join as joinPaths, resolve } from "path"; +import { join as joinPaths, resolve } from "path"; import { cleanTypeScriptInstalls, installAllTypeScriptVersions, installTypeScriptNext } from "@definitelytyped/utils"; -import { checkPackageJson, checkTsconfig } from "./checks"; -import { checkTslintJson, lint, TsVersion } from "./lint"; -import { mapDefinedAsync, withoutPrefix } from "./util"; +import { lint } from "./lint"; async function main(): Promise { const args = process.argv.slice(2); let dirPath = process.cwd(); let onlyTestTsNext = false; - let expectOnly = false; - let shouldListen = false; let lookingForTsLocal = false; let tsLocal: string | undefined; @@ -42,17 +34,9 @@ async function main(): Promise { case "--version": console.log(require("../package.json").version); return; - case "--expectOnly": - expectOnly = true; - break; case "--onlyTestTsNext": onlyTestTsNext = true; break; - // Only for use by types-publisher. - // Listens for { path, onlyTestTsNext } messages and ouputs { path, status }. - case "--listen": - shouldListen = true; - break; default: { if (arg.startsWith("--")) { console.error(`Unknown option '${arg}'`); @@ -73,12 +57,8 @@ async function main(): Promise { throw new Error("Path for --localTs was not provided."); } - if (shouldListen) { - listen(dirPath, tsLocal, onlyTestTsNext); - } else { - await installTypeScriptAsNeeded(tsLocal, onlyTestTsNext); - await runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal); - } + await installTypeScriptAsNeeded(tsLocal, onlyTestTsNext); + await runTests(dirPath); } async function installTypeScriptAsNeeded(tsLocal: string | undefined, onlyTestTsNext: boolean): Promise { @@ -90,174 +70,23 @@ async function installTypeScriptAsNeeded(tsLocal: string | undefined, onlyTestTs } function usage(): void { - console.error("Usage: dtslint [--version] [--installAll] [--onlyTestTsNext] [--expectOnly] [--localTs path]"); + console.error("Usage: dtslint [--version] [--installAll] [--onlyTestTsNext] [--localTs path]"); console.error("Args:"); console.error(" --version Print version and exit."); console.error(" --installAll Cleans and installs all TypeScript versions."); - console.error(" --expectOnly Run only the ExpectType lint rule."); console.error(" --onlyTestTsNext Only run with `typescript@next`, not with the minimum version."); console.error(" --localTs path Run with *path* as the latest version of TS."); console.error(""); console.error("onlyTestTsNext and localTs are (1) mutually exclusive and (2) test a single version of TS"); } -function listen(dirPath: string, tsLocal: string | undefined, alwaysOnlyTestTsNext: boolean): void { - // Don't await this here to ensure that messages sent during installation aren't dropped. - const installationPromise = installTypeScriptAsNeeded(tsLocal, alwaysOnlyTestTsNext); - process.on("message", async (message: unknown) => { - const { path, onlyTestTsNext, expectOnly } = message as { path: string, onlyTestTsNext: boolean, expectOnly?: boolean }; - - await installationPromise; - runTests(joinPaths(dirPath, path), onlyTestTsNext, !!expectOnly, tsLocal) - .catch(e => e.stack) - .then(maybeError => { - process.send!({ path, status: maybeError === undefined ? "OK" : maybeError }); - }) - .catch(e => console.error(e.stack)); - }); -} - -async function runTests( - dirPath: string, - onlyTestTsNext: boolean, - expectOnly: boolean, - tsLocal: string | undefined, -): Promise { - const isOlderVersion = /^v(0\.)?\d+$/.test(basename(dirPath)); - - const indexText = await readFile(joinPaths(dirPath, "index.d.ts"), "utf-8"); - // If this *is* on DefinitelyTyped, types-publisher will fail if it can't parse the header. - const dt = indexText.includes("// Type definitions for"); - if (dt) { - // Someone may have copied text from DefinitelyTyped to their type definition and included a header, - // so assert that we're really on DefinitelyTyped. - assertPathIsInDefinitelyTyped(dirPath); - assertPathIsNotBanned(dirPath); - } - - const typesVersions = await mapDefinedAsync(await readdir(dirPath), async name => { - if (name === "tsconfig.json" || name === "tslint.json" || name === "tsutils") { return undefined; } - const version = withoutPrefix(name, "ts"); - if (version === undefined || !(await stat(joinPaths(dirPath, name))).isDirectory()) { return undefined; } - - if (!TypeScriptVersion.isTypeScriptVersion(version)) { - throw new Error(`There is an entry named ${name}, but ${version} is not a valid TypeScript version.`); - } - if (!TypeScriptVersion.isRedirectable(version)) { - throw new Error(`At ${dirPath}/${name}: TypeScript version directories only available starting with ts3.1.`); - } - return version; - }); - - if (dt) { - await checkPackageJson(dirPath, typesVersions); - } - - const minVersion = maxVersion( - getMinimumTypeScriptVersionFromComment(indexText), - TypeScriptVersion.lowest) as TypeScriptVersion; - if (onlyTestTsNext || tsLocal) { - const tsVersion = tsLocal ? "local" : TypeScriptVersion.latest; - await testTypesVersion(dirPath, tsVersion, tsVersion, isOlderVersion, dt, expectOnly, tsLocal, /*isLatest*/ true); - } else { - // For example, typesVersions of [3.2, 3.5, 3.6] will have - // associated ts3.2, ts3.5, ts3.6 directories, for - // <=3.2, <=3.5, <=3.6 respectively; the root level is for 3.7 and above. - // so this code needs to generate ranges [lowest-3.2, 3.3-3.5, 3.6-3.6, 3.7-latest] - const lows = [TypeScriptVersion.lowest, ...typesVersions.map(next)]; - const his = [...typesVersions, TypeScriptVersion.latest]; - assert.strictEqual(lows.length, his.length); - for (let i = 0; i < lows.length; i++) { - const low = maxVersion(minVersion, lows[i]); - const hi = his[i]; - assert( - parseFloat(hi) >= parseFloat(low), - `'// Minimum TypeScript Version: ${minVersion}' in header skips ts${hi} folder.`); - const isLatest = hi === TypeScriptVersion.latest; - const versionPath = isLatest ? dirPath : joinPaths(dirPath, `ts${hi}`); - if (lows.length > 1) { - console.log("testing from", low, "to", hi, "in", versionPath); - } - await testTypesVersion(versionPath, low, hi, isOlderVersion, dt, expectOnly, undefined, isLatest); - } - } -} - -function maxVersion(v1: TypeScriptVersion | undefined, v2: TypeScriptVersion): TypeScriptVersion; -function maxVersion(v1: AllTypeScriptVersion | undefined, v2: AllTypeScriptVersion): AllTypeScriptVersion; -function maxVersion(v1: AllTypeScriptVersion | undefined, v2: AllTypeScriptVersion) { - if (!v1) return v2; - if (!v2) return v1; - if (parseFloat(v1) >= parseFloat(v2)) return v1; - return v2; -} - -function next(v: TypeScriptVersion): TypeScriptVersion { - const index = TypeScriptVersion.supported.indexOf(v); - assert.notStrictEqual(index, -1); - assert(index < TypeScriptVersion.supported.length); - return TypeScriptVersion.supported[index + 1]; -} - -async function testTypesVersion( - dirPath: string, - lowVersion: TsVersion, - hiVersion: TsVersion, - isOlderVersion: boolean, - dt: boolean, - expectOnly: boolean, - tsLocal: string | undefined, - isLatest: boolean, -): Promise { - await checkTslintJson(dirPath, dt); - await checkTsconfig(dirPath, dt - ? { relativeBaseUrl: ".." + (isOlderVersion ? "/.." : "") + (isLatest ? "" : "/..") + "/" } - : undefined); - const err = await lint(dirPath, lowVersion, hiVersion, isLatest, expectOnly, tsLocal); +async function runTests(dirPath: string): Promise { + const err = await lint(dirPath); if (err) { throw new Error(err); } } -function assertPathIsInDefinitelyTyped(dirPath: string): void { - const parent = dirname(dirPath); - const types = /^v\d+(\.\d+)?$/.test(basename(dirPath)) ? dirname(parent) : parent; - // TODO: It's not clear whether this assertion makes sense, and it's broken on Azure Pipelines - // Re-enable it later if it makes sense. - // const dt = dirname(types); - // if (basename(dt) !== "DefinitelyTyped" || basename(types) !== "types") { - if (basename(types) !== "types") { - throw new Error("Since this type definition includes a header (a comment starting with `// Type definitions for`), " - + "assumed this was a DefinitelyTyped package.\n" - + "But it is not in a `DefinitelyTyped/types/xxx` directory: " - + dirPath); - } -} - -function assertPathIsNotBanned(dirPath: string) { - const basedir = basename(dirPath); - if (/(^|\W)download($|\W)/.test(basedir) && - basedir !== "download" && - basedir !== "downloadjs" && - basedir !== "s3-download-stream") { - // Since npm won't release their banned-words list, we'll have to manually add to this list. - throw new Error(`${dirPath}: Contains the word 'download', which is banned by npm.`); - } -} - -function getMinimumTypeScriptVersionFromComment(text: string): AllTypeScriptVersion | undefined { - const match = text.match(/\/\/ (?:Minimum )?TypeScript Version: /); - if (!match) { - return undefined; - } - - let line = text.slice(match.index, text.indexOf("\n", match.index)); - if (line.endsWith("\r")) { - line = line.slice(0, line.length - 1); - } - return parseTypeScriptVersionLine(line); -} - if (!module.parent) { main().catch(err => { console.error(err.stack); diff --git a/src/lint.ts b/src/lint.ts index 97fe372c..a59d609f 100644 --- a/src/lint.ts +++ b/src/lint.ts @@ -1,229 +1,24 @@ -import { TypeScriptVersion } from "@definitelytyped/typescript-versions"; -import { typeScriptPath } from "@definitelytyped/utils"; -import assert = require("assert"); -import { pathExists } from "fs-extra"; -import { dirname, join as joinPaths, normalize } from "path"; -import { Configuration, ILinterOptions, Linter } from "tslint"; -import * as TsType from "typescript"; -type Configuration = typeof Configuration; -type IConfigurationFile = Configuration.IConfigurationFile; +import { join as joinPaths } from "path"; +import { ESLint } from "eslint"; -import { getProgram, Options as ExpectOptions } from "./rules/expectRule"; +import { parseTsconfigFiles } from "./parseTsconfigFiles"; -import { readJson, withoutPrefix } from "./util"; - -export async function lint( - dirPath: string, - minVersion: TsVersion, - maxVersion: TsVersion, - isLatest: boolean, - expectOnly: boolean, - tsLocal: string | undefined): Promise { +export async function lint(dirPath: string): Promise { const tsconfigPath = joinPaths(dirPath, "tsconfig.json"); - const lintProgram = Linter.createProgram(tsconfigPath); - - for (const version of [maxVersion, minVersion]) { - const errors = testDependencies(version, dirPath, lintProgram, tsLocal); - if (errors) { return errors; } + const files = parseTsconfigFiles(dirPath, tsconfigPath); + if (typeof files === "string") { + return files; } - const lintOptions: ILinterOptions = { - fix: false, - formatter: "stylish", - }; - const linter = new Linter(lintOptions, lintProgram); - const configPath = expectOnly ? joinPaths(__dirname, "..", "dtslint-expect-only.json") : getConfigPath(dirPath); - const config = await getLintConfig(configPath, tsconfigPath, minVersion, maxVersion, tsLocal); - - for (const file of lintProgram.getSourceFiles()) { - if (lintProgram.isSourceFileDefaultLibrary(file)) { continue; } - - const { fileName, text } = file; - if (!fileName.includes("node_modules")) { - const err = testNoTsIgnore(text) || testNoTslintDisables(text); - if (err) { - const { pos, message } = err; - const place = file.getLineAndCharacterOfPosition(pos); - return `At ${fileName}:${JSON.stringify(place)}: ${message}`; - } + const eslint = new ESLint({ + baseConfig: { + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint/eslint-plugin'], + root: true, } - - // External dependencies should have been handled by `testDependencies`; - // typesVersions should be handled in a separate lint - if (!isExternalDependency(file, dirPath, lintProgram) && - (!isLatest || !isTypesVersionPath(fileName, dirPath))) { - linter.lint(fileName, text, config); - } - } - - const result = linter.getResult(); - return result.failures.length ? result.output : undefined; -} - -function testDependencies( - version: TsVersion, - dirPath: string, - lintProgram: TsType.Program, - tsLocal: string | undefined, -): string | undefined { - const tsconfigPath = joinPaths(dirPath, "tsconfig.json"); - assert(version !== "local" || tsLocal); - const ts: typeof TsType = require(typeScriptPath(version, tsLocal)); - const program = getProgram(tsconfigPath, ts, version, lintProgram); - const diagnostics = ts.getPreEmitDiagnostics(program).filter(d => !d.file || isExternalDependency(d.file, dirPath, program)); - if (!diagnostics.length) { return undefined; } - - const showDiags = ts.formatDiagnostics(diagnostics, { - getCanonicalFileName: f => f, - getCurrentDirectory: () => dirPath, - getNewLine: () => "\n", }); + const results = await eslint.lintFiles(files); + const formatter = await eslint.loadFormatter("stylish"); - const message = `Errors in typescript@${version} for external dependencies:\n${showDiags}`; - - // Add an edge-case for someone needing to `npm install` in react when they first edit a DT module which depends on it - #226 - const cannotFindDepsDiags = diagnostics.find(d => d.code === 2307 && d.messageText.toString().includes("Cannot find module")); - if (cannotFindDepsDiags && cannotFindDepsDiags.file) { - const path = cannotFindDepsDiags.file.fileName; - const typesFolder = dirname(path); - - return ` -A module look-up failed, this often occurs when you need to run \`npm install\` on a dependent module before you can lint. - -Before you debug, first try running: - - npm install --prefix ${typesFolder} - -Then re-run. Full error logs are below. - -${message}`; - } else { - return message; - } -} - -export function isExternalDependency(file: TsType.SourceFile, dirPath: string, program: TsType.Program): boolean { - return !startsWithDirectory(file.fileName, dirPath) || program.isSourceFileFromExternalLibrary(file); + return formatter.format(results); } - -function normalizePath(file: string) { - // replaces '\' with '/' and forces all DOS drive letters to be upper-case - return normalize(file) - .replace(/\\/g, "/") - .replace(/^[a-z](?=:)/, c => c.toUpperCase()); -} - -function isTypesVersionPath(fileName: string, dirPath: string) { - const normalFileName = normalizePath(fileName); - const normalDirPath = normalizePath(dirPath); - const subdirPath = withoutPrefix(normalFileName, normalDirPath); - return subdirPath && /^\/ts\d+\.\d/.test(subdirPath); -} - -function startsWithDirectory(filePath: string, dirPath: string): boolean { - const normalFilePath = normalizePath(filePath); - const normalDirPath = normalizePath(dirPath).replace(/\/$/, ""); - return normalFilePath.startsWith(normalDirPath + "/") || normalFilePath.startsWith(normalDirPath + "\\"); -} - -interface Err { pos: number; message: string; } -function testNoTsIgnore(text: string): Err | undefined { - const tsIgnore = "ts-ignore"; - const pos = text.indexOf(tsIgnore); - return pos === -1 ? undefined : { pos, message: "'ts-ignore' is forbidden." }; -} -function testNoTslintDisables(text: string): Err | undefined { - const tslintDisable = "tslint:disable"; - let lastIndex = 0; - // eslint-disable-next-line no-constant-condition - while (true) { - const pos = text.indexOf(tslintDisable, lastIndex); - if (pos === -1) { - return undefined; - } - const end = pos + tslintDisable.length; - const nextChar = text.charAt(end); - if (nextChar !== "-" && nextChar !== ":") { - const message = "'tslint:disable' is forbidden. " + - "('tslint:disable:rulename', tslint:disable-line' and 'tslint:disable-next-line' are allowed.)"; - return { pos, message }; - } - lastIndex = end; - } -} - -export async function checkTslintJson(dirPath: string, dt: boolean): Promise { - const configPath = getConfigPath(dirPath); - const shouldExtend = `dtslint/${dt ? "dt" : "dtslint"}.json`; - const validateExtends = (extend: string | string[]) => - extend === shouldExtend || (!dt && Array.isArray(extend) && extend.some(val => val === shouldExtend)); - - if (!await pathExists(configPath)) { - if (dt) { - throw new Error( - `On DefinitelyTyped, must include \`tslint.json\` containing \`{ "extends": "${shouldExtend}" }\`.\n` + - "This was inferred as a DefinitelyTyped package because it contains a `// Type definitions for` header."); - } - return; - } - - const tslintJson = await readJson(configPath); - if (!validateExtends(tslintJson.extends)) { - throw new Error(`If 'tslint.json' is present, it should extend "${shouldExtend}"`); - } -} - -function getConfigPath(dirPath: string): string { - return joinPaths(dirPath, "tslint.json"); -} - -async function getLintConfig( - expectedConfigPath: string, - tsconfigPath: string, - minVersion: TsVersion, - maxVersion: TsVersion, - tsLocal: string | undefined, -): Promise { - const configExists = await pathExists(expectedConfigPath); - const configPath = configExists ? expectedConfigPath : joinPaths(__dirname, "..", "dtslint.json"); - // Second param to `findConfiguration` doesn't matter, since config path is provided. - const config = Configuration.findConfiguration(configPath, "").results; - if (!config) { - throw new Error(`Could not load config at ${configPath}`); - } - - const expectRule = config.rules.get("expect"); - if (!expectRule || expectRule.ruleSeverity !== "error") { - throw new Error("'expect' rule should be enabled, else compile errors are ignored"); - } - if (expectRule) { - const versionsToTest = - range(minVersion, maxVersion).map(versionName => ({ versionName, path: typeScriptPath(versionName, tsLocal) })); - const expectOptions: ExpectOptions = { tsconfigPath, versionsToTest }; - expectRule.ruleArguments = [expectOptions]; - } - return config; -} - -function range(minVersion: TsVersion, maxVersion: TsVersion): ReadonlyArray { - if (minVersion === "local") { - assert(maxVersion === "local"); - return ["local"]; - } - if (minVersion === TypeScriptVersion.latest) { - assert(maxVersion === TypeScriptVersion.latest); - return [TypeScriptVersion.latest]; - } - assert(maxVersion !== "local"); - - const minIdx = TypeScriptVersion.shipped.indexOf(minVersion); - assert(minIdx >= 0); - if (maxVersion === TypeScriptVersion.latest) { - return [...TypeScriptVersion.shipped.slice(minIdx), TypeScriptVersion.latest]; - } - const maxIdx = TypeScriptVersion.shipped.indexOf(maxVersion as TypeScriptVersion); - assert(maxIdx >= minIdx); - return TypeScriptVersion.shipped.slice(minIdx, maxIdx + 1); -} - -export type TsVersion = TypeScriptVersion | "local"; diff --git a/src/parseTsconfigFiles.ts b/src/parseTsconfigFiles.ts new file mode 100644 index 00000000..7d28b3e6 --- /dev/null +++ b/src/parseTsconfigFiles.ts @@ -0,0 +1,42 @@ +import * as fs from "fs"; +import * as path from "path"; +import * as ts from "typescript"; + +function formatErrors(diagnostics: ts.Diagnostic[]) { + return ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: file => file, + getCurrentDirectory: process.cwd, + getNewLine: () => "\n", + }); +} + +export function parseTsconfigFiles(dirPath: string, configFile: string) { + const config = ts.readConfigFile(configFile, ts.sys.readFile); + if (config.error) { + return formatErrors([config.error]); + } + + const parsed = ts.parseJsonConfigFileContent( + config.config, + { + fileExists: fs.existsSync, + readDirectory: ts.sys.readDirectory, + readFile: file => fs.readFileSync(file, "utf8"), + useCaseSensitiveFileNames: true, + }, + path.resolve(dirPath), + { noEmit: true }, + ); + + if (parsed.errors) { + // Ignore warnings and "TS18003: No inputs were found in config file ..." + const errors = parsed.errors.filter( + diagnostic => diagnostic.category === ts.DiagnosticCategory.Error && diagnostic.code !== 18003, + ); + if (errors.length) { + return formatErrors(errors); + } + } + + return parsed.fileNames; +} \ No newline at end of file diff --git a/src/updateConfig.ts b/src/updateConfig.ts deleted file mode 100644 index 2db746ba..00000000 --- a/src/updateConfig.ts +++ /dev/null @@ -1,249 +0,0 @@ -// This is a stand-alone script that updates TSLint configurations for DefinitelyTyped packages. -// It runs all rules specified in `dt.json`, and updates the existing configuration for a package -// by adding rule exemptions only for the rules that caused a lint failure. -// For example, if a configuration specifies `"no-trailing-whitespace": false` and this rule -// no longer produces an error, then it will not be disabled in the new configuration. -// If you update or create a rule and now it causes new failures in DT, you can update the `dt.json` -// configuration with your rule, then register a disabler function for your rule -// (check `disableRules` function below), then run this script with your rule as argument. - -import cp = require("child_process"); -import fs = require("fs"); -import stringify = require("json-stable-stringify"); -import path = require("path"); -import { Configuration as Config, ILinterOptions, IRuleFailureJson, Linter, LintResult, RuleFailure } from "tslint"; -import * as ts from "typescript"; -import yargs = require("yargs"); -import { isExternalDependency } from "./lint"; -import { disabler as npmNamingDisabler } from "./rules/npmNamingRule"; - -// Rule "expect" needs TypeScript version information, which this script doesn't collect. -const ignoredRules: string[] = ["expect"]; - -function main() { - const args = yargs - .usage(`\`$0 --dt=path-to-dt\` or \`$0 --package=path-to-dt-package\` -'dt.json' is used as the base tslint config for running the linter.`) - .option("package", { - describe: "Path of DT package.", - type: "string", - conflicts: "dt", - }) - .option("dt", { - describe: "Path of local DefinitelyTyped repository.", - type: "string", - conflicts: "package", - }) - .option("rules", { - describe: "Names of the rules to be updated. Leave this empty to update all rules.", - type: "array", - string: true, - default: [] as string[], - }) - .check(arg => { - if (!arg.package && !arg.dt) { - throw new Error("You must provide either argument 'package' or 'dt'."); - } - const unsupportedRules = arg.rules.filter(rule => ignoredRules.includes(rule)); - if (unsupportedRules.length > 0) { - throw new Error(`Rules ${unsupportedRules.join(", ")} are not supported at the moment.`); - } - return true; - }).argv; - - if (args.package) { - updatePackage(args.package, dtConfig(args.rules)); - } else if (args.dt) { - updateAll(args.dt, dtConfig(args.rules)); - } -} - -const dtConfigPath = "dt.json"; - -function dtConfig(updatedRules: string[]): Config.IConfigurationFile { - const config = Config.findConfiguration(dtConfigPath).results; - if (!config) { - throw new Error(`Could not load config at ${dtConfigPath}.`); - } - // Disable ignored or non-updated rules. - for (const entry of config.rules.entries()) { - const [rule, ruleOpts] = entry; - if (ignoredRules.includes(rule) || (updatedRules.length > 0 && !updatedRules.includes(rule))) { - ruleOpts.ruleSeverity = "off"; - } - } - return config; -} - -function updateAll(dtPath: string, config: Config.IConfigurationFile): void { - const packages = fs.readdirSync(path.join(dtPath, "types")); - for (const pkg of packages) { - updatePackage(path.join(dtPath, "types", pkg), config); - } -} - -function updatePackage(pkgPath: string, baseConfig: Config.IConfigurationFile): void { - installDependencies(pkgPath); - const packages = walkPackageDir(pkgPath); - - const linterOpts: ILinterOptions = { - fix: false, - }; - - for (const pkg of packages) { - const results = pkg.lint(linterOpts, baseConfig); - if (results.failures.length > 0) { - const disabledRules = disableRules(results.failures); - const newConfig = mergeConfigRules(pkg.config(), disabledRules, baseConfig); - pkg.updateConfig(newConfig); - } - } -} - -function installDependencies(pkgPath: string): void { - if (fs.existsSync(path.join(pkgPath, "package.json"))) { - cp.execSync( - "npm install --ignore-scripts --no-shrinkwrap --no-package-lock --no-bin-links", - { - encoding: "utf8", - cwd: pkgPath, - }); - } -} - -function mergeConfigRules( - config: Config.RawConfigFile, - newRules: Config.RawRulesConfig, - baseConfig: Config.IConfigurationFile): Config.RawConfigFile { - const activeRules: string[] = []; - baseConfig.rules.forEach((ruleOpts, ruleName) => { - if (ruleOpts.ruleSeverity !== "off") { - activeRules.push(ruleName); - } - }); - const oldRules: Config.RawRulesConfig = config.rules || {}; - let newRulesConfig: Config.RawRulesConfig = {}; - for (const rule of Object.keys(oldRules)) { - if (activeRules.includes(rule)) { - continue; - } - newRulesConfig[rule] = oldRules[rule]; - } - newRulesConfig = { ...newRulesConfig, ...newRules }; - return { ...config, rules: newRulesConfig }; -} - -/** - * Represents a package from the linter's perspective. - * For example, `DefinitelyTyped/types/react` and `DefinitelyTyped/types/react/v15` are different - * packages. - */ -class LintPackage { - private files: ts.SourceFile[] = []; - private program: ts.Program; - - constructor(private rootDir: string) { - this.program = Linter.createProgram(path.join(this.rootDir, "tsconfig.json")); - } - - config(): Config.RawConfigFile { - return Config.readConfigurationFile(path.join(this.rootDir, "tslint.json")); - } - - addFile(filePath: string): void { - const file = this.program.getSourceFile(filePath); - if (file) { - this.files.push(file); - } - } - - lint(opts: ILinterOptions, config: Config.IConfigurationFile): LintResult { - const linter = new Linter(opts, this.program); - for (const file of this.files) { - if (ignoreFile(file, this.rootDir, this.program)) { - continue; - } - linter.lint(file.fileName, file.text, config); - } - return linter.getResult(); - } - - updateConfig(config: Config.RawConfigFile): void { - fs.writeFileSync( - path.join(this.rootDir, "tslint.json"), - stringify(config, { space: 4 }), - { encoding: "utf8", flag: "w" }); - } -} - -function ignoreFile(file: ts.SourceFile, dirPath: string, program: ts.Program): boolean { - return program.isSourceFileDefaultLibrary(file) || isExternalDependency(file, path.resolve(dirPath), program); -} - -function walkPackageDir(rootDir: string): LintPackage[] { - const packages: LintPackage[] = []; - - function walk(curPackage: LintPackage, dir: string): void { - for (const ent of fs.readdirSync(dir, { encoding: "utf8", withFileTypes: true })) { - const entPath = path.join(dir, ent.name); - if (ent.isFile()) { - curPackage.addFile(entPath); - } else if (ent.isDirectory() && ent.name !== "node_modules") { - if (isVersionDir(ent.name)) { - const newPackage = new LintPackage(entPath); - packages.push(newPackage); - walk(newPackage, entPath); - } else { - walk(curPackage, entPath); - } - } - } - } - - const lintPackage = new LintPackage(rootDir); - packages.push(lintPackage); - walk(lintPackage, rootDir); - return packages; -} - -/** - * Returns true if directory name matches a TypeScript or package version directory. - * Examples: `ts3.5`, `v11`, `v0.6` are all version names. - */ -function isVersionDir(dirName: string): boolean { - return /^ts\d+\.\d$/.test(dirName) || /^v\d+(\.\d+)?$/.test(dirName); -} - -type RuleOptions = boolean | unknown[]; -type RuleDisabler = (failures: IRuleFailureJson[]) => RuleOptions; -const defaultDisabler: RuleDisabler = () => { - return false; -}; - -function disableRules(allFailures: RuleFailure[]): Config.RawRulesConfig { - const ruleToFailures: Map = new Map(); - for (const failure of allFailures) { - const failureJson = failure.toJson(); - if (ruleToFailures.has(failureJson.ruleName)) { - ruleToFailures.get(failureJson.ruleName)!.push(failureJson); - } else { - ruleToFailures.set(failureJson.ruleName, [failureJson]); - } - } - - const newRulesConfig: Config.RawRulesConfig = {}; - ruleToFailures.forEach((failures, rule) => { - if (ignoredRules.includes(rule)) { - return; - } - const disabler = rule === "npm-naming" ? npmNamingDisabler : defaultDisabler; - const opts: RuleOptions = disabler(failures); - newRulesConfig[rule] = opts; - }); - - return newRulesConfig; -} - -if (!module.parent) { - main(); -} diff --git a/test/test.js b/test/test.js index 42167065..af7e4677 100755 --- a/test/test.js +++ b/test/test.js @@ -1,26 +1,2 @@ #! /usr/bin/env node -const { join: joinPaths } = require("path"); -const { consoleTestResultHandler, runTest } = require("tslint/lib/test"); -const { existsSync, readdirSync } = require("fs"); - -const testDir = __dirname; - -const tests = readdirSync(testDir).filter(x => x !== "test.js"); - -for (const testName of tests) { - const testDirectory = joinPaths(testDir, testName); - if (existsSync(joinPaths(testDirectory, "tslint.json"))) { - testSingle(testDirectory); - } else { - for (const subTestName of readdirSync(testDirectory)) { - testSingle(joinPaths(testDirectory, subTestName)); - } - } -} - -function testSingle(testDirectory) { - const result = runTest(testDirectory); - if (!consoleTestResultHandler(result, /*logger*/ console)) { - process.exit(1); - } -} +throw new Error("Pending all rules being converted to ESLint."); diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 8259bc81..00000000 --- a/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "tslint:latest", - "rules": { - "arrow-parens": [true, "ban-single-arg-parens"], - "indent": [true, "spaces"], - "interface-name": [true, "never-prefix"], - "max-line-length": [true, 130], - "member-access": [true, "no-public"], - "variable-name": [true, "check-format", "allow-leading-underscore"], - "curly": false, - - "no-console": false, - "no-namespace": false, - "object-literal-sort-keys": false, - "switch-default": false - } -} From 1518f6fb9e4a3875c79c6db2efb996341c8a6add Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 29 Aug 2021 22:55:47 -0400 Subject: [PATCH 2/2] Removed most DefinitelyTyped-specific functions --- package-lock.json | 14 --- package.json | 1 - src/checks.ts | 148 ---------------------- src/index.ts | 19 +-- src/lint.ts | 87 +------------ src/rules/npmNamingRule.ts | 36 ------ src/updateConfig.ts | 249 ------------------------------------- src/util.ts | 17 +-- 8 files changed, 8 insertions(+), 563 deletions(-) delete mode 100644 src/checks.ts delete mode 100644 src/updateConfig.ts diff --git a/package-lock.json b/package-lock.json index 95d5d610..d140e035 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "dts-critic": "^3.3.9", "fs-extra": "^6.0.1", "json-stable-stringify": "^1.0.1", - "strip-json-comments": "^2.0.1", "tslint": "5.14.0", "tsutils": "^2.29.0", "yargs": "^15.1.0" @@ -2730,14 +2729,6 @@ "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -5606,11 +5597,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", diff --git a/package.json b/package.json index 886ae186..65205380 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "dts-critic": "latest", "fs-extra": "^6.0.1", "json-stable-stringify": "^1.0.1", - "strip-json-comments": "^2.0.1", "tslint": "5.14.0", "tsutils": "^2.29.0", "yargs": "^15.1.0" diff --git a/src/checks.ts b/src/checks.ts deleted file mode 100644 index dc725362..00000000 --- a/src/checks.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { makeTypesVersionsForPackageJson } from "@definitelytyped/header-parser"; -import { TypeScriptVersion } from "@definitelytyped/typescript-versions"; -import assert = require("assert"); -import { pathExists } from "fs-extra"; -import { join as joinPaths } from "path"; - -import { getCompilerOptions, readJson } from "./util"; - -export async function checkPackageJson( - dirPath: string, - typesVersions: ReadonlyArray, -): Promise { - const pkgJsonPath = joinPaths(dirPath, "package.json"); - const needsTypesVersions = typesVersions.length !== 0; - if (!await pathExists(pkgJsonPath)) { - if (needsTypesVersions) { - throw new Error(`${dirPath}: Must have 'package.json' for "typesVersions"`); - } - return; - } - - const pkgJson = await readJson(pkgJsonPath) as Record; - - if ((pkgJson as any).private !== true) { - throw new Error(`${pkgJsonPath} should set \`"private": true\``); - } - - if (needsTypesVersions) { - assert.strictEqual((pkgJson as any).types, "index", `"types" in '${pkgJsonPath}' should be "index".`); - const expected = makeTypesVersionsForPackageJson(typesVersions); - assert.deepEqual((pkgJson as any).typesVersions, expected, - `"typesVersions" in '${pkgJsonPath}' is not set right. Should be: ${JSON.stringify(expected, undefined, 4)}`); - } - - for (const key in pkgJson) { // tslint:disable-line forin - switch (key) { - case "private": - case "dependencies": - case "license": - // "private"/"typesVersions"/"types" checked above, "dependencies" / "license" checked by types-publisher, - break; - case "typesVersions": - case "types": - if (!needsTypesVersions) { - throw new Error(`${pkgJsonPath} doesn't need to set "${key}" when no 'ts3.x' directories exist.`); - } - break; - default: - throw new Error(`${pkgJsonPath} should not include field ${key}`); - } - } -} - -export interface DefinitelyTypedInfo { - /** "../" or "../../" or "../../../". This should use '/' even on windows. */ - readonly relativeBaseUrl: string; -} -export async function checkTsconfig(dirPath: string, dt: DefinitelyTypedInfo | undefined): Promise { - const options = await getCompilerOptions(dirPath); - - if (dt) { - const { relativeBaseUrl } = dt; - - const mustHave = { - module: "commonjs", - noEmit: true, - forceConsistentCasingInFileNames: true, - baseUrl: relativeBaseUrl, - typeRoots: [relativeBaseUrl], - types: [], - }; - - for (const key of Object.getOwnPropertyNames(mustHave) as Array) { - const expected = mustHave[key]; - const actual = options[key]; - if (!deepEquals(expected, actual)) { - throw new Error(`Expected compilerOptions[${JSON.stringify(key)}] === ${JSON.stringify(expected)}`); - } - } - - for (const key in options) { // tslint:disable-line forin - switch (key) { - case "lib": - case "noImplicitAny": - case "noImplicitThis": - case "strict": - case "strictNullChecks": - case "noUncheckedIndexedAccess": - case "strictFunctionTypes": - case "esModuleInterop": - case "allowSyntheticDefaultImports": - // Allow any value - break; - case "target": - case "paths": - case "jsx": - case "jsxFactory": - case "experimentalDecorators": - case "noUnusedLocals": - case "noUnusedParameters": - // OK. "paths" checked further by types-publisher - break; - default: - if (!(key in mustHave)) { - throw new Error(`Unexpected compiler option ${key}`); - } - } - } - } - - if (!("lib" in options)) { - throw new Error('Must specify "lib", usually to `"lib": ["es6"]` or `"lib": ["es6", "dom"]`.'); - } - - if ("strict" in options) { - if (options.strict !== true) { - throw new Error('When "strict" is present, it must be set to `true`.'); - } - - for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) { - if (key in options) { - throw new TypeError(`Expected "${key}" to not be set when "strict" is \`true\`.`); - } - } - } else { - for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) { - if (!(key in options)) { - throw new Error(`Expected \`"${key}": true\` or \`"${key}": false\`.`); - } - } - } - - if (options.types && options.types.length) { - throw new Error( - 'Use `/// ` directives in source files and ensure ' + - 'that the "types" field in your tsconfig is an empty array.'); - } -} - -function deepEquals(expected: unknown, actual: unknown): boolean { - if (expected instanceof Array) { - return actual instanceof Array - && actual.length === expected.length - && expected.every((e, i) => deepEquals(e, actual[i])); - } else { - return expected === actual; - } -} diff --git a/src/index.ts b/src/index.ts index 2b57b51e..7e54c0f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,8 +7,7 @@ import { readdir, readFile, stat } from "fs-extra"; import { basename, dirname, join as joinPaths, resolve } from "path"; import { cleanTypeScriptInstalls, installAllTypeScriptVersions, installTypeScriptNext } from "@definitelytyped/utils"; -import { checkPackageJson, checkTsconfig } from "./checks"; -import { checkTslintJson, lint, TsVersion } from "./lint"; +import { lint, TsVersion } from "./lint"; import { mapDefinedAsync, withoutPrefix } from "./util"; async function main(): Promise { @@ -123,8 +122,6 @@ async function runTests( expectOnly: boolean, tsLocal: string | undefined, ): Promise { - const isOlderVersion = /^v(0\.)?\d+$/.test(basename(dirPath)); - const indexText = await readFile(joinPaths(dirPath, "index.d.ts"), "utf-8"); // If this *is* on DefinitelyTyped, types-publisher will fail if it can't parse the header. const dt = indexText.includes("// Type definitions for"); @@ -149,16 +146,12 @@ async function runTests( return version; }); - if (dt) { - await checkPackageJson(dirPath, typesVersions); - } - const minVersion = maxVersion( getMinimumTypeScriptVersionFromComment(indexText), TypeScriptVersion.lowest) as TypeScriptVersion; if (onlyTestTsNext || tsLocal) { const tsVersion = tsLocal ? "local" : TypeScriptVersion.latest; - await testTypesVersion(dirPath, tsVersion, tsVersion, isOlderVersion, dt, expectOnly, tsLocal, /*isLatest*/ true); + await testTypesVersion(dirPath, tsVersion, tsVersion, expectOnly, tsLocal, /*isLatest*/ true); } else { // For example, typesVersions of [3.2, 3.5, 3.6] will have // associated ts3.2, ts3.5, ts3.6 directories, for @@ -178,7 +171,7 @@ async function runTests( if (lows.length > 1) { console.log("testing from", low, "to", hi, "in", versionPath); } - await testTypesVersion(versionPath, low, hi, isOlderVersion, dt, expectOnly, undefined, isLatest); + await testTypesVersion(versionPath, low, hi, expectOnly, undefined, isLatest); } } } @@ -203,16 +196,10 @@ async function testTypesVersion( dirPath: string, lowVersion: TsVersion, hiVersion: TsVersion, - isOlderVersion: boolean, - dt: boolean, expectOnly: boolean, tsLocal: string | undefined, isLatest: boolean, ): Promise { - await checkTslintJson(dirPath, dt); - await checkTsconfig(dirPath, dt - ? { relativeBaseUrl: ".." + (isOlderVersion ? "/.." : "") + (isLatest ? "" : "/..") + "/" } - : undefined); const err = await lint(dirPath, lowVersion, hiVersion, isLatest, expectOnly, tsLocal); if (err) { throw new Error(err); diff --git a/src/lint.ts b/src/lint.ts index 97fe372c..9ae45942 100644 --- a/src/lint.ts +++ b/src/lint.ts @@ -2,15 +2,14 @@ import { TypeScriptVersion } from "@definitelytyped/typescript-versions"; import { typeScriptPath } from "@definitelytyped/utils"; import assert = require("assert"); import { pathExists } from "fs-extra"; -import { dirname, join as joinPaths, normalize } from "path"; +import { join as joinPaths, normalize } from "path"; import { Configuration, ILinterOptions, Linter } from "tslint"; -import * as TsType from "typescript"; type Configuration = typeof Configuration; type IConfigurationFile = Configuration.IConfigurationFile; -import { getProgram, Options as ExpectOptions } from "./rules/expectRule"; +import { Options as ExpectOptions } from "./rules/expectRule"; -import { readJson, withoutPrefix } from "./util"; +import { withoutPrefix } from "./util"; export async function lint( dirPath: string, @@ -22,11 +21,6 @@ export async function lint( const tsconfigPath = joinPaths(dirPath, "tsconfig.json"); const lintProgram = Linter.createProgram(tsconfigPath); - for (const version of [maxVersion, minVersion]) { - const errors = testDependencies(version, dirPath, lintProgram, tsLocal); - if (errors) { return errors; } - } - const lintOptions: ILinterOptions = { fix: false, formatter: "stylish", @@ -48,10 +42,8 @@ export async function lint( } } - // External dependencies should have been handled by `testDependencies`; // typesVersions should be handled in a separate lint - if (!isExternalDependency(file, dirPath, lintProgram) && - (!isLatest || !isTypesVersionPath(fileName, dirPath))) { + if (!isLatest || !isTypesVersionPath(fileName, dirPath)) { linter.lint(fileName, text, config); } } @@ -60,51 +52,6 @@ export async function lint( return result.failures.length ? result.output : undefined; } -function testDependencies( - version: TsVersion, - dirPath: string, - lintProgram: TsType.Program, - tsLocal: string | undefined, -): string | undefined { - const tsconfigPath = joinPaths(dirPath, "tsconfig.json"); - assert(version !== "local" || tsLocal); - const ts: typeof TsType = require(typeScriptPath(version, tsLocal)); - const program = getProgram(tsconfigPath, ts, version, lintProgram); - const diagnostics = ts.getPreEmitDiagnostics(program).filter(d => !d.file || isExternalDependency(d.file, dirPath, program)); - if (!diagnostics.length) { return undefined; } - - const showDiags = ts.formatDiagnostics(diagnostics, { - getCanonicalFileName: f => f, - getCurrentDirectory: () => dirPath, - getNewLine: () => "\n", - }); - - const message = `Errors in typescript@${version} for external dependencies:\n${showDiags}`; - - // Add an edge-case for someone needing to `npm install` in react when they first edit a DT module which depends on it - #226 - const cannotFindDepsDiags = diagnostics.find(d => d.code === 2307 && d.messageText.toString().includes("Cannot find module")); - if (cannotFindDepsDiags && cannotFindDepsDiags.file) { - const path = cannotFindDepsDiags.file.fileName; - const typesFolder = dirname(path); - - return ` -A module look-up failed, this often occurs when you need to run \`npm install\` on a dependent module before you can lint. - -Before you debug, first try running: - - npm install --prefix ${typesFolder} - -Then re-run. Full error logs are below. - -${message}`; - } else { - return message; - } -} - -export function isExternalDependency(file: TsType.SourceFile, dirPath: string, program: TsType.Program): boolean { - return !startsWithDirectory(file.fileName, dirPath) || program.isSourceFileFromExternalLibrary(file); -} function normalizePath(file: string) { // replaces '\' with '/' and forces all DOS drive letters to be upper-case @@ -120,11 +67,6 @@ function isTypesVersionPath(fileName: string, dirPath: string) { return subdirPath && /^\/ts\d+\.\d/.test(subdirPath); } -function startsWithDirectory(filePath: string, dirPath: string): boolean { - const normalFilePath = normalizePath(filePath); - const normalDirPath = normalizePath(dirPath).replace(/\/$/, ""); - return normalFilePath.startsWith(normalDirPath + "/") || normalFilePath.startsWith(normalDirPath + "\\"); -} interface Err { pos: number; message: string; } function testNoTsIgnore(text: string): Err | undefined { @@ -152,27 +94,6 @@ function testNoTslintDisables(text: string): Err | undefined { } } -export async function checkTslintJson(dirPath: string, dt: boolean): Promise { - const configPath = getConfigPath(dirPath); - const shouldExtend = `dtslint/${dt ? "dt" : "dtslint"}.json`; - const validateExtends = (extend: string | string[]) => - extend === shouldExtend || (!dt && Array.isArray(extend) && extend.some(val => val === shouldExtend)); - - if (!await pathExists(configPath)) { - if (dt) { - throw new Error( - `On DefinitelyTyped, must include \`tslint.json\` containing \`{ "extends": "${shouldExtend}" }\`.\n` + - "This was inferred as a DefinitelyTyped package because it contains a `// Type definitions for` header."); - } - return; - } - - const tslintJson = await readJson(configPath); - if (!validateExtends(tslintJson.extends)) { - throw new Error(`If 'tslint.json' is present, it should extend "${shouldExtend}"`); - } -} - function getConfigPath(dirPath: string): string { return joinPaths(dirPath, "tslint.json"); } diff --git a/src/rules/npmNamingRule.ts b/src/rules/npmNamingRule.ts index 0411f4b6..e304a0ad 100644 --- a/src/rules/npmNamingRule.ts +++ b/src/rules/npmNamingRule.ts @@ -1,7 +1,6 @@ import { CheckOptions as CriticOptions, CriticError, - defaultErrors, dtsCritic as critic, ErrorKind, ExportErrorKind, @@ -271,38 +270,3 @@ you can disable this check by adding the following options to your project's tsl return message; } - -/** - * Given npm-naming lint failures, returns a rule configuration that prevents such failures. - */ -export function disabler(failures: Lint.IRuleFailureJson[]): false | [true, ConfigOptions] { - const disabledErrors = new Set(); - for (const ruleFailure of failures) { - if (ruleFailure.ruleName !== "npm-naming") { - throw new Error(`Expected failures of rule "npm-naming", found failures of rule ${ruleFailure.ruleName}.`); - } - const message = ruleFailure.failure; - // Name errors. - if (message.includes("must have a matching npm package") - || message.includes("must match a version that exists on npm") - || message.includes("conflicts with the existing npm package")) { - return false; - } - // Code errors. - if (message.includes("declaration should use 'export =' syntax")) { - disabledErrors.add(ErrorKind.NeedsExportEquals); - } else if (message.includes("declaration specifies 'export default' but the JavaScript source \ - does not mention 'default' anywhere")) { - disabledErrors.add(ErrorKind.NoDefaultExport); - } else { - return [true, { mode: Mode.NameOnly }]; - } - } - - if ((defaultErrors as ExportErrorKind[]).every(error => disabledErrors.has(error))) { - return [true, { mode: Mode.NameOnly }]; - } - const errors: Array<[ExportErrorKind, boolean]> = []; - disabledErrors.forEach(error => errors.push([error, false])); - return [true, { mode: Mode.Code, errors }]; -} diff --git a/src/updateConfig.ts b/src/updateConfig.ts deleted file mode 100644 index 2db746ba..00000000 --- a/src/updateConfig.ts +++ /dev/null @@ -1,249 +0,0 @@ -// This is a stand-alone script that updates TSLint configurations for DefinitelyTyped packages. -// It runs all rules specified in `dt.json`, and updates the existing configuration for a package -// by adding rule exemptions only for the rules that caused a lint failure. -// For example, if a configuration specifies `"no-trailing-whitespace": false` and this rule -// no longer produces an error, then it will not be disabled in the new configuration. -// If you update or create a rule and now it causes new failures in DT, you can update the `dt.json` -// configuration with your rule, then register a disabler function for your rule -// (check `disableRules` function below), then run this script with your rule as argument. - -import cp = require("child_process"); -import fs = require("fs"); -import stringify = require("json-stable-stringify"); -import path = require("path"); -import { Configuration as Config, ILinterOptions, IRuleFailureJson, Linter, LintResult, RuleFailure } from "tslint"; -import * as ts from "typescript"; -import yargs = require("yargs"); -import { isExternalDependency } from "./lint"; -import { disabler as npmNamingDisabler } from "./rules/npmNamingRule"; - -// Rule "expect" needs TypeScript version information, which this script doesn't collect. -const ignoredRules: string[] = ["expect"]; - -function main() { - const args = yargs - .usage(`\`$0 --dt=path-to-dt\` or \`$0 --package=path-to-dt-package\` -'dt.json' is used as the base tslint config for running the linter.`) - .option("package", { - describe: "Path of DT package.", - type: "string", - conflicts: "dt", - }) - .option("dt", { - describe: "Path of local DefinitelyTyped repository.", - type: "string", - conflicts: "package", - }) - .option("rules", { - describe: "Names of the rules to be updated. Leave this empty to update all rules.", - type: "array", - string: true, - default: [] as string[], - }) - .check(arg => { - if (!arg.package && !arg.dt) { - throw new Error("You must provide either argument 'package' or 'dt'."); - } - const unsupportedRules = arg.rules.filter(rule => ignoredRules.includes(rule)); - if (unsupportedRules.length > 0) { - throw new Error(`Rules ${unsupportedRules.join(", ")} are not supported at the moment.`); - } - return true; - }).argv; - - if (args.package) { - updatePackage(args.package, dtConfig(args.rules)); - } else if (args.dt) { - updateAll(args.dt, dtConfig(args.rules)); - } -} - -const dtConfigPath = "dt.json"; - -function dtConfig(updatedRules: string[]): Config.IConfigurationFile { - const config = Config.findConfiguration(dtConfigPath).results; - if (!config) { - throw new Error(`Could not load config at ${dtConfigPath}.`); - } - // Disable ignored or non-updated rules. - for (const entry of config.rules.entries()) { - const [rule, ruleOpts] = entry; - if (ignoredRules.includes(rule) || (updatedRules.length > 0 && !updatedRules.includes(rule))) { - ruleOpts.ruleSeverity = "off"; - } - } - return config; -} - -function updateAll(dtPath: string, config: Config.IConfigurationFile): void { - const packages = fs.readdirSync(path.join(dtPath, "types")); - for (const pkg of packages) { - updatePackage(path.join(dtPath, "types", pkg), config); - } -} - -function updatePackage(pkgPath: string, baseConfig: Config.IConfigurationFile): void { - installDependencies(pkgPath); - const packages = walkPackageDir(pkgPath); - - const linterOpts: ILinterOptions = { - fix: false, - }; - - for (const pkg of packages) { - const results = pkg.lint(linterOpts, baseConfig); - if (results.failures.length > 0) { - const disabledRules = disableRules(results.failures); - const newConfig = mergeConfigRules(pkg.config(), disabledRules, baseConfig); - pkg.updateConfig(newConfig); - } - } -} - -function installDependencies(pkgPath: string): void { - if (fs.existsSync(path.join(pkgPath, "package.json"))) { - cp.execSync( - "npm install --ignore-scripts --no-shrinkwrap --no-package-lock --no-bin-links", - { - encoding: "utf8", - cwd: pkgPath, - }); - } -} - -function mergeConfigRules( - config: Config.RawConfigFile, - newRules: Config.RawRulesConfig, - baseConfig: Config.IConfigurationFile): Config.RawConfigFile { - const activeRules: string[] = []; - baseConfig.rules.forEach((ruleOpts, ruleName) => { - if (ruleOpts.ruleSeverity !== "off") { - activeRules.push(ruleName); - } - }); - const oldRules: Config.RawRulesConfig = config.rules || {}; - let newRulesConfig: Config.RawRulesConfig = {}; - for (const rule of Object.keys(oldRules)) { - if (activeRules.includes(rule)) { - continue; - } - newRulesConfig[rule] = oldRules[rule]; - } - newRulesConfig = { ...newRulesConfig, ...newRules }; - return { ...config, rules: newRulesConfig }; -} - -/** - * Represents a package from the linter's perspective. - * For example, `DefinitelyTyped/types/react` and `DefinitelyTyped/types/react/v15` are different - * packages. - */ -class LintPackage { - private files: ts.SourceFile[] = []; - private program: ts.Program; - - constructor(private rootDir: string) { - this.program = Linter.createProgram(path.join(this.rootDir, "tsconfig.json")); - } - - config(): Config.RawConfigFile { - return Config.readConfigurationFile(path.join(this.rootDir, "tslint.json")); - } - - addFile(filePath: string): void { - const file = this.program.getSourceFile(filePath); - if (file) { - this.files.push(file); - } - } - - lint(opts: ILinterOptions, config: Config.IConfigurationFile): LintResult { - const linter = new Linter(opts, this.program); - for (const file of this.files) { - if (ignoreFile(file, this.rootDir, this.program)) { - continue; - } - linter.lint(file.fileName, file.text, config); - } - return linter.getResult(); - } - - updateConfig(config: Config.RawConfigFile): void { - fs.writeFileSync( - path.join(this.rootDir, "tslint.json"), - stringify(config, { space: 4 }), - { encoding: "utf8", flag: "w" }); - } -} - -function ignoreFile(file: ts.SourceFile, dirPath: string, program: ts.Program): boolean { - return program.isSourceFileDefaultLibrary(file) || isExternalDependency(file, path.resolve(dirPath), program); -} - -function walkPackageDir(rootDir: string): LintPackage[] { - const packages: LintPackage[] = []; - - function walk(curPackage: LintPackage, dir: string): void { - for (const ent of fs.readdirSync(dir, { encoding: "utf8", withFileTypes: true })) { - const entPath = path.join(dir, ent.name); - if (ent.isFile()) { - curPackage.addFile(entPath); - } else if (ent.isDirectory() && ent.name !== "node_modules") { - if (isVersionDir(ent.name)) { - const newPackage = new LintPackage(entPath); - packages.push(newPackage); - walk(newPackage, entPath); - } else { - walk(curPackage, entPath); - } - } - } - } - - const lintPackage = new LintPackage(rootDir); - packages.push(lintPackage); - walk(lintPackage, rootDir); - return packages; -} - -/** - * Returns true if directory name matches a TypeScript or package version directory. - * Examples: `ts3.5`, `v11`, `v0.6` are all version names. - */ -function isVersionDir(dirName: string): boolean { - return /^ts\d+\.\d$/.test(dirName) || /^v\d+(\.\d+)?$/.test(dirName); -} - -type RuleOptions = boolean | unknown[]; -type RuleDisabler = (failures: IRuleFailureJson[]) => RuleOptions; -const defaultDisabler: RuleDisabler = () => { - return false; -}; - -function disableRules(allFailures: RuleFailure[]): Config.RawRulesConfig { - const ruleToFailures: Map = new Map(); - for (const failure of allFailures) { - const failureJson = failure.toJson(); - if (ruleToFailures.has(failureJson.ruleName)) { - ruleToFailures.get(failureJson.ruleName)!.push(failureJson); - } else { - ruleToFailures.set(failureJson.ruleName, [failureJson]); - } - } - - const newRulesConfig: Config.RawRulesConfig = {}; - ruleToFailures.forEach((failures, rule) => { - if (ignoredRules.includes(rule)) { - return; - } - const disabler = rule === "npm-naming" ? npmNamingDisabler : defaultDisabler; - const opts: RuleOptions = disabler(failures); - newRulesConfig[rule] = opts; - }); - - return newRulesConfig; -} - -if (!module.parent) { - main(); -} diff --git a/src/util.ts b/src/util.ts index 1a0e9791..92da33c2 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,14 +1,7 @@ import assert = require("assert"); -import { pathExists, readFile } from "fs-extra"; -import { basename, dirname, join } from "path"; -import stripJsonComments = require("strip-json-comments"); +import { basename, dirname } from "path"; import * as ts from "typescript"; -export async function readJson(path: string) { - const text = await readFile(path, "utf-8"); - return JSON.parse(stripJsonComments(text)); -} - export function failure(ruleName: string, s: string): string { return `${s} See: https://github.com/Microsoft/dtslint/blob/master/docs/${ruleName}.md`; } @@ -53,14 +46,6 @@ export function getModuleDeclarationStatements(node: ts.ModuleDeclaration): Read return body && ts.isModuleBlock(body) ? body.statements : undefined; } -export async function getCompilerOptions(dirPath: string): Promise { - const tsconfigPath = join(dirPath, "tsconfig.json"); - if (!await pathExists(tsconfigPath)) { - throw new Error(`Need a 'tsconfig.json' file in ${dirPath}`); - } - return (await readJson(tsconfigPath)).compilerOptions; -} - export function withoutPrefix(s: string, prefix: string): string | undefined { return s.startsWith(prefix) ? s.slice(prefix.length) : undefined; }