From 391566172dbc6013be79952fc68a588bf653fa8d Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 13 Feb 2023 18:40:49 +1030 Subject: [PATCH] feat: bump ts-api-utils to v0.0.21 (#6459) --- packages/eslint-plugin/package.json | 2 +- packages/eslint-plugin/src/rules/await-thenable.ts | 2 +- packages/eslint-plugin/src/rules/dot-notation.ts | 3 +-- .../src/rules/explicit-function-return-type.ts | 2 +- .../src/rules/no-confusing-void-expression.ts | 2 +- packages/eslint-plugin/src/rules/no-dynamic-delete.ts | 2 +- packages/eslint-plugin/src/rules/no-floating-promises.ts | 2 +- packages/eslint-plugin/src/rules/no-implied-eval.ts | 2 +- .../src/rules/no-meaningless-void-operator.ts | 2 +- packages/eslint-plugin/src/rules/no-misused-promises.ts | 2 +- .../src/rules/no-redundant-type-constituents.ts | 2 +- .../src/rules/no-unnecessary-boolean-literal-compare.ts | 2 +- .../eslint-plugin/src/rules/no-unnecessary-condition.ts | 2 +- .../eslint-plugin/src/rules/no-unnecessary-qualifier.ts | 2 +- .../src/rules/no-unnecessary-type-arguments.ts | 2 +- .../src/rules/no-unnecessary-type-assertion.ts | 2 +- packages/eslint-plugin/src/rules/no-unsafe-assignment.ts | 2 +- packages/eslint-plugin/src/rules/no-unsafe-call.ts | 2 +- .../eslint-plugin/src/rules/no-unsafe-member-access.ts | 2 +- packages/eslint-plugin/src/rules/no-unsafe-return.ts | 2 +- .../src/rules/non-nullable-type-assertion-style.ts | 2 +- .../eslint-plugin/src/rules/prefer-nullish-coalescing.ts | 2 +- packages/eslint-plugin/src/rules/prefer-readonly.ts | 2 +- packages/eslint-plugin/src/rules/prefer-regexp-exec.ts | 2 +- packages/eslint-plugin/src/rules/require-await.ts | 2 +- packages/eslint-plugin/src/rules/return-await.ts | 2 +- .../eslint-plugin/src/rules/strict-boolean-expressions.ts | 4 ++-- .../src/rules/switch-exhaustiveness-check.ts | 2 +- packages/eslint-plugin/src/rules/unbound-method.ts | 2 +- packages/type-utils/package.json | 2 +- packages/type-utils/src/containsAllTypesByName.ts | 2 +- packages/type-utils/src/getContextualType.ts | 2 +- packages/type-utils/src/isTypeReadonly.ts | 2 +- packages/type-utils/src/isUnsafeAssignment.ts | 2 +- packages/type-utils/src/predicates.ts | 2 +- packages/type-utils/src/typeFlagUtils.ts | 2 +- packages/typescript-estree/package.json | 2 +- packages/typescript-estree/src/convert-comments.ts | 2 +- yarn.lock | 8 ++++---- 39 files changed, 43 insertions(+), 44 deletions(-) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 781ee37a54e..c8a2a2cb340 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -53,7 +53,7 @@ "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", "semver": "^7.3.7", - "ts-api-tools": "^0.0.15" + "ts-api-utils": "^0.0.21" }, "devDependencies": { "@types/debug": "*", diff --git a/packages/eslint-plugin/src/rules/await-thenable.ts b/packages/eslint-plugin/src/rules/await-thenable.ts index 33678990522..940ddb75662 100644 --- a/packages/eslint-plugin/src/rules/await-thenable.ts +++ b/packages/eslint-plugin/src/rules/await-thenable.ts @@ -1,4 +1,4 @@ -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/dot-notation.ts b/packages/eslint-plugin/src/rules/dot-notation.ts index df6a502115d..400598b4f97 100644 --- a/packages/eslint-plugin/src/rules/dot-notation.ts +++ b/packages/eslint-plugin/src/rules/dot-notation.ts @@ -1,5 +1,5 @@ import type { TSESTree } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import type { @@ -77,7 +77,6 @@ export default createRule({ (options.allowIndexSignaturePropertyAccess ?? false) || tools.isCompilerOptionEnabled( services.program.getCompilerOptions(), - // @ts-expect-error - TS is refining the type to never for some reason 'noPropertyAccessFromIndexSignature', ); diff --git a/packages/eslint-plugin/src/rules/explicit-function-return-type.ts b/packages/eslint-plugin/src/rules/explicit-function-return-type.ts index 254c48a0965..97905879dd7 100644 --- a/packages/eslint-plugin/src/rules/explicit-function-return-type.ts +++ b/packages/eslint-plugin/src/rules/explicit-function-return-type.ts @@ -167,7 +167,7 @@ export default util.createRule({ | TSESTree.FunctionExpression | TSESTree.FunctionDeclaration, ): boolean { - return node.parent!.type === AST_NODE_TYPES.CallExpression; + return node.parent.type === AST_NODE_TYPES.CallExpression; } return { diff --git a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts index 77bdb724ef9..0567ea810b9 100644 --- a/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts +++ b/packages/eslint-plugin/src/rules/no-confusing-void-expression.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-dynamic-delete.ts b/packages/eslint-plugin/src/rules/no-dynamic-delete.ts index 325508ff9b6..6cf68bf2764 100644 --- a/packages/eslint-plugin/src/rules/no-dynamic-delete.ts +++ b/packages/eslint-plugin/src/rules/no-dynamic-delete.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index 21006caf137..126b0a0188a 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-implied-eval.ts b/packages/eslint-plugin/src/rules/no-implied-eval.ts index f14742a3c7a..b0a97efb69c 100644 --- a/packages/eslint-plugin/src/rules/no-implied-eval.ts +++ b/packages/eslint-plugin/src/rules/no-implied-eval.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts index 7cfb1822fc7..528344ea699 100644 --- a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts +++ b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { ESLintUtils } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-misused-promises.ts b/packages/eslint-plugin/src/rules/no-misused-promises.ts index 21f32539603..b26f638743a 100644 --- a/packages/eslint-plugin/src/rules/no-misused-promises.ts +++ b/packages/eslint-plugin/src/rules/no-misused-promises.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts b/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts index ae5af074b0b..b19186fc8cd 100644 --- a/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts +++ b/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts @@ -1,5 +1,5 @@ import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts index 36cdd33f7ef..c88ac20675b 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-boolean-literal-compare.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index e9de767edb9..b060ba86cd6 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts index 56c491e05b0..34675bc4f8e 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-qualifier.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts index 2508b0ddaf7..beeea459717 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-arguments.ts @@ -1,5 +1,5 @@ import type { TSESTree } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts index 6dc0cefabdc..c484fe633f0 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts index c3e3d432f36..ec7660d4f22 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-assignment.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import type * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unsafe-call.ts b/packages/eslint-plugin/src/rules/no-unsafe-call.ts index 9b2c08cb10e..6bee1215694 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-call.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-call.ts @@ -1,5 +1,5 @@ import type { TSESTree } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as util from '../util'; import { getThisExpression } from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts index cc8f57bb4f3..ca9174b99be 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-member-access.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as util from '../util'; import { getThisExpression } from '../util'; diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index dc10a68b73b..033aec99c9a 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as util from '../util'; import { getThisExpression } from '../util'; diff --git a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts index bda463dd7d9..70b25645524 100644 --- a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts +++ b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index af72186360c..d4078a87e06 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index 931fae7f6e0..5a22a3f95d7 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES, ASTUtils } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts index df72cfda39a..4d5b858dc2c 100644 --- a/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts +++ b/packages/eslint-plugin/src/rules/prefer-regexp-exec.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import type * as ts from 'typescript'; import { diff --git a/packages/eslint-plugin/src/rules/require-await.ts b/packages/eslint-plugin/src/rules/require-await.ts index 96d1f741e8d..c70af4e9972 100644 --- a/packages/eslint-plugin/src/rules/require-await.ts +++ b/packages/eslint-plugin/src/rules/require-await.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import type * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index ce71a6bf506..8bf64156ce6 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -1,6 +1,6 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts index 6425ea8bbfb..43802acf1ee 100644 --- a/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts +++ b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts @@ -3,7 +3,7 @@ import type { TSESTree, } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; @@ -818,7 +818,7 @@ export default util.createRule({ // If incoming type is either "true" or "false", there will be one type // object with intrinsicName set accordingly // If incoming type is boolean, there will be two type objects with - // intrinsicName set "true" and "false" each because of ts-api-tools.unionTypeParts() + // intrinsicName set "true" and "false" each because of ts-api-utils.unionTypeParts() if (booleans.length === 1) { tools.isBooleanLiteralType(booleans[0], true) ? variantTypes.add('truthy boolean') diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 4a5e1f7bf53..6f85e4818ea 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -1,5 +1,5 @@ import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { diff --git a/packages/eslint-plugin/src/rules/unbound-method.ts b/packages/eslint-plugin/src/rules/unbound-method.ts index 1e44957ed81..966664d9d6a 100644 --- a/packages/eslint-plugin/src/rules/unbound-method.ts +++ b/packages/eslint-plugin/src/rules/unbound-method.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import * as util from '../util'; diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index fd9faac647d..1bb59c566f7 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -42,7 +42,7 @@ "@typescript-eslint/typescript-estree": "5.51.0", "@typescript-eslint/utils": "5.51.0", "debug": "^4.3.4", - "ts-api-tools": "^0.0.15" + "ts-api-utils": "^0.0.21" }, "devDependencies": { "@typescript-eslint/parser": "5.51.0", diff --git a/packages/type-utils/src/containsAllTypesByName.ts b/packages/type-utils/src/containsAllTypesByName.ts index 715686fe3f7..b35e91e1229 100644 --- a/packages/type-utils/src/containsAllTypesByName.ts +++ b/packages/type-utils/src/containsAllTypesByName.ts @@ -1,4 +1,4 @@ -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { isTypeFlagSet } from './typeFlagUtils'; diff --git a/packages/type-utils/src/getContextualType.ts b/packages/type-utils/src/getContextualType.ts index b19ceb936bd..373729ad1dc 100644 --- a/packages/type-utils/src/getContextualType.ts +++ b/packages/type-utils/src/getContextualType.ts @@ -1,4 +1,4 @@ -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; /** diff --git a/packages/type-utils/src/isTypeReadonly.ts b/packages/type-utils/src/isTypeReadonly.ts index 649a38f40a2..825aa38b7c5 100644 --- a/packages/type-utils/src/isTypeReadonly.ts +++ b/packages/type-utils/src/isTypeReadonly.ts @@ -1,5 +1,5 @@ import { ESLintUtils } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { getTypeOfPropertyOfType } from './propertyTypes'; diff --git a/packages/type-utils/src/isUnsafeAssignment.ts b/packages/type-utils/src/isUnsafeAssignment.ts index e14370da7a9..be92fcaace1 100644 --- a/packages/type-utils/src/isUnsafeAssignment.ts +++ b/packages/type-utils/src/isUnsafeAssignment.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import type * as ts from 'typescript'; import { isTypeAnyType, isTypeUnknownType } from './predicates'; diff --git a/packages/type-utils/src/predicates.ts b/packages/type-utils/src/predicates.ts index 281ad0a188a..fa4524e7808 100644 --- a/packages/type-utils/src/predicates.ts +++ b/packages/type-utils/src/predicates.ts @@ -1,5 +1,5 @@ import debug from 'debug'; -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { getTypeArguments } from './getTypeArguments'; diff --git a/packages/type-utils/src/typeFlagUtils.ts b/packages/type-utils/src/typeFlagUtils.ts index 018c2f4de73..7e2003f6fe2 100644 --- a/packages/type-utils/src/typeFlagUtils.ts +++ b/packages/type-utils/src/typeFlagUtils.ts @@ -1,4 +1,4 @@ -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; /** diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index c9b2183cab0..4414257fee6 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -48,7 +48,7 @@ "globby": "^11.1.0", "is-glob": "^4.0.3", "semver": "^7.3.7", - "ts-api-tools": "^0.0.15" + "ts-api-utils": "^0.0.21" }, "devDependencies": { "@babel/code-frame": "*", diff --git a/packages/typescript-estree/src/convert-comments.ts b/packages/typescript-estree/src/convert-comments.ts index 0ffcd226bb0..dec2d5bcaa5 100644 --- a/packages/typescript-estree/src/convert-comments.ts +++ b/packages/typescript-estree/src/convert-comments.ts @@ -1,4 +1,4 @@ -import * as tools from 'ts-api-tools'; +import * as tools from 'ts-api-utils'; import * as ts from 'typescript'; import { getLocFor } from './node-utils'; diff --git a/yarn.lock b/yarn.lock index caba75cfc76..a1b168e17d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13659,10 +13659,10 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -ts-api-tools@^0.0.15: - version "0.0.15" - resolved "https://registry.yarnpkg.com/ts-api-tools/-/ts-api-tools-0.0.15.tgz#d16750e0fdf7816a9b91da6af9db5b5167bfca80" - integrity sha512-aNaUSL3j1IvX2xRahC86OHLLhtuEEKful+HfgZs1TcYr2ZcukrENRxDIP1mjXdMojnfr2VflHqsFaaTp1m/bLw== +ts-api-utils@^0.0.21: + version "0.0.21" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-0.0.21.tgz#d5e58e3200f848123a89f3987d6ee9b613642d01" + integrity sha512-Dr9RHp5+4jLF+2wARhwQO1Z/6BFVsKigZhascnbsbyzSEDKO9qGlN7RgsquqHwP0lHiQmLJFYiGCLXTmcDC9Wg== ts-essentials@^2.0.3: version "2.0.12"