From b287cf9fa1727b7acc074de071c49e50d34a193f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:46:36 -0800 Subject: [PATCH] Move TypeScript installer code to dtslint (#964) --- .changeset/dull-kings-decide.md | 6 ++++++ packages/dtslint/package.json | 1 + packages/dtslint/src/lint.ts | 3 ++- packages/{utils => dtslint}/src/typescript-installer.ts | 0 packages/utils/package.json | 2 -- packages/utils/src/index.ts | 1 - pnpm-lock.yaml | 9 +++------ 7 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 .changeset/dull-kings-decide.md rename packages/{utils => dtslint}/src/typescript-installer.ts (100%) diff --git a/.changeset/dull-kings-decide.md b/.changeset/dull-kings-decide.md new file mode 100644 index 0000000000..9ecedc4d60 --- /dev/null +++ b/.changeset/dull-kings-decide.md @@ -0,0 +1,6 @@ +--- +"@definitelytyped/dtslint": patch +"@definitelytyped/utils": patch +--- + +Move TypeScript installer code to dtslint diff --git a/packages/dtslint/package.json b/packages/dtslint/package.json index ee8dbc2c82..e4a0c31951 100644 --- a/packages/dtslint/package.json +++ b/packages/dtslint/package.json @@ -25,6 +25,7 @@ "@arethetypeswrong/cli": "0.14.1", "@arethetypeswrong/core": "0.14.1", "@definitelytyped/header-parser": "workspace:*", + "@definitelytyped/typescript-packages": "workspace:*", "@definitelytyped/typescript-versions": "workspace:*", "@definitelytyped/utils": "workspace:*", "@typescript-eslint/eslint-plugin": "^6.19.0", diff --git a/packages/dtslint/src/lint.ts b/packages/dtslint/src/lint.ts index c9b56dd8c4..a7e90848ee 100644 --- a/packages/dtslint/src/lint.ts +++ b/packages/dtslint/src/lint.ts @@ -1,11 +1,12 @@ import { TypeScriptVersion } from "@definitelytyped/typescript-versions"; -import { typeScriptPath, withoutStart } from "@definitelytyped/utils"; +import { withoutStart } from "@definitelytyped/utils"; import assert = require("assert"); import { join as joinPaths, normalize, resolve } from "path"; import { ESLint } from "eslint"; import * as TsType from "typescript"; import { createProgram } from "./createProgram"; +import { typeScriptPath } from "./typescript-installer"; export async function lint( dirPath: string, diff --git a/packages/utils/src/typescript-installer.ts b/packages/dtslint/src/typescript-installer.ts similarity index 100% rename from packages/utils/src/typescript-installer.ts rename to packages/dtslint/src/typescript-installer.ts diff --git a/packages/utils/package.json b/packages/utils/package.json index 85dc11e3da..efa180cc88 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -19,8 +19,6 @@ "url": "https://github.com/microsoft/DefinitelyTyped-tools/issues" }, "dependencies": { - "@definitelytyped/typescript-packages": "workspace:*", - "@definitelytyped/typescript-versions": "workspace:*", "@qiwi/npm-registry-client": "^8.9.1", "@types/node": "^18.19.7", "cachedir": "^2.0.0", diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index a6bbdd9b91..e81d162131 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -8,4 +8,3 @@ export * from "./miscellany"; export * from "./npm"; export * from "./process"; export * from "./progress"; -export * from "./typescript-installer"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c6c097f5e..611f9cb6f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -149,6 +149,9 @@ importers: '@definitelytyped/header-parser': specifier: workspace:* version: link:../header-parser + '@definitelytyped/typescript-packages': + specifier: workspace:* + version: link:../typescript-packages '@definitelytyped/typescript-versions': specifier: workspace:* version: link:../typescript-versions @@ -388,12 +391,6 @@ importers: packages/utils: dependencies: - '@definitelytyped/typescript-packages': - specifier: workspace:* - version: link:../typescript-packages - '@definitelytyped/typescript-versions': - specifier: workspace:* - version: link:../typescript-versions '@qiwi/npm-registry-client': specifier: ^8.9.1 version: 8.9.1