From bab5d8227b102233abfb9a6730f3cda6151ef5d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 5 Nov 2022 16:07:17 +0100 Subject: [PATCH 1/6] Improve CJS compat with ESM-based `@babel/core` --- Gulpfile.mjs | 12 ++ packages/babel-core/cjs-proxy.cjs | 32 ++++- packages/babel-core/package.json | 2 +- packages/babel-core/src/index.ts | 13 +++ .../babel-core/test/esm-cjs-integration.js | 109 ++++++++++++++++++ .../eager-plugin-as-string.cjs | 8 ++ ...ugin-required-after-dynamic-esm-import.cjs | 8 ++ ...lugin-required-after-static-esm-import.mjs | 8 ++ .../eager-plugin-required.cjs | 14 +++ .../lazy-plugin-as-string.cjs | 8 ++ .../lazy-plugin-required.cjs | 8 ++ .../esm-cjs-integration/plugins/eager.cjs | 13 +++ .../esm-cjs-integration/plugins/lazy.cjs | 34 ++++++ ...ransform-sync-after-dynamic-esm-import.cjs | 3 + ...transform-sync-after-static-esm-import.mjs | 4 + .../esm-cjs-integration/transform-sync.cjs | 9 ++ packages/babel-core/test/helpers/esm.js | 14 +++ 17 files changed, 293 insertions(+), 6 deletions(-) create mode 100644 packages/babel-core/test/esm-cjs-integration.js create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-as-string.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-dynamic-esm-import.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-static-esm-import.mjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-as-string.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-required.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/plugins/eager.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/plugins/lazy.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-dynamic-esm-import.cjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-static-esm-import.mjs create mode 100644 packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync.cjs diff --git a/Gulpfile.mjs b/Gulpfile.mjs index b46f664da6e1..3ca307954b18 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -384,6 +384,18 @@ function buildRollup(packages, buildStandalone) { ) { return; } + break; + case "NON_EXISTENT_EXPORT": + // babel-core/src/index.ts imports createRequire, but it's only + // used in the ESM build. We can safely ignore this warning. + if ( + warning.id.endsWith("babel-core/src/index.ts") && + warning.source === "\x00polyfill-node.module.js" && + warning.name === "createRequire" + ) { + return; + } + break; } // We use console.warn here since it prints more info than just "warn", diff --git a/packages/babel-core/cjs-proxy.cjs b/packages/babel-core/cjs-proxy.cjs index 4bf8b5cb9ced..a53f616df070 100644 --- a/packages/babel-core/cjs-proxy.cjs +++ b/packages/babel-core/cjs-proxy.cjs @@ -1,6 +1,12 @@ "use strict"; const babelP = import("./lib/index.js"); +let babel = null; +Object.defineProperty(exports, "__ initialize @babel/core cjs proxy __", { + set(val) { + babel = val; + }, +}); const functionNames = [ "createConfigItem", @@ -11,13 +17,9 @@ const functionNames = [ "transformFromAst", "parse", ]; +const propertyNames = ["types", "tokTypes", "traverse", "template", "version"]; for (const name of functionNames) { - exports[`${name}Sync`] = function () { - throw new Error( - `"${name}Sync" is not supported when loading @babel/core using require()` - ); - }; exports[name] = function (...args) { babelP.then(babel => { babel[name](...args); @@ -26,4 +28,24 @@ for (const name of functionNames) { exports[`${name}Async`] = function (...args) { return babelP.then(babel => babel[`${name}Async`](...args)); }; + exports[`${name}Sync`] = function (...args) { + if (!babel) throw notLoadedError(`${name}Sync`, "callable"); + return babel[`${name}Sync`](...args); + }; +} + +for (const name of propertyNames) { + Object.defineProperty(exports, name, { + get() { + if (!babel) throw notLoadedError(name, "accessible"); + return babel[name]; + }, + }); +} + +function notLoadedError(name, keyword) { + return new Error( + `The \`${name}\` export of @babel/core is only ${keyword}` + + ` from the CommonJS version after that the ESM version is loaded.` + ); } diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 44a0ff5456bb..9105f6db17eb 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -88,7 +88,7 @@ "type": "module", "exports": { ".": { - "require": "./cjs-proxy.cjs", + "require": "./cjs-proxy/index.cjs", "default": "./lib/index.js" }, "./package.json": "./package.json" diff --git a/packages/babel-core/src/index.ts b/packages/babel-core/src/index.ts index 9698e3fd1a6f..99b90d035f53 100644 --- a/packages/babel-core/src/index.ts +++ b/packages/babel-core/src/index.ts @@ -1,4 +1,6 @@ declare const PACKAGE_JSON: { name: string; version: string }; +declare const USE_ESM: boolean; + export const version = PACKAGE_JSON.version; export { default as File } from "./transformation/file/file"; @@ -72,6 +74,7 @@ export const DEFAULT_EXTENSIONS = Object.freeze([ ] as const); // For easier backward-compatibility, provide an API like the one we exposed in Babel 6. +// TODO(Babel 8): Remove this. import { loadOptionsSync } from "./config"; export class OptionManager { init(opts: {}) { @@ -79,8 +82,18 @@ export class OptionManager { } } +// TODO(Babel 8): Remove this. export function Plugin(alias: string) { throw new Error( `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`, ); } + +import { createRequire } from "module"; +import * as thisFile from "./index"; +if (USE_ESM) { + // Pass this module to the CJS proxy, so that it + // can be synchronously accessed. + const cjsProxy = createRequire(import.meta.url)("../cjs-proxy.cjs"); + cjsProxy["__ initialize @babel/core cjs proxy __"] = thisFile; +} diff --git a/packages/babel-core/test/esm-cjs-integration.js b/packages/babel-core/test/esm-cjs-integration.js new file mode 100644 index 000000000000..434e60c40510 --- /dev/null +++ b/packages/babel-core/test/esm-cjs-integration.js @@ -0,0 +1,109 @@ +import { execFile } from "child_process"; +import { createRequire } from "module"; +import { outputType } from "./helpers/esm.js"; + +const require = createRequire(import.meta.url); + +async function run(name) { + return new Promise((res, rej) => { + execFile( + "node", + [require.resolve(`./fixtures/esm-cjs-integration/${name}`)], + { env: process.env }, + (error, stdout, stderr) => { + if (error) rej(error); + res({ stdout: stdout.toString(), stderr: stderr.toString() }); + }, + ); + }); +} + +(outputType === "module" ? describe : describe.skip)("usage from cjs", () => { + it("lazy plugin required", async () => { + expect(await run("lazy-plugin-required.cjs")).toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "\\"Replaced!\\"; + ", + } + `); + }); + + it("lazy plugin as config string", async () => { + expect(await run("lazy-plugin-as-string.cjs")).toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "\\"Replaced!\\"; + ", + } + `); + }); + + it("eager plugin required", async () => { + await expect(run("eager-plugin-required.cjs")).rejects.toThrow( + "The `types` export of @babel/core is only accessible from" + + " the CommonJS version after that the ESM version is loaded.", + ); + }); + + it("eager plugin required after dynamic esm import", async () => { + expect(await run("eager-plugin-required-after-dynamic-esm-import.cjs")) + .toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "\\"Replaced!\\"; + ", + } + `); + }); + + it("eager plugin required after static esm import", async () => { + expect(await run("eager-plugin-required-after-static-esm-import.mjs")) + .toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "\\"Replaced!\\"; + ", + } + `); + }); + + it("eager plugin as config string", async () => { + expect(await run("eager-plugin-as-string.cjs")).toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "\\"Replaced!\\"; + ", + } + `); + }); + + it("transformSync", async () => { + await expect(run("transform-sync.cjs")).rejects.toThrow( + "The `transformSync` export of @babel/core is only callable from" + + " the CommonJS version after that the ESM version is loaded.", + ); + }); + + it("transformSync after dynamic esm import", async () => { + expect(await run("transform-sync-after-dynamic-esm-import.cjs")) + .toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "REPLACE_ME; + ", + } + `); + }); + + it("transformSync after static esm import", async () => { + expect(await run("transform-sync-after-static-esm-import.mjs")) + .toMatchInlineSnapshot(` + Object { + "stderr": "", + "stdout": "REPLACE_ME; + ", + } + `); + }); +}); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-as-string.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-as-string.cjs new file mode 100644 index 000000000000..5228276c6d0a --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-as-string.cjs @@ -0,0 +1,8 @@ +const babel = require("../../../cjs-proxy.cjs"); + +babel + .transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [__dirname + "/plugins/eager.cjs"], + }) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-dynamic-esm-import.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-dynamic-esm-import.cjs new file mode 100644 index 000000000000..5f953e1da116 --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-dynamic-esm-import.cjs @@ -0,0 +1,8 @@ +import("../../../lib/index.js") + .then(babel => + babel.transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [require("./plugins/eager.cjs")], + }), + ) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-static-esm-import.mjs b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-static-esm-import.mjs new file mode 100644 index 000000000000..cd70b4fd240a --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required-after-static-esm-import.mjs @@ -0,0 +1,8 @@ +import * as babel from "../../../lib/index.js"; + +babel + .transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [(await import("./plugins/eager.cjs")).default], + }) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required.cjs new file mode 100644 index 000000000000..5f9ceddb938c --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/eager-plugin-required.cjs @@ -0,0 +1,14 @@ +/* + * This test throws an error, because the plugin accesses + * @babel/core's CJS .types export before that the ESM + * version is loaded. + */ + +const babel = require("../../../cjs-proxy.cjs"); + +babel + .transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [require("./plugins/eager.cjs")], + }) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-as-string.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-as-string.cjs new file mode 100644 index 000000000000..55233204f038 --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-as-string.cjs @@ -0,0 +1,8 @@ +const babel = require("../../../cjs-proxy.cjs"); + +babel + .transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [__dirname + "/plugins/lazy.cjs"], + }) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-required.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-required.cjs new file mode 100644 index 000000000000..2647bc7d44ec --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/lazy-plugin-required.cjs @@ -0,0 +1,8 @@ +const babel = require("../../../cjs-proxy.cjs"); + +babel + .transformAsync("REPLACE_ME;", { + configFile: false, + plugins: [require("./plugins/lazy.cjs")], + }) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/eager.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/eager.cjs new file mode 100644 index 000000000000..255a74baf79b --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/eager.cjs @@ -0,0 +1,13 @@ +const { types: t } = require("../../../../cjs-proxy.cjs"); + +module.exports = function () { + return { + visitor: { + Identifier(path) { + if (path.node.name === "REPLACE_ME") { + path.replaceWith(t.stringLiteral("Replaced!")); + } + }, + }, + }; +}; diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/lazy.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/lazy.cjs new file mode 100644 index 000000000000..d621bbce410c --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/plugins/lazy.cjs @@ -0,0 +1,34 @@ +/* +import { types as t } from "../../../../cjs-proxy.cjs"; + +export default function () { + return { + visitor: { + Identifier(path) { + if (path.node.name === "REPLACE_ME") { + path.replaceWith(t.stringLiteral("Replaced!")); + } + } + } + } +} +*/ + +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true, +}); +exports["default"] = _default; +var _core = require("../../../../cjs-proxy.cjs"); +function _default() { + return { + visitor: { + Identifier: function Identifier(path) { + if (path.node.name === "REPLACE_ME") { + path.replaceWith(_core.types.stringLiteral("Replaced!")); + } + }, + }, + }; +} diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-dynamic-esm-import.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-dynamic-esm-import.cjs new file mode 100644 index 000000000000..b7ae43d9e7ff --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-dynamic-esm-import.cjs @@ -0,0 +1,3 @@ +import("../../../lib/index.js") + .then(babel => babel.transformSync("REPLACE_ME;", { configFile: false })) + .then(out => console.log(out.code), console.error); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-static-esm-import.mjs b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-static-esm-import.mjs new file mode 100644 index 000000000000..5c4d7c29cd32 --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync-after-static-esm-import.mjs @@ -0,0 +1,4 @@ +import * as babel from "../../../lib/index.js"; + +const out = babel.transformSync("REPLACE_ME;", { configFile: false }); +console.log(out.code); diff --git a/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync.cjs b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync.cjs new file mode 100644 index 000000000000..06e7bf3158e3 --- /dev/null +++ b/packages/babel-core/test/fixtures/esm-cjs-integration/transform-sync.cjs @@ -0,0 +1,9 @@ +/* + * This test throws an error, because the CJS .transformSync + * is called before that the ESM version is loaded. + */ + +const babel = require("../../../cjs-proxy.cjs"); + +const out = babel.transformSync("REPLACE_ME;", { configFile: false }); +console.log(out.code); diff --git a/packages/babel-core/test/helpers/esm.js b/packages/babel-core/test/helpers/esm.js index c24dbaaac63b..2138ac2a9aa7 100644 --- a/packages/babel-core/test/helpers/esm.js +++ b/packages/babel-core/test/helpers/esm.js @@ -1,6 +1,7 @@ import cp from "child_process"; import util from "util"; import path from "path"; +import fs from "fs"; import { fileURLToPath } from "url"; import { createRequire } from "module"; @@ -12,6 +13,19 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); // "minNodeVersion": "10.0.0" <-- For Ctrl+F when dropping node 10 export const supportsESM = parseInt(process.versions.node) >= 12; +export const outputType = (() => { + try { + return fs + .readFileSync( + new URL("../../../../.module-type", import.meta.url), + "utf-8", + ) + .trim(); + } catch (_) { + return "script"; + } +})(); + export const isMJS = file => path.extname(file) === ".mjs"; export const itESM = supportsESM ? it : it.skip; From 5a9e9bd9ccee758429d19dc6fc72706ec20972f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 5 Nov 2022 20:50:34 +0100 Subject: [PATCH 2/6] Fix rollup --- Gulpfile.mjs | 11 ----------- packages/babel-core/src/index.ts | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 3ca307954b18..7637c718b17c 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -385,17 +385,6 @@ function buildRollup(packages, buildStandalone) { return; } break; - case "NON_EXISTENT_EXPORT": - // babel-core/src/index.ts imports createRequire, but it's only - // used in the ESM build. We can safely ignore this warning. - if ( - warning.id.endsWith("babel-core/src/index.ts") && - warning.source === "\x00polyfill-node.module.js" && - warning.name === "createRequire" - ) { - return; - } - break; } // We use console.warn here since it prints more info than just "warn", diff --git a/packages/babel-core/src/index.ts b/packages/babel-core/src/index.ts index 99b90d035f53..219d99f50bfa 100644 --- a/packages/babel-core/src/index.ts +++ b/packages/babel-core/src/index.ts @@ -89,11 +89,11 @@ export function Plugin(alias: string) { ); } -import { createRequire } from "module"; +import * as module from "module"; import * as thisFile from "./index"; if (USE_ESM) { // Pass this module to the CJS proxy, so that it // can be synchronously accessed. - const cjsProxy = createRequire(import.meta.url)("../cjs-proxy.cjs"); + const cjsProxy = module.createRequire(import.meta.url)("../cjs-proxy.cjs"); cjsProxy["__ initialize @babel/core cjs proxy __"] = thisFile; } From 6b1814b40d5437014d8020f732dc6ddc4293f410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 5 Nov 2022 21:37:53 +0100 Subject: [PATCH 3/6] Fix standalone build --- babel.config.js | 5 +++++ packages/babel-core/src/index.ts | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/babel.config.js b/babel.config.js index 206537d9417d..392369e77b20 100644 --- a/babel.config.js +++ b/babel.config.js @@ -231,6 +231,11 @@ module.exports = function (api) { { name: "USE_ESM", value: outputType === "module" }, "flag-USE_ESM", ], + [ + pluginToggleBooleanFlag, + { name: "IS_STANDALONE", value: env === "standalone" }, + "flag-IS_STANDALONE", + ], process.env.STRIP_BABEL_8_FLAG && [ pluginToggleBooleanFlag, diff --git a/packages/babel-core/src/index.ts b/packages/babel-core/src/index.ts index 219d99f50bfa..af096fcc2e46 100644 --- a/packages/babel-core/src/index.ts +++ b/packages/babel-core/src/index.ts @@ -1,5 +1,5 @@ declare const PACKAGE_JSON: { name: string; version: string }; -declare const USE_ESM: boolean; +declare const USE_ESM: boolean, IS_STANDALONE: boolean; export const version = PACKAGE_JSON.version; @@ -89,11 +89,12 @@ export function Plugin(alias: string) { ); } -import * as module from "module"; +import Module from "module"; import * as thisFile from "./index"; if (USE_ESM) { - // Pass this module to the CJS proxy, so that it - // can be synchronously accessed. - const cjsProxy = module.createRequire(import.meta.url)("../cjs-proxy.cjs"); - cjsProxy["__ initialize @babel/core cjs proxy __"] = thisFile; + if (!IS_STANDALONE) { + // Pass this module to the CJS proxy, so that it can be synchronously accessed. + const cjsProxy = Module.createRequire(import.meta.url)("../cjs-proxy.cjs"); + cjsProxy["__ initialize @babel/core cjs proxy __"] = thisFile; + } } From 3750c9761267d46ec75218da55f20df9dc7d42d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 15 Dec 2022 17:20:42 +0100 Subject: [PATCH 4/6] Update packages/babel-core/package.json --- packages/babel-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 9105f6db17eb..44a0ff5456bb 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -88,7 +88,7 @@ "type": "module", "exports": { ".": { - "require": "./cjs-proxy/index.cjs", + "require": "./cjs-proxy.cjs", "default": "./lib/index.js" }, "./package.json": "./package.json" From 210d93c75f8c88fbf6ca56ed860d483a83c8b463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 25 Jan 2023 11:10:29 +0100 Subject: [PATCH 5/6] Update packages/babel-core/test/esm-cjs-integration.js Co-authored-by: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> --- packages/babel-core/test/esm-cjs-integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/test/esm-cjs-integration.js b/packages/babel-core/test/esm-cjs-integration.js index 434e60c40510..d87f2000d3e7 100644 --- a/packages/babel-core/test/esm-cjs-integration.js +++ b/packages/babel-core/test/esm-cjs-integration.js @@ -7,7 +7,7 @@ const require = createRequire(import.meta.url); async function run(name) { return new Promise((res, rej) => { execFile( - "node", + process.execPath, [require.resolve(`./fixtures/esm-cjs-integration/${name}`)], { env: process.env }, (error, stdout, stderr) => { From 8bc65f1829c13d30a3239e0b38db9e93342d4413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 26 Jan 2023 09:37:32 +0100 Subject: [PATCH 6/6] Update Gulpfile.mjs --- Gulpfile.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 7637c718b17c..b46f664da6e1 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -384,7 +384,6 @@ function buildRollup(packages, buildStandalone) { ) { return; } - break; } // We use console.warn here since it prints more info than just "warn",