mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Convert scripts/Gulpfile to checked mjs/cjs so they can run without compilation (#50988)
This commit is contained in:
@@ -17,5 +17,5 @@ namespace Utils {
|
||||
}
|
||||
|
||||
export const findUpRoot: { (): string; cached?: string; } = () =>
|
||||
findUpRoot.cached ||= dirname(findUpFile("Gulpfile.js"));
|
||||
findUpRoot.cached ||= dirname(findUpFile("Gulpfile.mjs"));
|
||||
}
|
||||
|
||||
@@ -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(Utils.findUpFile("scripts/failed-tests.js")) as typeof import("../../../scripts/failed-tests");
|
||||
const FailedTestReporter = require(Utils.findUpFile("scripts/failed-tests.cjs")) as typeof import("../../../scripts/failed-tests.cjs");
|
||||
|
||||
const perfdataFileNameFragment = ".parallelperf";
|
||||
const perfData = readSavedPerfData(configOption);
|
||||
@@ -534,7 +534,7 @@ namespace Harness.Parallel.Host {
|
||||
patchStats(consoleReporter.stats);
|
||||
|
||||
let xunitReporter: import("mocha").reporters.XUnit | undefined;
|
||||
let failedTestReporter: import("../../../scripts/failed-tests") | undefined;
|
||||
let failedTestReporter: import("../../../scripts/failed-tests.cjs") | undefined;
|
||||
if (process.env.CI === "true") {
|
||||
xunitReporter = new Mocha.reporters.XUnit(replayRunner, {
|
||||
reporterOptions: {
|
||||
|
||||
Reference in New Issue
Block a user