mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
parent
d89076381e
commit
fa2ad1a35a
@ -39,7 +39,7 @@ const execTsc = (lkg, ...args) =>
|
||||
exec(process.execPath,
|
||||
[resolve(findUpRoot(), lkg ? "./lib/tsc" : "./built/local/tsc"),
|
||||
"-b", ...args],
|
||||
{ hidePrompt: true })
|
||||
{ hidePrompt: true });
|
||||
|
||||
const projectBuilder = new ProjectQueue((projects, lkg, force) => execTsc(lkg, ...(force ? ["--force"] : []), ...projects));
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
namespace findUpDir {
|
||||
import { join, resolve, dirname } from "path";
|
||||
import { existsSync } from "fs";
|
||||
namespace Utils {
|
||||
const { join, resolve, dirname } = require("path") as typeof import("path");
|
||||
const { existsSync } = require("fs") as typeof import("fs");
|
||||
|
||||
// search directories upward to avoid hard-wired paths based on the
|
||||
// build tree (same as scripts/build/findUpDir.js)
|
||||
|
||||
export function findUpFile(name: string) {
|
||||
export function findUpFile(name: string): string {
|
||||
let dir = __dirname;
|
||||
while (true) {
|
||||
const fullPath = join(dir, name);
|
||||
|
||||
@ -41,6 +41,7 @@ namespace Harness {
|
||||
export const virtualFileSystemRoot = "/";
|
||||
|
||||
function createNodeIO(): IO {
|
||||
const workspaceRoot = Utils.findUpRoot();
|
||||
let fs: any, pathModule: any;
|
||||
if (require) {
|
||||
fs = require("fs");
|
||||
@ -154,7 +155,7 @@ namespace Harness {
|
||||
log: s => console.log(s),
|
||||
args: () => ts.sys.args,
|
||||
getExecutingFilePath: () => ts.sys.getExecutingFilePath(),
|
||||
getWorkspaceRoot: () => vpath.resolve(__dirname, "../.."),
|
||||
getWorkspaceRoot: () => workspaceRoot,
|
||||
exit: exitCode => ts.sys.exit(exitCode),
|
||||
readDirectory: (path, extension, exclude, include, depth) => ts.sys.readDirectory(path, extension, exclude, include, depth),
|
||||
getAccessibleFileSystemEntries,
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
"evaluatorImpl.ts",
|
||||
"fakesHosts.ts",
|
||||
"client.ts",
|
||||
"findUpDir.ts",
|
||||
|
||||
"runnerbase.ts",
|
||||
"sourceMapRecorder.ts",
|
||||
|
||||
@ -14,7 +14,7 @@ namespace Harness.Parallel.Host {
|
||||
const { statSync } = require("fs") as typeof import("fs");
|
||||
|
||||
// NOTE: paths for module and types for FailedTestReporter _do not_ line up due to our use of --outFile for run.js
|
||||
const FailedTestReporter = require(path.resolve(__dirname, "../../scripts/failed-tests")) as typeof import("../../../scripts/failed-tests");
|
||||
const FailedTestReporter = require(Utils.findUpFile("scripts/failed-tests.js")) as typeof import("../../../scripts/failed-tests");
|
||||
|
||||
const perfdataFileNameFragment = ".parallelperf";
|
||||
const perfData = readSavedPerfData(configOption);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user