mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Update deps, a few majors (#60967)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import chalk from "chalk";
|
||||
import { readFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
import pc from "picocolors";
|
||||
import playwright from "playwright";
|
||||
|
||||
// Turning this on will leave the Chromium browser open, giving you the
|
||||
@@ -17,7 +17,7 @@ for (const browserType of browsers) {
|
||||
|
||||
/** @type {(err: Error) => void} */
|
||||
const errorCaught = err => {
|
||||
console.error(chalk.red("There was an error running built/typescript.js in " + browserType));
|
||||
console.error(pc.red("There was an error running built/typescript.js in " + browserType));
|
||||
console.log(err.toString());
|
||||
process.exitCode = 1;
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { CancelError } from "@esfx/canceltoken";
|
||||
import chalk from "chalk";
|
||||
import fs from "fs";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import pc from "picocolors";
|
||||
|
||||
import {
|
||||
findUpFile,
|
||||
@@ -48,12 +48,12 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
|
||||
|
||||
if (coverage && testTimeout) {
|
||||
testTimeout *= 2;
|
||||
console.log(chalk.yellowBright(`[coverage] doubling test timeout to ${testTimeout}ms...`));
|
||||
console.log(pc.yellowBright(`[coverage] doubling test timeout to ${testTimeout}ms...`));
|
||||
}
|
||||
|
||||
if (!cmdLineOptions.dirty) {
|
||||
if (options.watching) {
|
||||
console.log(chalk.yellowBright(`[watch] cleaning test directories...`));
|
||||
console.log(pc.yellowBright(`[watch] cleaning test directories...`));
|
||||
}
|
||||
await cleanTestDirs();
|
||||
await rimraf(coverageDir);
|
||||
@@ -81,7 +81,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
|
||||
}
|
||||
|
||||
if (options.watching) {
|
||||
console.log(chalk.yellowBright(`[watch] running tests...`));
|
||||
console.log(pc.yellowBright(`[watch] running tests...`));
|
||||
}
|
||||
|
||||
if (tests || skipSysTests || runners || light || testTimeout || taskConfigsFolder || keepFailed || shards || shardId) {
|
||||
@@ -178,7 +178,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
|
||||
}
|
||||
|
||||
if (options.watching) {
|
||||
console.error(`${chalk.redBright(error.name)}: ${error.message}`);
|
||||
console.error(`${pc.redBright(error.name)}: ${error.message}`);
|
||||
}
|
||||
else {
|
||||
process.exitCode = typeof errorStatus === "number" ? errorStatus : 2;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { CancelError } from "@esfx/canceltoken";
|
||||
import assert from "assert";
|
||||
import chalk from "chalk";
|
||||
import { spawn } from "child_process";
|
||||
import fs from "fs";
|
||||
import JSONC from "jsonc-parser";
|
||||
import pc from "picocolors";
|
||||
import which from "which";
|
||||
|
||||
/** @import { CancelToken } from "@esfx/canceltoken" */
|
||||
@@ -26,7 +26,7 @@ export async function exec(cmd, args, options = {}) {
|
||||
return /**@type {Promise<{exitCode?: number}>}*/ (new Promise((resolve, reject) => {
|
||||
const { ignoreExitCode, waitForExit = true, ignoreStdout } = options;
|
||||
|
||||
if (!options.hidePrompt) console.log(`> ${chalk.green(cmd)} ${args.join(" ")}`);
|
||||
if (!options.hidePrompt) console.log(`> ${pc.green(cmd)} ${args.join(" ")}`);
|
||||
const proc = spawn(which.sync(cmd), args, { stdio: waitForExit ? ignoreStdout ? ["inherit", "ignore", "inherit"] : "inherit" : "ignore", detached: !waitForExit });
|
||||
if (waitForExit) {
|
||||
const onCanceled = () => {
|
||||
|
||||
Reference in New Issue
Block a user