Delete installDependencies entirely

It's only one line of code now
This commit is contained in:
Nathan Shively-Sanders
2023-04-10 10:50:41 -07:00
parent da605a2a62
commit 3d5cd40eae
2 changed files with 2 additions and 7 deletions

View File

@@ -1,5 +0,0 @@
import { execAndThrowErrors } from "@definitelytyped/utils";
export async function installDependencies(definitelyTypedPath: string): Promise<string> {
return execAndThrowErrors("pnpm install", definitelyTypedPath);
}

View File

@@ -4,7 +4,7 @@ import { execSync } from "child_process";
import { PerformanceObserver, performance } from "perf_hooks";
import { Node, SourceFile, Extension, CompilerOptions } from "typescript";
import { LanguageServiceBenchmark, PackageBenchmark, LanguageServiceSingleMeasurement, toPackageKey } from "../common";
import { installDependencies } from "./installDependencies";
import { execAndThrowErrors } from "@definitelytyped/utils";
import { getParsedCommandLineForPackage } from "./getParsedCommandLineForPackage";
import {
measureLanguageServiceWorkerFilename,
@@ -67,7 +67,7 @@ export async function measurePerf({
const packagePath = path.join(definitelyTypedRootPath, "types", typings.subDirectoryPath);
const typesVersion = getLatestTypesVersionForTypeScriptVersion(typings.typesVersions, typeScriptVersion);
const latestTSTypesDir = path.resolve(packagePath, typesVersion ? `ts${typesVersion}` : ".");
await installDependencies(definitelyTypedRootPath);
await execAndThrowErrors("pnpm install", definitelyTypedRootPath);
const commandLine = getParsedCommandLineForPackage(ts, latestTSTypesDir);
const testPaths = getTestFileNames(commandLine.fileNames);