mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-16 06:28:12 -05:00
Import chalk with import() syntax (#46931)
This makes code compatible with chalk v5.0.0.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// @ts-check
|
||||
const chalk = require("chalk");
|
||||
const { join } = require("path");
|
||||
const { readFileSync } = require("fs");
|
||||
try {
|
||||
@@ -18,6 +17,7 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user