diff --git a/package-lock.json b/package-lock.json index 2cb36937db3f1..ee3a711b4c3eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1864,10 +1864,14 @@ } }, "chalk": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", - "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", - "dev": true + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, "check-error": { "version": "1.0.2", @@ -5104,18 +5108,6 @@ "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } } }, "lru-cache": { diff --git a/package.json b/package.json index d49776c7bde44..7c6d17229555a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "browser-resolve": "^1.11.2", "browserify": "latest", "chai": "latest", - "chalk": "latest", + "chalk": "^4.1.2", "convert-source-map": "latest", "del": "5.1.0", "diff": "^4.0.2", diff --git a/scripts/browserIntegrationTest.js b/scripts/browserIntegrationTest.js index 1d11e3b3c8c47..622af7cb43da0 100644 --- a/scripts/browserIntegrationTest.js +++ b/scripts/browserIntegrationTest.js @@ -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(); diff --git a/scripts/build/utils.js b/scripts/build/utils.js index 3840cc79622c3..3bcad44177551 100644 --- a/scripts/build/utils.js +++ b/scripts/build/utils.js @@ -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();