🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@babel/plugin-transform-runtime

Package Overview
Dependencies
Maintainers
4
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-runtime - npm Package Compare versions

Comparing version
7.22.9
to
8.0.0-alpha.0
+2
-9
lib/get-runtime-path/browser.js

@@ -1,13 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
exports.resolveFSPath = resolveFSPath;
function _default(moduleName, dirname, absoluteRuntime) {
export default function (moduleName, dirname, absoluteRuntime) {
if (absoluteRuntime === false) return moduleName;
resolveFSPath();
}
function resolveFSPath() {
export function resolveFSPath() {
throw new Error("The 'absoluteRuntime' option is not supported when using @babel/standalone.");

@@ -14,0 +7,0 @@ }

+1
-1

@@ -1,1 +0,1 @@

{"version":3,"names":["_default","moduleName","dirname","absoluteRuntime","resolveFSPath","Error"],"sources":["../../src/get-runtime-path/browser.ts"],"sourcesContent":["export default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n resolveFSPath();\n}\n\nexport function resolveFSPath() {\n throw new Error(\n \"The 'absoluteRuntime' option is not supported when using @babel/standalone.\",\n );\n}\n"],"mappings":";;;;;;;AAAe,SAAAA,SACbC,UAAkB,EAClBC,OAAe,EACfC,eAAiC,EACjC;EACA,IAAIA,eAAe,KAAK,KAAK,EAAE,OAAOF,UAAU;EAEhDG,aAAa,CAAC,CAAC;AACjB;AAEO,SAASA,aAAaA,CAAA,EAAG;EAC9B,MAAM,IAAIC,KAAK,CACb,6EACF,CAAC;AACH"}
{"version":3,"names":["moduleName","dirname","absoluteRuntime","resolveFSPath","Error"],"sources":["../../src/get-runtime-path/browser.ts"],"sourcesContent":["export default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n resolveFSPath();\n}\n\nexport function resolveFSPath() {\n throw new Error(\n \"The 'absoluteRuntime' option is not supported when using @babel/standalone.\",\n );\n}\n"],"mappings":"AAAA,eAAe,UACbA,UAAkB,EAClBC,OAAe,EACfC,eAAiC,EACjC;EACA,IAAIA,eAAe,KAAK,KAAK,EAAE,OAAOF,UAAU;EAEhDG,aAAa,CAAC,CAAC;AACjB;AAEA,OAAO,SAASA,aAAaA,CAAA,EAAG;EAC9B,MAAM,IAAIC,KAAK,CACb,6EACF,CAAC;AACH"}

@@ -1,25 +0,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
exports.resolveFSPath = resolveFSPath;
var _path = require("path");
var _module = require("module");
function _default(moduleName, dirname, absoluteRuntime) {
import path from "path";
import { createRequire } from "module";
const require = createRequire(import.meta.url);
export default function (moduleName, dirname, absoluteRuntime) {
if (absoluteRuntime === false) return moduleName;
return resolveAbsoluteRuntime(moduleName, _path.resolve(dirname, absoluteRuntime === true ? "." : absoluteRuntime));
return resolveAbsoluteRuntime(moduleName, path.resolve(dirname, absoluteRuntime === true ? "." : absoluteRuntime));
}
function resolveAbsoluteRuntime(moduleName, dirname) {
try {
return _path.dirname((((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
paths: [b]
}, M = require("module")) => {
let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
if (f) return f;
f = new Error(`Cannot resolve module '${r}'`);
f.code = "MODULE_NOT_FOUND";
throw f;
})(`${moduleName}/package.json`, {
return path.dirname(require.resolve(`${moduleName}/package.json`, {
paths: [dirname]

@@ -36,3 +22,3 @@ })).replace(/\\/g, "/");

}
function resolveFSPath(path) {
export function resolveFSPath(path) {
return require.resolve(path).replace(/\\/g, "/");

@@ -39,0 +25,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"names":["_path","require","_module","_default","moduleName","dirname","absoluteRuntime","resolveAbsoluteRuntime","path","resolve","v","w","split","process","versions","node","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","replace","err","Object","assign","runtime","resolveFSPath"],"sources":["../../src/get-runtime-path/index.ts"],"sourcesContent":["import path from \"path\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nexport default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n return resolveAbsoluteRuntime(\n moduleName,\n path.resolve(dirname, absoluteRuntime === true ? \".\" : absoluteRuntime),\n );\n}\n\nfunction resolveAbsoluteRuntime(moduleName: string, dirname: string) {\n try {\n return path\n .dirname(\n require.resolve(`${moduleName}/package.json`, { paths: [dirname] }),\n )\n .replace(/\\\\/g, \"/\");\n } catch (err) {\n if (err.code !== \"MODULE_NOT_FOUND\") throw err;\n\n throw Object.assign(\n new Error(`Failed to resolve \"${moduleName}\" relative to \"${dirname}\"`),\n {\n code: \"BABEL_RUNTIME_NOT_FOUND\",\n runtime: moduleName,\n dirname,\n },\n );\n }\n}\n\nexport function resolveFSPath(path: string) {\n return require.resolve(path).replace(/\\\\/g, \"/\");\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAGe,SAAAE,SACbC,UAAkB,EAClBC,OAAe,EACfC,eAAiC,EACjC;EACA,IAAIA,eAAe,KAAK,KAAK,EAAE,OAAOF,UAAU;EAEhD,OAAOG,sBAAsB,CAC3BH,UAAU,EACVI,KAAI,CAACC,OAAO,CAACJ,OAAO,EAAEC,eAAe,KAAK,IAAI,GAAG,GAAG,GAAGA,eAAe,CACxE,CAAC;AACH;AAEA,SAASC,sBAAsBA,CAACH,UAAkB,EAAEC,OAAe,EAAE;EACnE,IAAI;IACF,OAAOG,KAAI,CACRH,OAAO,CACN,GAAAK,CAAA,EAAAC,CAAA,MAAAD,CAAA,GAAAA,CAAA,CAAAE,KAAA,OAAAD,CAAA,GAAAA,CAAA,CAAAC,KAAA,QAAAF,CAAA,OAAAC,CAAA,OAAAD,CAAA,OAAAC,CAAA,QAAAD,CAAA,QAAAC,CAAA,MAAAE,OAAA,CAAAC,QAAA,CAAAC,IAAA,WAAAd,OAAA,CAAAQ,OAAA,IAAAO,CAAA;MAAAC,KAAA,GAAAC,CAAA;IAAA,GAAAC,CAAA,GAAAlB,OAAA;MAAA,IAAAmB,CAAA,GAAAD,CAAA,CAAAE,SAAA,CAAAL,CAAA,EAAAG,CAAA,CAAAG,gBAAA,CAAAJ,CAAA,EAAAK,MAAA,CAAAL,CAAA;MAAA,IAAAE,CAAA,SAAAA,CAAA;MAAAA,CAAA,OAAAI,KAAA,2BAAAR,CAAA;MAAAI,CAAA,CAAAK,IAAA;MAAA,MAAAL,CAAA;IAAA,GAAiB,GAAEhB,UAAW,eAAc,EAAE;MAAEa,KAAK,EAAE,CAACZ,OAAO;IAAE,CAAC,CACpE,CAAC,CACAqB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EACxB,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACF,IAAI,KAAK,kBAAkB,EAAE,MAAME,GAAG;IAE9C,MAAMC,MAAM,CAACC,MAAM,CACjB,IAAIL,KAAK,CAAE,sBAAqBpB,UAAW,kBAAiBC,OAAQ,GAAE,CAAC,EACvE;MACEoB,IAAI,EAAE,yBAAyB;MAC/BK,OAAO,EAAE1B,UAAU;MACnBC;IACF,CACF,CAAC;EACH;AACF;AAEO,SAAS0B,aAAaA,CAACvB,IAAY,EAAE;EAC1C,OAAOP,OAAO,CAACQ,OAAO,CAACD,IAAI,CAAC,CAACkB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AAClD"}
{"version":3,"names":["path","createRequire","require","import","meta","url","moduleName","dirname","absoluteRuntime","resolveAbsoluteRuntime","resolve","paths","replace","err","code","Object","assign","Error","runtime","resolveFSPath"],"sources":["../../src/get-runtime-path/index.ts"],"sourcesContent":["import path from \"path\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nexport default function (\n moduleName: string,\n dirname: string,\n absoluteRuntime: string | boolean,\n) {\n if (absoluteRuntime === false) return moduleName;\n\n return resolveAbsoluteRuntime(\n moduleName,\n path.resolve(dirname, absoluteRuntime === true ? \".\" : absoluteRuntime),\n );\n}\n\nfunction resolveAbsoluteRuntime(moduleName: string, dirname: string) {\n try {\n return path\n .dirname(\n require.resolve(`${moduleName}/package.json`, { paths: [dirname] }),\n )\n .replace(/\\\\/g, \"/\");\n } catch (err) {\n if (err.code !== \"MODULE_NOT_FOUND\") throw err;\n\n throw Object.assign(\n new Error(`Failed to resolve \"${moduleName}\" relative to \"${dirname}\"`),\n {\n code: \"BABEL_RUNTIME_NOT_FOUND\",\n runtime: moduleName,\n dirname,\n },\n );\n }\n}\n\nexport function resolveFSPath(path: string) {\n return require.resolve(path).replace(/\\\\/g, \"/\");\n}\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,aAAa,QAAQ,QAAQ;AACtC,MAAMC,OAAO,GAAGD,aAAa,CAACE,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC;AAE9C,eAAe,UACbC,UAAkB,EAClBC,OAAe,EACfC,eAAiC,EACjC;EACA,IAAIA,eAAe,KAAK,KAAK,EAAE,OAAOF,UAAU;EAEhD,OAAOG,sBAAsB,CAC3BH,UAAU,EACVN,IAAI,CAACU,OAAO,CAACH,OAAO,EAAEC,eAAe,KAAK,IAAI,GAAG,GAAG,GAAGA,eAAe,CACxE,CAAC;AACH;AAEA,SAASC,sBAAsBA,CAACH,UAAkB,EAAEC,OAAe,EAAE;EACnE,IAAI;IACF,OAAOP,IAAI,CACRO,OAAO,CACNL,OAAO,CAACQ,OAAO,CAAE,GAAEJ,UAAW,eAAc,EAAE;MAAEK,KAAK,EAAE,CAACJ,OAAO;IAAE,CAAC,CACpE,CAAC,CACAK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EACxB,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACC,IAAI,KAAK,kBAAkB,EAAE,MAAMD,GAAG;IAE9C,MAAME,MAAM,CAACC,MAAM,CACjB,IAAIC,KAAK,CAAE,sBAAqBX,UAAW,kBAAiBC,OAAQ,GAAE,CAAC,EACvE;MACEO,IAAI,EAAE,yBAAyB;MAC/BI,OAAO,EAAEZ,UAAU;MACnBC;IACF,CACF,CAAC;EACH;AACF;AAEA,OAAO,SAASY,aAAaA,CAACnB,IAAY,EAAE;EAC1C,OAAOE,OAAO,CAACQ,OAAO,CAACV,IAAI,CAAC,CAACY,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;AAClD"}

@@ -1,14 +0,8 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hasMinVersion = hasMinVersion;
var _semver = require("semver");
function hasMinVersion(minVersion, runtimeVersion) {
import semver from "semver";
export function hasMinVersion(minVersion, runtimeVersion) {
if (!runtimeVersion) return true;
if (_semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
return !_semver.intersects(`<${minVersion}`, runtimeVersion) && !_semver.intersects(`>=8.0.0`, runtimeVersion);
if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
return !semver.intersects(`<${minVersion}`, runtimeVersion) && !semver.intersects(`>=8.0.0`, runtimeVersion);
}
//# sourceMappingURL=helpers.js.map

@@ -1,1 +0,1 @@

{"version":3,"names":["_semver","require","hasMinVersion","minVersion","runtimeVersion","semver","valid","intersects"],"sources":["../src/helpers.ts"],"sourcesContent":["import semver from \"semver\";\n\nexport function hasMinVersion(\n minVersion: string,\n runtimeVersion: string | void,\n) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion) return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // babel-core's availableHelper() API.\n if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n\n return (\n !semver.intersects(`<${minVersion}`, runtimeVersion) &&\n !semver.intersects(`>=8.0.0`, runtimeVersion)\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,SAASC,aAAaA,CAC3BC,UAAkB,EAClBC,cAA6B,EAC7B;EAIA,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAmBhC,IAAIC,OAAM,CAACC,KAAK,CAACF,cAAc,CAAC,EAAEA,cAAc,GAAI,IAAGA,cAAe,EAAC;EAEvE,OACE,CAACC,OAAM,CAACE,UAAU,CAAE,IAAGJ,UAAW,EAAC,EAAEC,cAAc,CAAC,IACpD,CAACC,OAAM,CAACE,UAAU,CAAE,SAAQ,EAAEH,cAAc,CAAC;AAEjD"}
{"version":3,"names":["semver","hasMinVersion","minVersion","runtimeVersion","valid","intersects"],"sources":["../src/helpers.ts"],"sourcesContent":["import semver from \"semver\";\n\nexport function hasMinVersion(\n minVersion: string,\n runtimeVersion: string | void,\n) {\n // If the range is unavailable, we're running the script during Babel's\n // build process, and we want to assume that all versions are satisfied so\n // that the built output will include all definitions.\n if (!runtimeVersion) return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // babel-core's availableHelper() API.\n if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;\n\n return (\n !semver.intersects(`<${minVersion}`, runtimeVersion) &&\n !semver.intersects(`>=8.0.0`, runtimeVersion)\n );\n}\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,QAAQ;AAE3B,OAAO,SAASC,aAAaA,CAC3BC,UAAkB,EAClBC,cAA6B,EAC7B;EAIA,IAAI,CAACA,cAAc,EAAE,OAAO,IAAI;EAmBhC,IAAIH,MAAM,CAACI,KAAK,CAACD,cAAc,CAAC,EAAEA,cAAc,GAAI,IAAGA,cAAe,EAAC;EAEvE,OACE,CAACH,MAAM,CAACK,UAAU,CAAE,IAAGH,UAAW,EAAC,EAAEC,cAAc,CAAC,IACpD,CAACH,MAAM,CAACK,UAAU,CAAE,SAAQ,EAAEF,cAAc,CAAC;AAEjD"}

@@ -1,17 +0,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _helperModuleImports = require("@babel/helper-module-imports");
var _core = require("@babel/core");
var _helpers = require("./helpers");
var _getRuntimePath = require("./get-runtime-path");
var _polyfills = require("./polyfills");
import { declare } from "@babel/helper-plugin-utils";
import { addDefault, isModule } from "@babel/helper-module-imports";
import { types as t } from "@babel/core";
import { hasMinVersion } from "./helpers.js";
import getRuntimePath, { resolveFSPath } from "./get-runtime-path/index.js";
import { createBasePolyfillsPlugin } from "./polyfills.js";
function supportsStaticESM(caller) {
return !!(caller != null && caller.supportsStaticESM);
return !!caller?.supportsStaticESM;
}
var _default = (0, _helperPluginUtils.declare)((api, options, dirname) => {
export default declare((api, options, dirname) => {
api.assertVersion(7);

@@ -36,6 +30,3 @@ const {

}
{
const DUAL_MODE_RUNTIME = "7.13.0";
var supportsCJSDefault = (0, _helpers.hasMinVersion)(DUAL_MODE_RUNTIME, runtimeVersion);
}
;
function has(obj, key) {

@@ -65,3 +56,3 @@ return Object.prototype.hasOwnProperty.call(obj, key);

name: "transform-runtime",
inherits: (0, _polyfills.createBasePolyfillsPlugin)(options, runtimeVersion, absoluteRuntime),
inherits: createBasePolyfillsPlugin(options, runtimeVersion, absoluteRuntime),
pre(file) {

@@ -71,17 +62,11 @@ if (!useRuntimeHelpers) return;

file.set("helperGenerator", name => {
var _modulePath, _file$get;
(_modulePath = modulePath) != null ? _modulePath : modulePath = (0, _getRuntimePath.default)((_file$get = file.get("runtimeHelpersModuleName")) != null ? _file$get : "@babel/runtime", dirname, absoluteRuntime);
modulePath ??= getRuntimePath(file.get("runtimeHelpersModuleName") ?? "@babel/runtime", dirname, absoluteRuntime);
{
if (!(file.availableHelper != null && file.availableHelper(name, runtimeVersion))) {
if (name === "regeneratorRuntime") {
return _core.types.arrowFunctionExpression([], _core.types.identifier("regeneratorRuntime"));
}
return;
}
if (!file.availableHelper(name, runtimeVersion)) return;
}
const isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;
const blockHoist = isInteropHelper && !(0, _helperModuleImports.isModule)(file.path) ? 4 : undefined;
const blockHoist = isInteropHelper && !isModule(file.path) ? 4 : undefined;
const helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers";
let helperPath = `${modulePath}/${helpersDir}/${name}`;
if (absoluteRuntime) helperPath = (0, _getRuntimePath.resolveFSPath)(helperPath);
if (absoluteRuntime) helperPath = resolveFSPath(helperPath);
return addDefaultImport(helperPath, name, blockHoist, true);

@@ -91,10 +76,10 @@ });

function addDefaultImport(source, nameHint, blockHoist, isHelper = false) {
const cacheKey = (0, _helperModuleImports.isModule)(file.path);
const cacheKey = isModule(file.path);
const key = `${source}:${nameHint}:${cacheKey || ""}`;
let cached = cache.get(key);
if (cached) {
cached = _core.types.cloneNode(cached);
cached = t.cloneNode(cached);
} else {
cached = (0, _helperModuleImports.addDefault)(file.path, source, {
importedInterop: isHelper && supportsCJSDefault ? "compiled" : "uncompiled",
cached = addDefault(file.path, source, {
importedInterop: isHelper ? "compiled" : "uncompiled",
nameHint,

@@ -110,4 +95,3 @@ blockHoist

});
exports.default = _default;
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"names":["_helperPluginUtils","require","_helperModuleImports","_core","_helpers","_getRuntimePath","_polyfills","supportsStaticESM","caller","_default","declare","api","options","dirname","assertVersion","helpers","useRuntimeHelpers","useESModules","version","runtimeVersion","absoluteRuntime","Error","DUAL_MODE_RUNTIME","supportsCJSDefault","hasMinVersion","has","obj","key","Object","prototype","hasOwnProperty","call","esModules","HEADER_HELPERS","name","inherits","createBasePolyfillsPlugin","pre","file","modulePath","set","_modulePath","_file$get","getRuntimePath","get","availableHelper","t","arrowFunctionExpression","identifier","isInteropHelper","indexOf","blockHoist","isModule","path","undefined","helpersDir","node","sourceType","helperPath","resolveFSPath","addDefaultImport","cache","Map","source","nameHint","isHelper","cacheKey","cached","cloneNode","addDefault","importedInterop","exports","default"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { addDefault, isModule } from \"@babel/helper-module-imports\";\nimport { types as t, type CallerMetadata } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path\";\nimport { createBasePolyfillsPlugin } from \"./polyfills\";\n\nfunction supportsStaticESM(caller: CallerMetadata | undefined) {\n // @ts-expect-error TS does not narrow down optional chaining\n return !!caller?.supportsStaticESM;\n}\n\nexport interface Options {\n absoluteRuntime?: boolean;\n corejs?: string | number | { version: string | number; proposals?: boolean };\n helpers?: boolean;\n regenerator?: boolean;\n useESModules?: boolean | \"auto\";\n version?: string;\n}\n\nexport default declare((api, options: Options, dirname) => {\n api.assertVersion(7);\n\n const {\n helpers: useRuntimeHelpers = true,\n useESModules = false,\n version: runtimeVersion = \"7.0.0-beta.0\",\n absoluteRuntime = false,\n } = options;\n\n if (typeof useRuntimeHelpers !== \"boolean\") {\n throw new Error(\"The 'helpers' option must be undefined, or a boolean.\");\n }\n\n if (typeof useESModules !== \"boolean\" && useESModules !== \"auto\") {\n throw new Error(\n \"The 'useESModules' option must be undefined, or a boolean, or 'auto'.\",\n );\n }\n\n if (\n typeof absoluteRuntime !== \"boolean\" &&\n typeof absoluteRuntime !== \"string\"\n ) {\n throw new Error(\n \"The 'absoluteRuntime' option must be undefined, a boolean, or a string.\",\n );\n }\n\n if (typeof runtimeVersion !== \"string\") {\n throw new Error(`The 'version' option must be a version string.`);\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // In recent @babel/runtime versions, we can use require(\"helper\").default\n // instead of require(\"helper\") so that it has the same interface as the\n // ESM helper, and bundlers can better exchange one format for the other.\n const DUAL_MODE_RUNTIME = \"7.13.0\";\n // eslint-disable-next-line no-var\n var supportsCJSDefault = hasMinVersion(DUAL_MODE_RUNTIME, runtimeVersion);\n }\n\n function has(obj: {}, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n\n if (has(options, \"useBuiltIns\")) {\n // @ts-expect-error deprecated options\n if (options[\"useBuiltIns\"]) {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. The @babel/runtime \" +\n \"module now uses builtins by default.\",\n );\n } else {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (has(options, \"polyfill\")) {\n // @ts-expect-error deprecated options\n if (options[\"polyfill\"] === false) {\n throw new Error(\n \"The 'polyfill' option has been removed. The @babel/runtime \" +\n \"module now skips polyfilling by default.\",\n );\n } else {\n throw new Error(\n \"The 'polyfill' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (has(options, \"moduleName\")) {\n throw new Error(\n \"The 'moduleName' option has been removed. @babel/transform-runtime \" +\n \"no longer supports arbitrary runtimes. If you were using this to \" +\n \"set an absolute path for Babel's standard runtimes, please use the \" +\n \"'absoluteRuntime' option.\",\n );\n }\n\n const esModules =\n useESModules === \"auto\" ? api.caller(supportsStaticESM) : useESModules;\n\n const HEADER_HELPERS = [\"interopRequireWildcard\", \"interopRequireDefault\"];\n\n return {\n name: \"transform-runtime\",\n\n inherits: createBasePolyfillsPlugin(\n options,\n runtimeVersion,\n absoluteRuntime,\n ),\n\n pre(file) {\n if (!useRuntimeHelpers) return;\n\n let modulePath: string;\n\n file.set(\"helperGenerator\", (name: string) => {\n modulePath ??= getRuntimePath(\n file.get(\"runtimeHelpersModuleName\") ?? \"@babel/runtime\",\n dirname,\n absoluteRuntime,\n );\n\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (!process.env.BABEL_8_BREAKING) {\n if (!file.availableHelper?.(name, runtimeVersion)) {\n if (name === \"regeneratorRuntime\") {\n // For regeneratorRuntime, we can fallback to the old behavior of\n // relying on the regeneratorRuntime global. If the 'regenerator'\n // option is not disabled, babel-plugin-polyfill-regenerator will\n // then replace it with a @babel/helpers/regenerator import.\n //\n // We must wrap it in a function, because built-in Babel helpers\n // are functions.\n return t.arrowFunctionExpression(\n [],\n t.identifier(\"regeneratorRuntime\"),\n );\n }\n return;\n }\n } else {\n if (!file.availableHelper(name, runtimeVersion)) return;\n }\n\n const isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;\n\n // Explicitly set the CommonJS interop helpers to their reserve\n // blockHoist of 4 so they are guaranteed to exist\n // when other things used them to import.\n const blockHoist =\n isInteropHelper && !isModule(file.path) ? 4 : undefined;\n\n const helpersDir =\n esModules && file.path.node.sourceType === \"module\"\n ? \"helpers/esm\"\n : \"helpers\";\n\n let helperPath = `${modulePath}/${helpersDir}/${name}`;\n if (absoluteRuntime) helperPath = resolveFSPath(helperPath);\n\n return addDefaultImport(helperPath, name, blockHoist, true);\n });\n\n const cache = new Map();\n\n function addDefaultImport(\n source: string,\n nameHint: string,\n blockHoist: number,\n isHelper = false,\n ) {\n // If something on the page adds a helper when the file is an ES6\n // file, we can't reused the cached helper name after things have been\n // transformed because it has almost certainly been renamed.\n const cacheKey = isModule(file.path);\n const key = `${source}:${nameHint}:${cacheKey || \"\"}`;\n\n let cached = cache.get(key);\n if (cached) {\n cached = t.cloneNode(cached);\n } else {\n cached = addDefault(file.path, source, {\n importedInterop: (\n process.env.BABEL_8_BREAKING\n ? isHelper\n : isHelper && supportsCJSDefault\n )\n ? \"compiled\"\n : \"uncompiled\",\n nameHint,\n blockHoist,\n });\n\n cache.set(key, cached);\n }\n return cached;\n }\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAEA,SAASM,iBAAiBA,CAACC,MAAkC,EAAE;EAE7D,OAAO,CAAC,EAACA,MAAM,YAANA,MAAM,CAAED,iBAAiB;AACpC;AAAC,IAAAE,QAAA,GAWc,IAAAC,0BAAO,EAAC,CAACC,GAAG,EAAEC,OAAgB,EAAEC,OAAO,KAAK;EACzDF,GAAG,CAACG,aAAa,CAAC,CAAC,CAAC;EAEpB,MAAM;IACJC,OAAO,EAAEC,iBAAiB,GAAG,IAAI;IACjCC,YAAY,GAAG,KAAK;IACpBC,OAAO,EAAEC,cAAc,GAAG,cAAc;IACxCC,eAAe,GAAG;EACpB,CAAC,GAAGR,OAAO;EAEX,IAAI,OAAOI,iBAAiB,KAAK,SAAS,EAAE;IAC1C,MAAM,IAAIK,KAAK,CAAC,uDAAuD,CAAC;EAC1E;EAEA,IAAI,OAAOJ,YAAY,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,SAAS;QAEf,IAAIC,UAAU,GAAI,GAAEnB,UAAW,IAAGgB,UAAW,IAAGrB,IAAK,EAAC;QACtD,IAAId,eAAe,EAAEsC,UAAU,GAAG,IAAAC,6BAAa,EAACD,UAAU,CAAC;QAE3D,OAAOE,gBAAgB,CAACF,UAAU,EAAExB,IAAI,EAAEiB,UAAU,EAAE,IAAI,CAAC;MAC7D,CAAC,CAAC;MAEF,MAAMU,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;MAEvB,SAASF,gBAAgBA,CACvBG,MAAc,EACdC,QAAgB,EAChBb,UAAkB,EAClBc,QAAQ,GAAG,KAAK,EAChB;QAIA,MAAMC,QAAQ,GAAG,IAAAd,6BAAQ,EAACd,IAAI,CAACe,IAAI,CAAC;QACpC,MAAM1B,GAAG,GAAI,GAAEoC,MAAO,IAAGC,QAAS,IAAGE,QAAQ,IAAI,EAAG,EAAC;QAErD,IAAIC,MAAM,GAAGN,KAAK,CAACjB,GAAG,CAACjB,GAAG,CAAC;QAC3B,IAAIwC,MAAM,EAAE;UACVA,MAAM,GAAGrB,WAAC,CAACsB,SAAS,CAACD,MAAM,CAAC;QAC9B,CAAC,MAAM;UACLA,MAAM,GAAG,IAAAE,+BAAU,EAAC/B,IAAI,CAACe,IAAI,EAAEU,MAAM,EAAE;YACrCO,eAAe,EAGTL,QAAQ,IAAI1C,kBAAkB,GAEhC,UAAU,GACV,YAAY;YAChByC,QAAQ;YACRb;UACF,CAAC,CAAC;UAEFU,KAAK,CAACrB,GAAG,CAACb,GAAG,EAAEwC,MAAM,CAAC;QACxB;QACA,OAAOA,MAAM;MACf;IACF;EACF,CAAC;AACH,CAAC,CAAC;AAAAI,OAAA,CAAAC,OAAA,GAAA/D,QAAA"}
{"version":3,"names":["declare","addDefault","isModule","types","t","hasMinVersion","getRuntimePath","resolveFSPath","createBasePolyfillsPlugin","supportsStaticESM","caller","api","options","dirname","assertVersion","helpers","useRuntimeHelpers","useESModules","version","runtimeVersion","absoluteRuntime","Error","has","obj","key","Object","prototype","hasOwnProperty","call","esModules","HEADER_HELPERS","name","inherits","pre","file","modulePath","set","get","availableHelper","isInteropHelper","indexOf","blockHoist","path","undefined","helpersDir","node","sourceType","helperPath","addDefaultImport","cache","Map","source","nameHint","isHelper","cacheKey","cached","cloneNode","importedInterop"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { addDefault, isModule } from \"@babel/helper-module-imports\";\nimport { types as t, type CallerMetadata } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path\";\nimport { createBasePolyfillsPlugin } from \"./polyfills\";\n\nfunction supportsStaticESM(caller: CallerMetadata | undefined) {\n // @ts-expect-error TS does not narrow down optional chaining\n return !!caller?.supportsStaticESM;\n}\n\nexport interface Options {\n absoluteRuntime?: boolean;\n corejs?: string | number | { version: string | number; proposals?: boolean };\n helpers?: boolean;\n regenerator?: boolean;\n useESModules?: boolean | \"auto\";\n version?: string;\n}\n\nexport default declare((api, options: Options, dirname) => {\n api.assertVersion(7);\n\n const {\n helpers: useRuntimeHelpers = true,\n useESModules = false,\n version: runtimeVersion = \"7.0.0-beta.0\",\n absoluteRuntime = false,\n } = options;\n\n if (typeof useRuntimeHelpers !== \"boolean\") {\n throw new Error(\"The 'helpers' option must be undefined, or a boolean.\");\n }\n\n if (typeof useESModules !== \"boolean\" && useESModules !== \"auto\") {\n throw new Error(\n \"The 'useESModules' option must be undefined, or a boolean, or 'auto'.\",\n );\n }\n\n if (\n typeof absoluteRuntime !== \"boolean\" &&\n typeof absoluteRuntime !== \"string\"\n ) {\n throw new Error(\n \"The 'absoluteRuntime' option must be undefined, a boolean, or a string.\",\n );\n }\n\n if (typeof runtimeVersion !== \"string\") {\n throw new Error(`The 'version' option must be a version string.`);\n }\n\n if (!process.env.BABEL_8_BREAKING) {\n // In recent @babel/runtime versions, we can use require(\"helper\").default\n // instead of require(\"helper\") so that it has the same interface as the\n // ESM helper, and bundlers can better exchange one format for the other.\n const DUAL_MODE_RUNTIME = \"7.13.0\";\n // eslint-disable-next-line no-var\n var supportsCJSDefault = hasMinVersion(DUAL_MODE_RUNTIME, runtimeVersion);\n }\n\n function has(obj: {}, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n\n if (has(options, \"useBuiltIns\")) {\n // @ts-expect-error deprecated options\n if (options[\"useBuiltIns\"]) {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. The @babel/runtime \" +\n \"module now uses builtins by default.\",\n );\n } else {\n throw new Error(\n \"The 'useBuiltIns' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (has(options, \"polyfill\")) {\n // @ts-expect-error deprecated options\n if (options[\"polyfill\"] === false) {\n throw new Error(\n \"The 'polyfill' option has been removed. The @babel/runtime \" +\n \"module now skips polyfilling by default.\",\n );\n } else {\n throw new Error(\n \"The 'polyfill' option has been removed. Use the 'corejs'\" +\n \"option to polyfill with `core-js` via @babel/runtime.\",\n );\n }\n }\n\n if (has(options, \"moduleName\")) {\n throw new Error(\n \"The 'moduleName' option has been removed. @babel/transform-runtime \" +\n \"no longer supports arbitrary runtimes. If you were using this to \" +\n \"set an absolute path for Babel's standard runtimes, please use the \" +\n \"'absoluteRuntime' option.\",\n );\n }\n\n const esModules =\n useESModules === \"auto\" ? api.caller(supportsStaticESM) : useESModules;\n\n const HEADER_HELPERS = [\"interopRequireWildcard\", \"interopRequireDefault\"];\n\n return {\n name: \"transform-runtime\",\n\n inherits: createBasePolyfillsPlugin(\n options,\n runtimeVersion,\n absoluteRuntime,\n ),\n\n pre(file) {\n if (!useRuntimeHelpers) return;\n\n let modulePath: string;\n\n file.set(\"helperGenerator\", (name: string) => {\n modulePath ??= getRuntimePath(\n file.get(\"runtimeHelpersModuleName\") ?? \"@babel/runtime\",\n dirname,\n absoluteRuntime,\n );\n\n // If the helper didn't exist yet at the version given, we bail\n // out and let Babel either insert it directly, or throw an error\n // so that plugins can handle that case properly.\n if (!process.env.BABEL_8_BREAKING) {\n if (!file.availableHelper?.(name, runtimeVersion)) {\n if (name === \"regeneratorRuntime\") {\n // For regeneratorRuntime, we can fallback to the old behavior of\n // relying on the regeneratorRuntime global. If the 'regenerator'\n // option is not disabled, babel-plugin-polyfill-regenerator will\n // then replace it with a @babel/helpers/regenerator import.\n //\n // We must wrap it in a function, because built-in Babel helpers\n // are functions.\n return t.arrowFunctionExpression(\n [],\n t.identifier(\"regeneratorRuntime\"),\n );\n }\n return;\n }\n } else {\n if (!file.availableHelper(name, runtimeVersion)) return;\n }\n\n const isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;\n\n // Explicitly set the CommonJS interop helpers to their reserve\n // blockHoist of 4 so they are guaranteed to exist\n // when other things used them to import.\n const blockHoist =\n isInteropHelper && !isModule(file.path) ? 4 : undefined;\n\n const helpersDir =\n esModules && file.path.node.sourceType === \"module\"\n ? \"helpers/esm\"\n : \"helpers\";\n\n let helperPath = `${modulePath}/${helpersDir}/${name}`;\n if (absoluteRuntime) helperPath = resolveFSPath(helperPath);\n\n return addDefaultImport(helperPath, name, blockHoist, true);\n });\n\n const cache = new Map();\n\n function addDefaultImport(\n source: string,\n nameHint: string,\n blockHoist: number,\n isHelper = false,\n ) {\n // If something on the page adds a helper when the file is an ES6\n // file, we can't reused the cached helper name after things have been\n // transformed because it has almost certainly been renamed.\n const cacheKey = isModule(file.path);\n const key = `${source}:${nameHint}:${cacheKey || \"\"}`;\n\n let cached = cache.get(key);\n if (cached) {\n cached = t.cloneNode(cached);\n } else {\n cached = addDefault(file.path, source, {\n importedInterop: (\n process.env.BABEL_8_BREAKING\n ? isHelper\n : isHelper && supportsCJSDefault\n )\n ? \"compiled\"\n : \"uncompiled\",\n nameHint,\n blockHoist,\n });\n\n cache.set(key, cached);\n }\n return cached;\n }\n },\n };\n});\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,4BAA4B;AACpD,SAASC,UAAU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F;EACF,CAAC;AACH,CAAC,CAAC"}

@@ -1,13 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBasePolyfillsPlugin = createBasePolyfillsPlugin;
var _babelPluginPolyfillCorejs = require("babel-plugin-polyfill-corejs2");
var _babelPluginPolyfillCorejs2 = require("babel-plugin-polyfill-corejs3");
var _babelPluginPolyfillRegenerator = require("babel-plugin-polyfill-regenerator");
const pluginCorejs2 = _babelPluginPolyfillCorejs.default || _babelPluginPolyfillCorejs;
const pluginCorejs3 = _babelPluginPolyfillCorejs2.default || _babelPluginPolyfillCorejs2;
const pluginRegenerator = _babelPluginPolyfillRegenerator.default || _babelPluginPolyfillRegenerator;
import _pluginCorejs2 from "babel-plugin-polyfill-corejs2";
import _pluginCorejs3 from "babel-plugin-polyfill-corejs3";
import _pluginRegenerator from "babel-plugin-polyfill-regenerator";
const pluginCorejs2 = _pluginCorejs2.default || _pluginCorejs2;
const pluginCorejs3 = _pluginCorejs3.default || _pluginCorejs3;
const pluginRegenerator = _pluginRegenerator.default || _pluginRegenerator;
const pluginsCompat = "#__secret_key__@babel/runtime__compatibility";

@@ -27,3 +21,3 @@ function createCorejsPlugin(plugin, options, regeneratorPlugin) {

}
function createBasePolyfillsPlugin({
export function createBasePolyfillsPlugin({
corejs,

@@ -30,0 +24,0 @@ regenerator: useRuntimeRegenerator = true

@@ -1,1 +0,1 @@

{"version":3,"names":["_babelPluginPolyfillCorejs","require","_babelPluginPolyfillCorejs2","_babelPluginPolyfillRegenerator","pluginCorejs2","_pluginCorejs2","default","pluginCorejs3","_pluginCorejs3","pluginRegenerator","_pluginRegenerator","pluginsCompat","createCorejsPlugin","plugin","options","regeneratorPlugin","api","_","filename","Object","assign","inherits","createRegeneratorPlugin","useRuntimeRegenerator","undefined","createBasePolyfillsPlugin","corejs","regenerator","runtimeVersion","absoluteImports","proposals","rawVersion","version","Boolean","corejsVersion","Number","includes","Error","JSON","stringify","polyfillOpts","method","useBabelRuntime","ext"],"sources":["../src/polyfills.ts"],"sourcesContent":["// TODO(Babel 8): Remove at least support for babel-plugin-polyfill-regenerator,\n// which isn't needed anymore, and babel-plugin-polyfill-corejs2, since core-js\n// 2 isn't maintained anymore.\n// Consider also removing babel-plugin-polyfill-corejs3 from here, and ask users\n// to explicitly enable it in their Babel configuration files.\n\nimport type { PluginAPI, PluginObject } from \"@babel/core\";\nimport _pluginCorejs2 from \"babel-plugin-polyfill-corejs2\";\nimport _pluginCorejs3 from \"babel-plugin-polyfill-corejs3\";\nimport _pluginRegenerator from \"babel-plugin-polyfill-regenerator\";\nconst pluginCorejs2 = (_pluginCorejs2.default ||\n _pluginCorejs2) as typeof _pluginCorejs2.default;\nconst pluginCorejs3 = (_pluginCorejs3.default ||\n _pluginCorejs3) as typeof _pluginCorejs3.default;\nconst pluginRegenerator = (_pluginRegenerator.default ||\n _pluginRegenerator) as typeof _pluginRegenerator.default;\n\nimport type { Options } from \"./index\";\n\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\n\ninterface CoreJS2PluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n [pluginsCompat]: {\n runtimeVersion: string;\n useBabelRuntime: boolean;\n ext: string;\n };\n}\n\ninterface RegeneratorPluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n [pluginsCompat]: {\n useBabelRuntime: boolean;\n };\n}\n\ninterface CoreJS3PluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n proposals: boolean;\n version: number;\n [pluginsCompat]: {\n useBabelRuntime: boolean;\n ext: string;\n };\n}\n\nfunction createCorejsPlugin<Options extends {}>(\n plugin: (api: PluginAPI, options: Options, filename: string) => PluginObject,\n options: Options,\n regeneratorPlugin: (\n api: PluginAPI,\n options: RegeneratorPluginOptions,\n filename: string,\n ) => PluginObject,\n): (api: PluginAPI, options: {}, filename: string) => PluginObject {\n return (api: PluginAPI, _: {}, filename: string) => {\n return {\n ...plugin(api, options, filename),\n inherits: regeneratorPlugin,\n };\n };\n}\n\nfunction createRegeneratorPlugin(\n options: RegeneratorPluginOptions,\n useRuntimeRegenerator: boolean,\n): (\n api: PluginAPI,\n options: RegeneratorPluginOptions,\n filename: string,\n) => PluginObject {\n if (!useRuntimeRegenerator) return undefined;\n return (api, _, filename) => {\n return pluginRegenerator(api, options, filename);\n };\n}\n\nexport function createBasePolyfillsPlugin(\n { corejs, regenerator: useRuntimeRegenerator = true }: Options,\n runtimeVersion: string,\n absoluteImports: boolean,\n) {\n let proposals = false;\n let rawVersion;\n\n if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs;\n }\n\n const corejsVersion = rawVersion ? Number(rawVersion) : false;\n\n if (![false, 2, 3].includes(corejsVersion)) {\n throw new Error(\n `The \\`core-js\\` version must be false, 2 or 3, but got ${JSON.stringify(\n rawVersion,\n )}.`,\n );\n }\n\n if (proposals && (!corejsVersion || corejsVersion < 3)) {\n throw new Error(\n \"The 'proposals' option is only supported when using 'corejs: 3'\",\n );\n }\n\n if (typeof useRuntimeRegenerator !== \"boolean\") {\n throw new Error(\n \"The 'regenerator' option must be undefined, or a boolean.\",\n );\n }\n\n const polyfillOpts = {\n method: \"usage-pure\",\n absoluteImports,\n [pluginsCompat]: { useBabelRuntime: true, runtimeVersion, ext: \"\" },\n } as const;\n\n return corejsVersion === 2\n ? createCorejsPlugin<CoreJS2PluginOptions>(\n pluginCorejs2,\n polyfillOpts,\n createRegeneratorPlugin(polyfillOpts, useRuntimeRegenerator),\n )\n : corejsVersion === 3\n ? createCorejsPlugin<CoreJS3PluginOptions>(\n pluginCorejs3,\n { version: 3, proposals, ...polyfillOpts },\n createRegeneratorPlugin(polyfillOpts, useRuntimeRegenerator),\n )\n : createRegeneratorPlugin(polyfillOpts, useRuntimeRegenerator);\n}\n"],"mappings":";;;;;;AAOA,IAAAA,0BAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AACA,IAAAE,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EAE7D,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAACK,QAAQ,CAACF,aAAa,CAAC,EAAE;IAC1C,MAAM,IAAIG,KAAK,CACZ,0DAAyDC,IAAI,CAACC,SAAS,CACtER,UACF,CAAE,GACJ,CAAC;EACH;EAEA,IAAID,SAAS,KAAK,CAACI,aAAa,IAAIA,aAAa,GAAG,CAAC,CAAC,EAAE;IACtD,MAAM,IAAIG,KAAK,CACb,iEACF,CAAC;EACH;EAEA,IAAI,OAAOd,qBAAqB,KAAK,SAAS,EAAE;IAC9C,MAAM,IAAIc,KAAK,CACb,2DACF,CAAC;EACH;EAEA,MAAMG,YAAY,GAAG;IACnBC,MAAM,EAAE,YAAY;IACpBZ,eAAe;IACf,CAAClB,aAAa,GAAG;MAAE+B,eAAe,EAAE,IAAI;MAAEd,cAAc;MAAEe,GAAG,EAAE;IAAG;EACpE,CAAU;EAEV,OAAOT,aAAa,KAAK,CAAC,GACtBtB,kBAAkB,CAChBR,aAAa,EACboC,YAAY,EACZlB,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAC7D,CAAC,GACDW,aAAa,KAAK,CAAC,GACnBtB,kBAAkB,CAChBL,aAAa,EAAAY,MAAA,CAAAC,MAAA;IACXY,OAAO,EAAE,CAAC;IAAEF;EAAS,GAAKU,YAAY,GACxClB,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAC7D,CAAC,GACDD,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAAC;AAClE"}
{"version":3,"names":["_pluginCorejs2","_pluginCorejs3","_pluginRegenerator","pluginCorejs2","default","pluginCorejs3","pluginRegenerator","pluginsCompat","createCorejsPlugin","plugin","options","regeneratorPlugin","api","_","filename","Object","assign","inherits","createRegeneratorPlugin","useRuntimeRegenerator","undefined","createBasePolyfillsPlugin","corejs","regenerator","runtimeVersion","absoluteImports","proposals","rawVersion","version","Boolean","corejsVersion","Number","includes","Error","JSON","stringify","polyfillOpts","method","useBabelRuntime","ext"],"sources":["../src/polyfills.ts"],"sourcesContent":["// TODO(Babel 8): Remove at least support for babel-plugin-polyfill-regenerator,\n// which isn't needed anymore, and babel-plugin-polyfill-corejs2, since core-js\n// 2 isn't maintained anymore.\n// Consider also removing babel-plugin-polyfill-corejs3 from here, and ask users\n// to explicitly enable it in their Babel configuration files.\n\nimport type { PluginAPI, PluginObject } from \"@babel/core\";\nimport _pluginCorejs2 from \"babel-plugin-polyfill-corejs2\";\nimport _pluginCorejs3 from \"babel-plugin-polyfill-corejs3\";\nimport _pluginRegenerator from \"babel-plugin-polyfill-regenerator\";\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\nconst pluginCorejs2 = (_pluginCorejs2.default ||\n _pluginCorejs2) as typeof _pluginCorejs2.default;\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\nconst pluginCorejs3 = (_pluginCorejs3.default ||\n _pluginCorejs3) as typeof _pluginCorejs3.default;\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\nconst pluginRegenerator = (_pluginRegenerator.default ||\n _pluginRegenerator) as typeof _pluginRegenerator.default;\n\nimport type { Options } from \"./index\";\n\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\n\ninterface CoreJS2PluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n [pluginsCompat]: {\n runtimeVersion: string;\n useBabelRuntime: boolean;\n ext: string;\n };\n}\n\ninterface RegeneratorPluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n [pluginsCompat]: {\n useBabelRuntime: boolean;\n };\n}\n\ninterface CoreJS3PluginOptions {\n absoluteImports: boolean;\n method: \"usage-pure\";\n proposals: boolean;\n version: number;\n [pluginsCompat]: {\n useBabelRuntime: boolean;\n ext: string;\n };\n}\n\nfunction createCorejsPlugin<Options extends {}>(\n plugin: (api: PluginAPI, options: Options, filename: string) => PluginObject,\n options: Options,\n regeneratorPlugin: (\n api: PluginAPI,\n options: RegeneratorPluginOptions,\n filename: string,\n ) => PluginObject,\n): (api: PluginAPI, options: {}, filename: string) => PluginObject {\n return (api: PluginAPI, _: {}, filename: string) => {\n return {\n ...plugin(api, options, filename),\n inherits: regeneratorPlugin,\n };\n };\n}\n\nfunction createRegeneratorPlugin(\n options: RegeneratorPluginOptions,\n useRuntimeRegenerator: boolean,\n): (\n api: PluginAPI,\n options: RegeneratorPluginOptions,\n filename: string,\n) => PluginObject {\n if (!useRuntimeRegenerator) return undefined;\n return (api, _, filename) => {\n return pluginRegenerator(api, options, filename);\n };\n}\n\nexport function createBasePolyfillsPlugin(\n { corejs, regenerator: useRuntimeRegenerator = true }: Options,\n runtimeVersion: string,\n absoluteImports: boolean,\n) {\n let proposals = false;\n let rawVersion;\n\n if (typeof corejs === \"object\" && corejs !== null) {\n rawVersion = corejs.version;\n proposals = Boolean(corejs.proposals);\n } else {\n rawVersion = corejs;\n }\n\n const corejsVersion = rawVersion ? Number(rawVersion) : false;\n\n if (![false, 2, 3].includes(corejsVersion)) {\n throw new Error(\n `The \\`core-js\\` version must be false, 2 or 3, but got ${JSON.stringify(\n rawVersion,\n )}.`,\n );\n }\n\n if (proposals && (!corejsVersion || corejsVersion < 3)) {\n throw new Error(\n \"The 'proposals' option is only supported when using 'corejs: 3'\",\n );\n }\n\n if (typeof useRuntimeRegenerator !== \"boolean\") {\n throw new Error(\n \"The 'regenerator' option must be undefined, or a boolean.\",\n );\n }\n\n const polyfillOpts = {\n method: \"usage-pure\",\n absoluteImports,\n [pluginsCompat]: { useBabelRuntime: true, runtimeVersion, ext: \"\" },\n } as const;\n\n return corejsVersion === 2\n ? createCorejsPlugin<CoreJS2PluginOptions>(\n pluginCorejs2,\n polyfillOpts,\n createRegeneratorPlugin(polyfillOpts, useRuntimeRegenerator),\n )\n : corejsVersion === 3\n ? createCorejsPlugin<CoreJS3PluginOptions>(\n pluginCorejs3,\n { version: 3, proposals, ...polyfillOpts },\n createRegeneratorPlugin(polyfillOpts, useRuntimeRegen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AACP,MAAM,CAACI,SAAS,CAAC;EACvC,CAAC,MAAM;IACLC,UAAU,GAAGL,MAAM;EACrB;EAEA,MAAMQ,aAAa,GAAGH,UAAU,GAAGI,MAAM,CAACJ,UAAU,CAAC,GAAG,KAAK;EAE7D,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAACK,QAAQ,CAACF,aAAa,CAAC,EAAE;IAC1C,MAAM,IAAIG,KAAK,CACZ,0DAAyDC,IAAI,CAACC,SAAS,CACtER,UACF,CAAE,GACJ,CAAC;EACH;EAEA,IAAID,SAAS,KAAK,CAACI,aAAa,IAAIA,aAAa,GAAG,CAAC,CAAC,EAAE;IACtD,MAAM,IAAIG,KAAK,CACb,iEACF,CAAC;EACH;EAEA,IAAI,OAAOd,qBAAqB,KAAK,SAAS,EAAE;IAC9C,MAAM,IAAIc,KAAK,CACb,2DACF,CAAC;EACH;EAEA,MAAMG,YAAY,GAAG;IACnBC,MAAM,EAAE,YAAY;IACpBZ,eAAe;IACf,CAAClB,aAAa,GAAG;MAAE+B,eAAe,EAAE,IAAI;MAAEd,cAAc;MAAEe,GAAG,EAAE;IAAG;EACpE,CAAU;EAEV,OAAOT,aAAa,KAAK,CAAC,GACtBtB,kBAAkB,CAChBL,aAAa,EACbiC,YAAY,EACZlB,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAC7D,CAAC,GACDW,aAAa,KAAK,CAAC,GACnBtB,kBAAkB,CAChBH,aAAa,EAAAU,MAAA,CAAAC,MAAA;IACXY,OAAO,EAAE,CAAC;IAAEF;EAAS,GAAKU,YAAY,GACxClB,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAC7D,CAAC,GACDD,uBAAuB,CAACkB,YAAY,EAAEjB,qBAAqB,CAAC;AAClE"}
{
"name": "@babel/plugin-transform-runtime",
"version": "7.22.9",
"version": "8.0.0-alpha.0",
"description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals",

@@ -23,27 +23,30 @@ "repository": {

"dependencies": {
"@babel/helper-module-imports": "^7.22.5",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-module-imports": "^8.0.0-alpha.0",
"@babel/helper-plugin-utils": "^8.0.0-alpha.0",
"babel-plugin-polyfill-corejs2": "^0.4.4",
"babel-plugin-polyfill-corejs3": "^0.8.2",
"babel-plugin-polyfill-regenerator": "^0.5.1",
"semver": "^6.3.1"
"semver": "^7.3.4"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
"@babel/core": "^8.0.0-alpha.0"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/helper-plugin-test-runner": "^7.22.5",
"@babel/helpers": "^7.22.6",
"@babel/preset-env": "^7.22.9",
"@babel/runtime": "^7.22.6",
"@babel/runtime-corejs3": "^7.22.6",
"make-dir": "^2.1.0"
"@babel/core": "^8.0.0-alpha.0",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.0",
"@babel/helpers": "^8.0.0-alpha.0",
"@babel/preset-env": "^8.0.0-alpha.0",
"@babel/runtime": "^8.0.0-alpha.0",
"@babel/runtime-corejs3": "^8.0.0-alpha.0"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-runtime",
"engines": {
"node": ">=6.9.0"
"node": "^16.20.0 || ^18.16.0 || >=20.0.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"type": "module"
}