diff --git a/.eslintrc.js b/.eslintrc.js index 4dbde1fb20cf..b39e5187bc73 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,9 +25,10 @@ module.exports = { './tests/integration/utils/jsconfig.json', './packages/*/tsconfig.json', ], + allowAutomaticSingleRunInference: true, tsconfigRootDir: __dirname, warnOnUnsupportedTypeScriptVersion: false, - EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true, + EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, }, rules: { // diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e1a349e5aa3..ca2816fa5baf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,14 @@ on: push: branches: - master - # TODO - delete this before merging v4 into master - - v4 pull_request: branches: - '**' env: PRIMARY_NODE_VERSION: 12 + NX_BRANCH: ${{ github.event.number }} + NX_RUN_GROUP: ${{ github.run_id }} jobs: typecheck: @@ -43,7 +43,7 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | @@ -85,57 +85,49 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run unit tests for typescript-estree - run: yarn test - working-directory: packages/typescript-estree + run: npx nx test @typescript-eslint/typescript-estree env: CI: true - name: Run unit tests for visitor-keys - run: yarn test - working-directory: packages/visitor-keys + run: npx nx test @typescript-eslint/visitor-keys env: CI: true - name: Run unit tests for scope-manager - run: yarn test - working-directory: packages/scope-manager + run: npx nx test @typescript-eslint/scope-manager env: CI: true - name: Run unit tests for experimental-utils - run: yarn test - working-directory: packages/experimental-utils + run: npx nx test @typescript-eslint/experimental-utils env: CI: true - name: Run unit tests for parser - run: yarn test - working-directory: packages/parser + run: npx nx test @typescript-eslint/parser env: CI: true - name: Run unit tests for eslint-plugin - run: yarn test - working-directory: packages/eslint-plugin + run: npx nx test @typescript-eslint/eslint-plugin env: CI: true - name: Run unit tests for eslint-plugin-tslint - run: yarn test - working-directory: packages/eslint-plugin-tslint + run: npx nx test @typescript-eslint/eslint-plugin-tslint env: CI: true - name: Run unit tests for eslint-plugin-internal - run: yarn test - working-directory: packages/eslint-plugin-internal + run: npx nx test @typescript-eslint/eslint-plugin-internal env: CI: true @@ -171,23 +163,23 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Check code formatting - run: yarn check:format + run: yarn check-format - name: Lint code run: yarn lint - name: Lint markdown - run: yarn lint:markdown + run: yarn lint-markdown - name: Check spelling - run: yarn check:spelling + run: yarn check-spelling integration_tests: name: Run integration tests on primary Node.js version @@ -214,14 +206,14 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run integrations tests - run: yarn test:integration + run: yarn test-integration env: CI: true @@ -253,51 +245,44 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | yarn build - name: Run unit tests for typescript-estree - run: yarn test - working-directory: packages/typescript-estree + run: npx nx test @typescript-eslint/typescript-estree env: CI: true - name: Run unit tests for visitor-keys - run: yarn test - working-directory: packages/visitor-keys + run: npx nx test @typescript-eslint/visitor-keys env: CI: true - name: Run unit tests for scope-manager - run: yarn test - working-directory: packages/scope-manager + run: npx nx test @typescript-eslint/scope-manager env: CI: true - name: Run unit tests for experimental-utils - run: yarn test - working-directory: packages/experimental-utils + run: npx nx test @typescript-eslint/experimental-utils env: CI: true - name: Run unit tests for parser - run: yarn test - working-directory: packages/parser + run: npx nx test @typescript-eslint/parser env: CI: true - name: Run unit tests for eslint-plugin - run: yarn test - working-directory: packages/eslint-plugin + run: npx nx test @typescript-eslint/eslint-plugin env: CI: true - name: Run unit tests for eslint-plugin-tslint - run: yarn test - working-directory: packages/eslint-plugin-tslint + run: npx nx test @typescript-eslint/eslint-plugin-tslint env: CI: true @@ -335,7 +320,7 @@ jobs: - name: Install dependencies run: | yarn --ignore-engines --frozen-lockfile --ignore-scripts - yarn check:clean-workspace-after-install + yarn check-clean-workspace-after-install - name: Build run: | diff --git a/.github/workflows/generate-contributors.yml b/.github/workflows/generate-contributors.yml index c45a78430669..c1d29f1fda2a 100644 --- a/.github/workflows/generate-contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -35,7 +35,7 @@ jobs: yarn --ignore-engines --frozen-lockfile --ignore-scripts - name: Generate contributors - run: yarn generate:contributors + run: yarn generate-contributors - name: Create Pull Request uses: peter-evans/create-pull-request@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cace1e04257..6583908b372b 100644 --- a/CHANGELOG.md +++ b/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **eslint-plugin:** allow explicit any for no-unsafe-return ([#3498](https://github.com/typescript-eslint/typescript-eslint/issues/3498)) ([b15a2b2](https://github.com/typescript-eslint/typescript-eslint/commit/b15a2b2a02dc9af2b47b77eb3aede73ffa85ac66)) +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `LogicalExpression`'s `operator` type ([#3497](https://github.com/typescript-eslint/typescript-eslint/issues/3497)) ([9e343fd](https://github.com/typescript-eslint/typescript-eslint/commit/9e343fdaa0b04ed007b873c781e8cc98fc1fb7f5)) +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) +* **eslint-plugin:** [prefer-literal-enum-member] add allowBitwiseExpressions option ([#3515](https://github.com/typescript-eslint/typescript-eslint/issues/3515)) ([288092a](https://github.com/typescript-eslint/typescript-eslint/commit/288092a085fdd9abaffe0aa1d0b37a8844dd86ff)) +* **typescript-estree:** add opt-in inference for single runs and create programs for projects up front ([#3512](https://github.com/typescript-eslint/typescript-eslint/issues/3512)) ([06c2d9b](https://github.com/typescript-eslint/typescript-eslint/commit/06c2d9ba5442330f56637ecb14fae7e41696699c)) +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8a732fc417b..f742bdd75e93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,12 +55,12 @@ We have a sophisticated CI process setup which gets run on every PR. You must pa - Coverage reports should automatically be generated locally, and the `codecov` bot should also comment on your PR with the percentage, as well as links to the line-by-line coverage of each file touched by your PR. - Ensure you have no lint errors. - You can run `yarn lint` in any package or in the root. - - You can run `yarn lint:markdown` in the root. + - You can run `yarn lint-markdown` in the root. - If you have made changes to any markdown documentation, ensure there are no spelling errors - - You can run `yarn check:spelling` in the root. + - You can run `yarn check-spelling` in the root. - Or if you are using vscode, you can use [`Code Spell Checker`](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) plugin. - If you have made changes within the `eslint-plugin` package, ensure the configs and documentation are valid. - - You can run `yarn check:configs` and `yarn check:docs` in the root, or in the `eslint-plugin` folder. + - You can run `yarn check-configs` and `yarn check-docs` in the root, or in the `eslint-plugin` folder. ### Raising a PR diff --git a/lerna.json b/lerna.json index 757d0fec9038..ce8013f10bd6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.26.1", + "version": "4.27.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/nx.json b/nx.json new file mode 100644 index 000000000000..361ed34b99a8 --- /dev/null +++ b/nx.json @@ -0,0 +1,66 @@ +{ + "npmScope": "typescript-eslint", + "implicitDependencies": { + "workspace.json": "*", + "package.json": { + "dependencies": "*", + "devDependencies": "*" + }, + "nx.json": "*", + ".github/workflows/ci.yml": "*" + }, + "workspaceLayout": { + "libsDir": "packages" + }, + "tasksRunnerOptions": { + "default": { + "runner": "@nrwl/nx-cloud", + "options": { + "cacheableOperations": ["build", "test", "package", "prepare"], + "strictlyOrderedTargets": ["build", "package", "prepare"], + "accessToken": "YjFjNTBhOWUtY2JmNy00ZDhiLWE5N2UtZjliNDAwNmIzOTdjfHJlYWQtd3JpdGU=", + "canTrackAnalytics": false, + "showUsageWarnings": true, + "runtimeCacheInputs": ["node -v"] + } + } + }, + "projects": { + "@typescript-eslint/ast-spec": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin-internal": { + "implicitDependencies": [] + }, + "@typescript-eslint/eslint-plugin-tslint": { + "implicitDependencies": [] + }, + "@typescript-eslint/experimental-utils": { + "implicitDependencies": [] + }, + "@typescript-eslint/parser": { + "implicitDependencies": [] + }, + "@typescript-eslint/scope-manager": { + "implicitDependencies": [] + }, + "@typescript-eslint/shared-fixtures": { + "implicitDependencies": [] + }, + "@typescript-eslint/types": { + "implicitDependencies": ["@typescript-eslint/ast-spec"] + }, + "@typescript-eslint/typescript-estree": { + "implicitDependencies": [] + }, + "@typescript-eslint/visitor-keys": { + "implicitDependencies": [] + } + }, + "affected": { + "defaultBase": "master" + } +} diff --git a/package.json b/package.json index 7d4bc600bec3..e4c07d58f0ef 100644 --- a/package.json +++ b/package.json @@ -17,27 +17,27 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "build": "lerna run build --ignore ast-spec", - "check:clean-workspace-after-install": "git diff --quiet --exit-code", - "check:configs": "lerna run check:configs", - "check:docs": "lerna run check:docs", - "check:format": "prettier --list-different \"./**/*.{ts,js,json,md}\"", - "check:spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\"", + "build": "npx nx prebuild @typescript-eslint/types && nx run-many --target=build --all --parallel", + "check-clean-workspace-after-install": "git diff --quiet --exit-code", + "check-configs": "nx run-many --target=check-configs --all --parallel", + "check-docs": "nx run-many --target=check-docs --all --parallel", + "check-format": "prettier --list-different \"./**/*.{ts,js,json,md}\"", + "check-spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\"", "clean": "lerna clean && lerna run clean", "cz": "git-cz", "format": "prettier --write \"./**/*.{ts,js,json,md}\"", - "generate:contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts && yarn all-contributors generate", - "lint:fix": "eslint . --ext .js,.ts --fix", - "lint:markdown:fix": "yarn lint:markdown --fix", - "lint:markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", + "generate-contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts && yarn all-contributors generate", + "lint-fix": "eslint . --ext .js,.ts --fix", + "lint-markdown-fix": "yarn lint-markdown --fix", + "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", "lint": "eslint . --ext .js,.ts", "postinstall": "yarn husky install && yarn build", "pre-commit": "yarn lint-staged", - "pre-push": "yarn check:format", - "test": "lerna run test --concurrency 1", - "test:integration": "./tests/integration/run-all-tests.sh", - "test:kill-integration-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local", - "typecheck": "lerna run typecheck" + "pre-push": "yarn check-format", + "test": "nx run-many --target=test --all --parallel", + "test-integration": "./tests/integration/run-all-tests.sh", + "test-kill-integration-containers": "docker-compose -f tests/integration/docker-compose.yml down -v --rmi local", + "typecheck": "nx run-many --target=typecheck --all --parallel" }, "config": { "commitizen": { @@ -77,6 +77,10 @@ "@commitlint/cli": "^12.1.4", "@commitlint/config-conventional": "^12.1.4", "@commitlint/config-lerna-scopes": "^12.1.4", + "@nrwl/cli": "^12.3.5", + "@nrwl/nx-cloud": "^12.1.3", + "@nrwl/tao": "^12.3.5", + "@nrwl/workspace": "^12.3.5", "@types/babel__code-frame": "^7.0.2", "@types/debug": "^4.1.5", "@types/eslint-visitor-keys": "^1.0.0", diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index f7ea1246c5c2..dc5f93812474 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `LogicalExpression`'s `operator` type ([#3497](https://github.com/typescript-eslint/typescript-eslint/issues/3497)) ([9e343fd](https://github.com/typescript-eslint/typescript-eslint/commit/9e343fdaa0b04ed007b873c781e8cc98fc1fb7f5)) +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 96ec8a09b7dc..ed01fb3f7d3e 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ @@ -41,6 +41,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "devDependencies": { - "@microsoft/api-extractor": "^7.15.2" + "@microsoft/api-extractor": "^7.15.2", + "typescript": "*" } } diff --git a/packages/ast-spec/src/expression/LogicalExpression/spec.ts b/packages/ast-spec/src/expression/LogicalExpression/spec.ts index a9bd50e1dfe1..6d2b56b50dd4 100644 --- a/packages/ast-spec/src/expression/LogicalExpression/spec.ts +++ b/packages/ast-spec/src/expression/LogicalExpression/spec.ts @@ -3,4 +3,5 @@ import type { BinaryExpressionBase } from '../../base/BinaryExpressionBase'; export interface LogicalExpression extends BinaryExpressionBase { type: AST_NODE_TYPES.LogicalExpression; + operator: '??' | '&&' | '||'; } diff --git a/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts index d04e49fd98b8..0cf3c4a911d0 100644 --- a/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts +++ b/packages/ast-spec/src/parameter/TSParameterProperty/spec.ts @@ -12,6 +12,7 @@ export interface TSParameterProperty extends BaseNode { readonly?: boolean; static?: boolean; export?: boolean; + override?: boolean; parameter: AssignmentPattern | BindingName | RestElement; decorators?: Decorator[]; } diff --git a/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts new file mode 100644 index 000000000000..a3ab12ee8564 --- /dev/null +++ b/packages/ast-spec/src/token/PunctuatorToken/PunctuatorTokenToText.ts @@ -0,0 +1,63 @@ +import type { SyntaxKind } from 'typescript'; + +export interface PunctuatorTokenToText { + [SyntaxKind.OpenBraceToken]: '{'; + [SyntaxKind.CloseBraceToken]: '}'; + [SyntaxKind.OpenParenToken]: '('; + [SyntaxKind.CloseParenToken]: ')'; + [SyntaxKind.OpenBracketToken]: '['; + [SyntaxKind.CloseBracketToken]: ']'; + [SyntaxKind.DotToken]: '.'; + [SyntaxKind.DotDotDotToken]: '...'; + [SyntaxKind.SemicolonToken]: ';'; + [SyntaxKind.CommaToken]: ','; + [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.LessThanSlashToken]: ''; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.EqualsGreaterThanToken]: '=>'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.SlashToken]: '/'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusPlusToken]: '++'; + [SyntaxKind.MinusMinusToken]: '--'; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.ExclamationToken]: '!'; + [SyntaxKind.TildeToken]: '~'; + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.QuestionToken]: '?'; + [SyntaxKind.ColonToken]: ':'; + [SyntaxKind.AtToken]: '@'; + [SyntaxKind.QuestionQuestionToken]: '??'; + [SyntaxKind.EqualsToken]: '='; + [SyntaxKind.PlusEqualsToken]: '+='; + [SyntaxKind.MinusEqualsToken]: '-='; + [SyntaxKind.AsteriskEqualsToken]: '*='; + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; + [SyntaxKind.SlashEqualsToken]: '/='; + [SyntaxKind.PercentEqualsToken]: '%='; + [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; + [SyntaxKind.AmpersandEqualsToken]: '&='; + [SyntaxKind.BarEqualsToken]: '|='; + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.CaretEqualsToken]: '^='; +} diff --git a/packages/ast-spec/src/token/PunctuatorToken/spec.ts b/packages/ast-spec/src/token/PunctuatorToken/spec.ts index 39b9507348c2..68156aad6638 100644 --- a/packages/ast-spec/src/token/PunctuatorToken/spec.ts +++ b/packages/ast-spec/src/token/PunctuatorToken/spec.ts @@ -1,6 +1,12 @@ import type { AST_TOKEN_TYPES } from '../../ast-token-types'; import type { BaseToken } from '../../base/BaseToken'; +import type { PunctuatorTokenToText } from './PunctuatorTokenToText'; + +export * from './PunctuatorTokenToText'; + +type ValueOf = T[keyof T]; export interface PunctuatorToken extends BaseToken { type: AST_TOKEN_TYPES.Punctuator; + value: ValueOf; } diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index e0a9ecca5f7b..1a3541a5dbf8 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 432794935bc3..77d46e71b1f6 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.26.1", + "version": "4.27.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 18539ad609f0..7d18d1347758 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 5a31ac9fe864..a2d1916e0008 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.26.1", + "version": "4.27.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.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.26.1" + "@typescript-eslint/parser": "4.27.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 8b7f427128d3..8df2fb68dbbf 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **eslint-plugin:** allow explicit any for no-unsafe-return ([#3498](https://github.com/typescript-eslint/typescript-eslint/issues/3498)) ([b15a2b2](https://github.com/typescript-eslint/typescript-eslint/commit/b15a2b2a02dc9af2b47b77eb3aede73ffa85ac66)) + + +### Features + +* **eslint-plugin:** [prefer-literal-enum-member] add allowBitwiseExpressions option ([#3515](https://github.com/typescript-eslint/typescript-eslint/issues/3515)) ([288092a](https://github.com/typescript-eslint/typescript-eslint/commit/288092a085fdd9abaffe0aa1d0b37a8844dd86ff)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) diff --git a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md index e2350f357113..2086f6533cf8 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -21,6 +21,10 @@ The answer is that `Foo.c` will be `1` at runtime. The [playground](https://www. This rule is meant to prevent unexpected results in code by requiring the use of literal values as enum members to prevent unexpected runtime behavior. Template literals, arrays, objects, constructors, and all other expression types can end up using a variable from its scope or the parent scope, which can result in the same unexpected behavior at runtime. +## Options + +- `allowBitwiseExpressions` set to `true` will allow you to use bitwise expressions in enum initializer (Default: `false`). + Examples of **incorrect** code for this rule: ```ts @@ -46,6 +50,37 @@ enum Valid { } ``` +### `allowBitwiseExpressions` + +Examples of **incorrect** code for the `{ "allowBitwiseExpressions": true }` option: + +```ts +const x = 1; +enum Foo { + A = x << 0, + B = x >> 0, + C = x >>> 0, + D = x | 0, + E = x & 0, + F = x ^ 0, + G = ~x, +} +``` + +Examples of **correct** code for the `{ "allowBitwiseExpressions": true }` option: + +```ts +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} +``` + ## When Not To Use It If you want use anything other than simple literals as an enum value. diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 8f23087a053d..47cc63e7719b 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -32,8 +32,8 @@ "types": "index.d.ts", "scripts": { "build": "tsc -b tsconfig.build.json", - "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", - "check:configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", + "check-docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", + "check-configs": "jest tests/configs.test.ts --runTestsByPath --silent --runInBand", "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,js,json,md}\" --ignore-path ../../.prettierignore", @@ -44,8 +44,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.26.1", - "@typescript-eslint/scope-manager": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", + "@typescript-eslint/scope-manager": "4.27.0", "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.21", diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index 4d65ce529af0..d460dd04c9bf 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -91,6 +91,16 @@ export default util.createRule({ functionType = checker.getTypeAtLocation(functionTSNode); } + // If there is an explicit type annotation *and* that type matches the actual + // function return type, we shouldn't complain (it's intentional, even if unsafe) + if (functionTSNode.type) { + for (const signature of functionType.getCallSignatures()) { + if (returnNodeType === signature.getReturnType()) { + return; + } + } + } + if (anyType !== util.AnyType.Safe) { // Allow cases when the declared return type of the function is either unknown or unknown[] // and the function is returning any or any[]. @@ -140,13 +150,6 @@ export default util.createRule({ for (const signature of functionType.getCallSignatures()) { const functionReturnType = signature.getReturnType(); - if (returnNodeType === functionReturnType) { - // don't bother checking if they're the same - // either the function is explicitly declared to return the same type - // or there was no declaration, so the return type is implicit - return; - } - const result = util.isUnsafeAssignment( returnNodeType, functionReturnType, diff --git a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts index 9843afeef4f3..77b6746a06b0 100644 --- a/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts +++ b/packages/eslint-plugin/src/rules/prefer-literal-enum-member.ts @@ -15,10 +15,24 @@ export default createRule({ messages: { notLiteral: `Explicit enum value must only be a literal value (string, number, boolean, etc).`, }, - schema: [], + schema: [ + { + type: 'object', + properties: { + allowBitwiseExpressions: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], }, - defaultOptions: [], - create(context) { + defaultOptions: [ + { + allowBitwiseExpressions: false, + }, + ], + create(context, [{ allowBitwiseExpressions }]) { return { TSEnumMember(node): void { // If there is no initializer, then this node is just the name of the member, so ignore. @@ -39,8 +53,21 @@ export default createRule({ // -1 and +1 if ( node.initializer.type === AST_NODE_TYPES.UnaryExpression && - ['+', '-'].includes(node.initializer.operator) && - node.initializer.argument.type === AST_NODE_TYPES.Literal + node.initializer.argument.type === AST_NODE_TYPES.Literal && + (['+', '-'].includes(node.initializer.operator) || + (allowBitwiseExpressions && node.initializer.operator === '~')) + ) { + return; + } + + if ( + allowBitwiseExpressions && + node.initializer.type === AST_NODE_TYPES.BinaryExpression && + ['|', '&', '^', '<<', '>>', '>>>'].includes( + node.initializer.operator, + ) && + node.initializer.left.type === AST_NODE_TYPES.Literal && + node.initializer.right.type === AST_NODE_TYPES.Literal ) { return; } diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts index 0f533917d54c..2bbdfdd5ffaf 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts @@ -40,6 +40,18 @@ function foo() { ` function foo() { return []; +} + `, + // explicit any return type is allowed, if you want to be unsafe like that + ` +function foo(): any { + return {} as any; +} + `, + // explicit any array return type is allowed, if you want to be unsafe like that + ` +function foo(): any[] { + return [] as any[]; } `, // explicit any generic return type is allowed, if you want to be unsafe like that diff --git a/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts b/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts index 5459c42d51e1..5ec7af3c9db8 100644 --- a/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-literal-enum-member.test.ts @@ -62,6 +62,20 @@ enum ValidKeyWithComputedSyntaxButNoComputedKey { ['a'], } `, + { + code: ` +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} + `, + options: [{ allowBitwiseExpressions: true }], + }, ], invalid: [ { @@ -255,5 +269,108 @@ enum InvalidSpread { }, ], }, + { + code: ` +enum Foo { + A = 1 << 0, + B = 1 >> 0, + C = 1 >>> 0, + D = 1 | 0, + E = 1 & 0, + F = 1 ^ 0, + G = ~1, +} + `, + options: [{ allowBitwiseExpressions: false }], + errors: [ + { + messageId: 'notLiteral', + line: 3, + column: 3, + }, + { + messageId: 'notLiteral', + line: 4, + column: 3, + }, + { + messageId: 'notLiteral', + line: 5, + column: 3, + }, + { + messageId: 'notLiteral', + line: 6, + column: 3, + }, + { + messageId: 'notLiteral', + line: 7, + column: 3, + }, + { + messageId: 'notLiteral', + line: 8, + column: 3, + }, + { + messageId: 'notLiteral', + line: 9, + column: 3, + }, + ], + }, + { + code: ` +const x = 1; +enum Foo { + A = x << 0, + B = x >> 0, + C = x >>> 0, + D = x | 0, + E = x & 0, + F = x ^ 0, + G = ~x, +} + `, + options: [{ allowBitwiseExpressions: true }], + errors: [ + { + messageId: 'notLiteral', + line: 4, + column: 3, + }, + { + messageId: 'notLiteral', + line: 5, + column: 3, + }, + { + messageId: 'notLiteral', + line: 6, + column: 3, + }, + { + messageId: 'notLiteral', + line: 7, + column: 3, + }, + { + messageId: 'notLiteral', + line: 8, + column: 3, + }, + { + messageId: 'notLiteral', + line: 9, + column: 3, + }, + { + messageId: 'notLiteral', + line: 10, + column: 3, + }, + ], + }, ], }); diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d6055ce29b9c..9fc69e872a0e 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 d0499b562518..89b3207346c7 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.26.1", + "version": "4.27.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.26.1", - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/typescript-estree": "4.27.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts index ddd24e1c029e..e0b472229499 100644 --- a/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts +++ b/packages/experimental-utils/src/ast-utils/eslint-utils/ReferenceTracker.ts @@ -3,12 +3,10 @@ import * as eslintUtils from 'eslint-utils'; import { TSESTree } from '../../ts-estree'; import * as TSESLint from '../../ts-eslint'; -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ const ReferenceTrackerREAD: unique symbol = eslintUtils.ReferenceTracker.READ; const ReferenceTrackerCALL: unique symbol = eslintUtils.ReferenceTracker.CALL; const ReferenceTrackerCONSTRUCT: unique symbol = eslintUtils.ReferenceTracker.CONSTRUCT; -/* eslint-enable @typescript-eslint/no-unsafe-assignment */ interface ReferenceTracker { /** diff --git a/packages/experimental-utils/src/ts-eslint-scope/index.ts b/packages/experimental-utils/src/ts-eslint-scope/index.ts index 7cd1bed4021c..870c34fce1bb 100644 --- a/packages/experimental-utils/src/ts-eslint-scope/index.ts +++ b/packages/experimental-utils/src/ts-eslint-scope/index.ts @@ -10,5 +10,4 @@ export * from './Scope'; export * from './ScopeManager'; export * from './Variable'; -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment export const version: string = ESLintVersion; diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index c07db4b495e9..3233eb7a70ae 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) + + +### Features + +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/README.md b/packages/parser/README.md index 0599f61b2369..04f5c53d0f4a 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -64,6 +64,8 @@ interface ParserOptions { tsconfigRootDir?: string; extraFileExtensions?: string[]; warnOnUnsupportedTypeScriptVersion?: boolean; + + program?: import('typescript').Program; } ``` @@ -211,6 +213,39 @@ Default `false`. This option allows you to request that when the `project` setting is specified, files will be allowed when not included in the projects defined by the provided `tsconfig.json` files. **Using this option will incur significant performance costs. This option is primarily included for backwards-compatibility.** See the **`project`** section above for more information. +### `parserOptions.programs` + +Default `undefined`. + +This option allows you to programmatically provide an array of one or more instances of a TypeScript Program object that will provide type information to rules. +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). + +## Utilities + +### `createProgram(configFile, projectDirectory)` + +This serves as a utility method for users of the `parserOptions.programs` feature to create a TypeScript program instance from a config file. + +```ts +declare function createProgram( + configFile: string, + projectDirectory?: string, +): import('typescript').Program; +``` + +Example usage in .eslintrc.js: + +```js +const parser = require('@typescript-eslint/parser'); +const programs = [parser.createProgram('tsconfig.json')]; +module.exports = { + parserOptions: { + programs, + }, +}; +``` + ## Supported TypeScript Version Please see [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint) for the supported TypeScript version. diff --git a/packages/parser/package.json b/packages/parser/package.json index 3ff1f3968e96..b60fefa206de 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.26.1", + "version": "4.27.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.26.1", - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/scope-manager": "4.27.0", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/typescript-estree": "4.27.0", "debug": "^4.3.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.26.1", + "@typescript-eslint/experimental-utils": "4.27.0", "glob": "*", "typescript": "*" }, diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 451f263d62b6..c1bb82bf5935 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -2,6 +2,7 @@ export { parse, parseForESLint, ParserOptions } from './parser'; export { ParserServices, clearCaches, + createProgram, } 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 diff --git a/packages/parser/tests/lib/services.ts b/packages/parser/tests/lib/services.ts index 28cada9d251d..4567f5f85a45 100644 --- a/packages/parser/tests/lib/services.ts +++ b/packages/parser/tests/lib/services.ts @@ -7,6 +7,7 @@ import { formatSnapshotName, testServices, } from '../tools/test-utils'; +import { createProgram } from '@typescript-eslint/typescript-estree'; //------------------------------------------------------------------------------ // Setup @@ -30,15 +31,17 @@ function createConfig(filename: string): ParserOptions { //------------------------------------------------------------------------------ describe('services', () => { + const program = createProgram(path.resolve(FIXTURES_DIR, 'tsconfig.json')); testFiles.forEach(filename => { const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const config = createConfig(filename); - it( - formatSnapshotName(filename, FIXTURES_DIR, '.ts'), - createSnapshotTestBlock(code, config), - ); - it(`${formatSnapshotName(filename, FIXTURES_DIR, '.ts')} services`, () => { + const snapshotName = formatSnapshotName(filename, FIXTURES_DIR, '.ts'); + it(snapshotName, createSnapshotTestBlock(code, config)); + it(`${snapshotName} services`, () => { testServices(code, config); }); + it(`${snapshotName} services with provided program`, () => { + testServices(code, { ...config, program }); + }); }); }); diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 2ee969b4e090..eafe71aee419 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 b2584b548268..330a99619bfe 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.26.1", + "version": "4.27.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.26.1", - "@typescript-eslint/visitor-keys": "4.26.1" + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/visitor-keys": "4.27.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.26.1", + "@typescript-eslint/typescript-estree": "4.27.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 55b086a682dd..8c8d35582fb5 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts new file mode 100644 index 000000000000..846318396d4e --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts @@ -0,0 +1,3 @@ +class SpecializedComponent extends SomeComponent { + constructor(protected override readonly param: string) {} +} diff --git a/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts new file mode 100644 index 000000000000..2c734ff5c607 --- /dev/null +++ b/packages/shared-fixtures/fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts @@ -0,0 +1,5 @@ +class SpecializedComponent extends SomeComponent { + constructor(override param: string) { + super(); + } +} diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 13c290d52509..34945d18889f 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.26.1", + "version": "4.27.0", "private": true } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 638d10d83e5a..4a1f19861b82 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Features + +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index e6a4c44ea3ae..4b81f6165290 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.26.1", + "version": "4.27.0", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", @@ -48,5 +48,8 @@ "_ts3.4/*" ] } + }, + "devDependencies": { + "typescript": "*" } } diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index 8f6632df9a42..a8ecb896726c 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -1,4 +1,5 @@ import { Lib } from './lib'; +import type { Program } from 'typescript'; type DebugLevel = boolean | ('typescript-eslint' | 'eslint' | 'typescript')[]; @@ -41,6 +42,7 @@ interface ParserOptions { extraFileExtensions?: string[]; filePath?: string; loc?: boolean; + program?: Program; project?: string | string[]; projectFolderIgnoreList?: (string | RegExp)[]; range?: boolean; diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 31b10925f0cd..357f5300c1e9 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + + +### Bug Fixes + +* **typescript-estree:** allow providing more one than one existing program in config ([#3508](https://github.com/typescript-eslint/typescript-eslint/issues/3508)) ([4f1806e](https://github.com/typescript-eslint/typescript-eslint/commit/4f1806e548affb7265da360d1fc8d033e25de325)) +* **typescript-estree:** support override modifier for parameter property ([#3485](https://github.com/typescript-eslint/typescript-eslint/issues/3485)) ([33b9f69](https://github.com/typescript-eslint/typescript-eslint/commit/33b9f69a681cd3219a2acca5b0b2fa67609f099e)) + + +### Features + +* **ast-spec:** specify `PunctuatorToken`'s `value` type ([#3496](https://github.com/typescript-eslint/typescript-eslint/issues/3496)) ([fdb1d81](https://github.com/typescript-eslint/typescript-eslint/commit/fdb1d81f0fcf75a9216e6a90469f18c24c91f718)) +* **typescript-estree:** add opt-in inference for single runs and create programs for projects up front ([#3512](https://github.com/typescript-eslint/typescript-eslint/issues/3512)) ([06c2d9b](https://github.com/typescript-eslint/typescript-eslint/commit/06c2d9ba5442330f56637ecb14fae7e41696699c)) +* allow user to provide TS program instance in parser options ([#3484](https://github.com/typescript-eslint/typescript-eslint/issues/3484)) ([e855b18](https://github.com/typescript-eslint/typescript-eslint/commit/e855b18b8feee0edb5c617c11006861426a6f530)) + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 b9d40fb1ec07..31084150646b 100644 --- a/packages/typescript-estree/README.md +++ b/packages/typescript-estree/README.md @@ -208,6 +208,13 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { */ tsconfigRootDir?: string; + /** + * Instance of a TypeScript Program object to be used for type information. + * 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. + */ + program?: import('typescript').Program; + /** *************************************************************************************** * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * @@ -218,6 +225,20 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * it will not error, but will instead parse the file and its dependencies in a new program. */ createDefaultProgram?: boolean; + + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; } interface ParserServices { @@ -303,6 +324,34 @@ Types for the AST produced by the parse functions. - `AST_NODE_TYPES` is an enum which provides the values for every single AST node's `type` property. - `AST_TOKEN_TYPES` is an enum which provides the values for every single AST token's `type` property. +### Utilities + +#### `createProgram(configFile, projectDirectory)` + +This serves as a utility method for users of the `ParseOptions.program` feature to create a TypeScript program instance from a config file. + +```ts +declare function createProgram( + configFile: string, + projectDirectory: string = process.cwd(), +): import('typescript').Program; +``` + +Example usage: + +```js +const tsESTree = require('@typescript-eslint/typescript-estree'); + +const program = tsESTree.createProgram('tsconfig.json'); +const code = `const hello: string = 'world';`; +const { ast, services } = parseAndGenerateServices(code, { + filePath: '/some/path/to/file/foo.ts', + loc: true, + program, + range: true, +}); +``` + ## Supported TypeScript Version See the [Supported TypeScript Version](../../README.md#supported-typescript-version) section in the project root. diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 1781b27a7345..438a537f84cc 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.26.1", + "version": "4.27.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.26.1", - "@typescript-eslint/visitor-keys": "4.26.1", + "@typescript-eslint/types": "4.27.0", + "@typescript-eslint/visitor-keys": "4.27.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.26.1", + "@typescript-eslint/shared-fixtures": "4.27.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 2a0c8ff4b2eb..8ffa10ab9181 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1585,6 +1585,8 @@ export class Converter { hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, static: hasModifier(SyntaxKind.StaticKeyword, node) || undefined, export: hasModifier(SyntaxKind.ExportKeyword, node) || undefined, + override: + hasModifier(SyntaxKind.OverrideKeyword, node) || undefined, parameter: result, }); } diff --git a/packages/typescript-estree/src/create-program/createProjectProgram.ts b/packages/typescript-estree/src/create-program/createProjectProgram.ts index bca6fda10051..69903a5bcafc 100644 --- a/packages/typescript-estree/src/create-program/createProjectProgram.ts +++ b/packages/typescript-estree/src/create-program/createProjectProgram.ts @@ -3,19 +3,12 @@ import path from 'path'; import { getProgramsForProjects } from './createWatchProgram'; import { firstDefined } from '../node-utils'; import { Extra } from '../parser-options'; -import { ASTAndProgram } from './shared'; +import { ASTAndProgram, getAstFromProgram } from './shared'; const log = debug('typescript-eslint:typescript-estree:createProjectProgram'); const DEFAULT_EXTRA_FILE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx']; -function getExtension(fileName: string | undefined): string | null { - if (!fileName) { - return null; - } - return fileName.endsWith('.d.ts') ? '.d.ts' : path.extname(fileName); -} - /** * @param code The code of the file being linted * @param createDefaultProgram True if the default program should be created @@ -31,18 +24,7 @@ function createProjectProgram( const astAndProgram = firstDefined( getProgramsForProjects(code, extra.filePath, extra), - currentProgram => { - const ast = currentProgram.getSourceFile(extra.filePath); - - // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 - const expectedExt = getExtension(extra.filePath); - const returnedExt = getExtension(ast?.fileName); - if (expectedExt !== returnedExt) { - return; - } - - return ast && { ast, program: currentProgram }; - }, + currentProgram => getAstFromProgram(currentProgram, extra), ); if (!astAndProgram && !createDefaultProgram) { diff --git a/packages/typescript-estree/src/create-program/createWatchProgram.ts b/packages/typescript-estree/src/create-program/createWatchProgram.ts index e2bf060050c2..f10f2a2295fc 100644 --- a/packages/typescript-estree/src/create-program/createWatchProgram.ts +++ b/packages/typescript-estree/src/create-program/createWatchProgram.ts @@ -50,7 +50,7 @@ const parsedFilesSeenHash = new Map(); * Clear all of the parser caches. * This should only be used in testing to ensure the parser is clean between tests. */ -function clearCaches(): void { +function clearWatchCaches(): void { knownWatchProgramMap.clear(); fileWatchCallbackTrackingMap.clear(); folderWatchCallbackTrackingMap.clear(); @@ -530,4 +530,4 @@ function maybeInvalidateProgram( return null; } -export { clearCaches, createWatchProgram, getProgramsForProjects }; +export { clearWatchCaches, createWatchProgram, getProgramsForProjects }; diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index ae2962528040..8202c538d342 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -1,5 +1,6 @@ import path from 'path'; import * as ts from 'typescript'; +import { Program } from 'typescript'; import { Extra } from '../parser-options'; interface ASTAndProgram { @@ -8,14 +9,11 @@ interface ASTAndProgram { } /** - * Default compiler options for program generation from single root file + * Compiler options required to avoid critical functionality issues */ -const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { - allowNonTsExtensions: true, - allowJs: true, - checkJs: true, - noEmit: true, - // extendedDiagnostics: true, +const CORE_COMPILER_OPTIONS: ts.CompilerOptions = { + noEmit: true, // required to avoid parse from causing emit to occur + /** * Flags required to make no-unused-vars work */ @@ -23,6 +21,16 @@ const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { noUnusedParameters: true, }; +/** + * Default compiler options for program generation + */ +const DEFAULT_COMPILER_OPTIONS: ts.CompilerOptions = { + ...CORE_COMPILER_OPTIONS, + allowNonTsExtensions: true, + allowJs: true, + checkJs: true, +}; + function createDefaultCompilerOptionsFromExtra( extra: Extra, ): ts.CompilerOptions { @@ -93,12 +101,37 @@ function getScriptKind( } } +function getExtension(fileName: string | undefined): string | null { + if (!fileName) { + return null; + } + return fileName.endsWith('.d.ts') ? '.d.ts' : path.extname(fileName); +} + +function getAstFromProgram( + currentProgram: Program, + extra: Extra, +): ASTAndProgram | undefined { + const ast = currentProgram.getSourceFile(extra.filePath); + + // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 + const expectedExt = getExtension(extra.filePath); + const returnedExt = getExtension(ast?.fileName); + if (expectedExt !== returnedExt) { + return undefined; + } + + return ast && { ast, program: currentProgram }; +} + export { ASTAndProgram, + CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, ensureAbsolutePath, getCanonicalFileName, getScriptKind, + getAstFromProgram, }; diff --git a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts new file mode 100644 index 000000000000..23b56497dc61 --- /dev/null +++ b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts @@ -0,0 +1,97 @@ +import debug from 'debug'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as ts from 'typescript'; +import { Extra } from '../parser-options'; +import { + ASTAndProgram, + CORE_COMPILER_OPTIONS, + getAstFromProgram, +} from './shared'; + +const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); + +function useProvidedPrograms( + programInstances: Iterable, + extra: Extra, +): ASTAndProgram | undefined { + log( + 'Retrieving ast for %s from provided program instance(s)', + extra.filePath, + ); + + let astAndProgram: ASTAndProgram | undefined; + for (const programInstance of programInstances) { + astAndProgram = getAstFromProgram(programInstance, extra); + // Stop at the first applicable program instance + if (astAndProgram) { + break; + } + } + + if (!astAndProgram) { + const relativeFilePath = path.relative( + extra.tsconfigRootDir || process.cwd(), + extra.filePath, + ); + const errorLines = [ + '"parserOptions.programs" has been provided for @typescript-eslint/parser.', + `The file was not found in any of the provided program instance(s): ${relativeFilePath}`, + ]; + + throw new Error(errorLines.join('\n')); + } + + astAndProgram.program.getTypeChecker(); // ensure parent pointers are set in source files + + return astAndProgram; +} + +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +function createProgramFromConfigFile( + configFile: string, + projectDirectory?: string, +): ts.Program { + if (ts.sys === undefined) { + throw new Error( + '`createProgramFromConfigFile` is only supported in a Node-like environment.', + ); + } + + const parsed = ts.getParsedCommandLineOfConfigFile( + configFile, + CORE_COMPILER_OPTIONS, + { + onUnRecoverableConfigFileDiagnostic: diag => { + throw new Error(formatDiagnostics([diag])); // ensures that `parsed` is defined. + }, + fileExists: fs.existsSync, + getCurrentDirectory: () => + (projectDirectory && path.resolve(projectDirectory)) || process.cwd(), + readDirectory: ts.sys.readDirectory, + readFile: file => fs.readFileSync(file, 'utf-8'), + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + }, + ); + const result = parsed!; // parsed is not undefined, since we throw on failure. + if (result.errors.length) { + throw new Error(formatDiagnostics(result.errors)); + } + const host = ts.createCompilerHost(result.options, true); + return ts.createProgram(result.fileNames, result.options, host); +} + +function formatDiagnostics(diagnostics: ts.Diagnostic[]): string | undefined { + return ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: f => f, + getCurrentDirectory: process.cwd, + getNewLine: () => '\n', + }); +} + +export { useProvidedPrograms, createProgramFromConfigFile }; diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 81f3d69446b6..b2a0581dc926 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -2,7 +2,8 @@ export * from './parser'; export { ParserServices, TSESTreeOptions } from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; -export { clearCaches } from './create-program/createWatchProgram'; +export { clearWatchCaches as clearCaches } from './create-program/createWatchProgram'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; // re-export for backwards-compat export { visitorKeys } from '@typescript-eslint/visitor-keys'; diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 9afe27669265..1969b6b2fb39 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -13,73 +13,14 @@ const LOGICAL_OPERATORS: ( SyntaxKind.QuestionQuestionToken, ]; -interface TokenToText { - [SyntaxKind.OpenBraceToken]: '{'; - [SyntaxKind.CloseBraceToken]: '}'; - [SyntaxKind.OpenParenToken]: '('; - [SyntaxKind.CloseParenToken]: ')'; - [SyntaxKind.OpenBracketToken]: '['; - [SyntaxKind.CloseBracketToken]: ']'; - [SyntaxKind.DotToken]: '.'; - [SyntaxKind.DotDotDotToken]: '...'; - [SyntaxKind.SemicolonToken]: ';'; - [SyntaxKind.CommaToken]: ','; - [SyntaxKind.LessThanToken]: '<'; - [SyntaxKind.GreaterThanToken]: '>'; - [SyntaxKind.LessThanEqualsToken]: '<='; - [SyntaxKind.GreaterThanEqualsToken]: '>='; - [SyntaxKind.EqualsEqualsToken]: '=='; - [SyntaxKind.ExclamationEqualsToken]: '!='; - [SyntaxKind.EqualsEqualsEqualsToken]: '==='; - [SyntaxKind.InstanceOfKeyword]: 'instanceof'; - [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; - [SyntaxKind.EqualsGreaterThanToken]: '=>'; - [SyntaxKind.PlusToken]: '+'; - [SyntaxKind.MinusToken]: '-'; - [SyntaxKind.AsteriskToken]: '*'; - [SyntaxKind.AsteriskAsteriskToken]: '**'; - [SyntaxKind.SlashToken]: '/'; - [SyntaxKind.PercentToken]: '%'; - [SyntaxKind.PlusPlusToken]: '++'; - [SyntaxKind.MinusMinusToken]: '--'; - [SyntaxKind.LessThanLessThanToken]: '<<'; - [SyntaxKind.LessThanSlashToken]: '>'; - [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; - [SyntaxKind.AmpersandToken]: '&'; - [SyntaxKind.BarToken]: '|'; - [SyntaxKind.CaretToken]: '^'; - [SyntaxKind.ExclamationToken]: '!'; - [SyntaxKind.TildeToken]: '~'; - [SyntaxKind.AmpersandAmpersandToken]: '&&'; - [SyntaxKind.BarBarToken]: '||'; - [SyntaxKind.QuestionToken]: '?'; - [SyntaxKind.ColonToken]: ':'; - [SyntaxKind.EqualsToken]: '='; - [SyntaxKind.PlusEqualsToken]: '+='; - [SyntaxKind.MinusEqualsToken]: '-='; - [SyntaxKind.AsteriskEqualsToken]: '*='; - [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; - [SyntaxKind.SlashEqualsToken]: '/='; - [SyntaxKind.PercentEqualsToken]: '%='; - [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; - [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; - [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; - [SyntaxKind.AmpersandEqualsToken]: '&='; - [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; - [SyntaxKind.BarEqualsToken]: '|='; - [SyntaxKind.BarBarEqualsToken]: '||='; - [SyntaxKind.CaretEqualsToken]: '^='; - [SyntaxKind.QuestionQuestionEqualsToken]: '??='; - [SyntaxKind.AtToken]: '@'; +interface TokenToText extends TSESTree.PunctuatorTokenToText { + [SyntaxKind.ImportKeyword]: 'import'; [SyntaxKind.InKeyword]: 'in'; - [SyntaxKind.UniqueKeyword]: 'unique'; - [SyntaxKind.KeyOfKeyword]: 'keyof'; + [SyntaxKind.InstanceOfKeyword]: 'instanceof'; [SyntaxKind.NewKeyword]: 'new'; - [SyntaxKind.ImportKeyword]: 'import'; + [SyntaxKind.KeyOfKeyword]: 'keyof'; [SyntaxKind.ReadonlyKeyword]: 'readonly'; - [SyntaxKind.QuestionQuestionToken]: '??'; - [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.UniqueKeyword]: 'unique'; } /** @@ -518,7 +459,7 @@ export function getTokenType( if ( token.kind >= SyntaxKind.FirstPunctuation && - token.kind <= SyntaxKind.LastBinaryOperator + token.kind <= SyntaxKind.LastPunctuation ) { return AST_TOKEN_TYPES.Punctuator; } @@ -609,6 +550,8 @@ export function convertToken( }, }; } else { + // @ts-expect-error TS is complaining about `value` not being the correct + // type but it is return { type: tokenType, value, diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index a3758fffb794..0bde1d9176ab 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -1,7 +1,7 @@ import { DebugLevel } from '@typescript-eslint/types'; -import { Program } from 'typescript'; -import { TSESTree, TSNode, TSESTreeToTSNode, TSToken } from './ts-estree'; +import type { Program } from 'typescript'; import { CanonicalPath } from './create-program/shared'; +import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; type DebugModule = 'typescript-eslint' | 'eslint' | 'typescript'; @@ -18,8 +18,10 @@ export interface Extra { filePath: string; jsx: boolean; loc: boolean; + singleRun: boolean; log: (message: string) => void; preserveNodeMaps?: boolean; + programs: null | Iterable; projects: CanonicalPath[]; range: boolean; strict: boolean; @@ -169,6 +171,13 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { */ tsconfigRootDir?: string; + /** + * An array of one or more instances of TypeScript Program objects to be used for type information. + * 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[]; + /** *************************************************************************************** * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. * @@ -179,6 +188,20 @@ interface ParseAndGenerateServicesOptions extends ParseOptions { * it will not error, but will instead parse the file and its dependencies in a new program. */ createDefaultProgram?: boolean; + + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; } export type TSESTreeOptions = ParseAndGenerateServicesOptions; diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index fdbeaa6fa069..904bb054fdf8 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -2,6 +2,7 @@ import debug from 'debug'; import { sync as globSync } from 'globby'; import isGlob from 'is-glob'; import semver from 'semver'; +import { normalize } from 'path'; import * as ts from 'typescript'; import { astConverter } from './ast-converter'; import { convertError } from './convert'; @@ -18,6 +19,10 @@ import { ensureAbsolutePath, getCanonicalFileName, } from './create-program/shared'; +import { + createProgramFromConfigFile, + useProvidedPrograms, +} from './create-program/useProvidedPrograms'; const log = debug('typescript-eslint:typescript-estree:parser'); @@ -42,6 +47,16 @@ const isRunningSupportedTypeScriptVersion = semver.satisfies( let extra: Extra; let warnedAboutTSVersion = false; +/** + * Cache existing programs for the single run use-case. + * + * clearProgramCache() is only intended to be used in testing to ensure the parser is clean between tests. + */ +const existingPrograms = new Map(); +function clearProgramCache(): void { + existingPrograms.clear(); +} + function enforceString(code: unknown): string { /** * Ensure the source code is a string @@ -55,16 +70,19 @@ function enforceString(code: unknown): string { /** * @param code The code of the file being linted + * @param programInstances One or more (potentially lazily constructed) existing programs to use * @param shouldProvideParserServices True if the program should be attempted to be calculated from provided tsconfig files * @param shouldCreateDefaultProgram True if the program should be created from compiler host * @returns Returns a source file and program corresponding to the linted code */ function getProgramAndAST( code: string, + programInstances: Iterable | null, shouldProvideParserServices: boolean, shouldCreateDefaultProgram: boolean, ): ASTAndProgram { return ( + (programInstances && useProvidedPrograms(programInstances, extra)) || (shouldProvideParserServices && createProjectProgram(code, shouldCreateDefaultProgram, extra)) || (shouldProvideParserServices && @@ -105,12 +123,18 @@ function resetExtra(): void { loc: false, log: console.log, // eslint-disable-line no-console preserveNodeMaps: true, + programs: null, projects: [], range: false, strict: false, tokens: null, tsconfigRootDir: process.cwd(), useJSXTextNode: false, + /** + * Unless we can reliably infer otherwise, we default to assuming that this run could be part + * of a long-running session (e.g. in an IDE) and watch programs will therefore be required + */ + singleRun: false, }; } @@ -264,22 +288,37 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { // NOTE - ensureAbsolutePath relies upon having the correct tsconfigRootDir in extra extra.filePath = ensureAbsolutePath(extra.filePath, extra); - const projectFolderIgnoreList = ( - options.projectFolderIgnoreList ?? ['**/node_modules/**'] - ) - .reduce((acc, folder) => { - if (typeof folder === 'string') { - acc.push(folder); - } - return acc; - }, []) - // prefix with a ! for not match glob - .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); - // NOTE - prepareAndTransformProjects relies upon having the correct tsconfigRootDir in extra - extra.projects = prepareAndTransformProjects( - options.project, - projectFolderIgnoreList, - ); + if (Array.isArray(options.programs)) { + if (!options.programs.length) { + throw new Error( + `You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.`, + ); + } + extra.programs = options.programs; + log( + 'parserOptions.programs was provided, so parserOptions.project will be ignored.', + ); + } + + if (!extra.programs) { + // providing a program overrides project resolution + const projectFolderIgnoreList = ( + options.projectFolderIgnoreList ?? ['**/node_modules/**'] + ) + .reduce((acc, folder) => { + if (typeof folder === 'string') { + acc.push(folder); + } + return acc; + }, []) + // prefix with a ! for not match glob + .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); + // NOTE - prepareAndTransformProjects relies upon having the correct tsconfigRootDir in extra + extra.projects = prepareAndTransformProjects( + options.project, + projectFolderIgnoreList, + ); + } if ( Array.isArray(options.extraFileExtensions) && @@ -325,6 +364,47 @@ function warnAboutTSVersion(): void { } } +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + */ +function inferSingleRun(options: TSESTreeOptions | undefined): void { + // Allow users to explicitly inform us of their intent to perform a single run (or not) with TSESTREE_SINGLE_RUN + if (process.env.TSESTREE_SINGLE_RUN === 'false') { + extra.singleRun = false; + return; + } + if (process.env.TSESTREE_SINGLE_RUN === 'true') { + extra.singleRun = true; + return; + } + + // Currently behind a flag while we gather real-world feedback + if (options?.allowAutomaticSingleRunInference) { + if ( + // Default to single runs for CI processes. CI=true is set by most CI providers by default. + process.env.CI === 'true' || + // This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...` + process.argv[1].endsWith(normalize('node_modules/.bin/eslint')) + ) { + extra.singleRun = true; + return; + } + } + + /** + * We default to assuming that this run could be part of a long-running session (e.g. in an IDE) + * and watch programs will therefore be required + */ + extra.singleRun = false; +} + // eslint-disable-next-line @typescript-eslint/no-empty-interface interface EmptyObject {} type AST = TSESTree.Program & @@ -386,6 +466,11 @@ function parseWithNodeMapsInternal( */ warnAboutTSVersion(); + /** + * Figure out whether this is a single run or part of a long-running process + */ + inferSingleRun(options); + /** * Create a ts.SourceFile directly, no ts.Program is needed for a simple * parse @@ -446,13 +531,44 @@ function parseAndGenerateServices( warnAboutTSVersion(); /** - * Generate a full ts.Program in order to be able to provide parser - * services, such as type-checking + * Figure out whether this is a single run or part of a long-running process + */ + inferSingleRun(options); + + /** + * If this is a single run in which the user has not provided any existing programs but there + * are programs which need to be created from the provided "project" option, + * create an Iterable which will lazily create the programs as needed by the iteration logic + */ + if (extra.singleRun && !extra.programs && extra.projects?.length > 0) { + extra.programs = { + *[Symbol.iterator](): Iterator { + for (const configFile of extra.projects) { + const existingProgram = existingPrograms.get(configFile); + if (existingProgram) { + yield existingProgram; + } else { + log( + 'Detected single-run/CLI usage, creating Program once ahead of time for project: %s', + configFile, + ); + const newProgram = createProgramFromConfigFile(configFile); + existingPrograms.set(configFile, newProgram); + yield newProgram; + } + } + }, + }; + } + + /** + * Generate a full ts.Program or offer provided instances in order to be able to provide parser services, such as type-checking */ const shouldProvideParserServices = - extra.projects && extra.projects.length > 0; + extra.programs != null || (extra.projects && extra.projects.length > 0); const { ast, program } = getProgramAndAST( code, + extra.programs, shouldProvideParserServices, extra.createDefaultProgram, )!; @@ -497,4 +613,5 @@ export { parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, + clearProgramCache, }; diff --git a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts index cab81a426fe1..92eb7909f457 100644 --- a/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts +++ b/packages/typescript-estree/tests/ast-alignment/fixtures-to-test.ts @@ -386,6 +386,12 @@ tester.addFixturePatternConfig('typescript/basics', { * This is intentional; babel is not checking types */ 'catch-clause-with-invalid-annotation', + /** + * [BABEL ERRORED, BUT TS-ESTREE DID NOT] + * SyntaxError: Unexpected token, expected "," + */ + 'class-with-constructor-and-parameter-property-with-modifiers', + 'class-with-constructor-and-parameter-proptery-with-override-modifier', ], ignoreSourceType: [ /** diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index b8cf71c020cd..7a972315f315 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -1746,6 +1746,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-return-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/lib/persistentParse.test.ts b/packages/typescript-estree/tests/lib/persistentParse.test.ts index 7e751ed42489..50ab0351c16c 100644 --- a/packages/typescript-estree/tests/lib/persistentParse.test.ts +++ b/packages/typescript-estree/tests/lib/persistentParse.test.ts @@ -1,7 +1,8 @@ import fs from 'fs'; import path from 'path'; import tmp from 'tmp'; -import { clearCaches, parseAndGenerateServices } from '../../src'; +import { clearWatchCaches } from '../../src/create-program/createWatchProgram'; +import { parseAndGenerateServices } from '../../src/parser'; const CONTENTS = { foo: 'console.log("foo")', @@ -17,7 +18,7 @@ const cwdCopy = process.cwd(); const tmpDirs = new Set(); afterEach(() => { // stop watching the files and folders - clearCaches(); + clearWatchCaches(); // clean up the temporary files and folders tmpDirs.forEach(t => t.removeCallback()); diff --git a/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts new file mode 100644 index 000000000000..b8e778e0fb01 --- /dev/null +++ b/packages/typescript-estree/tests/lib/semanticInfo-singleRun.test.ts @@ -0,0 +1,248 @@ +import glob from 'glob'; +import * as path from 'path'; +import { clearProgramCache, parseAndGenerateServices } from '../../src'; +import { getCanonicalFileName } from '../../src/create-program/shared'; + +const mockProgram = { + getSourceFile(): void { + return; + }, + getTypeChecker(): void { + return; + }, +}; + +jest.mock('../../src/ast-converter', () => { + return { + astConverter(): unknown { + return { estree: {}, astMaps: {} }; + }, + }; +}); + +interface MockProgramWithConfigFile { + __FROM_CONFIG_FILE__?: string; +} + +jest.mock('../../src/create-program/shared.ts', () => { + return { + ...jest.requireActual('../../src/create-program/shared.ts'), + getAstFromProgram(program: MockProgramWithConfigFile): unknown { + if ( + program.__FROM_CONFIG_FILE__?.endsWith('non-matching-tsconfig.json') + ) { + return null; + } + // Remove temporary tracking value for the config added by mock createProgramFromConfigFile() below + delete program.__FROM_CONFIG_FILE__; + return { ast: {}, program }; + }, + }; +}); + +jest.mock('../../src/create-program/useProvidedPrograms.ts', () => { + return { + ...jest.requireActual('../../src/create-program/useProvidedPrograms.ts'), + createProgramFromConfigFile: jest + .fn() + .mockImplementation((configFile): MockProgramWithConfigFile => { + return { + // So we can differentiate our mock return values based on which tsconfig this is + __FROM_CONFIG_FILE__: configFile, + ...mockProgram, + }; + }), + }; +}); + +jest.mock('../../src/create-program/createWatchProgram', () => { + return { + ...jest.requireActual('../../src/create-program/createWatchProgram'), + getProgramsForProjects: jest.fn(() => [mockProgram]), + }; +}); + +const { + createProgramFromConfigFile, +} = require('../../src/create-program/useProvidedPrograms'); + +const FIXTURES_DIR = './tests/fixtures/semanticInfo'; +const testFiles = glob.sync(`**/*.src.ts`, { + cwd: FIXTURES_DIR, +}); + +const code = 'const foo = 5;'; +// File will not be found in the first Program, but will be in the second +const tsconfigs = ['./non-matching-tsconfig.json', './tsconfig.json']; +const options = { + filePath: testFiles[0], + tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), + loggerFn: false, + project: tsconfigs, + allowAutomaticSingleRunInference: true, +} as const; + +const resolvedProject = (p: string): string => + getCanonicalFileName(path.resolve(path.join(process.cwd(), FIXTURES_DIR), p)); + +describe('semanticInfo - singleRun', () => { + beforeEach(() => { + // ensure caches are clean for each test + clearProgramCache(); + // ensure invocations of mock are clean for each test + (createProgramFromConfigFile as jest.Mock).mockClear(); + }); + + it('should not create any programs ahead of time by default when there is no way to infer singleRun=true', () => { + // For when these tests themselves are running in CI, we need to ignore that for this particular spec + const originalEnvCI = process.env.CI; + process.env.CI = 'false'; + + /** + * At this point there is nothing to indicate it is a single run, so createProgramFromConfigFile should + * never be called + */ + parseAndGenerateServices(code, options); + expect(createProgramFromConfigFile).not.toHaveBeenCalled(); + + // Restore process data + process.env.CI = originalEnvCI; + }); + + it('should not create any programs ahead of time when when TSESTREE_SINGLE_RUN=false, even if other inferrence criteria apply', () => { + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'false'; + + // Normally CI=true would be used to infer singleRun=true, but TSESTREE_SINGLE_RUN is explicitly set to false + const originalEnvCI = process.env.CI; + process.env.CI = 'true'; + + parseAndGenerateServices(code, options); + expect(createProgramFromConfigFile).not.toHaveBeenCalled(); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + process.env.CI = originalEnvCI; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when TSESTREE_SINGLE_RUN=true', () => { + /** + * Single run because of explicit environment variable TSESTREE_SINGLE_RUN + */ + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'true'; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when singleRun is inferred from CI=true', () => { + /** + * Single run because of CI=true (we need to make sure we respect the original value + * so that we won't interfere with our own usage of the variable) + */ + const originalEnvCI = process.env.CI; + process.env.CI = 'true'; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.env.CI = originalEnvCI; + }); + + it('should lazily create the required program out of the provided "parserOptions.project" one time when singleRun is inferred from process.argv', () => { + /** + * Single run because of process.argv + */ + const originalProcessArgv = process.argv; + process.argv = ['', 'node_modules/.bin/eslint', '']; + + const resultProgram = parseAndGenerateServices(code, options).services + .program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called once per project + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(tsconfigs.length); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 2, + resolvedProject(tsconfigs[1]), + ); + + // Restore process data + process.argv = originalProcessArgv; + }); + + it('should stop iterating through and lazily creating programs for the given "parserOptions.project" once a matching one has been found', () => { + /** + * Single run because of explicit environment variable TSESTREE_SINGLE_RUN + */ + const originalTSESTreeSingleRun = process.env.TSESTREE_SINGLE_RUN; + process.env.TSESTREE_SINGLE_RUN = 'true'; + + const optionsWithReversedTsconfigs = { + ...options, + // Now the matching tsconfig comes first + project: options.project.reverse(), + }; + + const resultProgram = parseAndGenerateServices( + code, + optionsWithReversedTsconfigs, + ).services.program; + expect(resultProgram).toEqual(mockProgram); + + // Call parseAndGenerateServices() again to ensure caching of Programs is working correctly... + parseAndGenerateServices(code, options); + // ...by asserting this was only called only once + expect(createProgramFromConfigFile).toHaveBeenCalledTimes(1); + + expect(createProgramFromConfigFile).toHaveBeenNthCalledWith( + 1, + resolvedProject(tsconfigs[0]), + ); + + // Restore process data + process.env.TSESTREE_SINGLE_RUN = originalTSESTreeSingleRun; + }); +}); diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index 3d8cb41bd25d..d099342c72e7 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -1,19 +1,20 @@ -import { readFileSync } from 'fs'; +import * as fs from 'fs'; import glob from 'glob'; -import { extname, join, resolve } from 'path'; +import * as path from 'path'; import * as ts from 'typescript'; +import { clearWatchCaches } from '../../src/create-program/createWatchProgram'; +import { createProgramFromConfigFile as createProgram } from '../../src/create-program/useProvidedPrograms'; +import { + parseAndGenerateServices, + ParseAndGenerateServicesResult, +} from '../../src/parser'; import { TSESTreeOptions } from '../../src/parser-options'; +import { TSESTree } from '../../src/ts-estree'; import { createSnapshotTestBlock, formatSnapshotName, parseCodeAndGenerateServices, } from '../../tools/test-utils'; -import { - clearCaches, - parseAndGenerateServices, - ParseAndGenerateServicesResult, -} from '../../src'; -import { TSESTree } from '../../src/ts-estree'; const FIXTURES_DIR = './tests/fixtures/semanticInfo'; const testFiles = glob.sync(`**/*.src.ts`, { @@ -30,21 +31,21 @@ function createOptions(fileName: string): TSESTreeOptions & { cwd?: string } { useJSXTextNode: false, errorOnUnknownASTType: true, filePath: fileName, - tsconfigRootDir: join(process.cwd(), FIXTURES_DIR), + tsconfigRootDir: path.join(process.cwd(), FIXTURES_DIR), project: `./tsconfig.json`, loggerFn: false, }; } -// ensure tsconfig-parser caches are clean for each test -beforeEach(() => clearCaches()); +// ensure tsconfig-parser watch caches are clean for each test +beforeEach(() => clearWatchCaches()); describe('semanticInfo', () => { // test all AST snapshots testFiles.forEach(filename => { - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); it( - formatSnapshotName(filename, FIXTURES_DIR, extname(filename)), + formatSnapshotName(filename, FIXTURES_DIR, path.extname(filename)), createSnapshotTestBlock( code, createOptions(filename), @@ -55,7 +56,7 @@ describe('semanticInfo', () => { it(`should cache the created ts.program`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsProjectString = { ...options, @@ -70,7 +71,7 @@ describe('semanticInfo', () => { it(`should handle "project": "./tsconfig.json" and "project": ["./tsconfig.json"] the same`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsProjectString = { ...options, @@ -87,7 +88,7 @@ describe('semanticInfo', () => { it(`should resolve absolute and relative tsconfig paths the same`, () => { const filename = testFiles[0]; - const code = readFileSync(join(FIXTURES_DIR, filename), 'utf8'); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const options = createOptions(filename); const optionsAbsolutePath = { ...options, @@ -119,9 +120,9 @@ describe('semanticInfo', () => { // case-specific tests it('isolated-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -129,9 +130,9 @@ describe('semanticInfo', () => { }); it('isolated-vue-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'extra-file-extension.vue'); + const fileName = path.resolve(FIXTURES_DIR, 'extra-file-extension.vue'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), { ...createOptions(fileName), extraFileExtensions: ['.vue'], @@ -142,9 +143,12 @@ describe('semanticInfo', () => { }); it('non-existent-estree-nodes tests', () => { - const fileName = resolve(FIXTURES_DIR, 'non-existent-estree-nodes.src.ts'); + const fileName = path.resolve( + FIXTURES_DIR, + 'non-existent-estree-nodes.src.ts', + ); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -166,9 +170,9 @@ describe('semanticInfo', () => { }); it('imported-file tests', () => { - const fileName = resolve(FIXTURES_DIR, 'import-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'import-file.src.ts'); const parseResult = parseCodeAndGenerateServices( - readFileSync(fileName, 'utf8'), + fs.readFileSync(fileName, 'utf8'), createOptions(fileName), ); @@ -242,20 +246,26 @@ describe('semanticInfo', () => { }); it('non-existent project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './tsconfigs.json'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrow(/Cannot read file .+tsconfigs\.json'/); }); it('fail to read project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = '.'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrow( // case insensitive because unix based systems are case insensitive /Cannot read file .+semanticInfo'./i, @@ -263,11 +273,14 @@ describe('semanticInfo', () => { }); it('malformed project file', () => { - const fileName = resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); badConfig.project = './badTSConfig/tsconfig.json'; expect(() => - parseCodeAndGenerateServices(readFileSync(fileName, 'utf8'), badConfig), + parseCodeAndGenerateServices( + fs.readFileSync(fileName, 'utf8'), + badConfig, + ), ).toThrowErrorMatchingSnapshot(); }); @@ -279,6 +292,66 @@ describe('semanticInfo', () => { expect(parseResult.services.program).toBeDefined(); }); + + it('empty programs array should throw', () => { + const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); + const badConfig = createOptions(fileName); + badConfig.programs = []; + expect(() => parseAndGenerateServices('const foo = 5;', badConfig)).toThrow( + 'You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.', + ); + }); + + it(`first matching provided program instance is returned in result`, () => { + const filename = testFiles[0]; + const program1 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const program2 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const code = fs.readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); + const options = createOptions(filename); + const optionsProjectString = { + ...options, + programs: [program1, program2], + project: './tsconfig.json', + }; + const parseResult = parseAndGenerateServices(code, optionsProjectString); + expect(parseResult.services.program).toBe(program1); + }); + + it('file not in provided program instance(s)', () => { + const filename = 'non-existent-file.ts'; + const program1 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const options = createOptions(filename); + const optionsWithSingleProgram = { + ...options, + programs: [program1], + }; + expect(() => + parseAndGenerateServices('const foo = 5;', optionsWithSingleProgram), + ).toThrow( + `The file was not found in any of the provided program instance(s): ${filename}`, + ); + + const program2 = createProgram(path.join(FIXTURES_DIR, 'tsconfig.json')); + const optionsWithMultiplePrograms = { + ...options, + programs: [program1, program2], + }; + expect(() => + parseAndGenerateServices('const foo = 5;', optionsWithMultiplePrograms), + ).toThrow( + `The file was not found in any of the provided program instance(s): ${filename}`, + ); + }); + + it('createProgram fails on non-existent file', () => { + expect(() => createProgram('tsconfig.non-existent.json')).toThrow(); + }); + + it('createProgram fails on tsconfig with errors', () => { + expect(() => + createProgram(path.join(FIXTURES_DIR, 'badTSConfig', 'tsconfig.json')), + ).toThrow(); + }); }); function testIsolatedFile( diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot new file mode 100644 index 000000000000..c05e61d23707 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src.ts.shot @@ -0,0 +1,559 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-constructor-and-parameter-property-with-modifiers.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 53, + 110, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 108, + 110, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "accessibility": "protected", + "export": undefined, + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "override": true, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "name": "param", + "range": Array [ + 93, + 106, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 47, + "line": 2, + }, + }, + "range": Array [ + 98, + 106, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 65, + 106, + ], + "readonly": true, + "static": undefined, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 64, + 110, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 112, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 112, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 113, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 65, + 74, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 75, + 83, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 84, + 92, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 93, + 98, + ], + "type": "Identifier", + "value": "param", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 47, + "line": 2, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 100, + 106, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 2, + }, + "start": Object { + "column": 55, + "line": 2, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 109, + 110, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 111, + 112, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot new file mode 100644 index 000000000000..2ab13d8e51c6 --- /dev/null +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src.ts.shot @@ -0,0 +1,649 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typescript basics class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "override": false, + "range": Array [ + 53, + 109, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 102, + ], + "type": "Super", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "optional": false, + "range": Array [ + 97, + 104, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 105, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 89, + 109, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "accessibility": undefined, + "export": undefined, + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "override": true, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "param", + "range": Array [ + 74, + 87, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 79, + 87, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 81, + 87, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 65, + 87, + ], + "readonly": undefined, + "static": undefined, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 64, + 109, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 111, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SpecializedComponent", + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 111, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "comments": Array [], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 112, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 26, + ], + "type": "Identifier", + "value": "SpecializedComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "Identifier", + "value": "SomeComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 53, + 64, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 65, + 73, + ], + "type": "Identifier", + "value": "override", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 74, + 79, + ], + "type": "Identifier", + "value": "param", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 81, + 87, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 87, + 88, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 89, + 90, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 97, + 102, + ], + "type": "Keyword", + "value": "super", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 102, + 103, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 104, + 105, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 110, + 111, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot index 57fd7fb7ff7a..274ac4ac7c7c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-export-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot index b4662a489b0b..72e5749ba0f1 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-private-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot index 0248c45f7818..7e87ef2df91e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-protected-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot index bd27cd8449be..363608735e5e 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-public-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -237,6 +239,7 @@ Object { "line": 4, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { @@ -346,6 +349,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot index a33a42f2d7d5..225de104f5ed 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-readonly-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -164,6 +165,7 @@ Object { "line": 3, }, }, + "override": undefined, "parameter": Object { "left": Object { "loc": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot index 41e85e115fc3..9287f9c1d21c 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/class-with-static-parameter-properties.src.ts.shot @@ -91,6 +91,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot index 6f1327b0808f..75ad28bb7599 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.shot @@ -31,6 +31,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -70,6 +71,7 @@ Object { "line": 2, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot index 32b6bf5d3bdf..c744f34b9000 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/namespaces-and-modules/nested-internal-module.src.ts.shot @@ -189,6 +189,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { @@ -262,6 +263,7 @@ Object { "line": 5, }, }, + "override": undefined, "parameter": Object { "loc": Object { "end": Object { diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 728f075000f4..9805958418b9 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.27.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.1...v4.27.0) (2021-06-14) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.26.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.26.0...v4.26.1) (2021-06-07) **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 8028f5e8f628..665bc6a4dc7a 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.26.1", + "version": "4.27.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.26.1", + "@typescript-eslint/types": "4.27.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 0cfd463e6b2d..0e8da2eba1ce 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,6 +1,8 @@ { "compilerOptions": { - "types": ["@types/node"] + "types": ["@types/node"], + "noEmit": true, + "allowJs": true }, "extends": "./tsconfig.base.json", "include": ["tests/**/*.ts", "tools/**/*.ts", ".eslintrc.js"] diff --git a/workspace.json b/workspace.json new file mode 100644 index 000000000000..8ff120441560 --- /dev/null +++ b/workspace.json @@ -0,0 +1,49 @@ +{ + "version": 2, + "projects": { + "@typescript-eslint/ast-spec": { + "root": "packages/ast-spec", + "type": "library" + }, + "@typescript-eslint/eslint-plugin": { + "root": "packages/eslint-plugin", + "type": "library" + }, + "@typescript-eslint/eslint-plugin-internal": { + "root": "packages/eslint-plugin-internal", + "type": "library" + }, + "@typescript-eslint/eslint-plugin-tslint": { + "root": "packages/eslint-plugin-tslint", + "type": "library" + }, + "@typescript-eslint/experimental-utils": { + "root": "packages/experimental-utils", + "type": "library" + }, + "@typescript-eslint/parser": { + "root": "packages/parser", + "type": "library" + }, + "@typescript-eslint/scope-manager": { + "root": "packages/scope-manager", + "type": "library" + }, + "@typescript-eslint/shared-fixtures": { + "root": "packages/shared-fixtures", + "type": "library" + }, + "@typescript-eslint/types": { + "root": "packages/types", + "type": "library" + }, + "@typescript-eslint/typescript-estree": { + "root": "packages/typescript-estree", + "type": "library" + }, + "@typescript-eslint/visitor-keys": { + "root": "packages/visitor-keys", + "type": "library" + } + } +} diff --git a/yarn.lock b/yarn.lock index f6cf41a28f74..dd47863227d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -455,14 +455,14 @@ dependencies: chalk "^4.0.0" -"@cspell/cspell-bundled-dicts@^5.5.2": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.5.2.tgz#ee7f299e2bfccf73c38f8fc877317929d468d328" - integrity sha512-6erGPW9IFln/DWT754rjoOoE+QqatZJMFXu9ghcemooNbqbXrSG4ByXNVaEi3CfLjK48GHc8uJIkHoX4lbFArA== +"@cspell/cspell-bundled-dicts@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.6.0.tgz#998410852abad3253dfe19a3786c34ad7a5ad618" + integrity sha512-l9rFp7tNq5bpUlihh54a5Gtby2Ol9slsgTS4dq7VwbZcCye2BrVW0XhjmEWpl+bngOUMHnLLza+GQrDzELgXDA== dependencies: "@cspell/dict-ada" "^1.1.2" "@cspell/dict-aws" "^1.0.14" - "@cspell/dict-bash" "^1.0.12" + "@cspell/dict-bash" "^1.0.13" "@cspell/dict-companies" "^1.0.38" "@cspell/dict-cpp" "^1.1.39" "@cspell/dict-cryptocurrencies" "^1.0.10" @@ -471,8 +471,8 @@ "@cspell/dict-django" "^1.0.26" "@cspell/dict-dotnet" "^1.0.25" "@cspell/dict-elixir" "^1.0.24" - "@cspell/dict-en-gb" "^1.1.29" - "@cspell/dict-en_us" "^1.2.42" + "@cspell/dict-en-gb" "^1.1.30" + "@cspell/dict-en_us" "^1.2.43" "@cspell/dict-filetypes" "^1.1.5" "@cspell/dict-fonts" "^1.0.14" "@cspell/dict-fullstack" "^1.0.38" @@ -485,20 +485,20 @@ "@cspell/dict-lorem-ipsum" "^1.0.22" "@cspell/dict-lua" "^1.0.16" "@cspell/dict-node" "^1.0.12" - "@cspell/dict-npm" "^1.0.12" + "@cspell/dict-npm" "^1.0.13" "@cspell/dict-php" "^1.0.24" - "@cspell/dict-powershell" "^1.0.15" + "@cspell/dict-powershell" "^1.0.16" "@cspell/dict-python" "^1.0.35" "@cspell/dict-ruby" "^1.0.14" "@cspell/dict-rust" "^1.0.22" "@cspell/dict-scala" "^1.0.21" - "@cspell/dict-software-terms" "^1.0.32" + "@cspell/dict-software-terms" "^1.0.33" "@cspell/dict-typescript" "^1.0.19" -"@cspell/cspell-types@^5.5.2": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.5.2.tgz#46cd362cd07be2f31167823fbfef580b01017053" - integrity sha512-/SEI6b51gYI2UQXQci++oraYvWJmSfKkV+rw3vk1qycZwLcmrqxZonLyHEH25+npUHE2ae1jE1g202w493icYg== +"@cspell/cspell-types@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.6.0.tgz#e7c368545bcfb3313d586dc5c7a4db017016f0e8" + integrity sha512-jbNHEQOmRaa15c5MDmaBOSRxpc3vUpAX9nhhcLrRgUk9eOIJzbIKsRJhMrwPcMd9F6V+mInAxdWGrsBETq9waw== "@cspell/dict-ada@^1.1.2": version "1.1.2" @@ -510,10 +510,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-1.0.14.tgz#beddede1053ce3622400e36c65da9fd2954e939d" integrity sha512-K21CfB4ZpKYwwDQiPfic2zJA/uxkbsd4IQGejEvDAhE3z8wBs6g6BwwqdVO767M9NgZqc021yAVpr79N5pWe3w== -"@cspell/dict-bash@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.12.tgz#fdf828c520dfd274f1cee6a4a90a0f6d86a703ac" - integrity sha512-BOMHVW/m281mqUSJkZ3oiJiUUItLd7QdzpMjm428V9yBYFwIdbds1CeatS7C6kgpI2eBE4RXmy1Hjk/lR63Jew== +"@cspell/dict-bash@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-1.0.14.tgz#b519aca2843ea206b034381aabcf37b18b4930b2" + integrity sha512-Q5RKcyJfPzLraFGliKaRVMBFACCtcQZ4wPLRkLLFHKEUN6/hKqKB0owrVq225AByv3aY2CMEPIaPEU7F0QDlTA== "@cspell/dict-companies@^1.0.38": version "1.0.38" @@ -555,15 +555,15 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-1.0.24.tgz#fc5c15b9f66b8aa5e25c98f54103c796fec70aba" integrity sha512-pEX6GYlEx4Teusw/m+XmqoXzcHOqpcn1ZX4H33ONqR81XdPwbaKorBr1IG23Ic76IhwrFlOqs48tcnxrHYpFnA== -"@cspell/dict-en-gb@^1.1.29": - version "1.1.29" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.29.tgz#12f0225f79598f7a1cdd08e2a2e2656189fc0747" - integrity sha512-rAgrN77RsKnmfkl0GyrEr5swFnqHpfPPPLscEgO+ShEL1Z9fyrcoPNW7X7EmsrITYmVy1iiemDAP2OGKvyj4Hw== +"@cspell/dict-en-gb@^1.1.30": + version "1.1.30" + resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.30.tgz#eee3d16b0176f5a44667f966f83097c3d6a7d654" + integrity sha512-xQUXZZ0ODBY9saso9e0BozS5FsX2o2+0fmbrekyITTTOCt/RN7bqByC7Hfj7HziQ3LxuC06EsS8ao8CKk9JTmQ== -"@cspell/dict-en_us@^1.2.42": - version "1.2.42" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.42.tgz#ed9e28a2d4734d87681aa4421f33b23a2327bbb1" - integrity sha512-5iegemAMT+5WQzPViy67EBH1z3sR53ZXCVQ1RmZJ++ZHkQ0BZ78EgZdrHFBW7tm3D43yf3V8vYSeTse5f1YPCw== +"@cspell/dict-en_us@^1.2.43": + version "1.2.43" + resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-1.2.43.tgz#dae5a5cd1a47408a5d3a13c2f215793ecde5f400" + integrity sha512-WAOtAZr3rNH4zpUXSeuxEo/C65o4Xp4sVdZ9cIqI+FPU7Vrgz0wuQZIL5TwbkuGUdtQtpRfgs2kTPXzns0fjGw== "@cspell/dict-filetypes@^1.1.5": version "1.1.5" @@ -625,20 +625,20 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-1.0.12.tgz#a7236be30340ff8fe365f62c8d13121fdbe7f51c" integrity sha512-RPNn/7CSkflAWk0sbSoOkg0ORrgBARUjOW3QjB11KwV1gSu8f5W/ij/S50uIXtlrfoBLqd4OyE04jyON+g/Xfg== -"@cspell/dict-npm@^1.0.12": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.12.tgz#2d30e4580855f67e407d096ba73656e3e05b5617" - integrity sha512-UaC3SzuAHtpKl/iwhQse52Mji/2/Zn8XpOwLpYcLElURa325/1oyhO8bsgX/SWXmo7RJ1xOYv0BQkQpvMx9TOg== +"@cspell/dict-npm@^1.0.13": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-1.0.14.tgz#047043a1d44a3dfa56f33cb8070c05867050f84a" + integrity sha512-RPaU6HJR03J9pg0yCgR59X55ozLhBkWvkHR3mD++ko5hKv0IXOfbS53nQwVN9yBAWjhCREJImemWPswoVu31zg== "@cspell/dict-php@^1.0.24": version "1.0.24" resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-1.0.24.tgz#40c15a4c5e1e2deba28841e2b498595b13f0ff88" integrity sha512-vHCqETX1idT9tN1plkxUFnXMIHjbbrNOINZh1PYSvVlBrOdahSaL/g6dOJZC5QTaaidoU4WXUlgnNb/7JN4Plg== -"@cspell/dict-powershell@^1.0.15": - version "1.0.15" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.15.tgz#340b5a2a316cdadf670fe4d0fb1df01f3266cf1e" - integrity sha512-7s1s+iMnf1Sm6+LICfeFMJ79k2Ygy6dG5pRefa2iq7DxOnf4n2ZlXFBDDxKH9NcUFD2uRLqQzN48lon4roCYfw== +"@cspell/dict-powershell@^1.0.16": + version "1.0.16" + resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-1.0.16.tgz#06a2966b2dca7a0d97938ff90fcfc74354cfb7ba" + integrity sha512-cbauyYR6H53gfd/J9B3wgly9kg1joLSVxxqbry+y0BqF7FBtkctnXev2WHRbX68o6X9iQPhUz6+3zGKwFW5Stg== "@cspell/dict-python@^1.0.35": version "1.0.35" @@ -660,10 +660,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-1.0.21.tgz#bfda392329061e2352fbcd33d228617742c93831" integrity sha512-5V/R7PRbbminTpPS3ywgdAalI9BHzcEjEj9ug4kWYvBIGwSnS7T6QCFCiu+e9LvEGUqQC+NHgLY4zs1NaBj2vA== -"@cspell/dict-software-terms@^1.0.32": - version "1.0.32" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.32.tgz#21d5bdb6c21fcef423cc226857ca9dab176954da" - integrity sha512-RA2rRiw0cODQOfUJZ2817n9iu+CThpo09D5Li3+632TCDA4IjkfNYGpTegE5N3eQCPFzLJN7Oghdc7YGNut+Qg== +"@cspell/dict-software-terms@^1.0.33": + version "1.0.35" + resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-1.0.35.tgz#f3d75af834f4e051e41b85fcfc4fd092d993aef1" + integrity sha512-b2q1Ja12WivVYDMkXpix+CY+PTDOHJriEZJpDWt7AG+DhwjqjASufjfBIV7U0t0e/eV7PLzbYCj0oj9lTT5eow== "@cspell/dict-typescript@^1.0.19": version "1.0.19" @@ -787,13 +787,13 @@ jest-util "^27.0.2" slash "^3.0.0" -"@jest/core@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.0.3.tgz#b5a38675fa0466450a7fd465f4b226762cb592a2" - integrity sha512-rN8lr/OJ8iApcQUh4khnMaOCVX4oRnLwy2tPW3Vh70y62K8Da8fhkxMUq0xX9VPa4+yWUm0tGc/jUSJi+Jzuwg== +"@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== dependencies: "@jest/console" "^27.0.2" - "@jest/reporters" "^27.0.2" + "@jest/reporters" "^27.0.4" "@jest/test-result" "^27.0.2" "@jest/transform" "^27.0.2" "@jest/types" "^27.0.2" @@ -804,15 +804,15 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^27.0.2" - jest-config "^27.0.3" + 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.2" - jest-resolve-dependencies "^27.0.3" - jest-runner "^27.0.3" - jest-runtime "^27.0.3" - jest-snapshot "^27.0.2" + 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" @@ -853,10 +853,10 @@ "@jest/types" "^27.0.2" expect "^27.0.2" -"@jest/reporters@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.0.2.tgz#ad73835d1cd54da08b0998a70b14446405e8e0d9" - integrity sha512-SVQjew/kafNxSN1my4praGQP+VPVGHsU8zqiEDppLvq6j1lryIjdNb9P+bZSsKeifU4bIoaPnf9Ui0tK9WOpFA== +"@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" @@ -874,7 +874,7 @@ istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" jest-haste-map "^27.0.2" - jest-resolve "^27.0.2" + jest-resolve "^27.0.4" jest-util "^27.0.2" jest-worker "^27.0.2" slash "^3.0.0" @@ -902,15 +902,15 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.0.3": - version "27.0.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.0.3.tgz#2a8632b86a9a6f8900e514917cdab6a062e71049" - integrity sha512-DcLTzraZ8xLr5fcIl+CF14vKeBBpBrn55wFxI9Ju+dhEBdjRdJQ/Z/pLkMehkPZWIQ+rR23J8e+wFDkfjree0Q== +"@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.3" + jest-runtime "^27.0.4" "@jest/transform@^27.0.2": version "27.0.2" @@ -933,6 +933,17 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jest/types@^27.0.2": version "27.0.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.2.tgz#e153d6c46bda0f2589f0702b071f9898c7bbd37e" @@ -1629,24 +1640,24 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@microsoft/api-extractor-model@7.13.2": - version "7.13.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.2.tgz#7e640dbd421cc95a28e03c5a949d8ebcc63c936d" - integrity sha512-gA9Q8q5TPM2YYk7rLinAv9KqcodrmRC13BVmNzLswjtFxpz13lRh0BmrqD01/sddGpGMIuWFYlfUM4VSWxnggA== +"@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== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.38.0" + "@rushstack/node-core-library" "3.39.0" "@microsoft/api-extractor@^7.15.2": - version "7.15.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.2.tgz#7a06b857660e33d1cdc050d576eb6c6c05dc532a" - integrity sha512-/Y/n+QOc1vM6Vg3OAUByT/wXdZciE7jV3ay33+vxl3aKva5cNsuOauL14T7XQWUiLko3ilPwrcnFcEjzXpLsuA== + version "7.16.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.16.1.tgz#7d5490a2ce1441ab8bc7bd6866a350cf580de0d0" + integrity sha512-hKFoLdmEUbHMIH48MXzSg8rndiugrXHruMVk+BQvhu14yX3LxH9re1CKwj4vLZb7bVBn+FfaWSZ5d3ltiXvX3w== dependencies: - "@microsoft/api-extractor-model" "7.13.2" + "@microsoft/api-extractor-model" "7.13.3" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.38.0" + "@rushstack/node-core-library" "3.39.0" "@rushstack/rig-package" "0.2.12" "@rushstack/ts-command-line" "4.7.10" colors "~1.2.1" @@ -1654,7 +1665,7 @@ resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.2.4" + typescript "~4.3.2" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -1705,6 +1716,109 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@nrwl/cli@12.3.5", "@nrwl/cli@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-12.3.5.tgz#15a4011990cc8cfae660addc7abcf6a3f7402107" + integrity sha512-iAH90jevQW3G9KPtEg9b14g1zMxrsxgRYQfkZDXijx21yJGDieJh1mCIewpy5jcEBS+ODQKvant0XdyhS/kUBw== + dependencies: + "@nrwl/tao" "12.3.5" + chalk "4.1.0" + v8-compile-cache "2.3.0" + yargs "15.4.1" + yargs-parser "20.0.0" + +"@nrwl/devkit@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-12.3.5.tgz#5b1a9382f9a51f12ce133a95eb4d6731fc2cda03" + integrity sha512-bZi2WNHAAy/nSHAlA7r8zGpLuWPeurTbwBeNH9gm3It19fV5+hWoL1/pPlDBr2xEWjJQJNmWikxonxhw2ZIpGw== + dependencies: + "@nrwl/tao" "12.3.5" + ejs "^3.1.5" + ignore "^5.0.4" + semver "7.3.4" + strip-json-comments "^3.1.1" + tslib "^2.0.0" + +"@nrwl/jest@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-12.3.5.tgz#6e74902cc290b8a7c6cdcf937d4634c4befea59e" + integrity sha512-pFaDcr7tGbYQ7NrWlym0cKAXFtphqLq8KlEoWM0aQcBQxv9VZtj4N8dwYPXPMAiAGYKYqgt9e74rgvN+bGeS1g== + dependencies: + "@nrwl/devkit" "12.3.5" + jest-resolve "^26.6.2" + rxjs "^6.5.4" + strip-json-comments "^3.1.1" + tslib "^2.0.0" + +"@nrwl/linter@12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-12.3.5.tgz#3224926a936b60e31c74b63efd7c97fce511610a" + integrity sha512-6YhjlDZFb2dk0kphdLUELj99bAhG/So+CO1E8/eJsTvK4Mf7LySaTamabR9meSJW7yu2WKxiIIm4Z69IBI1bNQ== + dependencies: + "@nrwl/devkit" "12.3.5" + glob "7.1.4" + minimatch "3.0.4" + tmp "~0.2.1" + tslib "^2.0.0" + +"@nrwl/nx-cloud@^12.1.3": + version "12.1.3" + resolved "https://registry.yarnpkg.com/@nrwl/nx-cloud/-/nx-cloud-12.1.3.tgz#a22b34b787ecebade1c7fcb21e6c1cf765b80d3b" + integrity sha512-IC+CNSXGuInEnIwDS6wVl25vQJm5z9Duh1PzP5k0e30JcoUTqjL08KKwvzo8cmKpUvgLNo3rABc5J5F+fXaJGQ== + dependencies: + axios "^0.21.1" + chalk "4.1.0" + node-machine-id "^1.1.12" + rxjs "6.5.5" + strip-json-comments "^3.1.1" + tar "5.0.5" + uuid "^3.3.3" + +"@nrwl/tao@12.3.5", "@nrwl/tao@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-12.3.5.tgz#7cbc65a561e5f9255403dc55bddf0f9a6743397c" + integrity sha512-K/Q0GsrLzqXubmLgm8tFSjvrG61lQ00DrtNZ5dHywOAXREeV11A0bR7lXVDTohABk3D9Wgly5IKZPZ3iUwscsg== + dependencies: + chalk "4.1.0" + enquirer "~2.3.6" + fs-extra "^9.1.0" + rxjs "^6.5.4" + rxjs-for-await "0.0.2" + semver "7.3.4" + strip-json-comments "^3.1.1" + tmp "~0.2.1" + tslib "^2.0.0" + yargs-parser "20.0.0" + +"@nrwl/workspace@^12.3.5": + version "12.3.5" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-12.3.5.tgz#1e3c0ba31bf45ba18a958a7bf99b938631eae9eb" + integrity sha512-mawmYJBxjjiqGKQPu7bqtAhuWFj1vzK+VVUuGlItDM+mJuDFLrOZqVAQL/SJOVPS0qRpYTBiWrdF4ZsLTEa8LQ== + dependencies: + "@nrwl/cli" "12.3.5" + "@nrwl/devkit" "12.3.5" + "@nrwl/jest" "12.3.5" + "@nrwl/linter" "12.3.5" + chalk "4.1.0" + cosmiconfig "^4.0.0" + dotenv "8.2.0" + enquirer "~2.3.6" + flat "^5.0.2" + fs-extra "^9.1.0" + glob "7.1.4" + ignore "^5.0.4" + minimatch "3.0.4" + npm-run-all "^4.1.5" + open "^7.4.2" + resolve "1.17.0" + rxjs "^6.5.4" + semver "7.3.4" + strip-json-comments "^3.1.1" + tmp "~0.2.1" + tslib "^2.0.0" + yargs "15.4.1" + yargs-parser "20.0.0" + "@octokit/auth-token@^2.4.0": version "2.4.2" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" @@ -1814,10 +1928,10 @@ dependencies: "@types/node" ">= 8" -"@rushstack/node-core-library@3.38.0": - version "3.38.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.38.0.tgz#da1cc87f9ad141b06d4ce7c8eafb09b542c10e75" - integrity sha512-cmvl0yQx8sSmbuXwiRYJi8TO+jpTtrLJQ8UmFHhKvgPVJAW8cV8dnpD1Xx/BvTGrJZ2XtRAIkAhBS9okBnap4w== +"@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== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -2037,9 +2151,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@10.17.13", "@types/node@>= 8", "@types/node@^15.6.1": - version "15.6.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08" - integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA== + version "15.12.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d" + integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2084,6 +2198,13 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== +"@types/yargs@^15.0.0": + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" + integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== + dependencies: + "@types/yargs-parser" "*" + "@types/yargs@^16.0.0": version "16.0.3" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.3.tgz#4b6d35bb8e680510a7dc2308518a80ee1ef27e01" @@ -2432,6 +2553,11 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async@0.9.x: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= + async@^3.0.1: version "3.2.0" resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" @@ -2467,6 +2593,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + 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" @@ -2727,7 +2860,7 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= -callsites@^3.0.0: +callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== @@ -2788,6 +2921,14 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chalk@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^2.0.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2815,7 +2956,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -2850,6 +2991,14 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +clear-module@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/clear-module/-/clear-module-4.1.1.tgz#bf8ba3b62eb70ee1e0adec90589741425cf32db8" + integrity sha512-ng0E7LeODcT3QkazOckzZqbca+JByQy/Q2Z6qO24YsTp+pLxCfohGz2gJYJqZS0CWTX3LEUiHOqe5KlYeUbEMw== + dependencies: + parent-module "^2.0.0" + resolve-from "^5.0.0" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -3230,6 +3379,16 @@ core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + cosmiconfig@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -3256,7 +3415,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3281,59 +3440,62 @@ 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.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.5.2.tgz#b2445789239f15e541bacf787336dc5234c03421" - integrity sha512-sr8je4895+I84kSCMCqWumRyrnaun5FQT7tmsNtWHebSB3dsmJ6lli7DodBsnM+mojGg9egdeunAHWhSwjHGVQ== +cspell-glob@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.6.0.tgz#25c459d23ceae071fb845e4affc3b32d88499150" + integrity sha512-2VLuKwm7fJmB/U3Y30GXaQiqy1Zu3Qt5lQNkWYW1i1FTjp7seodTXQUUntkILTOdMGsOgCwsQmEP9WmqVkAKUg== dependencies: micromatch "^4.0.4" -cspell-io@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.5.2.tgz#293026318e7881e801c5b4484cc0a1409506a901" - integrity sha512-aeT9RGgRoWRXPkYtRN2swNokjEqo0+dXTs6brOEmM6oOOzA/xsksnDncHJeCt/EwXs/ri/eXpjLG9ObTMt1tug== +cspell-io@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.6.0.tgz#2e6463e6a83aba8c7707d09a54569d62bb95fd9d" + integrity sha512-PIUl7UNLcM3d/BNWD5TphuhxM0Dwpg+MkmahEjuvoYR0S67q6twNj5MOPfmih08KB1hkFecHZJDTkfUS/8a9Hg== dependencies: iconv-lite "^0.6.3" iterable-to-stream "^2.0.0" -cspell-lib@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.5.2.tgz#3e699b2a563d8560136a8916d307bea9922be15b" - integrity sha512-xAC/4l7QqsTowmVguzGJMhVXzb+uQcHACDpZcKcujYRnwgGOqonNfrN8kq8xmInVo36P621Frx8aKKgaP6A4Ew== +cspell-lib@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.6.0.tgz#913e5ccdc12f4d333e8611d70eab5cf8f37294a9" + integrity sha512-Knep49uDKH/UWKrkRrwxUzo3EB8gDIL47ikJk9KMcT7EynYW8EJmoeRqDCMbagmBSID8FEHsuDV3SHR9q0FYIw== dependencies: - "@cspell/cspell-bundled-dicts" "^5.5.2" - "@cspell/cspell-types" "^5.5.2" + "@cspell/cspell-bundled-dicts" "^5.6.0" + "@cspell/cspell-types" "^5.6.0" + clear-module "^4.1.1" comment-json "^4.1.0" configstore "^5.0.1" cosmiconfig "^7.0.0" - cspell-glob "^5.5.2" - cspell-io "^5.5.2" - cspell-trie-lib "^5.5.2" + cspell-glob "^5.6.0" + cspell-io "^5.6.0" + cspell-trie-lib "^5.6.0" + find-up "^5.0.0" fs-extra "^10.0.0" gensequence "^3.1.1" + import-fresh "^3.3.0" resolve-from "^5.0.0" resolve-global "^1.0.0" vscode-uri "^3.0.2" -cspell-trie-lib@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.5.2.tgz#54f88663332213afd15be98a16007d249b4bdb3d" - integrity sha512-xLXOaoCHUPTxWnYel8zjKRxRlRQd/S8jjg7kXHZt8XOkWNRGCjeF/Itgb77+zNDoknlH9OphmwBjYwxXAWC14Q== +cspell-trie-lib@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.6.0.tgz#57199083f715a435d995e02f765d7435d65bc9c9" + integrity sha512-ZnEiKgWQv+D0HWQssSwDReTVRSXK8stl8meyu8To0Tdm/y1gTHx3JWhdBToRMFSmodLARVu4hp7mIArzcAyO1g== dependencies: fs-extra "^10.0.0" gensequence "^3.1.1" cspell@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.5.2.tgz#a778efb24006e2a552aab2c52ce23c753d64ac68" - integrity sha512-iklHcVuV+hfzeOtDcoAVBtrujhIMMLJaZRlaNTxsawNNnD/BuYljicy1CkHH1TfD4Bygj3eAIPsVtPmShyLSoA== + version "5.6.0" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.6.0.tgz#5abb52081c9386e846a989b755486a87dbb7019d" + integrity sha512-keruL7u2yKuWAOW28C6NHknyHX3zpY3PtIobaS8bZ2REGVepFi28oES3S5ZquK/fLVy9WdsbUCg9pA/sUMmIAg== dependencies: - "@cspell/cspell-types" "^5.5.2" + "@cspell/cspell-types" "^5.6.0" chalk "^4.1.1" commander "^7.2.0" comment-json "^4.1.0" - cspell-glob "^5.5.2" - cspell-lib "^5.5.2" + cspell-glob "^5.6.0" + cspell-lib "^5.6.0" fs-extra "^10.0.0" get-stdin "^8.0.0" glob "^7.1.7" @@ -3648,6 +3810,11 @@ 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== + downlevel-dts@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.7.0.tgz#155c24310dad8a4820ad077e64b15a8c461aa932" @@ -3680,6 +3847,13 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ejs@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== + dependencies: + jake "^10.6.1" + electron-to-chromium@^1.3.723: version "1.3.736" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz#f632d900a1f788dab22fec9c62ec5c9c8f0c4052" @@ -3714,7 +3888,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -4209,6 +4383,13 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +filelist@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== + dependencies: + minimatch "^3.0.4" + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -4295,6 +4476,11 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" @@ -4308,6 +4494,11 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" +follow-redirects@^1.10.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" + integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -4369,7 +4560,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^9.0.0: +fs-extra@^9.0.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== @@ -4395,6 +4586,13 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -4926,7 +5124,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.5, ignore@^5.1.4, ignore@~5.1.8: +ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.4, ignore@~5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== @@ -4947,6 +5145,14 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-fresh@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + 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" @@ -5186,6 +5392,11 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -5367,6 +5578,13 @@ is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -5440,6 +5658,16 @@ iterable-to-stream@^2.0.0: resolved "https://registry.yarnpkg.com/iterable-to-stream/-/iterable-to-stream-2.0.0.tgz#8cc654ab9b1011dc138e681fee2c0f0bb3cc7e3c" integrity sha512-efkLePxXjJk92hvN+2rS3tGJTRn8/tqXjmZvPI6LQ29xCj2sUF4zW8hkMsVe3jpTkxtMZ89xsKnz9FaRqNWM6g== +jake@^10.6.1: + version "10.8.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" + integrity sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A== + dependencies: + async "0.9.x" + chalk "^2.4.2" + 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" @@ -5449,10 +5677,10 @@ jest-changed-files@^27.0.2: execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.0.3.tgz#32006967de484e03589da944064d72e172ce3261" - integrity sha512-tdMfzs7SgD5l7jRcI1iB3vtQi5fHwCgo4RlO8bzZnYc05PZ+tlAOMZeS8eGYkZ2tPaRY/aRLMFWQp/8zXBrolQ== +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" @@ -5466,39 +5694,39 @@ jest-circus@^27.0.3: jest-each "^27.0.2" jest-matcher-utils "^27.0.2" jest-message-util "^27.0.2" - jest-runtime "^27.0.3" - jest-snapshot "^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-cli@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.0.3.tgz#b733871acb526054a0f8c971d0466595c5f8316d" - integrity sha512-7bt9Sgv4nWH5pUnyJfdLf8CHWfo4+7lSPxeBwQx4r0vBj9jweJam/piE2U91SXtQI+ckm+TIN97OVnqIYpVhSg== +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== dependencies: - "@jest/core" "^27.0.3" + "@jest/core" "^27.0.4" "@jest/test-result" "^27.0.2" "@jest/types" "^27.0.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.0.3" + jest-config "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" prompts "^2.0.1" yargs "^16.0.3" -jest-config@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.0.3.tgz#31871583573c6d669dcdb5bb2d1a8738f3b91c20" - integrity sha512-zgtI2YQo+ekKsmYNyDlXFY/7w7WWBSJFoj/WRe173WB88CDUrEYWr0sLdbLOQe+sRu6l1Y2S0MCS6BOJm5jkoA== +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.3" + "@jest/test-sequencer" "^27.0.4" "@jest/types" "^27.0.2" babel-jest "^27.0.2" chalk "^4.0.0" @@ -5506,14 +5734,14 @@ jest-config@^27.0.3: glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.0.3" + 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.3" + jest-jasmine2 "^27.0.4" jest-regex-util "^27.0.1" - jest-resolve "^27.0.2" - jest-runner "^27.0.3" + jest-resolve "^27.0.4" + jest-runner "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" micromatch "^4.0.4" @@ -5597,10 +5825,10 @@ jest-haste-map@^27.0.2: optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.0.3.tgz#fa6f6499566ea1b01b68b3ad13f49d1592b02c85" - integrity sha512-odJ2ia8P5c+IsqOcWJPmku4AqbXIfTVLRjYTKHri3TEvbmTdLw0ghy13OAPIl/0v7cVH0TURK7+xFOHKDLvKIA== +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" @@ -5615,8 +5843,8 @@ jest-jasmine2@^27.0.3: jest-each "^27.0.2" jest-matcher-utils "^27.0.2" jest-message-util "^27.0.2" - jest-runtime "^27.0.3" - jest-snapshot "^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" @@ -5672,14 +5900,28 @@ jest-regex-util@^27.0.1: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.1.tgz#69d4b1bf5b690faa3490113c47486ed85dd45b68" integrity sha512-6nY6QVcpTgEKQy1L41P4pr3aOddneK17kn3HJw6SdwGiKfgCGTvH02hVXL0GU8GEKtPH83eD2DIDgxHXOxVohQ== -jest-resolve-dependencies@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.3.tgz#7e258f7d0458bb910855f8a50f5c1e9d92c319dc" - integrity sha512-HdjWOvFAgT5CYChF2eiBN2rRKicjaTCCtA3EtH47REIdGzEHGUhYrWYgLahXsiOovvWN6edhcHL5WCa3gbc04A== +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== dependencies: "@jest/types" "^27.0.2" jest-regex-util "^27.0.1" - jest-snapshot "^27.0.2" + jest-snapshot "^27.0.4" + +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== + dependencies: + "@jest/types" "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.2" + jest-util "^26.6.2" + read-pkg-up "^7.0.1" + resolve "^1.18.1" + slash "^3.0.0" jest-resolve@^27.0.2: version "27.0.2" @@ -5696,10 +5938,25 @@ jest-resolve@^27.0.2: resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.0.3.tgz#d9747af3bee5a6ffaeb9e10b653263b780258b54" - integrity sha512-zH23uIIh1ro1JCD7XX1bQ0bQwXEsBzLX2UJVE/AVLsk4YJRmTfyXIzzRzBWRdnMHHg1NWkJ4fGs7eFP15IqZpQ== +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" @@ -5712,20 +5969,22 @@ jest-runner@^27.0.3: 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.2" - jest-runtime "^27.0.3" + 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-runtime@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.0.3.tgz#32499c1047e5d953cfbb67fe790ab0167a614d28" - integrity sha512-k1Hl2pWWHBkSXdCggX2lyLRuDnnnmMlnJd+DPLb8LmmAeHW87WgGC6TplD377VxY3KQu73sklkhGUIdwFgsRVQ== +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" @@ -5746,8 +6005,8 @@ jest-runtime@^27.0.3: jest-message-util "^27.0.2" jest-mock "^27.0.3" jest-regex-util "^27.0.1" - jest-resolve "^27.0.2" - jest-snapshot "^27.0.2" + jest-resolve "^27.0.4" + jest-snapshot "^27.0.4" jest-util "^27.0.2" jest-validate "^27.0.2" slash "^3.0.0" @@ -5792,6 +6051,36 @@ 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-specific-snapshot@*, jest-specific-snapshot@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/jest-specific-snapshot/-/jest-specific-snapshot-5.0.0.tgz#48f72d5613af7f3e30df75b6b3534db6bab32ea0" @@ -5799,6 +6088,18 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + 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" @@ -5846,13 +6147,13 @@ jest-worker@^27.0.2: supports-color "^8.0.0" jest@^27.0.3: - version "27.0.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.3.tgz#0b4ac738c93612f778d58250aee026220487e5a4" - integrity sha512-0G9+QqXFIZWgf5rs3yllpaA+13ZawVHfyuhuCV1EnoFbX++rVMRrYWCAnk+dfhwyv9/VTQvn+XG969u8aPRsBg== + version "27.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-27.0.4.tgz#91d4d564b36bcf93b98dac1ab19f07089e670f53" + integrity sha512-Px1iKFooXgGSkk1H8dJxxBIrM3tsc5SIuI4kfKYK2J+4rvCvPGr/cXktxh0e9zIPQ5g09kOMNfHQEmusBUf/ZA== dependencies: - "@jest/core" "^27.0.3" + "@jest/core" "^27.0.4" import-local "^3.0.2" - jest-cli "^27.0.3" + jest-cli "^27.0.4" jju@~1.4.0: version "1.4.0" @@ -5864,7 +6165,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: +js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6457,15 +6758,20 @@ markdownlint@~0.23.1: markdown-it "12.0.4" marked@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.6.tgz#c3ab1403b9b70f26acd92590fc272eb1718e778c" - integrity sha512-S2mYj0FzTQa0dLddssqwRVW4EOJOVJ355Xm2Vcbm+LU7GQRGWvwbO5K87OaPSOux2AwTSgtPPaXmc8sDPrhn2A== + version "2.0.7" + resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1" + integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ== mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -6583,7 +6889,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.4, minimatch@~3.0.4: +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -6620,6 +6926,13 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -6627,6 +6940,14 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" +minizlib@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -6794,6 +7115,11 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= +node-machine-id@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -6886,6 +7212,21 @@ npm-pick-manifest@^3.0.0: npm-package-arg "^6.0.0" semver "^5.4.1" +npm-run-all@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -7016,6 +7357,14 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -7194,6 +7543,13 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parent-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-2.0.0.tgz#fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708" + integrity sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg== + dependencies: + callsites "^3.1.0" + parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" @@ -7335,6 +7691,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== +pidtree@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" + integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -7425,9 +7786,9 @@ prelude-ls@~1.1.2: integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prettier@*, prettier@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" - integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== + version "2.3.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" + integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== pretty-format@*, pretty-format@^26.0.0, pretty-format@^27.0.0, pretty-format@^27.0.2: version "27.0.2" @@ -7779,7 +8140,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.2: +require-from-string@^2.0.1, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -7845,7 +8206,14 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3.2: +resolve@1.17.0, resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -7853,13 +8221,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.3. is-core-module "^2.2.0" path-parse "^1.0.6" -resolve@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - resolve@~1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" @@ -7930,7 +8291,19 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: +rxjs-for-await@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b" + integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== + +rxjs@6.5.5: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + +rxjs@^6.4.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.7: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -7976,6 +8349,13 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + semver@7.3.5, semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@~7.3.0: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" @@ -8034,6 +8414,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.6.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== + shelljs@^0.8.3: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" @@ -8333,6 +8718,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string.prototype.padend@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz#6858ca4f35c5268ebd5e8615e1327d55f59ee311" + integrity sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" @@ -8516,6 +8910,18 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" +tar@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.5.tgz#03fcdb7105bc8ea3ce6c86642b9c942495b04f93" + integrity sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ== + dependencies: + chownr "^1.1.3" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.0" + mkdirp "^0.5.0" + yallist "^4.0.0" + tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -8625,7 +9031,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.1: +tmp@^0.2.1, tmp@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -8726,9 +9132,9 @@ trim-off-newlines@^1.0.0: integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= ts-jest@^27.0.1: - version "27.0.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.0.2.tgz#acc1525d5fd25c107c777c3b80a11365db579aa1" - integrity sha512-pozjHOOfm+sbv9kXCvTFVyDntWvuJztzkNFql/akD75hSMZ2jsbidVauOhBRImAopXohqcLtPK/NTTIS8Y49Ug== + 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== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -8772,6 +9178,11 @@ tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== +tslib@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" + integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== + tslint@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" @@ -8878,7 +9289,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4: +typescript@*, typescript@4.3.2, "typescript@>=3.3.1 <4.4.0", typescript@^4.1.0-dev.20201026, typescript@~4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== @@ -9013,11 +9424,16 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +v8-compile-cache@2.3.0: + 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" @@ -9302,9 +9718,9 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== y18n@^5.0.5: version "5.0.5" @@ -9326,6 +9742,11 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yargs-parser@20.0.0: + version "20.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.0.0.tgz#c65a1daaa977ad63cebdd52159147b789a4e19a9" + integrity sha512-8eblPHTL7ZWRkyjIZJjnGf+TijiKJSwA24svzLRVvtgoi/RZiKa9fFQTrlx0OKLnyHSdt/enrdadji6WFfESVA== + yargs-parser@20.x, yargs-parser@^20.2.2: version "20.2.6" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.6.tgz#69f920addf61aafc0b8b89002f5d66e28f2d8b20" @@ -9347,39 +9768,39 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^14.2.2: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== +yargs@15.4.1, yargs@^15.0.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== dependencies: - cliui "^5.0.0" + cliui "^6.0.0" decamelize "^1.2.0" - find-up "^3.0.0" + find-up "^4.1.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^3.0.0" + string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^15.0.1" + yargs-parser "^18.1.2" -yargs@^15.0.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== +yargs@^14.2.2: + version "14.2.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== dependencies: - cliui "^6.0.0" + cliui "^5.0.0" decamelize "^1.2.0" - find-up "^4.1.0" + find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^4.2.0" + string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.2" + yargs-parser "^15.0.1" yargs@^16.0.3, yargs@^16.2.0: version "16.2.0"