mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 22:15:18 -05:00
@@ -1,4 +1,5 @@
|
||||
// @ts-check
|
||||
const chalk = require("chalk");
|
||||
const { join } = require("path");
|
||||
const { readFileSync } = require("fs");
|
||||
try {
|
||||
@@ -17,7 +18,6 @@ const playwright = require("playwright");
|
||||
const debugging = false;
|
||||
|
||||
(async () => {
|
||||
const chalk = (await import("chalk")).default;
|
||||
for (const browserType of ["chromium", "firefox"]) {
|
||||
const browser = await playwright[browserType].launch({ headless: !debugging });
|
||||
const context = await browser.newContext();
|
||||
|
||||
@@ -8,6 +8,7 @@ const mkdirp = require("mkdirp");
|
||||
const del = require("del");
|
||||
const File = require("vinyl");
|
||||
const ts = require("../../lib/typescript");
|
||||
const chalk = require("chalk");
|
||||
const which = require("which");
|
||||
const { spawn } = require("child_process");
|
||||
const { CancellationToken, CancelError, Deferred } = require("prex");
|
||||
@@ -26,7 +27,6 @@ const { Readable, Duplex } = require("stream");
|
||||
* @property {boolean} [waitForExit=true]
|
||||
*/
|
||||
async function exec(cmd, args, options = {}) {
|
||||
const chalk = (await import("chalk")).default;
|
||||
return /**@type {Promise<{exitCode: number}>}*/(new Promise((resolve, reject) => {
|
||||
const { ignoreExitCode, cancelToken = CancellationToken.none, waitForExit = true } = options;
|
||||
cancelToken.throwIfCancellationRequested();
|
||||
|
||||
Reference in New Issue
Block a user