diff --git a/.eslintrc.js b/.eslintrc.js index b39e5187bc73..df695f85e94c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -65,8 +65,6 @@ module.exports = { ], // TODO - enable these new recommended rules - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', @@ -164,8 +162,10 @@ module.exports = { // all test files { files: [ - 'packages/*/tests/**/*.test.ts', 'packages/*/tests/**/*.spec.ts', + 'packages/*/tests/**/*.test.ts', + 'packages/*/tests/**/spec.ts', + 'packages/*/tests/**/test.ts', 'packages/parser/tests/**/*.ts', ], env: { @@ -173,6 +173,8 @@ module.exports = { }, rules: { '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', 'eslint-plugin/no-identical-tests': 'error', 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', @@ -198,6 +200,8 @@ module.exports = { rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-plus-operands': 'off', }, }, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2816fa5baf..70c540bb07dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,7 +292,7 @@ jobs: name: Publish the latest code as a canary version runs-on: ubuntu-latest needs: [typecheck, test_on_primary_node_version, unit_tests_on_other_node_versions, linting_and_style, integration_tests] - if: github.ref == 'refs/heads/master' + if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 # Fetch all history for all tags and branches in this job because lerna needs it diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cbb536062bb..46a6bf956ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] handle bind on nested member expressions ([#3598](https://github.com/typescript-eslint/typescript-eslint/issues/3598)) ([f5a6806](https://github.com/typescript-eslint/typescript-eslint/commit/f5a6806ae4291f540eef73cd5c182c985c5059e7)) +* **eslint-plugin:** [no-implied-eval] permit more expression types ([#3624](https://github.com/typescript-eslint/typescript-eslint/issues/3624)) ([ca7c549](https://github.com/typescript-eslint/typescript-eslint/commit/ca7c549426d885ecb43cc8fe99518e58041ad152)) +* **eslint-plugin:** [no-unnecessary-boolean-literal-compare] incorrect fix when condition is reversed ([#3581](https://github.com/typescript-eslint/typescript-eslint/issues/3581)) ([b595575](https://github.com/typescript-eslint/typescript-eslint/commit/b595575ccef7bceb04c6317fb903f4bedeb19a69)) +* **eslint-plugin:** [return-await] handle nested functions correctly ([#3601](https://github.com/typescript-eslint/typescript-eslint/issues/3601)) ([4a196b5](https://github.com/typescript-eslint/typescript-eslint/commit/4a196b5818bb8557a7d3c5abae81fbd8021d9cb9)) +* **eslint-plugin:** [return-await] properly handle fixes for `TSAsExpression` ([#3631](https://github.com/typescript-eslint/typescript-eslint/issues/3631)) ([00a4369](https://github.com/typescript-eslint/typescript-eslint/commit/00a436986ceb2520fdeb7efed9ad8b2d866700b7)) +* **experimental-utils:** simplify `eslint-utils`' `findVariable`'s signature in `ast-utils` ([#3574](https://github.com/typescript-eslint/typescript-eslint/issues/3574)) ([3ef5267](https://github.com/typescript-eslint/typescript-eslint/commit/3ef5267b850e1ffb7115e263e89a98c455fd2532)) +* **typescript-estree:** correct tty check ([#3635](https://github.com/typescript-eslint/typescript-eslint/issues/3635)) ([62bcc93](https://github.com/typescript-eslint/typescript-eslint/commit/62bcc937f08cd18296ffbe96a3551ec1fb87aecd)) +* **typescript-estree:** ensure --fix works with singleRun mode ([#3655](https://github.com/typescript-eslint/typescript-eslint/issues/3655)) ([99eca0d](https://github.com/typescript-eslint/typescript-eslint/commit/99eca0d428187d4c29ded9ddd1b57b40ab463c01)) + + +### Features + +* **ast-spec:** extract `ExportKind` & `ImportKind` ([#3564](https://github.com/typescript-eslint/typescript-eslint/issues/3564)) ([120d566](https://github.com/typescript-eslint/typescript-eslint/commit/120d566c980c61d3823fbe8b2db30d76b8c31140)) +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) +* **eslint-plugin:** [no-redeclare] ignoreDeclarationMerge of enum+namespace ([#3572](https://github.com/typescript-eslint/typescript-eslint/issues/3572)) ([18e30cb](https://github.com/typescript-eslint/typescript-eslint/commit/18e30cb601ee4e990d6becdfb9d98ae8119b7919)) +* **eslint-plugin:** [prefer-return-this-type] add a new rule ([#3228](https://github.com/typescript-eslint/typescript-eslint/issues/3228)) ([5e1a615](https://github.com/typescript-eslint/typescript-eslint/commit/5e1a61500472ff186eede686b2257464476d3d87)) +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/lerna.json b/lerna.json index 0bdd3150c5fd..597602d30961 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.28.5", + "version": "4.29.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/package.json b/package.json index a04cb34c3213..e7e708f0685f 100644 --- a/package.json +++ b/package.json @@ -74,13 +74,13 @@ "@babel/code-frame": "^7.12.13", "@babel/parser": "^7.14.6", "@babel/types": "^7.14.4", - "@commitlint/cli": "^12.1.4", - "@commitlint/config-conventional": "^12.1.4", - "@commitlint/config-lerna-scopes": "^12.1.4", - "@nrwl/cli": "12.6.0", - "@nrwl/nx-cloud": "12.3.0", - "@nrwl/tao": "12.6.0", - "@nrwl/workspace": "12.6.0", + "@commitlint/cli": "^13.1.0", + "@commitlint/config-conventional": "^13.1.0", + "@commitlint/config-lerna-scopes": "^13.1.0", + "@nrwl/cli": "12.6.3", + "@nrwl/nx-cloud": "12.3.5", + "@nrwl/tao": "12.6.3", + "@nrwl/workspace": "12.6.3", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", @@ -107,13 +107,13 @@ "eslint-plugin-jest": "^24.3.6", "eslint-plugin-simple-import-sort": "^7.0.0", "glob": "^7.1.7", - "husky": "^5.0.9", + "husky": "^7.0.1", "jest": "^27.0.3", "jest-specific-snapshot": "^5.0.0", "lerna": "^3.22.1", "lint-staged": "^11.0.0", "make-dir": "^3.1.0", - "markdownlint-cli": "^0.27.1", + "markdownlint-cli": "^0.28.1", "node-fetch": "^2.6.1", "prettier": "2.3.2", "pretty-format": "^27.0.2", diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index cf8aa62fff49..d883c719512f 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **ast-spec:** extract `ExportKind` & `ImportKind` ([#3564](https://github.com/typescript-eslint/typescript-eslint/issues/3564)) ([120d566](https://github.com/typescript-eslint/typescript-eslint/commit/120d566c980c61d3823fbe8b2db30d76b8c31140)) +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 1de0a2fdbcfb..2836f9b404db 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/ast-spec/src/base/BaseNode.ts b/packages/ast-spec/src/base/BaseNode.ts index 362f156832b4..797b3d351320 100644 --- a/packages/ast-spec/src/base/BaseNode.ts +++ b/packages/ast-spec/src/base/BaseNode.ts @@ -1,22 +1,15 @@ // import type { Node } from '../unions/Node'; -import type { Range } from './Range'; -import type { SourceLocation } from './SourceLocation'; +import type { AST_NODE_TYPES } from '../ast-node-types'; +import type { NodeOrTokenData } from './NodeOrTokenData'; -export interface BaseNode { - /** - * The source location information of the node. - * @see {SourceLocation} - */ - loc: SourceLocation; - /** - * @see {Range} - */ - range: Range; +export interface BaseNode extends NodeOrTokenData { /** * The parent node of the current node + * + * This is added in the @typescript-eslint/types package as ESLint adds it + * while traversing. */ // parent?: Node; - // every node *will* have a type, but let the nodes define their own exact string - // type: string; + type: AST_NODE_TYPES; } diff --git a/packages/ast-spec/src/base/BaseToken.ts b/packages/ast-spec/src/base/BaseToken.ts index cdf0d1286438..8780cfcb9695 100644 --- a/packages/ast-spec/src/base/BaseToken.ts +++ b/packages/ast-spec/src/base/BaseToken.ts @@ -1,8 +1,10 @@ -import type { BaseNode } from './BaseNode'; +import type { AST_TOKEN_TYPES } from '../ast-token-types'; +import type { NodeOrTokenData } from './NodeOrTokenData'; /* * Token and Comment are pseudo-nodes to represent pieces of source code */ -export interface BaseToken extends BaseNode { +export interface BaseToken extends NodeOrTokenData { + type: AST_TOKEN_TYPES; value: string; } diff --git a/packages/ast-spec/src/base/NodeOrTokenData.ts b/packages/ast-spec/src/base/NodeOrTokenData.ts new file mode 100644 index 000000000000..8052278bbf02 --- /dev/null +++ b/packages/ast-spec/src/base/NodeOrTokenData.ts @@ -0,0 +1,17 @@ +import type { Range } from './Range'; +import type { SourceLocation } from './SourceLocation'; + +export interface NodeOrTokenData { + /** + * The source location information of the node. + * @see {SourceLocation} + */ + loc: SourceLocation; + + /** + * @see {Range} + */ + range: Range; + + type: string; +} diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts index e9657a7536fa..e6700070b59b 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { Identifier } from '../../expression/Identifier/spec'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportAllDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportAllDeclaration; source: Expression | null; - exportKind: 'type' | 'value'; + exportKind: ExportKind; exported: Identifier | null; } diff --git a/packages/ast-spec/src/declaration/ExportAndImportKind.ts b/packages/ast-spec/src/declaration/ExportAndImportKind.ts new file mode 100644 index 000000000000..e8d90b767981 --- /dev/null +++ b/packages/ast-spec/src/declaration/ExportAndImportKind.ts @@ -0,0 +1,4 @@ +type ExportAndImportKind = 'type' | 'value'; + +export type ExportKind = ExportAndImportKind; +export type ImportKind = ExportAndImportKind; diff --git a/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts index f34b6e44668f..492d0981b8ca 100644 --- a/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportDefaultDeclaration/spec.ts @@ -2,9 +2,10 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportDefaultDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportDefaultDeclaration; declaration: ExportDeclaration | Expression; - exportKind: 'type' | 'value'; + exportKind: ExportKind; } diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts index 021fea1c6330..bf4d9ea86d2c 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode'; import type { ExportSpecifier } from '../../special/ExportSpecifier/spec'; import type { ExportDeclaration } from '../../unions/ExportDeclaration'; import type { Expression } from '../../unions/Expression'; +import type { ExportKind } from '../ExportAndImportKind'; export interface ExportNamedDeclaration extends BaseNode { type: AST_NODE_TYPES.ExportNamedDeclaration; declaration: ExportDeclaration | null; specifiers: ExportSpecifier[]; source: Expression | null; - exportKind: 'type' | 'value'; + exportKind: ExportKind; } diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts index eaaad5f53e32..2aeaeae4539f 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { ImportClause } from '../../unions/ImportClause'; import type { Literal } from '../../unions/Literal'; +import type { ImportKind } from '../ExportAndImportKind'; export interface ImportDeclaration extends BaseNode { type: AST_NODE_TYPES.ImportDeclaration; source: Literal; specifiers: ImportClause[]; - importKind: 'type' | 'value'; + importKind: ImportKind; } diff --git a/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts index 4c434dded782..5ccd9b6fc4fc 100644 --- a/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/TSImportEqualsDeclaration/spec.ts @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode'; import type { Identifier } from '../../expression/Identifier/spec'; import type { TSExternalModuleReference } from '../../special/TSExternalModuleReference/spec'; import type { EntityName } from '../../unions/EntityName'; +import type { ImportKind } from '../ExportAndImportKind'; export interface TSImportEqualsDeclaration extends BaseNode { type: AST_NODE_TYPES.TSImportEqualsDeclaration; id: Identifier; moduleReference: EntityName | TSExternalModuleReference; - importKind: 'type' | 'value'; + importKind: ImportKind; isExport: boolean; } diff --git a/packages/ast-spec/src/index.ts b/packages/ast-spec/src/index.ts index bd4b6584482d..c0dc09b70b0e 100644 --- a/packages/ast-spec/src/index.ts +++ b/packages/ast-spec/src/index.ts @@ -1,7 +1,7 @@ export * from './base/Accessibility'; export * from './base/BaseNode'; // this is exported so that the `types` package can merge the decl and add the `parent` property -export * from './base/OptionalRangeAndLoc'; export * from './base/LineAndColumnData'; +export * from './base/OptionalRangeAndLoc'; export * from './base/Range'; export * from './base/SourceLocation'; diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 4ad594f0f09f..340d6d776459 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index a66619ad72e0..3704cfe5df1c 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "4.28.5", + "version": "4.29.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 6bc3be0b84f9..267da2f340fb 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 3f8f90c5e985..d6c946d4f05b 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "4.28.5", + "version": "4.29.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "TSLint wrapper plugin for ESLint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.28.5" + "@typescript-eslint/parser": "4.29.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 4409fd54813a..82d712fef935 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **eslint-plugin:** [no-implied-eval] handle bind on nested member expressions ([#3598](https://github.com/typescript-eslint/typescript-eslint/issues/3598)) ([f5a6806](https://github.com/typescript-eslint/typescript-eslint/commit/f5a6806ae4291f540eef73cd5c182c985c5059e7)) +* **eslint-plugin:** [no-implied-eval] permit more expression types ([#3624](https://github.com/typescript-eslint/typescript-eslint/issues/3624)) ([ca7c549](https://github.com/typescript-eslint/typescript-eslint/commit/ca7c549426d885ecb43cc8fe99518e58041ad152)) +* **eslint-plugin:** [no-unnecessary-boolean-literal-compare] incorrect fix when condition is reversed ([#3581](https://github.com/typescript-eslint/typescript-eslint/issues/3581)) ([b595575](https://github.com/typescript-eslint/typescript-eslint/commit/b595575ccef7bceb04c6317fb903f4bedeb19a69)) +* **eslint-plugin:** [return-await] handle nested functions correctly ([#3601](https://github.com/typescript-eslint/typescript-eslint/issues/3601)) ([4a196b5](https://github.com/typescript-eslint/typescript-eslint/commit/4a196b5818bb8557a7d3c5abae81fbd8021d9cb9)) +* **eslint-plugin:** [return-await] properly handle fixes for `TSAsExpression` ([#3631](https://github.com/typescript-eslint/typescript-eslint/issues/3631)) ([00a4369](https://github.com/typescript-eslint/typescript-eslint/commit/00a436986ceb2520fdeb7efed9ad8b2d866700b7)) + + +### Features + +* **eslint-plugin:** [no-redeclare] ignoreDeclarationMerge of enum+namespace ([#3572](https://github.com/typescript-eslint/typescript-eslint/issues/3572)) ([18e30cb](https://github.com/typescript-eslint/typescript-eslint/commit/18e30cb601ee4e990d6becdfb9d98ae8119b7919)) +* **eslint-plugin:** [prefer-return-this-type] add a new rule ([#3228](https://github.com/typescript-eslint/typescript-eslint/issues/3228)) ([5e1a615](https://github.com/typescript-eslint/typescript-eslint/commit/5e1a61500472ff186eede686b2257464476d3d87)) +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 344764dcb96b..6f890d272562 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -163,6 +163,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/prefer-readonly-parameter-types`](./docs/rules/prefer-readonly-parameter-types.md) | Requires that function parameters are typed as readonly to prevent accidental mutation of inputs | | | :thought_balloon: | | [`@typescript-eslint/prefer-reduce-type-parameter`](./docs/rules/prefer-reduce-type-parameter.md) | Prefer using type parameter when calling `Array#reduce` instead of casting | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :white_check_mark: | :wrench: | :thought_balloon: | +| [`@typescript-eslint/prefer-return-this-type`](./docs/rules/prefer-return-this-type.md) | Enforce that `this` is used when only `this` type is returned | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-string-starts-ends-with`](./docs/rules/prefer-string-starts-ends-with.md) | Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-ts-expect-error`](./docs/rules/prefer-ts-expect-error.md) | Recommends using `@ts-expect-error` over `@ts-ignore` | | :wrench: | | | [`@typescript-eslint/promise-function-async`](./docs/rules/promise-function-async.md) | Requires any function or method that returns a Promise to be marked async | | :wrench: | :thought_balloon: | diff --git a/packages/eslint-plugin/docs/rules/no-redeclare.md b/packages/eslint-plugin/docs/rules/no-redeclare.md index 4b5164d6f0e0..539e691cfb26 100644 --- a/packages/eslint-plugin/docs/rules/no-redeclare.md +++ b/packages/eslint-plugin/docs/rules/no-redeclare.md @@ -41,6 +41,7 @@ When set to `true`, the rule will ignore declaration merges between the followin - class + namespace - class + interface + namespace - function + namespace +- enum + namespace Examples of **correct** code with `{ ignoreDeclarationMerge: true }`: diff --git a/packages/eslint-plugin/docs/rules/no-use-before-define.md b/packages/eslint-plugin/docs/rules/no-use-before-define.md index dfdab4d60f70..d7ec0aadd73b 100644 --- a/packages/eslint-plugin/docs/rules/no-use-before-define.md +++ b/packages/eslint-plugin/docs/rules/no-use-before-define.md @@ -1,7 +1,5 @@ # Disallow the use of variables before they are defined (`no-use-before-define`) -## PLEASE READ THIS ISSUE BEFORE USING THIS RULE [#1856](https://github.com/typescript-eslint/typescript-eslint/issues/1856) - ## Rule Details This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule. @@ -42,10 +40,10 @@ const defaultOptions: Options = { If this is `true`, this rule warns every reference to a enum before the enum declaration. If this is `false`, this rule will ignore references to enums, when the reference is in a child scope. -Examples of **incorrect** code for the `{ "enums": false }` option: +Examples of **incorrect** code for the `{ "enums": true }` option: ```ts -/*eslint no-use-before-define: ["error", { "enums": false }]*/ +/*eslint no-use-before-define: ["error", { "enums": true }]*/ const x = Foo.FOO; diff --git a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md new file mode 100644 index 000000000000..161495b82c00 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md @@ -0,0 +1,90 @@ +# Enforce that `this` is used when only `this` type is returned (`prefer-return-this-type`) + +[Method chaining](https://en.wikipedia.org/wiki/Method_chaining) is a common pattern in OOP languages and TypeScript provides a special [polymorphic this type](https://www.typescriptlang.org/docs/handbook/2/classes.html#this-types). +If any type other than `this` is specified as the return type of these chaining methods, TypeScript will fail to cast it when invoking in subclass. + +```ts +class Animal { + eat(): Animal { + console.log("I'm moving!"); + return this; + } +} + +class Cat extends Animal { + meow(): Cat { + console.log('Meow~'); + return this; + } +} + +const cat = new Cat(); +// Error: Property 'meow' does not exist on type 'Animal'. +// because `eat` returns `Animal` and not all animals meow. +cat.eat().meow(); + +// the error can be fixed by removing the return type of `eat` or use `this` as the return type. +class Animal { + eat(): this { + console.log("I'm moving!"); + return this; + } +} + +class Cat extends Animal { + meow(): this { + console.log('Meow~'); + return this; + } +} + +const cat = new Cat(); +// no errors. Because `eat` returns `Cat` now +cat.eat().meow(); +``` + +Examples of **incorrect** code for this rule: + +```ts +class Foo { + f1(): Foo { + return this; + } + f2 = (): Foo => { + return this; + }; + f3(): Foo | undefined { + return Math.random() > 0.5 ? this : undefined; + } +} +``` + +Examples of **correct** code for this rule: + +```ts +class Foo { + f1(): this { + return this; + } + f2() { + return this; + } + f3 = (): this => { + return this; + }; + f4 = () => { + return this; + }; +} + +class Base {} +class Derived extends Base { + f(): Base { + return this; + } +} +``` + +## When Not To Use It + +If you don't use method chaining or explicit return values, you can safely turn this rule off. diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 52d579430969..7318829850c0 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.28.5", - "@typescript-eslint/scope-manager": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", + "@typescript-eslint/scope-manager": "4.29.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.1.0", diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index b21d14efc9f0..66209b806233 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -129,6 +129,7 @@ export = { '@typescript-eslint/prefer-readonly-parameter-types': 'error', '@typescript-eslint/prefer-reduce-type-parameter': 'error', '@typescript-eslint/prefer-regexp-exec': 'error', + '@typescript-eslint/prefer-return-this-type': 'error', '@typescript-eslint/prefer-string-starts-ends-with': 'error', '@typescript-eslint/prefer-ts-expect-error': 'error', '@typescript-eslint/promise-function-async': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index be78db26f806..1b6fa0f6ea12 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -94,6 +94,7 @@ import preferReadonly from './prefer-readonly'; import preferReadonlyParameterTypes from './prefer-readonly-parameter-types'; import preferReduceTypeParameter from './prefer-reduce-type-parameter'; import preferRegexpExec from './prefer-regexp-exec'; +import preferReturnThisType from './prefer-return-this-type'; import preferStringStartsEndsWith from './prefer-string-starts-ends-with'; import preferTsExpectError from './prefer-ts-expect-error'; import promiseFunctionAsync from './promise-function-async'; @@ -212,6 +213,7 @@ export default { 'prefer-readonly-parameter-types': preferReadonlyParameterTypes, 'prefer-reduce-type-parameter': preferReduceTypeParameter, 'prefer-regexp-exec': preferRegexpExec, + 'prefer-return-this-type': preferReturnThisType, 'prefer-string-starts-ends-with': preferStringStartsEndsWith, 'prefer-ts-expect-error': preferTsExpectError, 'promise-function-async': promiseFunctionAsync, diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index c7caf2d4bef4..34b1c70b16d0 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -99,6 +99,12 @@ export default util.createRule({ return signatures.length > 0; } + function isBind(node: TSESTree.Node): boolean { + return node.type === AST_NODE_TYPES.MemberExpression + ? isBind(node.property) + : node.type === AST_NODE_TYPES.Identifier && node.name === 'bind'; + } + function isFunction(node: TSESTree.Node): boolean { switch (node.type) { case AST_NODE_TYPES.ArrowFunctionExpression: @@ -106,20 +112,15 @@ export default util.createRule({ case AST_NODE_TYPES.FunctionExpression: return true; - case AST_NODE_TYPES.MemberExpression: - case AST_NODE_TYPES.Identifier: - case AST_NODE_TYPES.ConditionalExpression: - return isFunctionType(node); + case AST_NODE_TYPES.Literal: + case AST_NODE_TYPES.TemplateLiteral: + return false; case AST_NODE_TYPES.CallExpression: - return ( - (node.callee.type === AST_NODE_TYPES.Identifier && - node.callee.name === 'bind') || - isFunctionType(node) - ); + return isBind(node.callee) || isFunctionType(node); default: - return false; + return isFunctionType(node); } } diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index f6b15c0430c1..e9d52852668f 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -4,7 +4,9 @@ import * as util from '../util'; const baseRule = ((): typeof BaseRule | null => { try { - return require('eslint/lib/rules/no-loss-of-precision'); + return require('eslint/lib/rules/no-loss-of-precision') as + | typeof BaseRule + | null; } catch { /* istanbul ignore next */ return null; diff --git a/packages/eslint-plugin/src/rules/no-redeclare.ts b/packages/eslint-plugin/src/rules/no-redeclare.ts index 399966b16d2c..ae4b2e9a3f5a 100644 --- a/packages/eslint-plugin/src/rules/no-redeclare.ts +++ b/packages/eslint-plugin/src/rules/no-redeclare.ts @@ -63,6 +63,10 @@ export default util.createRule({ AST_NODE_TYPES.TSModuleDeclaration, AST_NODE_TYPES.FunctionDeclaration, ]); + const ENUM_DECLARATION_MERGE_NODES = new Set([ + AST_NODE_TYPES.TSEnumDeclaration, + AST_NODE_TYPES.TSModuleDeclaration, + ]); function* iterateDeclarations(variable: TSESLint.Scope.Variable): Generator< { @@ -164,12 +168,33 @@ export default util.createRule({ return; } - // there's more than one class declaration, which needs to be reported + // there's more than one function declaration, which needs to be reported for (const { identifier } of functionDecls) { yield { type: 'syntax', node: identifier, loc: identifier.loc }; } return; } + + if ( + // enum + namespace merging + identifiers.every(({ parent }) => + ENUM_DECLARATION_MERGE_NODES.has(parent.type), + ) + ) { + const enumDecls = identifiers.filter( + ({ parent }) => parent.type === AST_NODE_TYPES.TSEnumDeclaration, + ); + if (enumDecls.length === 1) { + // safe declaration merging + return; + } + + // there's more than one enum declaration, which needs to be reported + for (const { identifier } of enumDecls) { + yield { type: 'syntax', node: identifier, loc: identifier.loc }; + } + return; + } } for (const { identifier } of identifiers) { diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts index fe1fd24cc4f1..55719d857dab 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts @@ -186,7 +186,7 @@ export default util.createRule({ range: expression.range[0] < against.range[0] ? [expression.range[1], against.range[1]] - : [against.range[1], expression.range[1]], + : [against.range[0], expression.range[0]], }; } diff --git a/packages/eslint-plugin/src/rules/prefer-return-this-type.ts b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts new file mode 100644 index 000000000000..4287d6c5dfaa --- /dev/null +++ b/packages/eslint-plugin/src/rules/prefer-return-this-type.ts @@ -0,0 +1,178 @@ +import { + TSESTree, + AST_NODE_TYPES, +} from '@typescript-eslint/experimental-utils'; +import { createRule, forEachReturnStatement, getParserServices } from '../util'; +import * as ts from 'typescript'; + +type ClassLikeDeclaration = + | TSESTree.ClassDeclaration + | TSESTree.ClassExpression; + +type FunctionLike = + | TSESTree.MethodDefinition['value'] + | TSESTree.ArrowFunctionExpression; + +export default createRule({ + name: 'prefer-return-this-type', + defaultOptions: [], + + meta: { + type: 'suggestion', + docs: { + description: + 'Enforce that `this` is used when only `this` type is returned', + category: 'Best Practices', + recommended: false, + requiresTypeChecking: true, + }, + messages: { + useThisType: 'use `this` type instead.', + }, + schema: [], + fixable: 'code', + }, + + create(context) { + const parserServices = getParserServices(context); + const checker = parserServices.program.getTypeChecker(); + + function tryGetNameInType( + name: string, + typeNode: TSESTree.TypeNode, + ): TSESTree.Identifier | undefined { + if ( + typeNode.type === AST_NODE_TYPES.TSTypeReference && + typeNode.typeName.type === AST_NODE_TYPES.Identifier && + typeNode.typeName.name === name + ) { + return typeNode.typeName; + } + + if (typeNode.type === AST_NODE_TYPES.TSUnionType) { + for (const type of typeNode.types) { + const found = tryGetNameInType(name, type); + if (found) { + return found; + } + } + } + + return undefined; + } + + function isThisSpecifiedInParameters(originalFunc: FunctionLike): boolean { + const firstArg = originalFunc.params[0]; + return ( + firstArg && + firstArg.type === AST_NODE_TYPES.Identifier && + firstArg.name === 'this' + ); + } + + function isFunctionReturningThis( + originalFunc: FunctionLike, + originalClass: ClassLikeDeclaration, + ): boolean { + if (isThisSpecifiedInParameters(originalFunc)) { + return false; + } + + const func = parserServices.esTreeNodeToTSNodeMap.get(originalFunc); + + if (!func.body) { + return false; + } + + const classType = checker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(originalClass), + ) as ts.InterfaceType; + + if (func.body.kind !== ts.SyntaxKind.Block) { + const type = checker.getTypeAtLocation(func.body); + return classType.thisType === type; + } + + let hasReturnThis = false; + let hasReturnClassType = false; + + forEachReturnStatement(func.body as ts.Block, stmt => { + const expr = stmt.expression; + if (!expr) { + return; + } + + // fast check + if (expr.kind === ts.SyntaxKind.ThisKeyword) { + hasReturnThis = true; + return; + } + + const type = checker.getTypeAtLocation(expr); + if (classType === type) { + hasReturnClassType = true; + return true; + } + + if (classType.thisType === type) { + hasReturnThis = true; + return; + } + + return; + }); + + return !hasReturnClassType && hasReturnThis; + } + + function checkFunction( + originalFunc: FunctionLike, + originalClass: ClassLikeDeclaration, + ): void { + const className = originalClass.id?.name; + if (!className) { + return; + } + + if (!originalFunc.returnType) { + return; + } + + const classNameRef = tryGetNameInType( + className, + originalFunc.returnType.typeAnnotation, + ); + if (!classNameRef) { + return; + } + + if (isFunctionReturningThis(originalFunc, originalClass)) { + context.report({ + node: classNameRef, + messageId: 'useThisType', + fix(fixer) { + return fixer.replaceText(classNameRef, 'this'); + }, + }); + } + } + + return { + 'ClassBody > MethodDefinition'(node: TSESTree.MethodDefinition): void { + checkFunction(node.value, node.parent!.parent as ClassLikeDeclaration); + }, + 'ClassBody > ClassProperty'(node: TSESTree.ClassProperty): void { + if ( + !( + node.value?.type === AST_NODE_TYPES.FunctionExpression || + node.value?.type === AST_NODE_TYPES.ArrowFunctionExpression + ) + ) { + return; + } + + checkFunction(node.value, node.parent!.parent as ClassLikeDeclaration); + }, + }; + }, +}); diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index 85a2eebe1f58..940dfe94023f 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -7,15 +7,16 @@ import * as tsutils from 'tsutils'; import * as ts from 'typescript'; import * as util from '../util'; -interface ScopeInfo { - hasAsync: boolean; -} - type FunctionNode = | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression; +interface ScopeInfo { + hasAsync: boolean; + owningFunc: FunctionNode; +} + export default util.createRule({ name: 'return-await', meta: { @@ -49,12 +50,17 @@ export default util.createRule({ const checker = parserServices.program.getTypeChecker(); const sourceCode = context.getSourceCode(); - let scopeInfo: ScopeInfo | null = null; + const scopeInfoStack: ScopeInfo[] = []; function enterFunction(node: FunctionNode): void { - scopeInfo = { + scopeInfoStack.push({ hasAsync: node.async, - }; + owningFunc: node, + }); + } + + function exitFunction(): void { + scopeInfoStack.pop(); } function inTry(node: ts.Node): boolean { @@ -147,8 +153,15 @@ export default util.createRule({ function insertAwait( fixer: TSESLint.RuleFixer, node: TSESTree.Expression, - ): TSESLint.RuleFix | null { - return fixer.insertTextBefore(node, 'await '); + ): TSESLint.RuleFix | TSESLint.RuleFix[] { + if (node.type !== AST_NODE_TYPES.TSAsExpression) { + return fixer.insertTextBefore(node, 'await '); + } + + return [ + fixer.insertTextBefore(node, 'await ('), + fixer.insertTextAfter(node, ')'), + ]; } function test(node: TSESTree.Expression, expression: ts.Node): void { @@ -263,6 +276,11 @@ export default util.createRule({ FunctionExpression: enterFunction, ArrowFunctionExpression: enterFunction, + 'FunctionDeclaration:exit': exitFunction, + 'FunctionExpression:exit': exitFunction, + 'ArrowFunctionExpression:exit': exitFunction, + + // executes after less specific handler, so exitFunction is called 'ArrowFunctionExpression[async = true]:exit'( node: TSESTree.ArrowFunctionExpression, ): void { @@ -274,6 +292,7 @@ export default util.createRule({ } }, ReturnStatement(node): void { + const scopeInfo = scopeInfoStack[scopeInfoStack.length - 1]; if (!scopeInfo || !scopeInfo.hasAsync || !node.argument) { return; } diff --git a/packages/eslint-plugin/src/util/astUtils.ts b/packages/eslint-plugin/src/util/astUtils.ts index 3fe1c01e2968..67bdfca5aa19 100644 --- a/packages/eslint-plugin/src/util/astUtils.ts +++ b/packages/eslint-plugin/src/util/astUtils.ts @@ -1,5 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; import { escapeRegExp } from './escapeRegExp'; +import * as ts from 'typescript'; // deeply re-export, for convenience export * from '@typescript-eslint/experimental-utils/dist/ast-utils'; @@ -41,3 +42,38 @@ export function getNameLocationInGlobalDirectiveComment( return { start, end }; } + +// Copied from typescript https://github.com/microsoft/TypeScript/blob/42b0e3c4630c129ca39ce0df9fff5f0d1b4dd348/src/compiler/utilities.ts#L1335 +// Warning: This has the same semantics as the forEach family of functions, +// in that traversal terminates in the event that 'visitor' supplies a truthy value. +export function forEachReturnStatement( + body: ts.Block, + visitor: (stmt: ts.ReturnStatement) => T, +): T | undefined { + return traverse(body); + + function traverse(node: ts.Node): T | undefined { + switch (node.kind) { + case ts.SyntaxKind.ReturnStatement: + return visitor(node); + case ts.SyntaxKind.CaseBlock: + case ts.SyntaxKind.Block: + case ts.SyntaxKind.IfStatement: + case ts.SyntaxKind.DoStatement: + case ts.SyntaxKind.WhileStatement: + case ts.SyntaxKind.ForStatement: + case ts.SyntaxKind.ForInStatement: + case ts.SyntaxKind.ForOfStatement: + case ts.SyntaxKind.WithStatement: + case ts.SyntaxKind.SwitchStatement: + case ts.SyntaxKind.CaseClause: + case ts.SyntaxKind.DefaultClause: + case ts.SyntaxKind.LabeledStatement: + case ts.SyntaxKind.TryStatement: + case ts.SyntaxKind.CatchClause: + return ts.forEachChild(node, traverse); + } + + return undefined; + } +} diff --git a/packages/eslint-plugin/src/util/createRule.ts b/packages/eslint-plugin/src/util/createRule.ts index d56fe6d2a7d7..8e69adb95659 100644 --- a/packages/eslint-plugin/src/util/createRule.ts +++ b/packages/eslint-plugin/src/util/createRule.ts @@ -1,7 +1,7 @@ import { ESLintUtils } from '@typescript-eslint/experimental-utils'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access const version: string = require('../../package.json').version; export const createRule = ESLintUtils.RuleCreator( diff --git a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts index de619abbc8b5..c789bd311211 100644 --- a/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts +++ b/packages/eslint-plugin/tests/rules/no-implied-eval.test.ts @@ -256,6 +256,27 @@ const foo = () => {}; const bar = () => {}; setTimeout(Math.radom() > 0.5 ? foo : bar, 0); +setTimeout(foo || bar, 500); + `, + ` +class Foo { + func1() {} + func2(): void { + setTimeout(this.func1.bind(this), 1); + } +} + `, + ` +class Foo { + private a = { + b: { + c: function () {}, + }, + }; + funcw(): void { + setTimeout(this.a.b.c.bind(this), 1); + } +} `, ], @@ -796,6 +817,21 @@ globalThis['execScript'](\`\`); }, ], }, + { + code: ` +const foo: string | undefined = 'hello'; +const bar = () => {}; + +setTimeout(foo || bar, 500); + `, + errors: [ + { + messageId: 'noImpliedEvalError', + line: 5, + column: 12, + }, + ], + }, { code: 'const fn = Function();', errors: [ diff --git a/packages/eslint-plugin/tests/rules/no-redeclare.test.ts b/packages/eslint-plugin/tests/rules/no-redeclare.test.ts index f227c5ac8919..c371a738755e 100644 --- a/packages/eslint-plugin/tests/rules/no-redeclare.test.ts +++ b/packages/eslint-plugin/tests/rules/no-redeclare.test.ts @@ -122,6 +122,13 @@ namespace A {} code: ` interface A {} class A {} +namespace A {} + `, + options: [{ ignoreDeclarationMerge: true }], + }, + { + code: ` +enum A {} namespace A {} `, options: [{ ignoreDeclarationMerge: true }], @@ -605,6 +612,23 @@ class A {} }, { code: ` +enum A {} +namespace A {} +enum A {} + `, + options: [{ ignoreDeclarationMerge: true }], + errors: [ + { + messageId: 'redeclared', + data: { + id: 'A', + }, + line: 4, + }, + ], + }, + { + code: ` function A() {} class A {} namespace A {} diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts index 36eb36033de1..7896fe00de88 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-boolean-literal-compare.test.ts @@ -224,5 +224,39 @@ ruleTester.run('no-unnecessary-boolean-literal-compare', rule, { } `, }, + { + code: ` + declare const varBoolean: boolean; + if (false !== varBoolean) { + } + `, + errors: [ + { + messageId: 'negated', + }, + ], + output: ` + declare const varBoolean: boolean; + if (varBoolean) { + } + `, + }, + { + code: ` + declare const varBoolean: boolean; + if (true !== varBoolean) { + } + `, + errors: [ + { + messageId: 'negated', + }, + ], + output: ` + declare const varBoolean: boolean; + if (!varBoolean) { + } + `, + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index e13dfc6f8496..fb7eadb47b71 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -1576,6 +1576,33 @@ export const ComponentFoo = () => { }, ], }, + // https://github.com/typescript-eslint/typescript-eslint/issues/3303 + { + code: ` +import React from 'react'; + +export const ComponentFoo = () => { + return
Foo Foo
; +}; + `, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + jsxPragma: null, + }, + errors: [ + { + messageId: 'unusedVar', + line: 2, + data: { + varName: 'React', + action: 'defined', + additional: '', + }, + }, + ], + }, { code: ` declare module 'foo' { diff --git a/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts new file mode 100644 index 000000000000..67864d22b6c8 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/prefer-return-this-type.test.ts @@ -0,0 +1,288 @@ +import rule from '../../src/rules/prefer-return-this-type'; +import { RuleTester, getFixturesRootDir } from '../RuleTester'; + +const rootPath = getFixturesRootDir(); + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('prefer-return-this-type', rule, { + valid: [ + ` +class Foo { + f1() {} + f2(): Foo { + return new Foo(); + } + f3() { + return this; + } + f4(): this { + return this; + } + f5(): any { + return this; + } + f6(): unknown { + return this; + } + f7(foo: Foo): Foo { + return Math.random() > 0.5 ? foo : this; + } + f10(this: Foo, that: Foo): Foo; + f11(): Foo { + return; + } + f13(this: Foo): Foo { + return this; + } + f14(): { f14: Function } { + return this; + } + f15(): Foo | this { + return Math.random() > 0.5 ? new Foo() : this; + } +} + `, + ` +class Foo { + f1 = () => {}; + f2 = (): Foo => { + return new Foo(); + }; + f3 = () => this; + f4 = (): this => { + return this; + }; + f5 = (): Foo => new Foo(); + f6 = ''; +} + `, + ` +const Foo = class { + bar() { + return this; + } +}; + `, + ` +class Base {} +class Derived extends Base { + f(): Base { + return this; + } +} + `, + ], + invalid: [ + { + code: ` +class Foo { + f(): Foo { + return this; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 8, + }, + ], + output: ` +class Foo { + f(): this { + return this; + } +} + `, + }, + { + code: ` +class Foo { + f(): Foo { + const self = this; + return self; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 8, + }, + ], + output: ` +class Foo { + f(): this { + const self = this; + return self; + } +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => { + return this; + }; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => { + return this; + }; +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => { + const self = this; + return self; + }; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => { + const self = this; + return self; + }; +} + `, + }, + { + code: ` +class Foo { + f = (): Foo => this; +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 11, + }, + ], + output: ` +class Foo { + f = (): this => this; +} + `, + }, + { + code: ` +class Foo { + f1(): Foo | undefined { + return this; + } + f2(): this | undefined { + return this; + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 9, + }, + ], + output: ` +class Foo { + f1(): this | undefined { + return this; + } + f2(): this | undefined { + return this; + } +} + `, + }, + { + code: ` +class Foo { + bar(): Foo | undefined { + if (Math.random() > 0.5) { + return this; + } + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 10, + }, + ], + output: ` +class Foo { + bar(): this | undefined { + if (Math.random() > 0.5) { + return this; + } + } +} + `, + }, + { + code: ` +class Foo { + bar(num: 1 | 2): Foo { + switch (num) { + case 1: + return this; + case 2: + return this; + } + } +} + `, + errors: [ + { + messageId: 'useThisType', + line: 3, + column: 20, + }, + ], + output: ` +class Foo { + bar(num: 1 | 2): this { + switch (num) { + case 1: + return this; + case 2: + return this; + } + } +} + `, + }, + ], +}); diff --git a/packages/eslint-plugin/tests/rules/return-await.test.ts b/packages/eslint-plugin/tests/rules/return-await.test.ts index 73056f6091c6..1c0a9cdd2a13 100644 --- a/packages/eslint-plugin/tests/rules/return-await.test.ts +++ b/packages/eslint-plugin/tests/rules/return-await.test.ts @@ -232,6 +232,21 @@ ruleTester.run('return-await', rule, { } `, }, + { + code: ` + async function test() { + const res = await Promise.resolve('{}'); + try { + async function nested() { + return Promise.resolve('ok'); + } + return await nested(); + } catch (error) { + return await Promise.resolve('error'); + } + } + `, + }, ], invalid: [ { @@ -827,5 +842,72 @@ const buzz = async () => ((await foo()) ? 1 : await bar()); }, ], }, + { + // https://github.com/typescript-eslint/typescript-eslint/issues/2109 + code: ` +async function test(): Promise { + const res = await fetch('...'); + try { + return res.json() as Promise; + } catch (err) { + throw Error('Request Failed.'); + } +} + `, + output: ` +async function test(): Promise { + const res = await fetch('...'); + try { + return await (res.json() as Promise); + } catch (err) { + throw Error('Request Failed.'); + } +} + `, + errors: [ + { + line: 5, + messageId: 'requiredPromiseAwait', + }, + ], + }, + { + code: ` + async function test() { + try { + const callback1 = function () {}; + const callback2 = async function () {}; + function callback3() {} + async function callback4() {} + const callback5 = () => {}; + const callback6 = async () => {}; + return Promise.resolve('try'); + } finally { + return Promise.resolve('finally'); + } + } + `, + output: ` + async function test() { + try { + const callback1 = function () {}; + const callback2 = async function () {}; + function callback3() {} + async function callback4() {} + const callback5 = () => {}; + const callback6 = async () => {}; + return await Promise.resolve('try'); + } finally { + return Promise.resolve('finally'); + } + } + `, + errors: [ + { + line: 10, + messageId: 'requiredPromiseAwait', + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tools/generate-rules-lists.ts b/packages/eslint-plugin/tools/generate-rules-lists.ts index 65faf6f2aa20..a4d3f3af8e72 100644 --- a/packages/eslint-plugin/tools/generate-rules-lists.ts +++ b/packages/eslint-plugin/tools/generate-rules-lists.ts @@ -43,7 +43,7 @@ const staticElements = { emojiKey.fixable, emojiKey.requiresTypeChecking, ], - listSpacerRow: Array(5).fill('-'), + listSpacerRow: Array(5).fill('-'), }; const returnEmojiIfTrue = ( diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 754f93ce147b..985d64275284 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **experimental-utils:** simplify `eslint-utils`' `findVariable`'s signature in `ast-utils` ([#3574](https://github.com/typescript-eslint/typescript-eslint/issues/3574)) ([3ef5267](https://github.com/typescript-eslint/typescript-eslint/commit/3ef5267b850e1ffb7115e263e89a98c455fd2532)) + + +### Features + +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 5080e90e0da1..b3f1c27d16ff 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.28.5", + "version": "4.29.0", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.28.5", - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts index 290afca90eb3..ad89e4730fcc 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/predicates.ts @@ -1,16 +1,20 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; -type IsPunctuatorTokenWithValueFunction = ( +type IsSpecificTokenFunction = ( token: TSESTree.Token, -) => token is TSESTree.PunctuatorToken & { value: Value }; +) => token is SpecificToken; -type IsNotPunctuatorTokenWithValueFunction = ( +type IsNotSpecificTokenFunction = ( token: TSESTree.Token, -) => token is Exclude< - TSESTree.Token, - TSESTree.PunctuatorToken & { value: Value } ->; +) => token is Exclude; + +type PunctuatorTokenWithValue = + TSESTree.PunctuatorToken & { value: Value }; +type IsPunctuatorTokenWithValueFunction = + IsSpecificTokenFunction>; +type IsNotPunctuatorTokenWithValueFunction = + IsNotSpecificTokenFunction>; const isArrowToken = eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'>; @@ -42,12 +46,10 @@ const isCommaToken = const isNotCommaToken = eslintUtils.isNotCommaToken as IsNotPunctuatorTokenWithValueFunction<','>; -const isCommentToken = eslintUtils.isCommentToken as ( - token: TSESTree.Token, -) => token is TSESTree.Comment; -const isNotCommentToken = eslintUtils.isNotCommentToken as ( - token: TSESTree.Token, -) => token is Exclude; +const isCommentToken = + eslintUtils.isCommentToken as IsSpecificTokenFunction; +const isNotCommentToken = + eslintUtils.isNotCommentToken as IsNotSpecificTokenFunction; const isOpeningBraceToken = eslintUtils.isOpeningBraceToken as IsPunctuatorTokenWithValueFunction<'{'>; diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts index 15f9325a582f..fa3efc70a772 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/scopeAnalysis.ts @@ -9,7 +9,7 @@ import * as TSESLint from '../../ts-eslint'; */ const findVariable = eslintUtils.findVariable as ( initialScope: TSESLint.Scope.Scope, - name: string, + nameOrNode: string | TSESTree.Identifier, ) => TSESLint.Scope.Variable | null; /** diff --git a/packages/experimental-utils/src/eslint-utils/RuleTester.ts b/packages/experimental-utils/src/eslint-utils/RuleTester.ts index a3210162e982..f2af7a290fd8 100644 --- a/packages/experimental-utils/src/eslint-utils/RuleTester.ts +++ b/packages/experimental-utils/src/eslint-utils/RuleTester.ts @@ -32,7 +32,7 @@ class RuleTester extends TSESLint.RuleTester { try { // instead of creating a hard dependency, just use a soft require // a bit weird, but if they're using this tooling, it'll be installed - // eslint-disable-next-line @typescript-eslint/no-unsafe-call + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access require(parser).clearCaches(); } catch { // ignored diff --git a/packages/experimental-utils/src/ts-eslint/Rule.ts b/packages/experimental-utils/src/ts-eslint/Rule.ts index 20a7735f08b6..f813b9d17309 100644 --- a/packages/experimental-utils/src/ts-eslint/Rule.ts +++ b/packages/experimental-utils/src/ts-eslint/Rule.ts @@ -277,7 +277,6 @@ interface RuleListener { ClassDeclaration?: RuleFunction; ClassExpression?: RuleFunction; ClassProperty?: RuleFunction; - Comment?: RuleFunction; ConditionalExpression?: RuleFunction; ContinueStatement?: RuleFunction; DebuggerStatement?: RuleFunction; @@ -338,7 +337,6 @@ interface RuleListener { TemplateLiteral?: RuleFunction; ThisExpression?: RuleFunction; ThrowStatement?: RuleFunction; - Token?: RuleFunction; TryStatement?: RuleFunction; TSAbstractClassProperty?: RuleFunction; TSAbstractKeyword?: RuleFunction; diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 83a7fd33fd15..ab28117c7537 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/README.md b/packages/parser/README.md index 04f5c53d0f4a..d76219e1ae9f 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -55,7 +55,7 @@ interface ParserOptions { }; ecmaVersion?: number; - jsxPragma?: string; + jsxPragma?: string | null; jsxFragmentName?: string | null; lib?: string[]; @@ -66,6 +66,7 @@ interface ParserOptions { warnOnUnsupportedTypeScriptVersion?: boolean; program?: import('typescript').Program; + moduleResolver?: string; } ``` @@ -110,7 +111,7 @@ Specifies the version of ECMAScript syntax you want to use. This is used by the Default `'React'` The identifier that's used for JSX Elements creation (after transpilation). -If you're using a library other than React (like `preact`), then you should change this value. +If you're using a library other than React (like `preact`), then you should change this value. If you are using the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) you can set this to `null`. This should not be a member expression - just the root identifier (i.e. use `"React"` instead of `"React.createElement"`). @@ -221,6 +222,29 @@ This option allows you to programmatically provide an array of one or more insta This will override any programs that would have been computed from `parserOptions.project` or `parserOptions.createDefaultProgram`. All linted files must be part of the provided program(s). +### `parserOptions.moduleResolver` + +Default `undefined`. + +This option allows you to provide a custom module resolution. The value should point to a JS file that default exports (`export default`, or `module.exports =`, or `export =`) a file with the following interface: + +```ts +interface ModuleResolver { + version: 1; + resolveModuleNames( + moduleNames: string[], + containingFile: string, + reusedNames: string[] | undefined, + redirectedReference: ts.ResolvedProjectReference | undefined, + options: ts.CompilerOptions, + ): (ts.ResolvedModule | undefined)[]; +} +``` + +[Refer to the TypeScript Wiki for an example on how to write the `resolveModuleNames` function](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#customizing-module-resolution). + +Note that if you pass custom programs via `options.programs` this option will not have any effect over them (you can simply add the custom resolution on them directly). + ## Utilities ### `createProgram(configFile, projectDirectory)` diff --git a/packages/parser/package.json b/packages/parser/package.json index 0c9f9a129e63..7e60f391a2ce 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.28.5", + "version": "4.29.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,14 +44,14 @@ "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "4.28.5", - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/scope-manager": "4.29.0", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/typescript-estree": "4.29.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.28.5", + "@typescript-eslint/experimental-utils": "4.29.0", "glob": "*", "typescript": "*" }, diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index c1bb82bf5935..928671a3c5c1 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -6,5 +6,5 @@ export { } from '@typescript-eslint/typescript-estree'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access export const version: string = require('../package.json').version; diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 2c88e35160d5..679706adae40 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index cd220b2e3b37..1ae1b8c8696b 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.28.5", + "version": "4.29.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/visitor-keys": "4.28.5" + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.28.5", + "@typescript-eslint/typescript-estree": "4.29.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/scope-manager/src/analyze.ts b/packages/scope-manager/src/analyze.ts index 1aaf874049fc..9845a3c17505 100644 --- a/packages/scope-manager/src/analyze.ts +++ b/packages/scope-manager/src/analyze.ts @@ -38,7 +38,7 @@ interface AnalyzeOptions { * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement"). * Defaults to `"React"`. */ - jsxPragma?: string; + jsxPragma?: string | null; /** * The identifier that's used for JSX fragment elements (after transpilation). @@ -108,7 +108,10 @@ function analyze( globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn, impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict, - jsxPragma: providedOptions?.jsxPragma ?? DEFAULT_OPTIONS.jsxPragma, + jsxPragma: + providedOptions?.jsxPragma === undefined + ? DEFAULT_OPTIONS.jsxPragma + : providedOptions.jsxPragma, jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName, sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType, diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index f35830e6acda..df4c318daddb 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -22,7 +22,7 @@ import { lib as TSLibraries } from '../lib'; import { Scope, GlobalScope } from '../scope'; interface ReferencerOptions extends VisitorOptions { - jsxPragma: string; + jsxPragma: string | null; jsxFragmentName: string | null; lib: Lib[]; emitDecoratorMetadata: boolean; @@ -30,7 +30,7 @@ interface ReferencerOptions extends VisitorOptions { // Referencing variables and creating bindings. class Referencer extends Visitor { - #jsxPragma: string; + #jsxPragma: string | null; #jsxFragmentName: string | null; #hasReferencedJsxFactory = false; #hasReferencedJsxFragmentFactory = false; @@ -120,7 +120,7 @@ class Referencer extends Visitor { } private referenceJsxPragma(): void { - if (this.#hasReferencedJsxFactory) { + if (this.#jsxPragma === null || this.#hasReferencedJsxFactory) { return; } this.#hasReferencedJsxFactory = this.referenceInSomeUpperScope( diff --git a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts index 4611ddcce736..8a75e729fd86 100644 --- a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts +++ b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts @@ -1,4 +1,4 @@ -import { AST_NODE_TYPES } from '@typescript-eslint/types'; +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; import { NewPlugin } from 'pretty-format'; import { createIdGenerator } from '../../../src/ID'; @@ -18,13 +18,13 @@ const SEEN_NODES = new Map(); const serializer: NewPlugin = { test(val): boolean { - return ( + return !!( val && typeof val === 'object' && // make sure it's not one of the classes from the package Object.getPrototypeOf(val) === Object.prototype && 'type' in val && - val.type in AST_NODE_TYPES + (val as TSESTree.Node).type in AST_NODE_TYPES ); }, serialize(node: Node): string { diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 2c4338a53f21..6676a92d868f 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index d9ee72f1db98..1d36745bf64b 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.28.5", + "version": "4.29.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 9abe57bc44b8..e7555d3a747c 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Features + +* **eslint-plugin:** Catch unused React import with new JSX transform ([#3577](https://github.com/typescript-eslint/typescript-eslint/issues/3577)) ([02998ea](https://github.com/typescript-eslint/typescript-eslint/commit/02998eac510665758b9a093d43afc310f3ac980d)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index c746e3336c43..1509752a2bf2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.28.5", + "version": "4.29.0", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index a8ecb896726c..9a761a37b97d 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -29,7 +29,7 @@ interface ParserOptions { ecmaVersion?: EcmaVersion; // scope-manager specific - jsxPragma?: string; + jsxPragma?: string | null; jsxFragmentName?: string | null; lib?: Lib[]; @@ -51,6 +51,7 @@ interface ParserOptions { tsconfigRootDir?: string; useJSXTextNode?: boolean; warnOnUnsupportedTypeScriptVersion?: boolean; + moduleResolver?: string; } export { DebugLevel, EcmaVersion, ParserOptions, SourceType }; diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 313f0ed9be9b..c15d4985b054 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + + +### Bug Fixes + +* **typescript-estree:** correct tty check ([#3635](https://github.com/typescript-eslint/typescript-eslint/issues/3635)) ([62bcc93](https://github.com/typescript-eslint/typescript-eslint/commit/62bcc937f08cd18296ffbe96a3551ec1fb87aecd)) +* **typescript-estree:** ensure --fix works with singleRun mode ([#3655](https://github.com/typescript-eslint/typescript-eslint/issues/3655)) ([99eca0d](https://github.com/typescript-eslint/typescript-eslint/commit/99eca0d428187d4c29ded9ddd1b57b40ab463c01)) + + +### Features + +* **ast-spec:** make `BaseNode` & `BaseToken` more type-safe ([#3560](https://github.com/typescript-eslint/typescript-eslint/issues/3560)) ([a6c5604](https://github.com/typescript-eslint/typescript-eslint/commit/a6c5604b65b6330d047aa016fc46b8a597a6ae58)) +* **typescript-estree:** add support for custom module resolution ([#3516](https://github.com/typescript-eslint/typescript-eslint/issues/3516)) ([d48429d](https://github.com/typescript-eslint/typescript-eslint/commit/d48429d97326545bb727f88ce9056270b1599a31)) + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/typescript-estree diff --git a/packages/typescript-estree/README.md b/packages/typescript-estree/README.md index 31084150646b..9cbcb2727cfc 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -239,6 +239,11 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * whether or not ESLint is being used as part of a single run. */ allowAutomaticSingleRunInference?: boolean; + + /** + * Path to a file exporting a custom ModuleResolver. + */ + moduleResolver?: string; } interface ParserServices { diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 00baf7782db7..1bbac1e52287 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.28.5", + "version": "4.29.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -41,8 +41,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.5", - "@typescript-eslint/visitor-keys": "4.28.5", + "@typescript-eslint/types": "4.29.0", + "@typescript-eslint/visitor-keys": "4.29.0", "debug": "^4.3.1", "globby": "^11.0.3", "is-glob": "^4.0.1", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "4.28.5", + "@typescript-eslint/shared-fixtures": "4.29.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 8ffa10ab9181..7f8514d8bc00 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */ import * as ts from 'typescript'; import { canContainDirective, @@ -199,7 +199,7 @@ export class Converter { */ private registerTSNodeInNodeMap( node: ts.Node, - result: TSESTree.BaseNode | null, + result: TSESTree.Node | null, ): void { if (result && this.options.shouldPreserveNodeMaps) { if (!this.tsNodeToESTreeNodeMap.has(node)) { diff --git a/packages/typescript-estree/src/create-program/createDefaultProgram.ts b/packages/typescript-estree/src/create-program/createDefaultProgram.ts index c912a44418a0..6e8c21612501 100644 --- a/packages/typescript-estree/src/create-program/createDefaultProgram.ts +++ b/packages/typescript-estree/src/create-program/createDefaultProgram.ts @@ -6,6 +6,7 @@ import { ASTAndProgram, CanonicalPath, createDefaultCompilerOptionsFromExtra, + getModuleResolver, } from './shared'; const log = debug('typescript-eslint:typescript-estree:createDefaultProgram'); @@ -43,6 +44,13 @@ function createDefaultProgram( commandLine.options, /* setParentNodes */ true, ); + + if (extra.moduleResolver) { + compilerHost.resolveModuleNames = getModuleResolver( + extra.moduleResolver, + ).resolveModuleNames; + } + const oldReadFile = compilerHost.readFile; compilerHost.readFile = (fileName: string): string | undefined => path.normalize(fileName) === path.normalize(extra.filePath) diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index f10f2a2295fc..2142065e47b0 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -9,6 +9,7 @@ import { CanonicalPath, createDefaultCompilerOptionsFromExtra, getCanonicalFileName, + getModuleResolver, } from './shared'; const log = debug('typescript-eslint:typescript-estree:createWatchProgram'); @@ -269,6 +270,12 @@ function createWatchProgram( /*reportWatchStatus*/ () => {}, ) as WatchCompilerHostOfConfigFile; + if (extra.moduleResolver) { + watchCompilerHost.resolveModuleNames = getModuleResolver( + extra.moduleResolver, + ).resolveModuleNames; + } + // ensure readFile reads the code being linted instead of the copy on disk const oldReadFile = watchCompilerHost.readFile; watchCompilerHost.readFile = (filePathIn, encoding): string | undefined => { diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index 8202c538d342..a0e654c90979 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -1,7 +1,7 @@ import path from 'path'; import * as ts from 'typescript'; import { Program } from 'typescript'; -import { Extra } from '../parser-options'; +import { Extra, ModuleResolver } from '../parser-options'; interface ASTAndProgram { ast: ts.SourceFile; @@ -124,6 +124,23 @@ function getAstFromProgram( return ast && { ast, program: currentProgram }; } +function getModuleResolver(moduleResolverPath: string): ModuleResolver { + let moduleResolver: ModuleResolver; + + try { + moduleResolver = require(moduleResolverPath) as ModuleResolver; + } catch (error) { + const errorLines = [ + 'Could not find the provided parserOptions.moduleResolver.', + 'Hint: use an absolute path if you are not in control over where the ESLint instance runs.', + ]; + + throw new Error(errorLines.join('\n')); + } + + return moduleResolver; +} + export { ASTAndProgram, CORE_COMPILER_OPTIONS, @@ -134,4 +151,5 @@ export { getCanonicalFileName, getScriptKind, getAstFromProgram, + getModuleResolver, }; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index b2a0581dc926..a922ef199cf7 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -1,4 +1,12 @@ -export * from './parser'; +export { + AST, + parse, + parseAndGenerateServices, + parseWithNodeMaps, + ParseAndGenerateServicesResult, + ParseWithNodeMapsResult, + clearProgramCache, +} from './parser'; export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; @@ -9,5 +17,5 @@ export { createProgramFromConfigFile as createProgram } from './create-program/u export { visitorKeys } from '@typescript-eslint/visitor-keys'; // note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access export const version: string = require('../package.json').version; diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 1969b6b2fb39..8c223ed650a2 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -632,8 +632,7 @@ export function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean { // If we have a token or node that has a non-zero width, it must have tokens. // Note: getWidth() does not take trivia into account. return n.kind === SyntaxKind.EndOfFileToken - ? // eslint-disable-next-line @typescript-eslint/no-explicit-any - !!(n as any).jsDoc + ? !!(n as ts.JSDocContainer).jsDoc : n.getWidth(ast) !== 0; } diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 0bde1d9176ab..55f47ef9041d 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -1,5 +1,5 @@ import { DebugLevel } from '@typescript-eslint/types'; -import type { Program } from 'typescript'; +import * as ts from 'typescript'; import { CanonicalPath } from './create-program/shared'; import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; @@ -21,13 +21,14 @@ export interface Extra { singleRun: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; - programs: null | Iterable; + programs: null | Iterable; projects: CanonicalPath[]; range: boolean; strict: boolean; tokens: null | TSESTree.Token[]; tsconfigRootDir: string; useJSXTextNode: boolean; + moduleResolver: string; } //////////////////////////////////////////////////// @@ -176,7 +177,7 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * This overrides any program or programs that would have been computed from the `project` option. * All linted files must be part of the provided program(s). */ - programs?: Program[]; + programs?: ts.Program[]; /** *************************************************************************************** @@ -202,6 +203,8 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * whether or not ESLint is being used as part of a single run. */ allowAutomaticSingleRunInference?: boolean; + + moduleResolver?: string; } export type TSESTreeOptions = ParseAndGenerateServicesOptions; @@ -221,8 +224,19 @@ export interface ParserWeakMapESTreeToTSNode< } export interface ParserServices { - program: Program; + program: ts.Program; esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; tsNodeToESTreeNodeMap: ParserWeakMap; hasFullTypeInformation: boolean; } + +export interface ModuleResolver { + version: 1; + resolveModuleNames( + moduleNames: string[], + containingFile: string, + reusedNames: string[] | undefined, + redirectedReference: ts.ResolvedProjectReference | undefined, + options: ts.CompilerOptions, + ): (ts.ResolvedModule | undefined)[]; +} diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 904bb054fdf8..e61b1b69ec2b 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -135,6 +135,7 @@ function resetExtra(): void { * of a long-running session (e.g. in an IDE) and watch programs will therefore be required */ singleRun: false, + moduleResolver: '', }; } @@ -342,11 +343,16 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { extra.EXPERIMENTAL_useSourceOfProjectReferenceRedirect = typeof options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === 'boolean' && options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect; + + if (typeof options.moduleResolver === 'string') { + extra.moduleResolver = options.moduleResolver; + } } function warnAboutTSVersion(): void { if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { - const isTTY = typeof process === undefined ? false : process.stdout?.isTTY; + const isTTY = + typeof process === 'undefined' ? false : process.stdout?.isTTY; if (isTTY) { const border = '============='; const versionWarning = [ @@ -496,6 +502,12 @@ function parseWithNodeMaps( return parseWithNodeMapsInternal(code, options, true); } +let parseAndGenerateServicesCalls: { [fileName: string]: number } = {}; +// Privately exported utility intended for use in typescript-eslint unit tests only +function clearParseAndGenerateServicesCalls(): void { + parseAndGenerateServicesCalls = {}; +} + function parseAndGenerateServices( code: string, options: T, @@ -566,12 +578,41 @@ function parseAndGenerateServices( */ const shouldProvideParserServices = extra.programs != null || (extra.projects && extra.projects.length > 0); - const { ast, program } = getProgramAndAST( - code, - extra.programs, - shouldProvideParserServices, - extra.createDefaultProgram, - )!; + + /** + * If we are in singleRun mode but the parseAndGenerateServices() function has been called more than once for the current file, + * it must mean that we are in the middle of an ESLint automated fix cycle (in which parsing can be performed up to an additional + * 10 times in order to apply all possible fixes for the file). + * + * In this scenario we cannot rely upon the singleRun AOT compiled programs because the SourceFiles will not contain the source + * with the latest fixes applied. Therefore we fallback to creating the quickest possible isolated program from the updated source. + */ + let ast: ts.SourceFile; + let program: ts.Program; + + if (extra.singleRun && options.filePath) { + parseAndGenerateServicesCalls[options.filePath] = + (parseAndGenerateServicesCalls[options.filePath] || 0) + 1; + } + + if ( + extra.singleRun && + options.filePath && + parseAndGenerateServicesCalls[options.filePath] > 1 + ) { + const isolatedAstAndProgram = createIsolatedProgram(code, extra); + ast = isolatedAstAndProgram.ast; + program = isolatedAstAndProgram.program; + } else { + const astAndProgram = getProgramAndAST( + code, + extra.programs, + shouldProvideParserServices, + extra.createDefaultProgram, + )!; + ast = astAndProgram.ast; + program = astAndProgram.program; + } /** * Convert the TypeScript AST to an ESTree-compatible one, and optionally preserve @@ -614,4 +655,5 @@ export { ParseAndGenerateServicesResult, ParseWithNodeMapsResult, clearProgramCache, + clearParseAndGenerateServicesCalls, }; diff --git a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts index 023d7e3faf8f..fab5cd642e09 100644 --- a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts +++ b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts @@ -45,7 +45,7 @@ export function getFirstSemanticOrSyntacticError( * and log a a warning. */ /* istanbul ignore next */ - console.warn(`Warning From TSC: "${e.message}`); // eslint-disable-line no-console + console.warn(`Warning From TSC: "${(e as Error).message}`); // eslint-disable-line no-console /* istanbul ignore next */ return undefined; } diff --git a/packages/typescript-estree/src/simple-traverse.ts b/packages/typescript-estree/src/simple-traverse.ts index 4d4ddaa5f187..f513e54b14f1 100644 --- a/packages/typescript-estree/src/simple-traverse.ts +++ b/packages/typescript-estree/src/simple-traverse.ts @@ -3,6 +3,7 @@ import { TSESTree } from './ts-estree'; // eslint-disable-next-line @typescript-eslint/no-explicit-any function isValidNode(x: any): x is TSESTree.Node { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return x !== null && typeof x === 'object' && typeof x.type === 'string'; } diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index 0a643827f3e3..7a463d97256b 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ import type babelParser from '@babel/parser'; import { ParserPlugin } from '@babel/parser'; diff --git a/packages/typescript-estree/tests/ast-alignment/utils.ts b/packages/typescript-estree/tests/ast-alignment/utils.ts index 34b318898c11..3cecac3f09f6 100644 --- a/packages/typescript-estree/tests/ast-alignment/utils.ts +++ b/packages/typescript-estree/tests/ast-alignment/utils.ts @@ -1,5 +1,5 @@ // babel types are something we don't really care about -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/restrict-plus-operands */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-plus-operands */ import { AST_NODE_TYPES, TSESTree } from '../../src/ts-estree'; import { deeplyCopy, omitDeep } from '../../tools/test-utils'; import * as BabelTypes from '@babel/types'; diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/file.ts b/packages/typescript-estree/tests/fixtures/moduleResolver/file.ts new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js b/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js new file mode 100644 index 000000000000..112df1b4b5f2 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/moduleResolver.js @@ -0,0 +1,36 @@ +const ts = require('typescript'); + +module.exports = { + version: 1, + resolveModuleNames: ( + moduleNames, + containingFile, + _reusedNames, + _redirectedReferences, + compilerOptions, + ) => { + const resolvedModules = []; + + for (const moduleName of moduleNames) { + let parsedModuleName = moduleName; + + if (parsedModuleName === '__PLACEHOLDER__') { + parsedModuleName = './something'; + } + + const resolution = ts.resolveModuleName( + parsedModuleName, + containingFile, + compilerOptions, + { + fileExists: ts.sys.fileExists, + readFile: ts.sys.readFile, + }, + ); + + resolvedModules.push(resolution.resolvedModule); + } + + return resolvedModules; + } +} diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts b/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts new file mode 100644 index 000000000000..c069798b6c26 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/something.ts @@ -0,0 +1 @@ +export const something = () => true; diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json new file mode 100644 index 000000000000..8de5ab303982 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.defaultProgram.json @@ -0,0 +1,3 @@ +{ + "include": [] +} diff --git a/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json new file mode 100644 index 000000000000..e7f769a18418 --- /dev/null +++ b/packages/typescript-estree/tests/fixtures/moduleResolver/tsconfig.json @@ -0,0 +1,3 @@ +{ + "include": ["./file.ts", "./something.ts"] +} diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index 3e3129737009..aa15fc136c1b 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -670,4 +670,94 @@ describe('parseAndGenerateServices', () => { expect(testParse('includeme', ignore)).not.toThrow(); }); }); + + describe('moduleResolver', () => { + beforeEach(() => { + parser.clearCaches(); + }); + + const PROJECT_DIR = resolve(FIXTURES_DIR, '../moduleResolver'); + const code = ` + import { something } from '__PLACEHOLDER__'; + + something(); + `; + const config: TSESTreeOptions = { + comment: true, + tokens: true, + range: true, + loc: true, + project: './tsconfig.json', + tsconfigRootDir: PROJECT_DIR, + filePath: resolve(PROJECT_DIR, 'file.ts'), + }; + const withDefaultProgramConfig: TSESTreeOptions = { + ...config, + project: './tsconfig.defaultProgram.json', + createDefaultProgram: true, + }; + + describe('when file is in the project', () => { + it('returns error if __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, config) + .services.program.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + + it('throws error if moduleResolver can not be found', () => { + expect(() => + parser.parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve( + PROJECT_DIR, + './this_moduleResolver_does_not_exist.js', + ), + }), + ).toThrowErrorMatchingInlineSnapshot(` + "Could not find the provided parserOptions.moduleResolver. + Hint: use an absolute path if you are not in control over where the ESLint instance runs." + `); + }); + + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), + }) + .services.program.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + + describe('when file is not in the project and createDefaultProgram=true', () => { + it('returns error because __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, withDefaultProgramConfig) + .services.program.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...withDefaultProgramConfig, + moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), + }) + .services.program.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + }); }); diff --git a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts index b8e778e0fb01..62d7c3a841c9 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts @@ -1,6 +1,10 @@ import glob from 'glob'; import * as path from 'path'; -import { clearProgramCache, parseAndGenerateServices } from '../../src'; +import { + clearProgramCache, + parseAndGenerateServices, + clearParseAndGenerateServicesCalls, +} from '../../src/parser'; import { getCanonicalFileName } from '../../src/create-program/shared'; const mockProgram = { @@ -91,6 +95,8 @@ describe('semanticInfo - singleRun', () => { clearProgramCache(); // ensure invocations of mock are clean for each test (createProgramFromConfigFile as jest.Mock).mockClear(); + // Do not track invocations per file across tests + clearParseAndGenerateServicesCalls(); }); it('should not create any programs ahead of time by default when there is no way to infer singleRun=true', () => { diff --git a/packages/typescript-estree/typings/typescript.d.ts b/packages/typescript-estree/typings/typescript.d.ts index 73268ec90529..a247b2808841 100644 --- a/packages/typescript-estree/typings/typescript.d.ts +++ b/packages/typescript-estree/typings/typescript.d.ts @@ -1,9 +1,13 @@ import 'typescript'; +// these additions are marked as internal to typescript declare module 'typescript' { interface SourceFile { - // this is marked as internal to typescript externalModuleIndicator?: Node; parseDiagnostics: DiagnosticWithLocation[]; } + + interface JSDocContainer { + jsDoc?: JSDoc[]; + } } diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index c147f162a6b9..59dcf6afc862 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.29.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.5...v4.29.0) (2021-08-02) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index e7bacdbc4f57..ba6aa2173aa4 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.28.5", + "version": "4.29.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.28.5", + "@typescript-eslint/types": "4.29.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { diff --git a/tests/integration/fixtures/markdown/test.js.snap b/tests/integration/fixtures/markdown/test.js.snap index 8663838f7edc..67725201aa8a 100644 --- a/tests/integration/fixtures/markdown/test.js.snap +++ b/tests/integration/fixtures/markdown/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 10, + "fatalErrorCount": 0, "filePath": "/usr/linked/Doc.md", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap b/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap index b313deb408b7..5b77306e5543 100644 --- a/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap +++ b/tests/integration/fixtures/recommended-does-not-require-program/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 1, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap index 23e113677ccd..cc617dc19cc9 100644 --- a/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap +++ b/tests/integration/fixtures/typescript-and-tslint-plugins-together/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/index.ts", "fixableErrorCount": 1, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/vue-jsx/test.js.snap b/tests/integration/fixtures/vue-jsx/test.js.snap index 3f0b716085b2..6877b71a7e88 100644 --- a/tests/integration/fixtures/vue-jsx/test.js.snap +++ b/tests/integration/fixtures/vue-jsx/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/Jsx.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tests/integration/fixtures/vue-sfc/test.js.snap b/tests/integration/fixtures/vue-sfc/test.js.snap index ac5804574daf..3c0d7fc68a32 100644 --- a/tests/integration/fixtures/vue-sfc/test.js.snap +++ b/tests/integration/fixtures/vue-sfc/test.js.snap @@ -4,6 +4,7 @@ exports[`it should produce the expected lint ouput 1`] = ` Array [ Object { "errorCount": 1, + "fatalErrorCount": 0, "filePath": "/usr/linked/Hello.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, @@ -89,6 +90,7 @@ export default Vue.extend({ }, Object { "errorCount": 0, + "fatalErrorCount": 0, "filePath": "/usr/linked/Utility.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, @@ -114,6 +116,7 @@ export default class Utility { }, Object { "errorCount": 0, + "fatalErrorCount": 0, "filePath": "/usr/linked/World.vue", "fixableErrorCount": 0, "fixableWarningCount": 0, diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index 07d59c394f00..c668ecf3da4a 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -78,9 +78,9 @@ async function main(): Promise { // fetch the user info const users = await Promise.all( - githubContributors.map>(async c => { + githubContributors.map(async c => { const response = await fetch(c.url, { method: 'GET' }); - return response.json(); + return (await response.json()) as User; }), ); diff --git a/yarn.lock b/yarn.lock index 9810d184e899..c8cd25cb92f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,10 +141,10 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== +"@babel/helper-validator-identifier@^7.14.0", "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== "@babel/helper-validator-option@^7.12.17": version "7.12.17" @@ -301,11 +301,11 @@ globals "^11.1.0" "@babel/types@*", "@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.2", "@babel/types@^7.14.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" - integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.9.tgz#f2b19c3f2f77c5708d67fe8f6046e9cea2b5036d" + integrity sha512-u0bLTnv3DFHeaQLYzb7oRJ1JHr1sv/SYDM7JSqHFFLwXG1wTZRughxFI5NCP8qBEo1rVVsn7Yg2Lvw49nne/Ow== dependencies: - "@babel/helper-validator-identifier" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -313,157 +313,158 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@commitlint/cli@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-12.1.4.tgz#af4d9dd3c0122c7b39a61fa1cd2abbad0422dbe0" - integrity sha512-ZR1WjXLvqEffYyBPT0XdnSxtt3Ty1TMoujEtseW5o3vPnkA1UNashAMjQVg/oELqfaiAMnDw8SERPMN0e/0kLg== +"@commitlint/cli@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-13.1.0.tgz#3608bb24dbef41aaa0729ffe65c7f9b57409626a" + integrity sha512-xN/uNYWtGTva5OMSd+xA6e6/c2jk8av7MUbdd6w2cw89u6z3fAWoyiH87X0ewdSMNYmW/6B3L/2dIVGHRDID5w== dependencies: - "@commitlint/format" "^12.1.4" - "@commitlint/lint" "^12.1.4" - "@commitlint/load" "^12.1.4" - "@commitlint/read" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/format" "^13.1.0" + "@commitlint/lint" "^13.1.0" + "@commitlint/load" "^13.1.0" + "@commitlint/read" "^13.1.0" + "@commitlint/types" "^13.1.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" - yargs "^16.2.0" + yargs "^17.0.0" -"@commitlint/config-conventional@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.1.4.tgz#95bbab622f117a8a3e49f95917b08655040c66a8" - integrity sha512-ZIdzmdy4o4WyqywMEpprRCrehjCSQrHkaRTVZV411GyLigFQHlEBSJITAihLAWe88Qy/8SyoIe5uKvAsV5vRqQ== +"@commitlint/config-conventional@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-13.1.0.tgz#f02871d50c73db0a31b777231f49203b964d9d59" + integrity sha512-zukJXqdr6jtMiVRy3tTHmwgKcUMGfqKDEskRigc5W3k2aYF4gBAtCEjMAJGZgSQE4DMcHeok0pEV2ANmTpb0cw== dependencies: conventional-changelog-conventionalcommits "^4.3.1" -"@commitlint/config-lerna-scopes@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-12.1.4.tgz#af6786d2a479eb4c90838782368bb3958547327a" - integrity sha512-D/VqvATs8fYi2CFpFdjLYeOHGm/KkxUSehGqwIPJfYXHHua19V5UqmUOeXTNAJaD+bTpiHvoBTK75NcmWpBQSg== +"@commitlint/config-lerna-scopes@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-lerna-scopes/-/config-lerna-scopes-13.1.0.tgz#c30006ff60a2a625184b9c37bc2ba8ce44ff0d60" + integrity sha512-/OTFM75GYHFRm5m1TKOpHsLvAUuGL6GYnA5xJDT4fe2vPIGqgBYVL9hEolKYTJfDtviBq4fEkEWZQjQF5e4KgA== dependencies: globby "^11.0.1" - import-from "3.0.0" + import-from "4.0.0" resolve-pkg "2.0.0" semver "7.3.5" -"@commitlint/ensure@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-12.1.4.tgz#287ae2dcc5ccb086e749705b1bd9bdb99773056f" - integrity sha512-MxHIBuAG9M4xl33qUfIeMSasbv3ktK0W+iygldBxZOL4QSYC2Gn66pZAQMnV9o3V+sVFHoAK2XUKqBAYrgbEqw== +"@commitlint/ensure@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-13.1.0.tgz#057a325b54f104cbeed2a26bacb5eec29298e7d5" + integrity sha512-NRGyjOdZQnlYwm9it//BZJ2Vm+4x7G9rEnHpLCvNKYY0c6RA8Qf7hamLAB8dWO12RLuFt06JaOpHZoTt/gHutA== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" lodash "^4.17.19" -"@commitlint/execute-rule@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-12.1.4.tgz#9973b02e9779adbf1522ae9ac207a4815ec73de1" - integrity sha512-h2S1j8SXyNeABb27q2Ok2vD1WfxJiXvOttKuRA9Or7LN6OQoC/KtT3844CIhhWNteNMu/wE0gkTqGxDVAnJiHg== +"@commitlint/execute-rule@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-13.0.0.tgz#7823303b82b5d86dac46e67cfa005f4433476981" + integrity sha512-lBz2bJhNAgkkU/rFMAw3XBNujbxhxlaFHY3lfKB/MxpAa+pIfmWB3ig9i1VKe0wCvujk02O0WiMleNaRn2KJqw== -"@commitlint/format@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-12.1.4.tgz#db2d46418a6ae57c90e5f7f65dff46f0265d9f24" - integrity sha512-h28ucMaoRjVvvgS6Bdf85fa/+ZZ/iu1aeWGCpURnQV7/rrVjkhNSjZwGlCOUd5kDV1EnZ5XdI7L18SUpRjs26g== +"@commitlint/format@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-13.1.0.tgz#915570d958d83bae5fa645de6b1e6c9dd1362ec0" + integrity sha512-n46rYvzf+6Sm99TJjTLjJBkjm6JVcklt31lDO5Q+pCIV0NnJ4qIUcwa6wIL9a9Vqb1XzlMgtp27E0zyYArkvSg== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" chalk "^4.0.0" -"@commitlint/is-ignored@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-12.1.4.tgz#4c430bc3b361aa9be5cd4ddb252c1559870ea7bc" - integrity sha512-uTu2jQU2SKvtIRVLOzMQo3KxDtO+iJ1p0olmncwrqy4AfPLgwoyCP2CiULq5M7xpR3+dE3hBlZXbZTQbD7ycIw== +"@commitlint/is-ignored@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-13.1.0.tgz#88a5dfbc8f9ea91e860323af6681aa131322b0c4" + integrity sha512-P6zenLE5Tn3FTNjRzmL9+/KooTXEI0khA2TmUbuei9KiycemeO4q7Xk7w7aXwFPNAbN0O9oI7z3z7cFpzKJWmQ== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" semver "7.3.5" -"@commitlint/lint@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-12.1.4.tgz#856b7fd2b2e6367b836cb84a12f1c1b3c0e40d22" - integrity sha512-1kZ8YDp4to47oIPFELUFGLiLumtPNKJigPFDuHt2+f3Q3IKdQ0uk53n3CPl4uoyso/Og/EZvb1mXjFR/Yce4cA== +"@commitlint/lint@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-13.1.0.tgz#ea56ce0970f9b75ffe7bd2c9968f4f1d4461ba3a" + integrity sha512-qH9AYSQDDTaSWSdtOvB3G1RdPpcYSgddAdFYqpFewlKQ1GJj/L+sM7vwqCG7/ip6AiM04Sry1sgmFzaEoFREUA== dependencies: - "@commitlint/is-ignored" "^12.1.4" - "@commitlint/parse" "^12.1.4" - "@commitlint/rules" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/is-ignored" "^13.1.0" + "@commitlint/parse" "^13.1.0" + "@commitlint/rules" "^13.1.0" + "@commitlint/types" "^13.1.0" -"@commitlint/load@>6.1.1", "@commitlint/load@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-12.1.4.tgz#e3c2dbc0e7d8d928f57a6878bd7219909fc0acab" - integrity sha512-Keszi0IOjRzKfxT+qES/n+KZyLrxy79RQz8wWgssCboYjKEp+wC+fLCgbiMCYjI5k31CIzIOq/16J7Ycr0C0EA== +"@commitlint/load@>6.1.1", "@commitlint/load@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-13.1.0.tgz#d6c9b547551f2216586d6c1964d93f92e7b04277" + integrity sha512-zlZbjJCWnWmBOSwTXis8H7I6pYk6JbDwOCuARA6B9Y/qt2PD+NCo0E/7EuaaFoxjHl+o56QR5QttuMBrf+BJzg== dependencies: - "@commitlint/execute-rule" "^12.1.4" - "@commitlint/resolve-extends" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/execute-rule" "^13.0.0" + "@commitlint/resolve-extends" "^13.0.0" + "@commitlint/types" "^13.1.0" chalk "^4.0.0" cosmiconfig "^7.0.0" lodash "^4.17.19" resolve-from "^5.0.0" -"@commitlint/message@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-12.1.4.tgz#3895edcc0709deca5945f3d55f5ea95a9f1f446d" - integrity sha512-6QhalEKsKQ/Y16/cTk5NH4iByz26fqws2ub+AinHPtM7Io0jy4e3rym9iE+TkEqiqWZlUigZnTwbPvRJeSUBaA== +"@commitlint/message@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-13.0.0.tgz#4f8d56b59e9cee8b37b8db6b48c26d7faf33762f" + integrity sha512-W/pxhesVEk8747BEWJ+VGQ9ILHmCV27/pEwJ0hGny1wqVquUR8SxvScRCbUjHCB1YtWX4dEnOPXOS9CLH/CX7A== -"@commitlint/parse@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-12.1.4.tgz#ba03d54d24ef84f6fd2ff31c5e9998b22d7d0aa1" - integrity sha512-yqKSAsK2V4X/HaLb/yYdrzs6oD/G48Ilt0EJ2Mp6RJeWYxG14w/Out6JrneWnr/cpzemyN5hExOg6+TB19H/Lw== +"@commitlint/parse@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-13.1.0.tgz#b88764be36527a468531e1b8dd2d95693ff9ba34" + integrity sha512-xFybZcqBiKVjt6vTStvQkySWEUYPI0AcO4QQELyy29o8EzYZqWkhUfrb7K61fWiHsplWL1iL6F3qCLoxSgTcrg== dependencies: - "@commitlint/types" "^12.1.4" + "@commitlint/types" "^13.1.0" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.0.0" -"@commitlint/read@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-12.1.4.tgz#552fda42ef185d5b578beb6f626a5f8b282de3a6" - integrity sha512-TnPQSJgD8Aod5Xeo9W4SaYKRZmIahukjcCWJ2s5zb3ZYSmj6C85YD9cR5vlRyrZjj78ItLUV/X4FMWWVIS38Jg== +"@commitlint/read@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-13.1.0.tgz#ccb65426b1228b8a598ed36966722d19756eea41" + integrity sha512-NrVe23GMKyL6i1yDJD8IpqCBzhzoS3wtLfDj8QBzc01Ov1cYBmDojzvBklypGb+MLJM1NbzmRM4PR5pNX0U/NQ== dependencies: - "@commitlint/top-level" "^12.1.4" - "@commitlint/types" "^12.1.4" - fs-extra "^9.0.0" + "@commitlint/top-level" "^13.0.0" + "@commitlint/types" "^13.1.0" + fs-extra "^10.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-12.1.4.tgz#e758ed7dcdf942618b9f603a7c28a640f6a0802a" - integrity sha512-R9CoUtsXLd6KSCfsZly04grsH6JVnWFmVtWgWs1KdDpdV+G3TSs37tColMFqglpkx3dsWu8dsPD56+D9YnJfqg== +"@commitlint/resolve-extends@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-13.0.0.tgz#a38fcd2474483bf9ec6e1e901b27b8a23abe7d73" + integrity sha512-1SyaE+UOsYTkQlTPUOoj4NwxQhGFtYildVS/d0TJuK8a9uAJLw7bhCLH2PEeH5cC2D1do4Eqhx/3bLDrSLH3hg== dependencies: import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-12.1.4.tgz#0e141b08caa3d7bdc48aa784baa8baff3efd64db" - integrity sha512-W8m6ZSjg7RuIsIfzQiFHa48X5mcPXeKT9yjBxVmjHvYfS2FDBf1VxCQ7vO0JTVIdV4ohjZ0eKg/wxxUuZHJAZg== +"@commitlint/rules@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-13.1.0.tgz#04f5aaf952884364ebf4e899ec440e3985f0e580" + integrity sha512-b6F+vBqEXsHVghrhomG0Y6YJimHZqkzZ0n5QEpk03dpBXH2OnsezpTw5e+GvbyYCc7PutGbYVQkytuv+7xCxYA== dependencies: - "@commitlint/ensure" "^12.1.4" - "@commitlint/message" "^12.1.4" - "@commitlint/to-lines" "^12.1.4" - "@commitlint/types" "^12.1.4" + "@commitlint/ensure" "^13.1.0" + "@commitlint/message" "^13.0.0" + "@commitlint/to-lines" "^13.0.0" + "@commitlint/types" "^13.1.0" + execa "^5.0.0" -"@commitlint/to-lines@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-12.1.4.tgz#caa582dbf121f377a0588bb64e25c4854843cd25" - integrity sha512-TParumvbi8bdx3EdLXz2MaX+e15ZgoCqNUgqHsRLwyqLUTRbqCVkzrfadG1UcMQk8/d5aMbb327ZKG3Q4BRorw== +"@commitlint/to-lines@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-13.0.0.tgz#5937dd287e3a4f984580ea94bdb994132169a780" + integrity sha512-mzxWwCio1M4/kG9/69TTYqrraQ66LmtJCYTzAZdZ2eJX3I5w52pSjyP/DJzAUVmmJCYf2Kw3s+RtNVShtnZ+Rw== -"@commitlint/top-level@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-12.1.4.tgz#96d5c715bfc1bdf86dfcf11b67fc2cf7658c7a6e" - integrity sha512-d4lTJrOT/dXlpY+NIt4CUl77ciEzYeNVc0VFgUQ6VA+b1rqYD2/VWFjBlWVOrklxtSDeKyuEhs36RGrppEFAvg== +"@commitlint/top-level@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-13.0.0.tgz#f8e1d1425240cd72c600e4da5716418c4ea0bda2" + integrity sha512-baBy3MZBF28sR93yFezd4a5TdHsbXaakeladfHK9dOcGdXo9oQe3GS5hP3BmlN680D6AiQSN7QPgEJgrNUWUCg== dependencies: find-up "^5.0.0" -"@commitlint/types@^12.1.4": - version "12.1.4" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-12.1.4.tgz#9618a5dc8991fb58e6de6ed89d7bf712fa74ba7e" - integrity sha512-KRIjdnWNUx6ywz+SJvjmNCbQKcKP6KArhjZhY2l+CWKxak0d77SOjggkMwFTiSgLODOwmuLTbarR2ZfWPiPMlw== +"@commitlint/types@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-13.1.0.tgz#12cfb6e932372b1816af8900e2d10694add28191" + integrity sha512-zcVjuT+OfKt8h91vhBxt05RMcTGEx6DM7Q9QZeuMbXFk6xgbsSEDMMapbJPA1bCZ81fa/1OQBijSYPrKvtt06g== dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.6.4": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.4.tgz#09809441105711f545ef64950fb8ae7cb50c97cc" - integrity sha512-0Q7byfMiLpUocALf8WWoQgYJpCY2fOyoH20AF1lhzPhHkoNXw0G0TisBIqinLI/c5sLsOFrZtH+kD1+cgF/b1A== +"@cspell/cspell-bundled-dicts@^5.6.6": + version "5.6.6" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.6.tgz#17ed23657d4a67fa8e60dacf40bfdff402009dd0" + integrity sha512-am79SwDYrs0g1aLmtoZDWIj/IT070ISPoZabpTqnR58MFn0NGrLlF9yEKy3oVZtJhe10L3WWHreYZkdELLS9Sg== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" @@ -500,10 +501,10 @@ "@cspell/dict-software-terms" "^1.0.37" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.6.4": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.4.tgz#c49c5a0196e4c95d151ce7147679251df757ae19" - integrity sha512-7XoM1lakuwEJmKjXcZlqAgY1wzamrJGtKP8ZM9RzHYTfYoP/bJ8APViwVsQFpG1YyZ5K83F+vdvDkKjlRk1ZpA== +"@cspell/cspell-types@^5.6.5": + version "5.6.5" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.5.tgz#445e73616e60ea27314595cedd8979dd8cae1091" + integrity sha512-NCcMIelcQFwr2Yu9ma0buVBAFBlqtlxvAurV5UYmdaYyFv6bKO81HN9oMpu5DFev0ntOjZUSYdAGAhCUuikd3w== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -780,18 +781,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.2.tgz#b8eeff8f21ac51d224c851e1729d2630c18631e6" - integrity sha512-/zYigssuHLImGeMAACkjI4VLAiiJznHgAl3xnFT19iWyct2LhrH3KXOjHRmxBGTkiPLZKKAJAgaPpiU9EZ9K+w== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.0.2" - jest-util "^27.0.2" - slash "^3.0.0" - "@jest/console@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.0.6.tgz#3eb72ea80897495c3d73dd97aab7f26770e2260f" @@ -804,51 +793,41 @@ jest-util "^27.0.6" slash "^3.0.0" -"@jest/core@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.4.tgz#679bf9ac07900da2ddbb9667bb1afa8029038f53" - integrity sha512-+dsmV8VUs1h/Szb+rEWk8xBM1fp1I///uFy9nk3wXGvRsF2lBp8EVPmtWc+QFRb3MY2b7u2HbkGF1fzoDzQTLA== +"@jest/core@^27.0.6": + version "27.0.6" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.6.tgz#c5f642727a0b3bf0f37c4b46c675372d0978d4a1" + integrity sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow== dependencies: - "@jest/console" "^27.0.2" - "@jest/reporters" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/console" "^27.0.6" + "@jest/reporters" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/transform" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.8.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^27.0.2" - jest-config "^27.0.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-resolve-dependencies "^27.0.4" - jest-runner "^27.0.4" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - jest-watcher "^27.0.2" + jest-changed-files "^27.0.6" + jest-config "^27.0.6" + jest-haste-map "^27.0.6" + jest-message-util "^27.0.6" + jest-regex-util "^27.0.6" + jest-resolve "^27.0.6" + jest-resolve-dependencies "^27.0.6" + jest-runner "^27.0.6" + jest-runtime "^27.0.6" + jest-snapshot "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" + jest-watcher "^27.0.6" micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.3.tgz#68769b1dfdd213e3456169d64fbe9bd63a5fda92" - integrity sha512-pN9m7fbKsop5vc3FOfH8NF7CKKdRbEZzcxfIo1n2TT6ucKWLFq0P6gCJH0GpnQp036++yY9utHOxpeT1WnkWTA== - dependencies: - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - "@jest/environment@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.0.6.tgz#ee293fe996db01d7d663b8108fa0e1ff436219d2" @@ -859,18 +838,6 @@ "@types/node" "*" jest-mock "^27.0.6" -"@jest/fake-timers@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.3.tgz#9899ba6304cc636734c74478df502e18136461dd" - integrity sha512-fQ+UCKRIYKvTCEOyKPnaPnomLATIhMnHC/xPZ7yT1Uldp7yMgMxoYIFidDbpSTgB79+/U+FgfoD30c6wg3IUjA== - dependencies: - "@jest/types" "^27.0.2" - "@sinonjs/fake-timers" "^7.0.2" - "@types/node" "*" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-util "^27.0.2" - "@jest/fake-timers@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.0.6.tgz#cbad52f3fe6abe30e7acb8cd5fa3466b9588e3df" @@ -883,15 +850,6 @@ jest-mock "^27.0.6" jest-util "^27.0.6" -"@jest/globals@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.3.tgz#1cf8933b7791bba0b99305cbf39fd4d2e3fe4060" - integrity sha512-OzsIuf7uf+QalqAGbjClyezzEcLQkdZ+7PejUrZgDs+okdAK8GwRCGcYCirHvhMBBQh60Jr3NlIGbn/KBPQLEQ== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/types" "^27.0.2" - expect "^27.0.2" - "@jest/globals@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.0.6.tgz#48e3903f99a4650673d8657334d13c9caf0e8f82" @@ -901,7 +859,7 @@ "@jest/types" "^27.0.6" expect "^27.0.6" -"@jest/reporters@27.0.6": +"@jest/reporters@27.0.6", "@jest/reporters@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.6.tgz#91e7f2d98c002ad5df94d5b5167c1eb0b9fd5b00" integrity sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA== @@ -931,45 +889,6 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.4.tgz#95609b1be97afb80d55d8aa3d7c3179c15810e65" - integrity sha512-Xa90Nm3JnV0xCe4M6A10M9WuN9krb+WFKxV1A98Y4ePCw40n++r7uxFUNU7DT1i9Behj7fjrAIju9oU0t1QtCg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.0.2" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.3" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^7.0.0" - -"@jest/source-map@^27.0.1": - version "27.0.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.1.tgz#2afbf73ddbaddcb920a8e62d0238a0a9e0a8d3e4" - integrity sha512-yMgkF0f+6WJtDMdDYNavmqvbHtiSpwRN2U/W+6uztgfqgkq/PXdKPqjBTUF1RD/feth4rH5N3NW0T5+wIuln1A== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - "@jest/source-map@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.0.6.tgz#be9e9b93565d49b0548b86e232092491fb60551f" @@ -989,26 +908,6 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.0.2.tgz#0451049e32ceb609b636004ccc27c8fa22263f10" - integrity sha512-gcdWwL3yP5VaIadzwQtbZyZMgpmes8ryBAJp70tuxghiA8qL4imJyZex+i+USQH2H4jeLVVszhwntgdQ97fccA== - dependencies: - "@jest/console" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.0.4": - version "27.0.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.4.tgz#976493b277594d81e589896f0ed21f198308928a" - integrity sha512-6UFEVwdmxYdyNffBxVVZxmXEdBE4riSddXYSnFNH0ELFQFk/bvagizim8WfgJTqF4EKd+j1yFxvhb8BMHfOjSQ== - dependencies: - "@jest/test-result" "^27.0.2" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-runtime "^27.0.4" - "@jest/test-sequencer@^27.0.6": version "27.0.6" resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz#80a913ed7a1130545b1cd777ff2735dd3af5d34b" @@ -1768,32 +1667,32 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.3": - version "7.13.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.3.tgz#ac01c064c5af520d3661c85d7e5ef95e1ca8ab92" - integrity sha512-uXilAhu2GcvyY/0NwVRk3AN7TFYjkPnjHLV2UywTTz9uglS+Af0YjNrCy+aaK8qXtfbFWdBzkH9N2XU8/YBeRQ== +"@microsoft/api-extractor-model@7.13.4": + version "7.13.4" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.4.tgz#bff4a52a35da5d9896650041d4f7a769c970da60" + integrity sha512-NYaR3hJinh089/Gkee8fvmEFf9zKkoUvNxgkqUlKBCDXH2+Ou4tNDuL8G6zjhKBPicHkp2VcL8l7q9H6txUkjQ== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" + "@rushstack/node-core-library" "3.39.1" "@microsoft/api-extractor@^7.15.2": - version "7.16.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.16.1.tgz#7d5490a2ce1441ab8bc7bd6866a350cf580de0d0" - integrity sha512-hKFoLdmEUbHMIH48MXzSg8rndiugrXHruMVk+BQvhu14yX3LxH9re1CKwj4vLZb7bVBn+FfaWSZ5d3ltiXvX3w== + version "7.18.4" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.4.tgz#2d7641b36d323b4ac710d838a972be7e4f14d32b" + integrity sha512-Wx45VuIAu09Pk9Qwzt0I57OX31BaWO2r6+mfSXqYFsJjYTqwUkdFh92G1GKYgvuR9oF/ai7w10wrFpx5WZYbGg== dependencies: - "@microsoft/api-extractor-model" "7.13.3" + "@microsoft/api-extractor-model" "7.13.4" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.39.0" - "@rushstack/rig-package" "0.2.12" - "@rushstack/ts-command-line" "4.7.10" + "@rushstack/node-core-library" "3.39.1" + "@rushstack/rig-package" "0.2.13" + "@rushstack/ts-command-line" "4.8.1" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.3.2" + typescript "~4.3.5" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -1844,37 +1743,37 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@nrwl/cli@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.0.tgz#c5104bbe7b7c5fa8674e53858e21c9022eff7d58" - integrity sha512-gzQ2QWUCTxC2tNVg+9gPAGxO9RVrF+35Q1SidC4I8VxXh7uhzEp5aweWnfTHSBuefPzqpKDxsjco4070z0c3zQ== +"@nrwl/cli@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.6.3.tgz#d74a0a639698d0b8c9347e0679ef9e8ba97182a4" + integrity sha512-UaVaoknao2+EHWlcyMahNHwelXVdDPDc13ki6T2pFYm9oFj+36YLXexhjwUxafeD/Po8nahaVWhsgqGcjUNgxQ== dependencies: - "@nrwl/tao" "12.6.0" + "@nrwl/tao" "12.6.3" chalk "4.1.0" v8-compile-cache "2.3.0" yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/devkit@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.0.tgz#a2bdd4c144f05597302580bcf31443abdd9dc6be" - integrity sha512-tvw/4n2JD/38UuzdxFCoj1+x02BAKK4EvtLhwUK5XSBF0wDYFBp5rHfxvUD9ZcoiRRrZA4QGFjhDljrfj95F2A== +"@nrwl/devkit@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.6.3.tgz#990885aef16c6e312de8655ba254b22b6eb21c76" + integrity sha512-HeBYesksZirm85sp5a2F23y/V8z2ajBN+Ej29R9E/hpnhOsZScpLxgxmhl+Cq4bd1omVJ6XRvUDwGwuIf1kQmg== dependencies: - "@nrwl/tao" "12.6.0" + "@nrwl/tao" "12.6.3" ejs "^3.1.5" ignore "^5.0.4" rxjs "^6.5.4" semver "7.3.4" tslib "^2.0.0" -"@nrwl/jest@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.0.tgz#4ae63b175c2a3a189267606d4e3796d0c4c406eb" - integrity sha512-xg9tqKgY1XIhA7GOhW9D9g3i3ulLa/Ofjuse0vPNG/e9qRrOUKAdK88OB5CB0AbrARCplf9//45i5NoeW9ZzDA== +"@nrwl/jest@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.6.3.tgz#9d020f61a1fbf63280034b7387c9f62bebafc1c6" + integrity sha512-wcWoq0bLFZeYGR7V4oAzzhp3RxnmeNRLJsYFVI7ShWaYW7em2MGyFiqYt6/Vp5lPT0WlgQH7HujDCx5EYCXVPQ== dependencies: "@jest/reporters" "27.0.6" "@jest/test-result" "27.0.6" - "@nrwl/devkit" "12.6.0" + "@nrwl/devkit" "12.6.3" chalk "4.1.0" identity-obj-proxy "3.0.0" jest-config "27.0.6" @@ -1883,21 +1782,21 @@ rxjs "^6.5.4" tslib "^2.0.0" -"@nrwl/linter@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.0.tgz#b102b481a166a9ead4a1df1a05bcaa81305f31ab" - integrity sha512-qOk6tOUqwLNYmeNNLFUgnbEr+v2G9VqZUBUWpVWT8PR78Rd0vI2AJDkE/VrjPKIfHzbXraKTuWcwTCijX8324w== +"@nrwl/linter@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.6.3.tgz#f66134a1cea2cf890c3c6e31ca3a3bbbddfaa02d" + integrity sha512-9Dmz7/ke0SMxVJLLdBfqa4U373Hrc7HDrbVPutUImNH/aEybhhYIc6yIURm+kUMswiwYSHvLpbb3QbvsxUZnYQ== dependencies: - "@nrwl/devkit" "12.6.0" + "@nrwl/devkit" "12.6.3" glob "7.1.4" minimatch "3.0.4" tmp "~0.2.1" tslib "^2.0.0" -"@nrwl/nx-cloud@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.0.tgz#2f461d566b98441c585ecf93010faf066e1199bf" - integrity sha512-woWvAqp8fWXSl0a+tijo3FtrrjXvGTir89XNhUdh7jvzq7P4+XiPIt6slgcRD3X3ew3JNkJterzf+188fQH8aQ== +"@nrwl/nx-cloud@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.3.5.tgz#e2c90e0f572eeddbc495a3bbb3edcfc0f3c1505e" + integrity sha512-4mrDh5vucDFFD9l6e5RROhloE1SFFERYZhpHn1wGV2USlaV2XtRRNfoVqoxqojBTaDHJ7PS4NJc974SzR9YTOw== dependencies: axios "^0.21.1" chalk "4.1.0" @@ -1906,10 +1805,10 @@ strip-json-comments "^3.1.1" tar "5.0.5" -"@nrwl/tao@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.0.tgz#b0ef91cbc0a8b7747407d1f25b0be669d9a8ddc7" - integrity sha512-h6X+mqmTlZjA9nqlyPAu9TFNORHAMcC1BD8H8kA8lTHN1nktLHQ266qpHVLsxcqww2EYsVqQaKaOpUacck49+w== +"@nrwl/tao@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.6.3.tgz#3eee7eee4d18a0580eee30fe3e3df0193195bc07" + integrity sha512-KlVdQEyxi/mk0X9FBY6w72XouiMesD3FCCrqgKx5oShOx2GehuP+LhOOrfnuMOT7WgKBCoHnqhnK1x6X1F5/XQ== dependencies: chalk "4.1.0" enquirer "~2.3.6" @@ -1922,19 +1821,19 @@ tslib "^2.0.0" yargs-parser "20.0.0" -"@nrwl/workspace@12.6.0": - version "12.6.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.0.tgz#101fda472268008ca64ac5478b95ae17735f93b4" - integrity sha512-g7RqXHLWiB7dO6YhH0Vcb1JRs/q/lSA49Q5DzJqXrVng63LA0wBovmFdOF9slcYNcsow35cDBgWvup+BQgq6gg== +"@nrwl/workspace@12.6.3": + version "12.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.6.3.tgz#42a0228ae6e6b788055f672e422676a863fbaf46" + integrity sha512-/5bCdRYqn/R50YGjNMZRbnOx7ACKoOsuwW1hpe6in36qNjquT0QXlukSTo72dqCoHgDf5Ha34sgZndsEMSnHPg== dependencies: - "@nrwl/cli" "12.6.0" - "@nrwl/devkit" "12.6.0" - "@nrwl/jest" "12.6.0" - "@nrwl/linter" "12.6.0" + "@nrwl/cli" "12.6.3" + "@nrwl/devkit" "12.6.3" + "@nrwl/jest" "12.6.3" + "@nrwl/linter" "12.6.3" chalk "4.1.0" chokidar "^3.5.1" cosmiconfig "^4.0.0" - dotenv "8.2.0" + dotenv "~10.0.0" enquirer "~2.3.6" flat "^5.0.2" fs-extra "^9.1.0" @@ -2059,10 +1958,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.39.0": - version "3.39.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.0.tgz#38928946d15ae89b773386cf97433d0d1ec83b93" - integrity sha512-kgu3+7/zOBkZU0+NdJb1rcHcpk3/oTjn5c8cg5nUTn+JDjEw58yG83SoeJEcRNNdl11dGX0lKG2PxPsjCokZOQ== +"@rushstack/node-core-library@3.39.1": + version "3.39.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.39.1.tgz#dd1dc270e3035ac4de270f0ca80c25724ce19cc7" + integrity sha512-HHgMEHZTXQ3NjpQzWd5+fSt2Eod9yFwj6qBPbaeaNtDNkOL8wbLoxVimQNtcH0Qhn4wxF5u2NTDNFsxf2yd1jw== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -2074,18 +1973,18 @@ timsort "~0.3.0" z-schema "~3.18.3" -"@rushstack/rig-package@0.2.12": - version "0.2.12" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.12.tgz#c434d62b28e0418a040938226f8913971d0424c7" - integrity sha512-nbePcvF8hQwv0ql9aeQxcaMPK/h1OLAC00W7fWCRWIvD2MchZOE8jumIIr66HGrfG2X1sw++m/ZYI4D+BM5ovQ== +"@rushstack/rig-package@0.2.13": + version "0.2.13" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.13.tgz#418f0aeb4c9b33bd8bd2547759fc0ae91fd970c7" + integrity sha512-qQMAFKvfb2ooaWU9DrGIK9d8QfyHy/HiuITJbWenlKgzcDXQvQgEduk57YF4Y7LLasDJ5ZzLaaXwlfX8qCRe5Q== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.7.10": - version "4.7.10" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.10.tgz#a2ec6efb1945b79b496671ce90eb1be4f1397d31" - integrity sha512-8t042g8eerypNOEcdpxwRA3uCmz0duMo21rG4Z2mdz7JxJeylDmzjlU3wDdef2t3P1Z61JCdZB6fbm1Mh0zi7w== +"@rushstack/ts-command-line@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.8.1.tgz#c233a0226112338e58e7e4fd219247b4e7cec883" + integrity sha512-rmxvYdCNRbyRs+DYAPye3g6lkCkWHleqO40K8UPvUAzFqEuj6+YCVssBiOmrUDCoM5gaegSNT0wFDYhz24DWtw== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -2137,9 +2036,9 @@ integrity sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA== "@types/babel__code-frame@*", "@types/babel__code-frame@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.2.tgz#e0c0f1648cbc09a9d4e5b4ed2ae9a6f7c8f5aeb0" - integrity sha512-imO+jT/yjOKOAS5GQZ8SDtwiIloAGGr6OaZDKB0V5JVaSfGZLat5K5/ZRtyKW6R60XHV3RHYPTFfhYb+wDKyKg== + version "7.0.3" + resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.3.tgz#eda94e1b7c9326700a4b69c485ebbc9498a0b63f" + integrity sha512-2TN6oiwtNjOezilFVl77zwdNPwQWaDBBCCWWxyo1ctiO3vAtd7H/aB/CBJdw9+kqq3+latD0SXoedIuHySSZWw== "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": version "7.1.14" @@ -2180,9 +2079,11 @@ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== "@types/debug@*", "@types/debug@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" - integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" + integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== + dependencies: + "@types/ms" "*" "@types/eslint-visitor-keys@*", "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" @@ -2190,9 +2091,9 @@ integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== "@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + version "7.1.4" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.4.tgz#ea59e21d2ee5c517914cb4bc8e4153b99e566672" + integrity sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA== dependencies: "@types/minimatch" "*" "@types/node" "*" @@ -2205,9 +2106,9 @@ "@types/node" "*" "@types/is-glob@*", "@types/is-glob@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.1.tgz#a93eec1714172c8eb3225a1cc5eb88c2477b7d00" - integrity sha512-k3RS5HyBPu4h+5hTmIEfPB2rl5P3LnGdQEZrV2b9OWTJVtsUQ2VBcedqYKGqxvZqle5UALUXdSfVA8nf3HfyWQ== + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/is-glob/-/is-glob-4.0.2.tgz#c243dd0d09eac2992130142419ff2308ffd988bf" + integrity sha512-4j5G9Y5jljDSICQ1R2f/Rcyoj6DZmYGneny+p/cDkjep0rkqNg0W73Ty0bVjMUTZgLXHf8oiMjg1XC3CDwCz+g== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.3" @@ -2236,17 +2137,17 @@ "@types/jest" "*" "@types/jest@*", "@types/jest@^26.0.23": - version "26.0.23" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" - integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== + version "26.0.24" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a" + integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" "@types/json-schema@^7.0.7": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== + version "7.0.8" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" + integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== "@types/json5@^0.0.29": version "0.0.29" @@ -2254,14 +2155,14 @@ integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= "@types/lodash@*", "@types/lodash@^4.14.170": - version "4.14.170" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6" - integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== + version "4.14.171" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.171.tgz#f01b3a5fe3499e34b622c362a46a609fdb23573b" + integrity sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg== "@types/marked@*", "@types/marked@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.3.tgz#c8ea93684e530cc3b667d3e7226556dd0844ad1f" - integrity sha512-lbhSN1rht/tQ+dSWxawCzGgTfxe9DB31iLgiT1ZVT5lshpam/nyOA1m3tKHRoNPctB2ukSL22JZI5Fr+WI/zYg== + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.4.tgz#34a0ea548afe6e0c01095229d47b48b2af650613" + integrity sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg== "@types/minimatch@*": version "3.0.4" @@ -2273,10 +2174,15 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/ms@*": + version "0.7.31" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" + integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== + "@types/node-fetch@^2.5.10": - version "2.5.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" - integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== + version "2.5.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" + integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== dependencies: "@types/node" "*" form-data "^3.0.0" @@ -2297,22 +2203,22 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@*", "@types/prettier@^2.1.5", "@types/prettier@^2.2.3": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb" - integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw== + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== "@types/rimraf@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.0.tgz#b9d03f090ece263671898d57bb7bb007023ac19f" - integrity sha512-7WhJ0MdpFgYQPXlF4Dx+DhgvlPCfz/x5mHaeDQAKhcenvQP1KCpLQ18JklAqeGMYSAT2PxLpzd0g2/HE7fj7hQ== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.1.tgz#1bbc106f0978742289103e080d4b41b3b4656e58" + integrity sha512-CAoSlbco40aKZ0CkelBF2g3JeN6aioRaTVnqSX5pWsn/WApm6IDxI4e4tD9D0dY/meCkyyleP1IQDVN13F4maA== dependencies: "@types/glob" "*" "@types/node" "*" "@types/semver@*", "@types/semver@^7.3.6": - version "7.3.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.6.tgz#e9831776f4512a7ba6da53e71c26e5fb67882d63" - integrity sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw== + version "7.3.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" + integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== "@types/stack-utils@^2.0.0": version "2.0.0" @@ -2320,9 +2226,9 @@ integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== "@types/tmp@*", "@types/tmp@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.0.tgz#e3f52b4d7397eaa9193592ef3fdd44dc0af4298c" - integrity sha512-flgpHJjntpBAdJD43ShRosQvNC0ME97DCfGvZEDlAThQmnerRXrLbX6YgzRBQCZTthET9eAWFAMaYP0m0Y4HzQ== + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.1.tgz#83ecf4ec22a8c218c71db25f316619fe5b986011" + integrity sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg== "@types/yargs-parser@*": version "20.2.0" @@ -2732,20 +2638,6 @@ axios@^0.21.1: dependencies: follow-redirects "^1.10.0" -babel-jest@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.2.tgz#7dc18adb01322acce62c2af76ea2c7cd186ade37" - integrity sha512-9OThPl3/IQbo4Yul2vMz4FYwILPQak8XelX4YGowygfHaOl5R5gfjm4iVx4d8aUugkW683t8aq0A74E7b5DU1Q== - dependencies: - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.0.1" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - babel-jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" @@ -2771,16 +2663,6 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.1.tgz#a6d10e484c93abff0f4e95f437dad26e5736ea11" - integrity sha512-sqBF0owAcCDBVEDtxqfYr2F36eSHdx7lAVGyYuOBRnKdD6gzcy0I0XrAYCZgOA3CRrLhmR+Uae9nogPzmAtOfQ== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - babel-plugin-jest-hoist@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" @@ -2809,14 +2691,6 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.1.tgz#7a50c75d16647c23a2cf5158d5bb9eb206b10e20" - integrity sha512-nIBIqCEpuiyhvjQs2mVNwTxQQa2xk70p9Dd/0obQGBf8FBzbnI8QhQKzLsWMN2i6q+5B0OcWDtrboBX5gmOLyA== - dependencies: - babel-plugin-jest-hoist "^27.0.1" - babel-preset-current-node-syntax "^1.0.0" - babel-preset-jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" @@ -3108,9 +2982,9 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: supports-color "^5.3.0" chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -3338,10 +3212,10 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@~7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" - integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== +commander@~8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258" + integrity sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ== comment-json@^4.1.0: version "4.1.0" @@ -3624,35 +3498,35 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -cspell-glob@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.4.tgz#282810958f253c665e052df70b8d6fc9b14e5bb7" - integrity sha512-aSXLEOPGYAy/b97NNqw0jyB3T/JTwFtoh2n5lWisUHhqOufpcPnVbbZmX8UWIwFPs6fD4M0oFyhUCAMDg9sfhQ== +cspell-glob@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.5.tgz#125818f94903fb070b9bb0f9fdf2488d2a279db7" + integrity sha512-bobER7IoYBJZCXxkiAc5FT1Tb55TFLf1vZSw0ORCFYMeMHlvYktwDx0Wo6/Nkz39MtMQ9nvLrepCMEEZNpKhVw== dependencies: micromatch "^4.0.4" -cspell-io@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.4.tgz#ce282d15c61eb631156cc92eed067362915de834" - integrity sha512-N0jgFupRsVNKt/UXx3HwGeOQJU7W+IfIKoBP0PIZuJe7MsuT+YofpQYwLcNxEQ7n5sOqRlPvS/6qRL8epClGPw== +cspell-io@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.5.tgz#071dfb9c1d1e38c758d9a5b38d5690142fb2e64f" + integrity sha512-OcnuiOkOetcWtihBF57fefLTNPHgsNEc7+x04U7hto3lwEWe8CFQfnkLbQIZfzXOyiyuPY2yjDO0/Y3oqWrB3A== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.4.tgz#fd19b8bc5ac54d394aa76075697ad3b62c000fe6" - integrity sha512-54esfuMa+DTyvrRgsoo30E9u/sHH5QEB0yyQ5LeyzlxlTmaUq5kTE/gssH9jkwXt1gd4rmb8jfE55Y+tQkXWWg== +cspell-lib@^5.6.6: + version "5.6.6" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.6.tgz#241924d83d9df9714692946246afe37c9074a79b" + integrity sha512-Sum4U7/xWTJm99DeZF0bFBBN5SQ7roArlwnnKMmuRRcYl3s9/3OgtIK2YOOgqoSCxh4G51f7aal+bNAlAnx1bA== dependencies: - "@cspell/cspell-bundled-dicts" "^5.6.4" - "@cspell/cspell-types" "^5.6.4" + "@cspell/cspell-bundled-dicts" "^5.6.6" + "@cspell/cspell-types" "^5.6.5" clear-module "^4.1.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.6.4" - cspell-io "^5.6.4" - cspell-trie-lib "^5.6.4" + cspell-glob "^5.6.5" + cspell-io "^5.6.5" + cspell-trie-lib "^5.6.5" find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" @@ -3661,25 +3535,25 @@ cspell-lib@^5.6.4: resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.6.4: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.4.tgz#e737e842a05f6130141eb53e45802294db257dd3" - integrity sha512-5BFPqkRUZLk1OCUyHExUmHQTnrie4z1TMwXRk0Ur4nE7pZ90Mu7YrPnujyXt9RAo1Wh8REhTlQoZpN60wOrBJQ== +cspell-trie-lib@^5.6.5: + version "5.6.5" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.5.tgz#f0bbb998f62fd2122e1ab10a34ffd1bce9c03ab7" + integrity sha512-x4Ii8LwFp7tt+Ie+5R/a/qgYn43R5RwRfByn3taMy4D++PgF+vHTVZm1yORmUFBPTIT39gFbtkAJR7X0kdBL/w== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.6.4" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.4.tgz#572fc72669c5a4cad68553b6f8943f30060c2b52" - integrity sha512-pdOvCv5Cn3mN+NPk10hZDI8Y8TDqZq//9lMC9r31xJJCqcUvWHz0FLbiEzqBbUwQJJ2KaCDUcOybZAsaRiY27w== + version "5.6.6" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.6.tgz#b9af8535b1c5e0ec856d17c98e4b04128feca78b" + integrity sha512-4k3Jcz61mv5SQNjVcrWjARcEVa7gOF8nyg5MPU68AWPoyg5VuE51jgQDr4c01dbG/PGRLtrLwVmr+r6Kh5RDVA== dependencies: - "@cspell/cspell-types" "^5.6.4" + "@cspell/cspell-types" "^5.6.5" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.6.4" - cspell-lib "^5.6.4" + cspell-glob "^5.6.5" + cspell-lib "^5.6.6" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" @@ -3784,9 +3658,9 @@ debug@3.1.0: ms "2.0.0" debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" @@ -3936,10 +3810,10 @@ didyoumean@^1.2.1: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= -diff-sequences@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.1.tgz#9c9801d52ed5f576ff0a20e3022a13ee6e297e7c" - integrity sha512-XPLijkfJUh/PIBnfkcSHgvD6tlYixmcMAn3osTk6jt+H0v/mgURto1XUiD9DKuGX5NDoVS6dSlA23gd9FUaCFg== +diff-sequences@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" + integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== diff@^4.0.1: version "4.0.2" @@ -3995,10 +3869,10 @@ dot-prop@^5.1.0, dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -dotenv@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== +dotenv@~10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== downlevel-dts@^0.7.0: version "0.7.0" @@ -4207,9 +4081,9 @@ eslint-plugin-eslint-comments@^3.2.0: ignore "^5.0.5" eslint-plugin-eslint-plugin@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.1.0.tgz#1d5c54f30b1bddf9b34b1f1dc1a4dff0efec4f79" - integrity sha512-Czb+Dx7ktQ3fFocksu9mF1xBhEzqMhu8g9eaaxpMlnrcDPE7kwIrDo0ttpCDsVEFH9FHWbZ3EzSnQG2gb5miHg== + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-3.5.3.tgz#6cac958e944b820962a4cf9e65cc32a2e0415eaf" + integrity sha512-8LnYyjIOLS0gqh3QFVBkahYzkFd5UaMZkkeEvqReSjIBgajYyZaMElU8szHhqDrqr0rWkkZk33j9e4qnFN3x2A== dependencies: eslint-utils "^2.1.0" @@ -4235,9 +4109,9 @@ eslint-plugin-import@^2.23.4: tsconfig-paths "^3.9.0" eslint-plugin-jest@^24.3.6: - version "24.3.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" - integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== + version "24.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262" + integrity sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg== dependencies: "@typescript-eslint/experimental-utils" "^4.0.1" @@ -4757,7 +4631,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0, fs-extra@^9.1.0: +fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== @@ -5010,7 +4884,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.6: +glob@*, glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.7, glob@~7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -5297,10 +5171,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^5.0.9: - version "5.2.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-5.2.0.tgz#fc5e1c2300d34855d47de4753607d00943fc0802" - integrity sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg== +husky@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c" + integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA== iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" @@ -5369,12 +5243,10 @@ import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-from@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" - integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== - dependencies: - resolve-from "^5.0.0" +import-from@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" + integrity sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ== import-lazy@~4.0.0: version "4.0.0" @@ -5437,11 +5309,16 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +ini@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + init-package-json@^1.10.3: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" @@ -5891,40 +5768,15 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.2.tgz#997253042b4a032950fc5f56abf3c5d1f8560801" - integrity sha512-eMeb1Pn7w7x3wue5/vF73LPCJ7DKQuC9wQUR5ebP9hDPpk5hzcT/3Hmz3Q5BOFpR3tgbmaWhJcMTVgC8Z1NuMw== +jest-changed-files@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.6.tgz#bed6183fcdea8a285482e3b50a9a7712d49a7a8b" + integrity sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.4.tgz#3b261514ee3b3da33def736a6352c98ff56bb6e6" - integrity sha512-QD+eblDiRphta630WRKewuASLs/oY1Zki2G4bccntRvrTHQ63ljwFR5TLduuK4Zg0ZPzW0+8o6AP7KRd1yKOjw== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.0.2" - is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - jest-circus@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.6.tgz#dd4df17c4697db6a2c232aaad4e9cec666926668" @@ -5950,25 +5802,25 @@ jest-circus@^27.0.6: stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.4.tgz#491b12c754c0d7c6873b13a66f26b3a80a852910" - integrity sha512-E0T+/i2lxsWAzV7LKYd0SB7HUAvePqaeIh5vX43/G5jXLhv1VzjYzJAGEkTfvxV774ll9cyE2ljcL73PVMEOXQ== +jest-cli@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.6.tgz#d021e5f4d86d6a212450d4c7b86cb219f1e6864f" + integrity sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg== dependencies: - "@jest/core" "^27.0.4" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/core" "^27.0.6" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" + jest-config "^27.0.6" + jest-util "^27.0.6" + jest-validate "^27.0.6" prompts "^2.0.1" yargs "^16.0.3" -jest-config@27.0.6: +jest-config@27.0.6, jest-config@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.6.tgz#119fb10f149ba63d9c50621baa4f1f179500277f" integrity sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w== @@ -5995,49 +5847,15 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.4.tgz#c4f41378acf40ca77860fb4e213b12109d87b8cf" - integrity sha512-VkQFAHWnPQefdvHU9A+G3H/Z3NrrTKqWpvxgQz3nkUdkDTWeKJE6e//BL+R7z79dXOMVksYgM/z6ndtN0hfChg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.0.4" - "@jest/types" "^27.0.2" - babel-jest "^27.0.2" - chalk "^4.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - is-ci "^3.0.0" - jest-circus "^27.0.4" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-get-type "^27.0.1" - jest-jasmine2 "^27.0.4" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-runner "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - micromatch "^4.0.4" - pretty-format "^27.0.2" - jest-diff@^26.0.0, jest-diff@^27.0.0, jest-diff@^27.0.2, jest-diff@^27.0.6: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.2.tgz#f315b87cee5dc134cf42c2708ab27375cc3f5a7e" - integrity sha512-BFIdRb0LqfV1hBt8crQmw6gGQHVDhM87SpMIZ45FPYKReZYG5er1+5pIn2zKqvrJp6WNox0ylR8571Iwk2Dmgw== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.0.6.tgz#4a7a19ee6f04ad70e0e3388f35829394a44c7b5e" + integrity sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg== dependencies: chalk "^4.0.0" - diff-sequences "^27.0.1" - jest-get-type "^27.0.1" - pretty-format "^27.0.2" - -jest-docblock@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.1.tgz#bd9752819b49fa4fab1a50b73eb58c653b962e8b" - integrity sha512-TA4+21s3oebURc7VgFV4r7ltdIJ5rtBH1E3Tbovcg7AV+oLfD5DcJ2V2vJ5zFA9sL5CFd/d2D6IpsAeSheEdrA== - dependencies: - detect-newline "^3.0.0" + diff-sequences "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.0.6" jest-docblock@^27.0.6: version "27.0.6" @@ -6046,17 +5864,6 @@ jest-docblock@^27.0.6: dependencies: detect-newline "^3.0.0" -jest-each@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.2.tgz#865ddb4367476ced752167926b656fa0dcecd8c7" - integrity sha512-OLMBZBZ6JkoXgUenDtseFRWA43wVl2BwmZYIWQws7eS7pqsIvePqj/jJmEnfq91ALk3LNphgwNK/PRFBYi7ITQ== - dependencies: - "@jest/types" "^27.0.2" - chalk "^4.0.0" - jest-get-type "^27.0.1" - jest-util "^27.0.2" - pretty-format "^27.0.2" - jest-each@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.0.6.tgz#cee117071b04060158dc8d9a66dc50ad40ef453b" @@ -6068,19 +5875,6 @@ jest-each@^27.0.6: jest-util "^27.0.6" pretty-format "^27.0.6" -jest-environment-jsdom@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.3.tgz#ed73e913ddc03864eb9f934b5cbabf1b63504e2e" - integrity sha512-5KLmgv1bhiimpSA8oGTnZYk6g4fsNyZiA/6gI2tAZUgrufd7heRUSVh4gRokzZVEj8zlwAQYT0Zs6tuJSW/ECA== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" - jsdom "^16.6.0" - jest-environment-jsdom@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz#f66426c4c9950807d0a9f209c590ce544f73291f" @@ -6094,18 +5888,6 @@ jest-environment-jsdom@^27.0.6: jest-util "^27.0.6" jsdom "^16.6.0" -jest-environment-node@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.3.tgz#b4acb3679d2552a4215732cab8b0ca7ec4398ee0" - integrity sha512-co2/IVnIFL3cItpFULCvXFg9us4gvWXgs7mutAMPCbFhcqh56QAOdKhNzC2+RycsC/k4mbMj1VF+9F/NzA0ROg== - dependencies: - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock "^27.0.3" - jest-util "^27.0.2" - jest-environment-node@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.0.6.tgz#a6699b7ceb52e8d68138b9808b0c404e505f3e07" @@ -6168,30 +5950,6 @@ jest-haste-map@^27.0.6: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.4.tgz#c669519ccf4904a485338555e1e66cad36bb0670" - integrity sha512-yj3WrjjquZwkJw+eA4c9yucHw4/+EHndHWSqgHbHGQfT94ihaaQsa009j1a0puU8CNxPDk0c1oAPeOpdJUElwA== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.0.2" - is-generator-fn "^2.0.0" - jest-each "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-runtime "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - pretty-format "^27.0.2" - throat "^6.0.1" - jest-jasmine2@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz#fd509a9ed3d92bd6edb68a779f4738b100655b37" @@ -6216,14 +5974,6 @@ jest-jasmine2@^27.0.6: pretty-format "^27.0.6" throat "^6.0.1" -jest-leak-detector@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.2.tgz#ce19aa9dbcf7a72a9d58907a970427506f624e69" - integrity sha512-TZA3DmCOfe8YZFIMD1GxFqXUkQnIoOGQyy4hFCA2mlHtnAaf+FeOMxi0fZmfB41ZL+QbFG6BVaZF5IeFIVy53Q== - dependencies: - jest-get-type "^27.0.1" - pretty-format "^27.0.2" - jest-leak-detector@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz#545854275f85450d4ef4b8fe305ca2a26450450f" @@ -6282,14 +6032,6 @@ jest-message-util@^27.0.6: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.3.tgz#5591844f9192b3335c0dca38e8e45ed297d4d23d" - integrity sha512-O5FZn5XDzEp+Xg28mUz4ovVcdwBBPfAhW9+zJLO0Efn2qNbYcDaJvSlRiQ6BCZUCVOJjALicuJQI9mRFjv1o9Q== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - jest-mock@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.0.6.tgz#0efdd40851398307ba16778728f6d34d583e3467" @@ -6313,14 +6055,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.4.tgz#a07a242d70d668afd3fcf7f4270755eebb1fe579" - integrity sha512-F33UPfw1YGWCV2uxJl7wD6TvcQn5IC0LtguwY3r4L7R6H4twpLkp5Q2ZfzRx9A2I3G8feiy0O0sqcn/Qoym71A== +jest-resolve-dependencies@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz#3e619e0ef391c3ecfcf6ef4056207a3d2be3269f" + integrity sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA== dependencies: - "@jest/types" "^27.0.2" - jest-regex-util "^27.0.1" - jest-snapshot "^27.0.4" + "@jest/types" "^27.0.6" + jest-regex-util "^27.0.6" + jest-snapshot "^27.0.6" jest-resolve@27.0.6, jest-resolve@^27.0.6: version "27.0.6" @@ -6352,49 +6094,6 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.0.4.tgz#8a27bc3f2f00c8ea28f3bc99bbf6f468300a703d" - integrity sha512-BcfyK2i3cG79PDb/6gB6zFeFQlcqLsQjGBqznFCpA0L/3l1L/oOsltdUjs5eISAWA9HS9qtj8v2PSZr/yWxONQ== - dependencies: - "@jest/types" "^27.0.2" - chalk "^4.0.0" - escalade "^3.1.1" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.2" - jest-util "^27.0.2" - jest-validate "^27.0.2" - resolve "^1.20.0" - slash "^3.0.0" - -jest-runner@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.4.tgz#2787170a9509b792ae129794f6944d27d5d12a4f" - integrity sha512-NfmvSYLCsCJk2AG8Ar2NAh4PhsJJpO+/r+g4bKR5L/5jFzx/indUpnVBdrfDvuqhGLLAvrKJ9FM/Nt8o1dsqxg== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-docblock "^27.0.1" - jest-environment-jsdom "^27.0.3" - jest-environment-node "^27.0.3" - jest-haste-map "^27.0.2" - jest-leak-detector "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-runtime "^27.0.4" - jest-util "^27.0.2" - jest-worker "^27.0.2" - source-map-support "^0.5.6" - throat "^6.0.1" - jest-runner@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.6.tgz#1325f45055539222bbc7256a6976e993ad2f9520" @@ -6423,38 +6122,6 @@ jest-runner@^27.0.6: source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.4.tgz#2e4a6aa77cac32ac612dfe12768387a8aa15c2f0" - integrity sha512-voJB4xbAjS/qYPboV+e+gmg3jfvHJJY4CagFWBOM9dQKtlaiTjcpD2tWwla84Z7PtXSQPeIpXY0qksA9Dum29A== - dependencies: - "@jest/console" "^27.0.2" - "@jest/environment" "^27.0.3" - "@jest/fake-timers" "^27.0.3" - "@jest/globals" "^27.0.3" - "@jest/source-map" "^27.0.1" - "@jest/test-result" "^27.0.2" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-haste-map "^27.0.2" - jest-message-util "^27.0.2" - jest-mock "^27.0.3" - jest-regex-util "^27.0.1" - jest-resolve "^27.0.4" - jest-snapshot "^27.0.4" - jest-util "^27.0.2" - jest-validate "^27.0.2" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^16.0.3" - jest-runtime@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.6.tgz#45877cfcd386afdd4f317def551fc369794c27c9" @@ -6533,36 +6200,6 @@ jest-snapshot@^27.0.2: pretty-format "^27.0.2" semver "^7.3.2" -jest-snapshot@^27.0.4: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.4.tgz#2b96e22ca90382b3e93bd0aae2ce4c78bf51fb5b" - integrity sha512-hnjrvpKGdSMvKfbHyaG5Kul7pDJGZvjVy0CKpzhu28MmAssDXS6GpynhXzgst1wBQoKD8c9b2VS2a5yhDLQRCA== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.0.2" - "@jest/types" "^27.0.2" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.0.2" - graceful-fs "^4.2.4" - jest-diff "^27.0.2" - jest-get-type "^27.0.1" - jest-haste-map "^27.0.2" - jest-matcher-utils "^27.0.2" - jest-message-util "^27.0.2" - jest-resolve "^27.0.4" - jest-util "^27.0.2" - natural-compare "^1.4.0" - pretty-format "^27.0.2" - semver "^7.3.2" - jest-snapshot@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.0.6.tgz#f4e6b208bd2e92e888344d78f0f650bcff05a4bf" @@ -6600,7 +6237,7 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" -jest-util@27.0.6, jest-util@^27.0.6: +jest-util@27.0.6, jest-util@^27.0.0, jest-util@^27.0.2, jest-util@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.6.tgz#e8e04eec159de2f4d5f57f795df9cdc091e50297" integrity sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ== @@ -6612,18 +6249,6 @@ jest-util@27.0.6, jest-util@^27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.0.0, jest-util@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.0.2.tgz#fc2c7ace3c75ae561cf1e5fdb643bf685a5be7c7" - integrity sha512-1d9uH3a00OFGGWSibpNYr+jojZ6AckOMCXV2Z4K3YXDnzpkAaXQyIpY14FOJPiUmil7CD+A6Qs+lnnh6ctRbIA== - dependencies: - "@jest/types" "^27.0.2" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^3.0.0" - picomatch "^2.2.3" - jest-validate@^27.0.2: version "27.0.2" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.0.2.tgz#7fe2c100089449cd5cbb47a5b0b6cb7cda5beee5" @@ -6648,17 +6273,17 @@ jest-validate@^27.0.6: leven "^3.1.0" pretty-format "^27.0.6" -jest-watcher@^27.0.2: - version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.2.tgz#dab5f9443e2d7f52597186480731a8c6335c5deb" - integrity sha512-8nuf0PGuTxWj/Ytfw5fyvNn/R80iXY8QhIT0ofyImUvdnoaBdT6kob0GmhXR+wO+ALYVnh8bQxN4Tjfez0JgkA== +jest-watcher@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.0.6.tgz#89526f7f9edf1eac4e4be989bcb6dec6b8878d9c" + integrity sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ== dependencies: - "@jest/test-result" "^27.0.2" - "@jest/types" "^27.0.2" + "@jest/test-result" "^27.0.6" + "@jest/types" "^27.0.6" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.0.2" + jest-util "^27.0.6" string-length "^4.0.1" jest-worker@^27.0.2: @@ -6680,13 +6305,13 @@ jest-worker@^27.0.6: supports-color "^8.0.0" jest@^27.0.3: - version "27.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" - integrity sha512-Px1iKFooXgGSkk1H8dJxxBIrM3tsc5SIuI4kfKYK2J+4rvCvPGr/cXktxh0e9zIPQ5g09kOMNfHQEmusBUf/ZA== + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.6.tgz#10517b2a628f0409087fbf473db44777d7a04505" + integrity sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA== dependencies: - "@jest/core" "^27.0.4" + "@jest/core" "^27.0.6" import-local "^3.0.2" - jest-cli "^27.0.4" + jest-cli "^27.0.6" jju@~1.4.0: version "1.4.0" @@ -6706,10 +6331,10 @@ js-yaml@^3.13.1, js-yaml@^3.9.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" - integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" @@ -6937,9 +6562,9 @@ linkify-it@^3.0.1: uc.micro "^1.0.1" lint-staged@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.0.0.tgz#24d0a95aa316ba28e257f5c4613369a75a10c712" - integrity sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw== + version "11.1.1" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.1.1.tgz#9c2018b872654cf80b2b1ff5a10b6b74aef6e300" + integrity sha512-eTNGe6i78PSUUH2BZi1gZmGmNfb8IeN4z2OzMYxSZ1qnP1WXKn1E7D+OHwLbRDm/wQINnzIj0bsKJ6lLVSuZiQ== dependencies: chalk "^4.1.1" cli-truncate "^2.1.0" @@ -7258,17 +6883,17 @@ markdown-it@12.0.4: mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.27.1.tgz#8fa095eea94936b6dea891f9db7f269c60e6d6fa" - integrity sha512-p1VV6aSbGrDlpUWzHizAnSNEQAweVR3qUI/AIUubxW7BGPXziSXkIED+uRtSohUlRS/jmqp3Wi4es5j6fIrdeQ== +markdownlint-cli@^0.28.1: + version "0.28.1" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.28.1.tgz#76f1d8d50f81dce524826c93bf0f95af9cbe9397" + integrity sha512-RBKtRRBzcuAF/H5wMSzb4zvEtbUkyYNEeaDtlQkyH9SoHWPL01emJ2Wrx6NEOa1ZDGwB+seBGvE157Qzc/t/vA== dependencies: - commander "~7.1.0" + commander "~8.0.0" deep-extend "~0.6.0" get-stdin "~8.0.0" - glob "~7.1.6" + glob "~7.1.7" ignore "~5.1.8" - js-yaml "^4.0.0" + js-yaml "^4.1.0" jsonc-parser "~3.0.0" lodash.differencewith "~4.5.0" lodash.flatten "~4.4.0" @@ -7276,7 +6901,7 @@ markdownlint-cli@^0.27.1: markdownlint-rule-helpers "~0.14.0" minimatch "~3.0.4" minimist "~1.2.5" - rc "~1.2.8" + run-con "~1.2.10" markdownlint-rule-helpers@~0.14.0: version "0.14.0" @@ -7291,9 +6916,9 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.6: - version "2.1.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.1.tgz#b7c27f520fc4de0ddd049d9b4be3b04e06314923" - integrity sha512-5XFS69o9CzDpQDSpUYC+AN2xvq8yl1EGa5SG/GI1hP78/uTeo3PDfiDNmsUyiahpyhToDDJhQk7fNtJsga+KVw== + version "2.1.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" + integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== mdurl@^1.0.1: version "1.0.1" @@ -8329,11 +7954,11 @@ prettier@2.3.2: integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.0.6: - version "27.0.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.2.tgz#9283ff8c4f581b186b2d4da461617143dca478a4" - integrity sha512-mXKbbBPnYTG7Yra9qFBtqj+IXcsvxsvOBco3QHxtxTl+hHKq6QdzMZ+q0CtL4ORHZgwGImRr2XZUX2EWzORxig== + version "27.0.6" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f" + integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ== dependencies: - "@jest/types" "^27.0.2" + "@jest/types" "^27.0.6" ansi-regex "^5.0.0" ansi-styles "^5.0.0" react-is "^17.0.1" @@ -8448,16 +8073,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -rc@~1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -8824,6 +8439,16 @@ run-async@^2.2.0, run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-con@~1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.2.10.tgz#90de9d43d20274d00478f4c000495bd72f417d22" + integrity sha512-n7PZpYmMM26ZO21dd8y3Yw1TRtGABjRtgPSgFS/nhzfvbJMXFtJhJVyEgayMiP+w/23craJjsnfDvx4W4ue/HQ== + dependencies: + deep-extend "^0.6.0" + ini "~2.0.0" + minimist "^1.2.5" + strip-json-comments "~3.1.1" + run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" @@ -9395,11 +9020,6 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1, strip-json-comments@~3.1 resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strong-log-transformer@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -9677,9 +9297,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.3.tgz#808492f022296cde19390bb6ad627c8126bf93f8" - integrity sha512-U5rdMjnYam9Ucw+h0QvtNDbc5+88nxt7tbIvqaZUhFrfG4+SkWhMXjejCLVGcpILTPuV+H3W/GZDZrnZFpPeXw== + version "27.0.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.4.tgz#df49683535831560ccb58f94c023d831b1b80df0" + integrity sha512-c4E1ECy9Xz2WGfTMyHbSaArlIva7Wi2p43QOMmCqjSSjHP06KXv+aT+eSY+yZMuqsMi3k7pyGsGj2q5oSl5WfQ== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -9693,9 +9313,9 @@ ts-jest@^27.0.1: yargs-parser "20.x" ts-node@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.0.0.tgz#05f10b9a716b0b624129ad44f0ea05dac84ba3be" - integrity sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg== + version "10.1.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.1.0.tgz#e656d8ad3b61106938a867f69c39a8ba6efc966e" + integrity sha512-6szn3+J9WyG2hE+5W8e0ruZrzyk1uFLYye6IGMBadnOzDh8aP7t8CbFpsfCiEx2+wMixAhjFt7lOZC4+l+WbEA== dependencies: "@tsconfig/node10" "^1.0.7" "@tsconfig/node12" "^1.0.7" @@ -9834,7 +9454,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: +typescript@*, typescript@4.3.5, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== @@ -9974,25 +9594,11 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -v8-compile-cache@2.3.0: +v8-compile-cache@2.3.0, v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-compile-cache@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" - integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - -v8-to-istanbul@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07" - integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - v8-to-istanbul@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz#4229f2a99e367f3f018fa1d5c2b8ec684667c69c" @@ -10356,7 +9962,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^16.0.3, yargs@^16.2.0: +yargs@^16.0.3: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -10369,6 +9975,19 @@ yargs@^16.0.3, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.0.0: + version "17.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" + integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"