Add <%br= %> jqhtml syntax docs, class override detection, npm update

Document event handler placement and model fetch clarification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-01-15 10:16:06 +00:00
parent 61f8f058f2
commit 1594502cb2
791 changed files with 7044 additions and 6089 deletions

View File

@@ -134,43 +134,41 @@ const availablePlugins = exports.default = {
};
const minVersions = exports.minVersions = {};
let legacyBabel7SyntaxPlugins = exports.legacyBabel7SyntaxPlugins = void 0;
{
Object.assign(minVersions, {
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": "7.16.0",
"bugfix/transform-v8-static-class-fields-redefine-readonly": "7.12.0",
"syntax-import-attributes": "7.22.0",
"transform-class-static-block": "7.12.0",
"transform-duplicate-named-capturing-groups-regex": "7.19.0",
"transform-explicit-resource-management": "7.23.9",
"transform-private-property-in-object": "7.10.0",
"transform-regexp-modifiers": "7.19.0"
});
const syntax = name => () => () => ({
manipulateOptions: (_, p) => p.plugins.push(name)
});
const legacyBabel7SyntaxPluginsLoaders = {
"syntax-async-generators": syntax("asyncGenerators"),
"syntax-class-properties": syntax("classProperties"),
"syntax-class-static-block": syntax("classStaticBlock"),
"syntax-dynamic-import": syntax("dynamicImport"),
"syntax-explicit-resource-management": syntax("explicitResourceManagement"),
"syntax-export-namespace-from": syntax("exportNamespaceFrom"),
"syntax-import-meta": syntax("importMeta"),
"syntax-json-strings": syntax("jsonStrings"),
"syntax-logical-assignment-operators": syntax("logicalAssignment"),
"syntax-nullish-coalescing-operator": syntax("nullishCoalescingOperator"),
"syntax-numeric-separator": syntax("numericSeparator"),
"syntax-object-rest-spread": syntax("objectRestSpread"),
"syntax-optional-catch-binding": syntax("optionalCatchBinding"),
"syntax-optional-chaining": syntax("optionalChaining"),
"syntax-private-property-in-object": syntax("privateIn"),
"syntax-top-level-await": syntax("topLevelAwait"),
"syntax-import-assertions": () => _pluginSyntaxImportAssertions.default,
"syntax-import-attributes": () => _pluginSyntaxImportAttributes.default,
"syntax-unicode-sets-regex": () => require("@babel/plugin-syntax-unicode-sets-regex")
};
Object.assign(availablePlugins, legacyBabel7SyntaxPluginsLoaders);
exports.legacyBabel7SyntaxPlugins = legacyBabel7SyntaxPlugins = new Set(Object.keys(legacyBabel7SyntaxPluginsLoaders));
}
Object.assign(minVersions, {
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": "7.16.0",
"bugfix/transform-v8-static-class-fields-redefine-readonly": "7.12.0",
"syntax-import-attributes": "7.22.0",
"transform-class-static-block": "7.12.0",
"transform-duplicate-named-capturing-groups-regex": "7.19.0",
"transform-explicit-resource-management": "7.23.9",
"transform-private-property-in-object": "7.10.0",
"transform-regexp-modifiers": "7.19.0"
});
const syntax = name => () => () => ({
manipulateOptions: (_, p) => p.plugins.push(name)
});
const legacyBabel7SyntaxPluginsLoaders = {
"syntax-async-generators": syntax("asyncGenerators"),
"syntax-class-properties": syntax("classProperties"),
"syntax-class-static-block": syntax("classStaticBlock"),
"syntax-dynamic-import": syntax("dynamicImport"),
"syntax-explicit-resource-management": syntax("explicitResourceManagement"),
"syntax-export-namespace-from": syntax("exportNamespaceFrom"),
"syntax-import-meta": syntax("importMeta"),
"syntax-json-strings": syntax("jsonStrings"),
"syntax-logical-assignment-operators": syntax("logicalAssignment"),
"syntax-nullish-coalescing-operator": syntax("nullishCoalescingOperator"),
"syntax-numeric-separator": syntax("numericSeparator"),
"syntax-object-rest-spread": syntax("objectRestSpread"),
"syntax-optional-catch-binding": syntax("optionalCatchBinding"),
"syntax-optional-chaining": syntax("optionalChaining"),
"syntax-private-property-in-object": syntax("privateIn"),
"syntax-top-level-await": syntax("topLevelAwait"),
"syntax-import-assertions": () => _pluginSyntaxImportAssertions.default,
"syntax-import-attributes": () => _pluginSyntaxImportAttributes.default,
"syntax-unicode-sets-regex": () => require("@babel/plugin-syntax-unicode-sets-regex")
};
Object.assign(availablePlugins, legacyBabel7SyntaxPluginsLoaders);
exports.legacyBabel7SyntaxPlugins = legacyBabel7SyntaxPlugins = new Set(Object.keys(legacyBabel7SyntaxPluginsLoaders));
//# sourceMappingURL=available-plugins.js.map

File diff suppressed because one or more lines are too long

View File

@@ -9,12 +9,10 @@ const compatData = require("@babel/compat-data/plugins");
const logPlugin = (item, targetVersions, list) => {
const filteredList = (0, _helperCompilationTargets.getInclusionReasons)(item, targetVersions, list);
const support = list[item];
{
if (item.startsWith("transform-")) {
const proposalName = `proposal-${item.slice(10)}`;
if (proposalName === "proposal-dynamic-import" || hasOwnProperty.call(compatData, proposalName)) {
item = proposalName;
}
if (item.startsWith("transform-")) {
const proposalName = `proposal-${item.slice(10)}`;
if (proposalName === "proposal-dynamic-import" || hasOwnProperty.call(compatData, proposalName)) {
item = proposalName;
}
}
if (!support) {

View File

@@ -1 +1 @@
{"version":3,"names":["_helperCompilationTargets","require","compatData","logPlugin","item","targetVersions","list","filteredList","getInclusionReasons","support","startsWith","proposalName","slice","hasOwnProperty","call","console","log","formattedTargets","first","target","Object","keys","exports"],"sources":["../src/debug.ts"],"sourcesContent":["import {\n getInclusionReasons,\n type Targets,\n type Target,\n} from \"@babel/helper-compilation-targets\";\nimport compatData from \"@babel/compat-data/plugins\" with { type: \"json\" };\n\n// Outputs a message that shows which target(s) caused an item to be included:\n// transform-foo { \"edge\":\"13\", \"firefox\":\"49\", \"ie\":\"10\" }\nexport const logPlugin = (\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) => {\n const filteredList = getInclusionReasons(item, targetVersions, list);\n\n const support = list[item];\n\n if (!process.env.BABEL_8_BREAKING) {\n // It's needed to keep outputting proposal- in the debug log.\n if (item.startsWith(\"transform-\")) {\n const proposalName = `proposal-${item.slice(10)}`;\n if (\n proposalName === \"proposal-dynamic-import\" ||\n Object.hasOwn(compatData, proposalName)\n ) {\n item = proposalName;\n }\n }\n }\n\n if (!support) {\n console.log(` ${item}`);\n return;\n }\n\n let formattedTargets = `{`;\n let first = true;\n for (const target of Object.keys(filteredList) as Target[]) {\n if (!first) formattedTargets += `,`;\n first = false;\n formattedTargets += ` ${target}`;\n if (support[target]) formattedTargets += ` < ${support[target]}`;\n }\n formattedTargets += ` }`;\n\n console.log(` ${item} ${formattedTargets}`);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA;AAI2C,MACpCC,UAAU,GAAAD,OAAA,CAAM,4BAA4B;AAI5C,MAAME,SAAS,GAAGA,CACvBC,IAAY,EACZC,cAAuB,EACvBC,IAAgC,KAC7B;EACH,MAAMC,YAAY,GAAG,IAAAC,6CAAmB,EAACJ,IAAI,EAAEC,cAAc,EAAEC,IAAI,CAAC;EAEpE,MAAMG,OAAO,GAAGH,IAAI,CAACF,IAAI,CAAC;EAES;IAEjC,IAAIA,IAAI,CAACM,UAAU,CAAC,YAAY,CAAC,EAAE;MACjC,MAAMC,YAAY,GAAG,YAAYP,IAAI,CAACQ,KAAK,CAAC,EAAE,CAAC,EAAE;MACjD,IACED,YAAY,KAAK,yBAAyB,IAC1CE,cAAA,CAAAC,IAAA,CAAcZ,UAAU,EAAES,YAAY,CAAC,EACvC;QACAP,IAAI,GAAGO,YAAY;MACrB;IACF;EACF;EAEA,IAAI,CAACF,OAAO,EAAE;IACZM,OAAO,CAACC,GAAG,CAAC,KAAKZ,IAAI,EAAE,CAAC;IACxB;EACF;EAEA,IAAIa,gBAAgB,GAAG,GAAG;EAC1B,IAAIC,KAAK,GAAG,IAAI;EAChB,KAAK,MAAMC,MAAM,IAAIC,MAAM,CAACC,IAAI,CAACd,YAAY,CAAC,EAAc;IAC1D,IAAI,CAACW,KAAK,EAAED,gBAAgB,IAAI,GAAG;IACnCC,KAAK,GAAG,KAAK;IACbD,gBAAgB,IAAI,IAAIE,MAAM,EAAE;IAChC,IAAIV,OAAO,CAACU,MAAM,CAAC,EAAEF,gBAAgB,IAAI,MAAMR,OAAO,CAACU,MAAM,CAAC,EAAE;EAClE;EACAF,gBAAgB,IAAI,IAAI;EAExBF,OAAO,CAACC,GAAG,CAAC,KAAKZ,IAAI,IAAIa,gBAAgB,EAAE,CAAC;AAC9C,CAAC;AAACK,OAAA,CAAAnB,SAAA,GAAAA,SAAA","ignoreList":[]}
{"version":3,"names":["_helperCompilationTargets","require","compatData","logPlugin","item","targetVersions","list","filteredList","getInclusionReasons","support","startsWith","proposalName","slice","hasOwnProperty","call","console","log","formattedTargets","first","target","Object","keys","exports"],"sources":["../src/debug.ts"],"sourcesContent":["import {\n getInclusionReasons,\n type Targets,\n type Target,\n} from \"@babel/helper-compilation-targets\";\nimport compatData from \"@babel/compat-data/plugins\" with { type: \"json\" };\n\n// Outputs a message that shows which target(s) caused an item to be included:\n// transform-foo { \"edge\":\"13\", \"firefox\":\"49\", \"ie\":\"10\" }\nexport const logPlugin = (\n item: string,\n targetVersions: Targets,\n list: Record<string, Targets>,\n) => {\n const filteredList = getInclusionReasons(item, targetVersions, list);\n\n const support = list[item];\n\n if (!process.env.BABEL_8_BREAKING) {\n // It's needed to keep outputting proposal- in the debug log.\n if (item.startsWith(\"transform-\")) {\n const proposalName = `proposal-${item.slice(10)}`;\n if (\n proposalName === \"proposal-dynamic-import\" ||\n Object.hasOwn(compatData, proposalName)\n ) {\n item = proposalName;\n }\n }\n }\n\n if (!support) {\n console.log(` ${item}`);\n return;\n }\n\n let formattedTargets = `{`;\n let first = true;\n for (const target of Object.keys(filteredList) as Target[]) {\n if (!first) formattedTargets += `,`;\n first = false;\n formattedTargets += ` ${target}`;\n if (support[target]) formattedTargets += ` < ${support[target]}`;\n }\n formattedTargets += ` }`;\n\n console.log(` ${item} ${formattedTargets}`);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA;AAI2C,MACpCC,UAAU,GAAAD,OAAA,CAAM,4BAA4B;AAI5C,MAAME,SAAS,GAAGA,CACvBC,IAAY,EACZC,cAAuB,EACvBC,IAA6B,KAC1B;EACH,MAAMC,YAAY,GAAG,IAAAC,6CAAmB,EAACJ,IAAI,EAAEC,cAAc,EAAEC,IAAI,CAAC;EAEpE,MAAMG,OAAO,GAAGH,IAAI,CAACF,IAAI,CAAC;EAIxB,IAAIA,IAAI,CAACM,UAAU,CAAC,YAAY,CAAC,EAAE;IACjC,MAAMC,YAAY,GAAG,YAAYP,IAAI,CAACQ,KAAK,CAAC,EAAE,CAAC,EAAE;IACjD,IACED,YAAY,KAAK,yBAAyB,IAC1CE,cAAA,CAAAC,IAAA,CAAcZ,UAAU,EAAES,YAAY,CAAC,EACvC;MACAP,IAAI,GAAGO,YAAY;IACrB;EACF;EAGF,IAAI,CAACF,OAAO,EAAE;IACZM,OAAO,CAACC,GAAG,CAAC,KAAKZ,IAAI,EAAE,CAAC;IACxB;EACF;EAEA,IAAIa,gBAAgB,GAAG,GAAG;EAC1B,IAAIC,KAAK,GAAG,IAAI;EAChB,KAAK,MAAMC,MAAM,IAAIC,MAAM,CAACC,IAAI,CAACd,YAAY,CAAC,EAAc;IAC1D,IAAI,CAACW,KAAK,EAAED,gBAAgB,IAAI,GAAG;IACnCC,KAAK,GAAG,KAAK;IACbD,gBAAgB,IAAI,IAAIE,MAAM,EAAE;IAChC,IAAIV,OAAO,CAACU,MAAM,CAAC,EAAEF,gBAAgB,IAAI,MAAMR,OAAO,CAACU,MAAM,CAAC,EAAE;EAClE;EACAF,gBAAgB,IAAI,IAAI;EAExBF,OAAO,CAACC,GAAG,CAAC,KAAKZ,IAAI,IAAIa,gBAAgB,EAAE,CAAC;AAC9C,CAAC;AAACK,OAAA,CAAAnB,SAAA,GAAAA,SAAA","ignoreList":[]}

View File

@@ -23,7 +23,7 @@ function removeUnsupportedItems(items, babelVersion) {
items.forEach(item => {
if (hasOwnProperty.call(_availablePlugins.minVersions, item) && _semver.lt(babelVersion, _availablePlugins.minVersions[item])) {
items.delete(item);
} else if (babelVersion[0] === "8" && _availablePlugins.legacyBabel7SyntaxPlugins.has(item)) {
} else if (babelVersion.startsWith("8") && _availablePlugins.legacyBabel7SyntaxPlugins.has(item)) {
items.delete(item);
}
});

View File

@@ -1 +1 @@
{"version":3,"names":["_semver","require","_availablePlugins","addProposalSyntaxPlugins","items","proposalSyntaxPlugins","forEach","plugin","add","removeUnnecessaryItems","overlapping","item","_overlapping$item","name","delete","removeUnsupportedItems","babelVersion","hasOwnProperty","call","minVersions","semver","lt","legacyBabel7SyntaxPlugins","has"],"sources":["../src/filter-items.ts"],"sourcesContent":["import semver from \"semver\";\nimport { minVersions, legacyBabel7SyntaxPlugins } from \"./available-plugins.ts\";\n\nexport function addProposalSyntaxPlugins(\n items: Set<string>,\n proposalSyntaxPlugins: readonly string[],\n) {\n proposalSyntaxPlugins.forEach(plugin => {\n items.add(plugin);\n });\n}\nexport function removeUnnecessaryItems(\n items: Set<string>,\n overlapping: { [name: string]: string[] },\n) {\n items.forEach(item => {\n overlapping[item]?.forEach(name => items.delete(name));\n });\n}\nexport function removeUnsupportedItems(\n items: Set<string>,\n babelVersion: string,\n) {\n items.forEach(item => {\n if (\n Object.hasOwn(minVersions, item) &&\n semver.lt(\n babelVersion,\n // @ts-expect-error we have checked minVersions[item] in has call\n minVersions[item],\n )\n ) {\n items.delete(item);\n } else if (\n !process.env.BABEL_8_BREAKING &&\n babelVersion[0] === \"8\" &&\n legacyBabel7SyntaxPlugins.has(item)\n ) {\n items.delete(item);\n }\n });\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEO,SAASE,wBAAwBA,CACtCC,KAAkB,EAClBC,qBAAwC,EACxC;EACAA,qBAAqB,CAACC,OAAO,CAACC,MAAM,IAAI;IACtCH,KAAK,CAACI,GAAG,CAACD,MAAM,CAAC;EACnB,CAAC,CAAC;AACJ;AACO,SAASE,sBAAsBA,CACpCL,KAAkB,EAClBM,WAAyC,EACzC;EACAN,KAAK,CAACE,OAAO,CAACK,IAAI,IAAI;IAAA,IAAAC,iBAAA;IACpB,CAAAA,iBAAA,GAAAF,WAAW,CAACC,IAAI,CAAC,aAAjBC,iBAAA,CAAmBN,OAAO,CAACO,IAAI,IAAIT,KAAK,CAACU,MAAM,CAACD,IAAI,CAAC,CAAC;EACxD,CAAC,CAAC;AACJ;AACO,SAASE,sBAAsBA,CACpCX,KAAkB,EAClBY,YAAoB,EACpB;EACAZ,KAAK,CAACE,OAAO,CAACK,IAAI,IAAI;IACpB,IACEM,cAAA,CAAAC,IAAA,CAAcC,6BAAW,EAAER,IAAI,CAAC,IAChCS,OAAM,CAACC,EAAE,CACPL,YAAY,EAEZG,6BAAW,CAACR,IAAI,CAClB,CAAC,EACD;MACAP,KAAK,CAACU,MAAM,CAACH,IAAI,CAAC;IACpB,CAAC,MAAM,IAELK,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,IACvBM,2CAAyB,CAACC,GAAG,CAACZ,IAAI,CAAC,EACnC;MACAP,KAAK,CAACU,MAAM,CAACH,IAAI,CAAC;IACpB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
{"version":3,"names":["_semver","require","_availablePlugins","addProposalSyntaxPlugins","items","proposalSyntaxPlugins","forEach","plugin","add","removeUnnecessaryItems","overlapping","item","_overlapping$item","name","delete","removeUnsupportedItems","babelVersion","hasOwnProperty","call","minVersions","semver","lt","startsWith","legacyBabel7SyntaxPlugins","has"],"sources":["../src/filter-items.ts"],"sourcesContent":["import semver from \"semver\";\nimport { minVersions, legacyBabel7SyntaxPlugins } from \"./available-plugins.ts\";\n\nexport function addProposalSyntaxPlugins(\n items: Set<string>,\n proposalSyntaxPlugins: readonly string[],\n) {\n proposalSyntaxPlugins.forEach(plugin => {\n items.add(plugin);\n });\n}\nexport function removeUnnecessaryItems(\n items: Set<string>,\n overlapping: Record<string, string[]>,\n) {\n items.forEach(item => {\n overlapping[item]?.forEach(name => items.delete(name));\n });\n}\nexport function removeUnsupportedItems(\n items: Set<string>,\n babelVersion: string,\n) {\n items.forEach(item => {\n if (\n Object.hasOwn(minVersions, item) &&\n semver.lt(\n babelVersion,\n // @ts-expect-error we have checked minVersions[item] in has call\n minVersions[item],\n )\n ) {\n items.delete(item);\n } else if (\n !process.env.BABEL_8_BREAKING &&\n babelVersion.startsWith(\"8\") &&\n legacyBabel7SyntaxPlugins.has(item)\n ) {\n items.delete(item);\n }\n });\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEO,SAASE,wBAAwBA,CACtCC,KAAkB,EAClBC,qBAAwC,EACxC;EACAA,qBAAqB,CAACC,OAAO,CAACC,MAAM,IAAI;IACtCH,KAAK,CAACI,GAAG,CAACD,MAAM,CAAC;EACnB,CAAC,CAAC;AACJ;AACO,SAASE,sBAAsBA,CACpCL,KAAkB,EAClBM,WAAqC,EACrC;EACAN,KAAK,CAACE,OAAO,CAACK,IAAI,IAAI;IAAA,IAAAC,iBAAA;IACpB,CAAAA,iBAAA,GAAAF,WAAW,CAACC,IAAI,CAAC,aAAjBC,iBAAA,CAAmBN,OAAO,CAACO,IAAI,IAAIT,KAAK,CAACU,MAAM,CAACD,IAAI,CAAC,CAAC;EACxD,CAAC,CAAC;AACJ;AACO,SAASE,sBAAsBA,CACpCX,KAAkB,EAClBY,YAAoB,EACpB;EACAZ,KAAK,CAACE,OAAO,CAACK,IAAI,IAAI;IACpB,IACEM,cAAA,CAAAC,IAAA,CAAcC,6BAAW,EAAER,IAAI,CAAC,IAChCS,OAAM,CAACC,EAAE,CACPL,YAAY,EAEZG,6BAAW,CAACR,IAAI,CAClB,CAAC,EACD;MACAP,KAAK,CAACU,MAAM,CAACH,IAAI,CAAC;IACpB,CAAC,MAAM,IAELK,YAAY,CAACM,UAAU,CAAC,GAAG,CAAC,IAC5BC,2CAAyB,CAACC,GAAG,CAACb,IAAI,CAAC,EACnC;MACAP,KAAK,CAACU,MAAM,CAACH,IAAI,CAAC;IACpB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}

View File

@@ -36,10 +36,8 @@ function filterStageFromList(list, stageList) {
}
const pluginsListWithProposals = Object.assign({}, _pluginsCompatData.plugins, _pluginsCompatData.pluginsBugfixes);
const pluginsListWithoutProposals = filterStageFromList(pluginsListWithProposals, _shippedProposals.proposalPlugins);
{
var pluginsListNoBugfixesWithProposals = _pluginsCompatData.plugins;
var pluginsListNoBugfixesWithoutProposals = filterStageFromList(_pluginsCompatData.plugins, _shippedProposals.proposalPlugins);
}
var pluginsListNoBugfixesWithProposals = _pluginsCompatData.plugins;
var pluginsListNoBugfixesWithoutProposals = filterStageFromList(_pluginsCompatData.plugins, _shippedProposals.proposalPlugins);
const getPlugin = pluginName => {
const plugin = _availablePlugins.default[pluginName]();
if (!plugin) {
@@ -71,7 +69,7 @@ function getSpecialModulesPluginNames(modules, shouldTransformDynamicImport, bab
console.warn("Dynamic import can only be transformed when transforming ES" + " modules to AMD, CommonJS or SystemJS.");
}
}
if (babelVersion[0] !== "8") {
if (!babelVersion.startsWith("8")) {
if (!shouldTransformDynamicImport) {
modulesPluginNames.push("syntax-dynamic-import");
}
@@ -102,72 +100,66 @@ const getCoreJSOptions = ({
noRuntimeName: true
}
});
{
var getPolyfillPlugins = ({
useBuiltIns,
corejs,
polyfillTargets,
include,
exclude,
proposals,
shippedProposals,
regenerator,
debug
}) => {
const polyfillPlugins = [];
if (useBuiltIns === "usage" || useBuiltIns === "entry") {
const pluginOptions = getCoreJSOptions({
useBuiltIns,
corejs,
polyfillTargets,
include,
exclude,
proposals,
shippedProposals,
debug
});
if (corejs) {
{
if (useBuiltIns === "usage") {
if (corejs.major === 2) {
polyfillPlugins.push([_babel7Plugins.pluginCoreJS2, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
usage: true
}]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
usage: true,
deprecated: true
}]);
}
if (regenerator) {
polyfillPlugins.push([_babel7Plugins.pluginRegenerator, {
method: "usage-global",
debug
}]);
}
} else {
if (corejs.major === 2) {
polyfillPlugins.push([_babel7Plugins.legacyBabelPolyfillPlugin, {
regenerator
}], [_babel7Plugins.pluginCoreJS2, pluginOptions]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
deprecated: true
}]);
if (!regenerator) {
polyfillPlugins.push([_babel7Plugins.removeRegeneratorEntryPlugin, pluginOptions]);
}
}
var getPolyfillPlugins = ({
useBuiltIns,
corejs,
polyfillTargets,
include,
exclude,
proposals,
shippedProposals,
regenerator,
debug
}) => {
const polyfillPlugins = [];
if (useBuiltIns === "usage" || useBuiltIns === "entry") {
const pluginOptions = getCoreJSOptions({
useBuiltIns,
corejs,
polyfillTargets,
include,
exclude,
proposals,
shippedProposals,
debug
});
if (corejs) {
if (useBuiltIns === "usage") {
if (corejs.major === 2) {
polyfillPlugins.push([_babel7Plugins.pluginCoreJS2, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
usage: true
}]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
usage: true,
deprecated: true
}]);
}
if (regenerator) {
polyfillPlugins.push([_babel7Plugins.pluginRegenerator, {
method: "usage-global",
debug
}]);
}
} else {
if (corejs.major === 2) {
polyfillPlugins.push([_babel7Plugins.legacyBabelPolyfillPlugin, {
regenerator
}], [_babel7Plugins.pluginCoreJS2, pluginOptions]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babel7Plugins.legacyBabelPolyfillPlugin, {
deprecated: true
}]);
if (!regenerator) {
polyfillPlugins.push([_babel7Plugins.removeRegeneratorEntryPlugin, pluginOptions]);
}
}
}
}
return polyfillPlugins;
};
{
exports.getPolyfillPlugins = getPolyfillPlugins;
}
}
return polyfillPlugins;
};
exports.getPolyfillPlugins = getPolyfillPlugins;
function getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv, api) {
if (optionsTargets != null && optionsTargets.esmodules && optionsTargets.browsers) {
console.warn(`
@@ -196,7 +188,6 @@ function supportsExportNamespaceFrom(caller) {
var _default = exports.default = (0, _helperPluginUtils.declarePreset)((api, opts) => {
api.assertVersion(7);
const babelTargets = api.targets();
;
const {
configPath,
debug,
@@ -214,25 +205,21 @@ var _default = exports.default = (0, _helperPluginUtils.declarePreset)((api, opt
},
browserslistEnv
} = (0, _normalizeOptions.default)(opts);
{
var {
loose,
spec = false,
bugfixes = false
} = opts;
}
var {
loose,
spec = false,
bugfixes = false
} = opts;
let targets = babelTargets;
if (_semver.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
{
var hasUglifyTarget = false;
if (optionsTargets != null && optionsTargets.uglify) {
hasUglifyTarget = true;
delete optionsTargets.uglify;
console.warn(`
var hasUglifyTarget = false;
if (optionsTargets != null && optionsTargets.uglify) {
hasUglifyTarget = true;
delete optionsTargets.uglify;
console.warn(`
The uglify target has been deprecated. Set the top level
option \`forceAllTransforms: true\` instead.
`);
}
}
targets = getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv, api);
}
@@ -297,40 +284,38 @@ option \`forceAllTransforms: true\` instead.
plugins
};
});
{
exports.getModulesPluginNames = ({
modules,
transformations,
shouldTransformESM,
shouldTransformDynamicImport,
shouldTransformExportNamespaceFrom
}) => {
const modulesPluginNames = [];
if (modules !== false && transformations[modules]) {
if (shouldTransformESM) {
modulesPluginNames.push(transformations[modules]);
}
if (shouldTransformDynamicImport) {
if (shouldTransformESM && modules !== "umd") {
modulesPluginNames.push("transform-dynamic-import");
} else {
console.warn("Dynamic import can only be transformed when transforming ES" + " modules to AMD, CommonJS or SystemJS.");
}
exports.getModulesPluginNames = ({
modules,
transformations,
shouldTransformESM,
shouldTransformDynamicImport,
shouldTransformExportNamespaceFrom
}) => {
const modulesPluginNames = [];
if (modules !== false && transformations[modules]) {
if (shouldTransformESM) {
modulesPluginNames.push(transformations[modules]);
}
if (shouldTransformDynamicImport) {
if (shouldTransformESM && modules !== "umd") {
modulesPluginNames.push("transform-dynamic-import");
} else {
console.warn("Dynamic import can only be transformed when transforming ES" + " modules to AMD, CommonJS or SystemJS.");
}
}
if (shouldTransformExportNamespaceFrom) {
modulesPluginNames.push("transform-export-namespace-from");
}
if (!shouldTransformDynamicImport) {
modulesPluginNames.push("syntax-dynamic-import");
}
if (!shouldTransformExportNamespaceFrom) {
modulesPluginNames.push("syntax-export-namespace-from");
}
modulesPluginNames.push("syntax-top-level-await");
modulesPluginNames.push("syntax-import-meta");
return modulesPluginNames;
};
}
}
if (shouldTransformExportNamespaceFrom) {
modulesPluginNames.push("transform-export-namespace-from");
}
if (!shouldTransformDynamicImport) {
modulesPluginNames.push("syntax-dynamic-import");
}
if (!shouldTransformExportNamespaceFrom) {
modulesPluginNames.push("syntax-export-namespace-from");
}
modulesPluginNames.push("syntax-top-level-await");
modulesPluginNames.push("syntax-import-meta");
return modulesPluginNames;
};
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"names":["amd","commonjs","cjs","systemjs","umd"],"sources":["../src/module-transformations.ts"],"sourcesContent":["type AvailablePlugins = typeof import(\"./available-plugins\").default;\n\nexport default {\n amd: \"transform-modules-amd\",\n commonjs: \"transform-modules-commonjs\",\n cjs: \"transform-modules-commonjs\",\n systemjs: \"transform-modules-systemjs\",\n umd: \"transform-modules-umd\",\n} as { [transform: string]: keyof AvailablePlugins };\n"],"mappings":";;;;;;iCAEe;EACbA,GAAG,EAAE,uBAAuB;EAC5BC,QAAQ,EAAE,4BAA4B;EACtCC,GAAG,EAAE,4BAA4B;EACjCC,QAAQ,EAAE,4BAA4B;EACtCC,GAAG,EAAE;AACP,CAAC","ignoreList":[]}
{"version":3,"names":["amd","commonjs","cjs","systemjs","umd"],"sources":["../src/module-transformations.ts"],"sourcesContent":["type AvailablePlugins = typeof import(\"./available-plugins\").default;\n\nexport default {\n amd: \"transform-modules-amd\",\n commonjs: \"transform-modules-commonjs\",\n cjs: \"transform-modules-commonjs\",\n systemjs: \"transform-modules-systemjs\",\n umd: \"transform-modules-umd\",\n} as Record<string, keyof AvailablePlugins>;\n"],"mappings":";;;;;;iCAEe;EACbA,GAAG,EAAE,uBAAuB;EAC5BC,QAAQ,EAAE,4BAA4B;EACtCC,GAAG,EAAE,4BAA4B;EACjCC,QAAQ,EAAE,4BAA4B;EACtCC,GAAG,EAAE;AACP,CAAC","ignoreList":[]}

View File

@@ -92,10 +92,8 @@ function normalizeCoreJSOption(corejs, useBuiltIns) {
let proposals = false;
let rawVersion;
if (useBuiltIns && corejs === undefined) {
{
rawVersion = 2;
console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a " + `core-js version. Currently, we assume version 2.x when no version ` + "is passed. Since this default version will likely change in future " + "versions of Babel, we recommend explicitly setting the core-js version " + "you are using via the `corejs` option.\n" + "\nYou should also be sure that the version you pass to the `corejs` " + "option matches the version specified in your `package.json`'s " + "`dependencies` section. If it doesn't, you need to run one of the " + "following commands:\n\n" + " npm install --save core-js@2 npm install --save core-js@3\n" + " yarn add core-js@2 yarn add core-js@3\n\n" + "More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n" + "More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs");
}
rawVersion = 2;
console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a " + `core-js version. Currently, we assume version 2.x when no version ` + "is passed. Since this default version will likely change in future " + "versions of Babel, we recommend explicitly setting the core-js version " + "you are using via the `corejs` option.\n" + "\nYou should also be sure that the version you pass to the `corejs` " + "option matches the version specified in your `package.json`'s " + "`dependencies` section. If it doesn't, you need to run one of the " + "following commands:\n\n" + " npm install --save core-js@2 npm install --save core-js@3\n" + " yarn add core-js@2 yarn add core-js@3\n\n" + "More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n" + "More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs");
} else if (typeof corejs === "object" && corejs !== null) {
rawVersion = corejs.version;
proposals = Boolean(corejs.proposals);
@@ -105,10 +103,8 @@ function normalizeCoreJSOption(corejs, useBuiltIns) {
const version = rawVersion ? _semver.coerce(String(rawVersion)) : false;
if (version) {
if (useBuiltIns) {
{
if (version.major < 2 || version.major > 3) {
throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported.");
}
if (version.major < 2 || version.major > 3) {
throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported.");
}
} else {
console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n");
@@ -120,18 +116,15 @@ function normalizeCoreJSOption(corejs, useBuiltIns) {
};
}
function normalizeOptions(opts) {
;
v.validateTopLevelOptions(opts, _options.TopLevelOptions);
const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
const corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);
const include = expandIncludesAndExcludes(opts.include, _options.TopLevelOptions.include, !!corejs.version && corejs.version.major);
const exclude = expandIncludesAndExcludes(opts.exclude, _options.TopLevelOptions.exclude, !!corejs.version && corejs.version.major);
checkDuplicateIncludeExcludes(include, exclude);
{
v.validateBooleanOption("loose", opts.loose);
v.validateBooleanOption("spec", opts.spec);
v.validateBooleanOption("bugfixes", opts.bugfixes);
}
v.validateBooleanOption("loose", opts.loose);
v.validateBooleanOption("spec", opts.spec);
v.validateBooleanOption("bugfixes", opts.bugfixes);
return {
configPath: v.validateStringOption(_options.TopLevelOptions.configPath, opts.configPath, process.cwd()),
corejs,

File diff suppressed because one or more lines are too long

View File

@@ -18,13 +18,11 @@ const TopLevelOptions = exports.TopLevelOptions = {
useBuiltIns: "useBuiltIns",
browserslistEnv: "browserslistEnv"
};
{
Object.assign(TopLevelOptions, {
bugfixes: "bugfixes",
loose: "loose",
spec: "spec"
});
}
Object.assign(TopLevelOptions, {
bugfixes: "bugfixes",
loose: "loose",
spec: "spec"
});
const ModulesOption = exports.ModulesOption = {
false: false,
auto: "auto",

View File

@@ -1 +1 @@
{"version":3,"names":["TopLevelOptions","exports","configPath","corejs","debug","exclude","forceAllTransforms","ignoreBrowserslistConfig","include","modules","shippedProposals","targets","useBuiltIns","browserslistEnv","Object","assign","bugfixes","loose","spec","ModulesOption","false","auto","amd","commonjs","cjs","systemjs","umd","UseBuiltInsOption","entry","usage"],"sources":["../src/options.ts"],"sourcesContent":["export const TopLevelOptions = {\n configPath: \"configPath\",\n corejs: \"corejs\",\n debug: \"debug\",\n exclude: \"exclude\",\n forceAllTransforms: \"forceAllTransforms\",\n ignoreBrowserslistConfig: \"ignoreBrowserslistConfig\",\n include: \"include\",\n modules: \"modules\",\n shippedProposals: \"shippedProposals\",\n targets: \"targets\",\n useBuiltIns: \"useBuiltIns\",\n browserslistEnv: \"browserslistEnv\",\n} as const;\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(TopLevelOptions, {\n bugfixes: \"bugfixes\",\n loose: \"loose\",\n spec: \"spec\",\n });\n}\n\nexport const ModulesOption = {\n false: false,\n auto: \"auto\",\n amd: \"amd\",\n commonjs: \"commonjs\",\n cjs: \"cjs\",\n systemjs: \"systemjs\",\n umd: \"umd\",\n} as const;\n\nexport const UseBuiltInsOption = {\n false: false,\n entry: \"entry\",\n usage: \"usage\",\n} as const;\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC7BE,UAAU,EAAE,YAAY;EACxBC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,kBAAkB,EAAE,oBAAoB;EACxCC,wBAAwB,EAAE,0BAA0B;EACpDC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,gBAAgB,EAAE,kBAAkB;EACpCC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,aAAa;EAC1BC,eAAe,EAAE;AACnB,CAAU;AAEyB;EACjCC,MAAM,CAACC,MAAM,CAACf,eAAe,EAAE;IAC7BgB,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,OAAO;IACdC,IAAI,EAAE;EACR,CAAC,CAAC;AACJ;AAEO,MAAMC,aAAa,GAAAlB,OAAA,CAAAkB,aAAA,GAAG;EAC3BC,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,KAAK;EACVC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE,KAAK;EACVC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE;AACP,CAAU;AAEH,MAAMC,iBAAiB,GAAA1B,OAAA,CAAA0B,iBAAA,GAAG;EAC/BP,KAAK,EAAE,KAAK;EACZQ,KAAK,EAAE,OAAO;EACdC,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
{"version":3,"names":["TopLevelOptions","exports","configPath","corejs","debug","exclude","forceAllTransforms","ignoreBrowserslistConfig","include","modules","shippedProposals","targets","useBuiltIns","browserslistEnv","Object","assign","bugfixes","loose","spec","ModulesOption","false","auto","amd","commonjs","cjs","systemjs","umd","UseBuiltInsOption","entry","usage"],"sources":["../src/options.ts"],"sourcesContent":["export const TopLevelOptions = {\n configPath: \"configPath\",\n corejs: \"corejs\",\n debug: \"debug\",\n exclude: \"exclude\",\n forceAllTransforms: \"forceAllTransforms\",\n ignoreBrowserslistConfig: \"ignoreBrowserslistConfig\",\n include: \"include\",\n modules: \"modules\",\n shippedProposals: \"shippedProposals\",\n targets: \"targets\",\n useBuiltIns: \"useBuiltIns\",\n browserslistEnv: \"browserslistEnv\",\n} as const;\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(TopLevelOptions, {\n bugfixes: \"bugfixes\",\n loose: \"loose\",\n spec: \"spec\",\n });\n}\n\nexport const ModulesOption = {\n false: false,\n auto: \"auto\",\n amd: \"amd\",\n commonjs: \"commonjs\",\n cjs: \"cjs\",\n systemjs: \"systemjs\",\n umd: \"umd\",\n} as const;\n\nexport const UseBuiltInsOption = {\n false: false,\n entry: \"entry\",\n usage: \"usage\",\n} as const;\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC7BE,UAAU,EAAE,YAAY;EACxBC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,kBAAkB,EAAE,oBAAoB;EACxCC,wBAAwB,EAAE,0BAA0B;EACpDC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,gBAAgB,EAAE,kBAAkB;EACpCC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,aAAa;EAC1BC,eAAe,EAAE;AACnB,CAAU;AAGRC,MAAM,CAACC,MAAM,CAACf,eAAe,EAAE;EAC7BgB,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACR,CAAC,CAAC;AAGG,MAAMC,aAAa,GAAAlB,OAAA,CAAAkB,aAAA,GAAG;EAC3BC,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,KAAK;EACVC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE,KAAK;EACVC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE;AACP,CAAU;AAEH,MAAMC,iBAAiB,GAAA1B,OAAA,CAAA0B,iBAAA,GAAG;EAC/BP,KAAK,EAAE,KAAK;EACZQ,KAAK,EAAE,OAAO;EACdC,KAAK,EAAE;AACT,CAAU","ignoreList":[]}

View File

@@ -12,9 +12,7 @@ const keys = Object.keys;
const plugins = exports.plugins = filterAvailable(originalPlugins);
const pluginsBugfixes = exports.pluginsBugfixes = filterAvailable(originalPluginsBugfixes);
const overlappingPlugins = exports.overlappingPlugins = filterAvailable(originalOverlappingPlugins);
{
overlappingPlugins["syntax-import-attributes"] = ["syntax-import-assertions"];
}
overlappingPlugins["syntax-import-attributes"] = ["syntax-import-assertions"];
function filterAvailable(data) {
const result = {};
for (const plugin of keys(data)) {

View File

@@ -1 +1 @@
{"version":3,"names":["_availablePlugins","require","originalPlugins","originalPluginsBugfixes","originalOverlappingPlugins","keys","Object","plugins","exports","filterAvailable","pluginsBugfixes","overlappingPlugins","data","result","plugin","hasOwnProperty","call","availablePlugins"],"sources":["../src/plugins-compat-data.ts"],"sourcesContent":["import originalPlugins from \"@babel/compat-data/plugins\" with { type: \"json\" };\nimport originalPluginsBugfixes from \"@babel/compat-data/plugin-bugfixes\" with { type: \"json\" };\nimport originalOverlappingPlugins from \"@babel/compat-data/overlapping-plugins\" with { type: \"json\" };\nimport availablePlugins from \"./available-plugins.ts\";\n\nconst keys: <O extends object>(o: O) => (keyof O)[] = Object.keys;\n\nexport const plugins = filterAvailable(originalPlugins);\nexport const pluginsBugfixes = filterAvailable(originalPluginsBugfixes);\nexport const overlappingPlugins = filterAvailable(originalOverlappingPlugins);\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error: we extend this here, since it's a syntax plugin and thus\n // doesn't make sense to store it in a compat-data package.\n overlappingPlugins[\"syntax-import-attributes\"] = [\"syntax-import-assertions\"];\n}\n\nfunction filterAvailable<Data extends { [name: string]: unknown }>(\n data: Data,\n): { [Name in keyof Data & keyof typeof availablePlugins]: Data[Name] } {\n const result = {} as any;\n for (const plugin of keys(data)) {\n if (Object.hasOwn(availablePlugins, plugin)) {\n result[plugin] = data[plugin];\n }\n }\n return result;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,iBAAA,GAAAC,OAAA;AAAsD,MAH/CC,eAAe,GAAAD,OAAA,CAAM,4BAA4B;EACjDE,uBAAuB,GAAAF,OAAA,CAAM,oCAAoC;EACjEG,0BAA0B,GAAAH,OAAA,CAAM,wCAAwC;AAG/E,MAAMI,IAA6C,GAAGC,MAAM,CAACD,IAAI;AAE1D,MAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGE,eAAe,CAACP,eAAe,CAAC;AAChD,MAAMQ,eAAe,GAAAF,OAAA,CAAAE,eAAA,GAAGD,eAAe,CAACN,uBAAuB,CAAC;AAChE,MAAMQ,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,GAAGF,eAAe,CAACL,0BAA0B,CAAC;AAE1C;EAGjCO,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,CAAC,0BAA0B,CAAC;AAC/E;AAEA,SAASF,eAAeA,CACtBG,IAAU,EAC4D;EACtE,MAAMC,MAAM,GAAG,CAAC,CAAQ;EACxB,KAAK,MAAMC,MAAM,IAAIT,IAAI,CAACO,IAAI,CAAC,EAAE;IAC/B,IAAIG,cAAA,CAAAC,IAAA,CAAcC,yBAAgB,EAAEH,MAAM,CAAC,EAAE;MAC3CD,MAAM,CAACC,MAAM,CAAC,GAAGF,IAAI,CAACE,MAAM,CAAC;IAC/B;EACF;EACA,OAAOD,MAAM;AACf","ignoreList":[]}
{"version":3,"names":["_availablePlugins","require","originalPlugins","originalPluginsBugfixes","originalOverlappingPlugins","keys","Object","plugins","exports","filterAvailable","pluginsBugfixes","overlappingPlugins","data","result","plugin","hasOwnProperty","call","availablePlugins"],"sources":["../src/plugins-compat-data.ts"],"sourcesContent":["import originalPlugins from \"@babel/compat-data/plugins\" with { type: \"json\" };\nimport originalPluginsBugfixes from \"@babel/compat-data/plugin-bugfixes\" with { type: \"json\" };\nimport originalOverlappingPlugins from \"@babel/compat-data/overlapping-plugins\" with { type: \"json\" };\nimport availablePlugins from \"./available-plugins.ts\";\n\nconst keys: <O extends object>(o: O) => (keyof O)[] = Object.keys;\n\nexport const plugins = filterAvailable(originalPlugins);\nexport const pluginsBugfixes = filterAvailable(originalPluginsBugfixes);\nexport const overlappingPlugins = filterAvailable(originalOverlappingPlugins);\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error: we extend this here, since it's a syntax plugin and thus\n // doesn't make sense to store it in a compat-data package.\n overlappingPlugins[\"syntax-import-attributes\"] = [\"syntax-import-assertions\"];\n}\n\nfunction filterAvailable<Data extends Record<string, unknown>>(\n data: Data,\n): { [Name in keyof Data & keyof typeof availablePlugins]: Data[Name] } {\n const result = {} as any;\n for (const plugin of keys(data)) {\n if (Object.hasOwn(availablePlugins, plugin)) {\n result[plugin] = data[plugin];\n }\n }\n return result;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,iBAAA,GAAAC,OAAA;AAAsD,MAH/CC,eAAe,GAAAD,OAAA,CAAM,4BAA4B;EACjDE,uBAAuB,GAAAF,OAAA,CAAM,oCAAoC;EACjEG,0BAA0B,GAAAH,OAAA,CAAM,wCAAwC;AAG/E,MAAMI,IAA6C,GAAGC,MAAM,CAACD,IAAI;AAE1D,MAAME,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGE,eAAe,CAACP,eAAe,CAAC;AAChD,MAAMQ,eAAe,GAAAF,OAAA,CAAAE,eAAA,GAAGD,eAAe,CAACN,uBAAuB,CAAC;AAChE,MAAMQ,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,GAAGF,eAAe,CAACL,0BAA0B,CAAC;AAK3EO,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,CAAC,0BAA0B,CAAC;AAG/E,SAASF,eAAeA,CACtBG,IAAU,EAC4D;EACtE,MAAMC,MAAM,GAAG,CAAC,CAAQ;EACxB,KAAK,MAAMC,MAAM,IAAIT,IAAI,CAACO,IAAI,CAAC,EAAE;IAC/B,IAAIG,cAAA,CAAAC,IAAA,CAAcC,yBAAgB,EAAEH,MAAM,CAAC,EAAE;MAC3CD,MAAM,CAACC,MAAM,CAAC,GAAGF,IAAI,CAACE,MAAM,CAAC;IAC/B;EACF;EACA,OAAOD,MAAM;AACf","ignoreList":[]}

View File

@@ -1,21 +1,19 @@
{
Object.defineProperties(exports, {
pluginCoreJS2: {
get: () => require("babel-plugin-polyfill-corejs2").default
},
pluginRegenerator: {
get: () => require("babel-plugin-polyfill-regenerator").default
},
legacyBabelPolyfillPlugin: {
get: () => require("./babel-polyfill.cjs")
},
removeRegeneratorEntryPlugin: {
get: () => require("./regenerator.cjs")
},
corejs2Polyfills: {
get: () => require("@babel/compat-data/corejs2-built-ins")
}
});
}
Object.defineProperties(exports, {
pluginCoreJS2: {
get: () => require("babel-plugin-polyfill-corejs2").default
},
pluginRegenerator: {
get: () => require("babel-plugin-polyfill-regenerator").default
},
legacyBabelPolyfillPlugin: {
get: () => require("./babel-polyfill.cjs")
},
removeRegeneratorEntryPlugin: {
get: () => require("./regenerator.cjs")
},
corejs2Polyfills: {
get: () => require("@babel/compat-data/corejs2-built-ins")
}
});
//# sourceMappingURL=babel-7-plugins.cjs.map

View File

@@ -1 +1 @@
{"version":3,"names":["Object","defineProperties","exports","pluginCoreJS2","get","require","default","pluginRegenerator","legacyBabelPolyfillPlugin","removeRegeneratorEntryPlugin","corejs2Polyfills"],"sources":["../../src/polyfills/babel-7-plugins.cjs"],"sourcesContent":["// TODO(Babel 8): Remove this file\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.defineProperties(exports, {\n pluginCoreJS2: {\n get: () => require(\"babel-plugin-polyfill-corejs2\").default,\n },\n pluginRegenerator: {\n get: () => require(\"babel-plugin-polyfill-regenerator\").default,\n },\n legacyBabelPolyfillPlugin: { get: () => require(\"./babel-polyfill.cjs\") },\n removeRegeneratorEntryPlugin: { get: () => require(\"./regenerator.cjs\") },\n corejs2Polyfills: {\n get: () => require(\"@babel/compat-data/corejs2-built-ins\"),\n },\n });\n}\n"],"mappings":"AAEmC;EACjCA,MAAM,CAACC,gBAAgB,CAACC,OAAO,EAAE;IAC/BC,aAAa,EAAE;MACbC,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,+BAA+B,CAAC,CAACC;IACtD,CAAC;IACDC,iBAAiB,EAAE;MACjBH,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,mCAAmC,CAAC,CAACC;IAC1D,CAAC;IACDE,yBAAyB,EAAE;MAAEJ,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,sBAAsB;IAAE,CAAC;IACzEI,4BAA4B,EAAE;MAAEL,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,mBAAmB;IAAE,CAAC;IACzEK,gBAAgB,EAAE;MAChBN,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,sCAAsC;IAC3D;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
{"version":3,"names":["Object","defineProperties","exports","pluginCoreJS2","get","require","default","pluginRegenerator","legacyBabelPolyfillPlugin","removeRegeneratorEntryPlugin","corejs2Polyfills"],"sources":["../../src/polyfills/babel-7-plugins.cjs"],"sourcesContent":["// TODO(Babel 8): Remove this file\n\nif (!process.env.BABEL_8_BREAKING) {\n Object.defineProperties(exports, {\n pluginCoreJS2: {\n get: () => require(\"babel-plugin-polyfill-corejs2\").default,\n },\n pluginRegenerator: {\n get: () => require(\"babel-plugin-polyfill-regenerator\").default,\n },\n legacyBabelPolyfillPlugin: { get: () => require(\"./babel-polyfill.cjs\") },\n removeRegeneratorEntryPlugin: { get: () => require(\"./regenerator.cjs\") },\n corejs2Polyfills: {\n get: () => require(\"@babel/compat-data/corejs2-built-ins\"),\n },\n });\n}\n"],"mappings":"AAGEA,MAAM,CAACC,gBAAgB,CAACC,OAAO,EAAE;EAC/BC,aAAa,EAAE;IACbC,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,+BAA+B,CAAC,CAACC;EACtD,CAAC;EACDC,iBAAiB,EAAE;IACjBH,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,mCAAmC,CAAC,CAACC;EAC1D,CAAC;EACDE,yBAAyB,EAAE;IAAEJ,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,sBAAsB;EAAE,CAAC;EACzEI,4BAA4B,EAAE;IAAEL,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,mBAAmB;EAAE,CAAC;EACzEK,gBAAgB,EAAE;IAChBN,GAAG,EAAEA,CAAA,KAAMC,OAAO,CAAC,sCAAsC;EAC3D;AACF,CAAC,CAAC","ignoreList":[]}

View File

@@ -1,4 +1,3 @@
;
const {
getImportSource,
getRequireSource,

View File

@@ -1 +1 @@
{"version":3,"names":["getImportSource","getRequireSource","isPolyfillSource","require","BABEL_POLYFILL_DEPRECATION","NO_DIRECT_POLYFILL_IMPORT","module","exports","template","regenerator","deprecated","usage","name","visitor","ImportDeclaration","path","src","console","warn","replace","remove","replaceWithMultiple","ast","replaceWith","Program","get","forEach","bodyPath"],"sources":["../../src/polyfills/babel-polyfill.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst {\n getImportSource,\n getRequireSource,\n isPolyfillSource,\n} = require(\"./utils.cjs\");\n\nconst BABEL_POLYFILL_DEPRECATION = `\n \\`@babel/polyfill\\` is deprecated. Please, use required parts of \\`core-js\\`\n and \\`regenerator-runtime/runtime\\` separately`;\n\nconst NO_DIRECT_POLYFILL_IMPORT = `\n When setting \\`useBuiltIns: 'usage'\\`, polyfills are automatically imported when needed.\n Please remove the direct import of \\`SPECIFIER\\` or use \\`useBuiltIns: 'entry'\\` instead.`;\n\nmodule.exports = function ({ template }, { regenerator, deprecated, usage }) {\n return {\n name: \"preset-env/replace-babel-polyfill\",\n visitor: {\n ImportDeclaration(path) {\n const src = getImportSource(path);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) path.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n path.replaceWithMultiple(template.ast`\n import \"core-js\";\n import \"regenerator-runtime/runtime.js\";\n `);\n } else {\n path.replaceWith(template.ast`\n import \"core-js\";\n `);\n }\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const src = getRequireSource(bodyPath);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) bodyPath.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n bodyPath.replaceWithMultiple(template.ast`\n require(\"core-js\");\n require(\"regenerator-runtime/runtime.js\");\n `);\n } else {\n bodyPath.replaceWith(template.ast`\n require(\"core-js\");\n `);\n }\n }\n });\n },\n },\n };\n};\n"],"mappings":";AAOA,MAAM;EACJA,eAAe;EACfC,gBAAgB;EAChBC;AACF,CAAC,GAAGC,OAAO,CAAC,aAAa,CAAC;AAE1B,MAAMC,0BAA0B,GAAG;AACnC;AACA,iDAAiD;AAEjD,MAAMC,yBAAyB,GAAG;AAClC;AACA,4FAA4F;AAE5FC,MAAM,CAACC,OAAO,GAAG,UAAU;EAAEC;AAAS,CAAC,EAAE;EAAEC,WAAW;EAAEC,UAAU;EAAEC;AAAM,CAAC,EAAE;EAC3E,OAAO;IACLC,IAAI,EAAE,mCAAmC;IACzCC,OAAO,EAAE;MACPC,iBAAiBA,CAACC,IAAI,EAAE;QACtB,MAAMC,GAAG,GAAGhB,eAAe,CAACe,IAAI,CAAC;QACjC,IAAIJ,KAAK,IAAIT,gBAAgB,CAACc,GAAG,CAAC,EAAE;UAClCC,OAAO,CAACC,IAAI,CAACb,yBAAyB,CAACc,OAAO,CAAC,WAAW,EAAEH,GAAG,CAAC,CAAC;UACjE,IAAI,CAACN,UAAU,EAAEK,IAAI,CAACK,MAAM,CAAC,CAAC;QAChC,CAAC,MAAM,IAAIJ,GAAG,KAAK,iBAAiB,EAAE;UACpC,IAAIN,UAAU,EAAE;YACdO,OAAO,CAACC,IAAI,CAACd,0BAA0B,CAAC;UAC1C,CAAC,MAAM,IAAIK,WAAW,EAAE;YACtBM,IAAI,CAACM,mBAAmB,CAACb,QAAQ,CAACc,GAAG;AACjD;AACA;AACA,aAAa,CAAC;UACJ,CAAC,MAAM;YACLP,IAAI,CAACQ,WAAW,CAACf,QAAQ,CAACc,GAAG;AACzC;AACA,aAAa,CAAC;UACJ;QACF;MACF,CAAC;MACDE,OAAOA,CAACT,IAAI,EAAE;QACZA,IAAI,CAACU,GAAG,CAAC,MAAM,CAAC,CAACC,OAAO,CAACC,QAAQ,IAAI;UACnC,MAAMX,GAAG,GAAGf,gBAAgB,CAAC0B,QAAQ,CAAC;UACtC,IAAIhB,KAAK,IAAIT,gBAAgB,CAACc,GAAG,CAAC,EAAE;YAClCC,OAAO,CAACC,IAAI,CAACb,yBAAyB,CAACc,OAAO,CAAC,WAAW,EAAEH,GAAG,CAAC,CAAC;YACjE,IAAI,CAACN,UAAU,EAAEiB,QAAQ,CAACP,MAAM,CAAC,CAAC;UACpC,CAAC,MAAM,IAAIJ,GAAG,KAAK,iBAAiB,EAAE;YACpC,IAAIN,UAAU,EAAE;cACdO,OAAO,CAACC,IAAI,CAACd,0BAA0B,CAAC;YAC1C,CAAC,MAAM,IAAIK,WAAW,EAAE;cACtBkB,QAAQ,CAACN,mBAAmB,CAACb,QAAQ,CAACc,GAAG;AACvD;AACA;AACA,eAAe,CAAC;YACJ,CAAC,MAAM;cACLK,QAAQ,CAACJ,WAAW,CAACf,QAAQ,CAACc,GAAG;AAC/C;AACA,eAAe,CAAC;YACJ;UACF;QACF,CAAC,CAAC;MACJ;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}
{"version":3,"names":["getImportSource","getRequireSource","isPolyfillSource","require","BABEL_POLYFILL_DEPRECATION","NO_DIRECT_POLYFILL_IMPORT","module","exports","template","regenerator","deprecated","usage","name","visitor","ImportDeclaration","path","src","console","warn","replace","remove","replaceWithMultiple","ast","replaceWith","Program","get","forEach","bodyPath"],"sources":["../../src/polyfills/babel-polyfill.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst {\n getImportSource,\n getRequireSource,\n isPolyfillSource,\n} = require(\"./utils.cjs\");\n\nconst BABEL_POLYFILL_DEPRECATION = `\n \\`@babel/polyfill\\` is deprecated. Please, use required parts of \\`core-js\\`\n and \\`regenerator-runtime/runtime\\` separately`;\n\nconst NO_DIRECT_POLYFILL_IMPORT = `\n When setting \\`useBuiltIns: 'usage'\\`, polyfills are automatically imported when needed.\n Please remove the direct import of \\`SPECIFIER\\` or use \\`useBuiltIns: 'entry'\\` instead.`;\n\nmodule.exports = function ({ template }, { regenerator, deprecated, usage }) {\n return {\n name: \"preset-env/replace-babel-polyfill\",\n visitor: {\n ImportDeclaration(path) {\n const src = getImportSource(path);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) path.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n path.replaceWithMultiple(template.ast`\n import \"core-js\";\n import \"regenerator-runtime/runtime.js\";\n `);\n } else {\n path.replaceWith(template.ast`\n import \"core-js\";\n `);\n }\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n const src = getRequireSource(bodyPath);\n if (usage && isPolyfillSource(src)) {\n console.warn(NO_DIRECT_POLYFILL_IMPORT.replace(\"SPECIFIER\", src));\n if (!deprecated) bodyPath.remove();\n } else if (src === \"@babel/polyfill\") {\n if (deprecated) {\n console.warn(BABEL_POLYFILL_DEPRECATION);\n } else if (regenerator) {\n bodyPath.replaceWithMultiple(template.ast`\n require(\"core-js\");\n require(\"regenerator-runtime/runtime.js\");\n `);\n } else {\n bodyPath.replaceWith(template.ast`\n require(\"core-js\");\n `);\n }\n }\n });\n },\n },\n };\n};\n"],"mappings":"AAOA,MAAM;EACJA,eAAe;EACfC,gBAAgB;EAChBC;AACF,CAAC,GAAGC,OAAO,CAAC,aAAa,CAAC;AAE1B,MAAMC,0BAA0B,GAAG;AACnC;AACA,iDAAiD;AAEjD,MAAMC,yBAAyB,GAAG;AAClC;AACA,4FAA4F;AAE5FC,MAAM,CAACC,OAAO,GAAG,UAAU;EAAEC;AAAS,CAAC,EAAE;EAAEC,WAAW;EAAEC,UAAU;EAAEC;AAAM,CAAC,EAAE;EAC3E,OAAO;IACLC,IAAI,EAAE,mCAAmC;IACzCC,OAAO,EAAE;MACPC,iBAAiBA,CAACC,IAAI,EAAE;QACtB,MAAMC,GAAG,GAAGhB,eAAe,CAACe,IAAI,CAAC;QACjC,IAAIJ,KAAK,IAAIT,gBAAgB,CAACc,GAAG,CAAC,EAAE;UAClCC,OAAO,CAACC,IAAI,CAACb,yBAAyB,CAACc,OAAO,CAAC,WAAW,EAAEH,GAAG,CAAC,CAAC;UACjE,IAAI,CAACN,UAAU,EAAEK,IAAI,CAACK,MAAM,CAAC,CAAC;QAChC,CAAC,MAAM,IAAIJ,GAAG,KAAK,iBAAiB,EAAE;UACpC,IAAIN,UAAU,EAAE;YACdO,OAAO,CAACC,IAAI,CAACd,0BAA0B,CAAC;UAC1C,CAAC,MAAM,IAAIK,WAAW,EAAE;YACtBM,IAAI,CAACM,mBAAmB,CAACb,QAAQ,CAACc,GAAG;AACjD;AACA;AACA,aAAa,CAAC;UACJ,CAAC,MAAM;YACLP,IAAI,CAACQ,WAAW,CAACf,QAAQ,CAACc,GAAG;AACzC;AACA,aAAa,CAAC;UACJ;QACF;MACF,CAAC;MACDE,OAAOA,CAACT,IAAI,EAAE;QACZA,IAAI,CAACU,GAAG,CAAC,MAAM,CAAC,CAACC,OAAO,CAACC,QAAQ,IAAI;UACnC,MAAMX,GAAG,GAAGf,gBAAgB,CAAC0B,QAAQ,CAAC;UACtC,IAAIhB,KAAK,IAAIT,gBAAgB,CAACc,GAAG,CAAC,EAAE;YAClCC,OAAO,CAACC,IAAI,CAACb,yBAAyB,CAACc,OAAO,CAAC,WAAW,EAAEH,GAAG,CAAC,CAAC;YACjE,IAAI,CAACN,UAAU,EAAEiB,QAAQ,CAACP,MAAM,CAAC,CAAC;UACpC,CAAC,MAAM,IAAIJ,GAAG,KAAK,iBAAiB,EAAE;YACpC,IAAIN,UAAU,EAAE;cACdO,OAAO,CAACC,IAAI,CAACd,0BAA0B,CAAC;YAC1C,CAAC,MAAM,IAAIK,WAAW,EAAE;cACtBkB,QAAQ,CAACN,mBAAmB,CAACb,QAAQ,CAACc,GAAG;AACvD;AACA;AACA,eAAe,CAAC;YACJ,CAAC,MAAM;cACLK,QAAQ,CAACJ,WAAW,CAACf,QAAQ,CAACc,GAAG;AAC/C;AACA,eAAe,CAAC;YACJ;UACF;QACF,CAAC,CAAC;MACJ;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}

View File

@@ -1,4 +1,3 @@
;
const {
getImportSource,
getRequireSource

View File

@@ -1 +1 @@
{"version":3,"names":["getImportSource","getRequireSource","require","isRegeneratorSource","source","module","exports","visitor","ImportDeclaration","path","regeneratorImportExcluded","remove","Program","get","forEach","bodyPath","name","pre","post","opts","debug","filename","file","process","env","BABEL_ENV","replace","console","log"],"sources":["../../src/polyfills/regenerator.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst { getImportSource, getRequireSource } = require(\"./utils.cjs\");\n\nfunction isRegeneratorSource(source) {\n return (\n source === \"regenerator-runtime/runtime\" ||\n source === \"regenerator-runtime/runtime.js\"\n );\n}\n\nmodule.exports = function () {\n const visitor = {\n ImportDeclaration(path) {\n if (isRegeneratorSource(getImportSource(path))) {\n this.regeneratorImportExcluded = true;\n path.remove();\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n if (isRegeneratorSource(getRequireSource(bodyPath))) {\n this.regeneratorImportExcluded = true;\n bodyPath.remove();\n }\n });\n },\n };\n\n return {\n name: \"preset-env/remove-regenerator\",\n visitor,\n pre() {\n this.regeneratorImportExcluded = false;\n },\n post() {\n if (this.opts.debug && this.regeneratorImportExcluded) {\n let filename = this.file.opts.filename;\n // normalize filename to generate consistent preset-env test fixtures\n if (process.env.BABEL_ENV === \"test\") {\n filename = filename.replace(/\\\\/g, \"/\");\n }\n console.log(\n `\\n[${filename}] Based on your targets, regenerator-runtime import excluded.`,\n );\n }\n },\n };\n};\n"],"mappings":";AAOA,MAAM;EAAEA,eAAe;EAAEC;AAAiB,CAAC,GAAGC,OAAO,CAAC,aAAa,CAAC;AAEpE,SAASC,mBAAmBA,CAACC,MAAM,EAAE;EACnC,OACEA,MAAM,KAAK,6BAA6B,IACxCA,MAAM,KAAK,gCAAgC;AAE/C;AAEAC,MAAM,CAACC,OAAO,GAAG,YAAY;EAC3B,MAAMC,OAAO,GAAG;IACdC,iBAAiBA,CAACC,IAAI,EAAE;MACtB,IAAIN,mBAAmB,CAACH,eAAe,CAACS,IAAI,CAAC,CAAC,EAAE;QAC9C,IAAI,CAACC,yBAAyB,GAAG,IAAI;QACrCD,IAAI,CAACE,MAAM,CAAC,CAAC;MACf;IACF,CAAC;IACDC,OAAOA,CAACH,IAAI,EAAE;MACZA,IAAI,CAACI,GAAG,CAAC,MAAM,CAAC,CAACC,OAAO,CAACC,QAAQ,IAAI;QACnC,IAAIZ,mBAAmB,CAACF,gBAAgB,CAACc,QAAQ,CAAC,CAAC,EAAE;UACnD,IAAI,CAACL,yBAAyB,GAAG,IAAI;UACrCK,QAAQ,CAACJ,MAAM,CAAC,CAAC;QACnB;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLK,IAAI,EAAE,+BAA+B;IACrCT,OAAO;IACPU,GAAGA,CAAA,EAAG;MACJ,IAAI,CAACP,yBAAyB,GAAG,KAAK;IACxC,CAAC;IACDQ,IAAIA,CAAA,EAAG;MACL,IAAI,IAAI,CAACC,IAAI,CAACC,KAAK,IAAI,IAAI,CAACV,yBAAyB,EAAE;QACrD,IAAIW,QAAQ,GAAG,IAAI,CAACC,IAAI,CAACH,IAAI,CAACE,QAAQ;QAEtC,IAAIE,OAAO,CAACC,GAAG,CAACC,SAAS,KAAK,MAAM,EAAE;UACpCJ,QAAQ,GAAGA,QAAQ,CAACK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;QACzC;QACAC,OAAO,CAACC,GAAG,CACT,MAAMP,QAAQ,+DAChB,CAAC;MACH;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}
{"version":3,"names":["getImportSource","getRequireSource","require","isRegeneratorSource","source","module","exports","visitor","ImportDeclaration","path","regeneratorImportExcluded","remove","Program","get","forEach","bodyPath","name","pre","post","opts","debug","filename","file","process","env","BABEL_ENV","replace","console","log"],"sources":["../../src/polyfills/regenerator.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nconst { getImportSource, getRequireSource } = require(\"./utils.cjs\");\n\nfunction isRegeneratorSource(source) {\n return (\n source === \"regenerator-runtime/runtime\" ||\n source === \"regenerator-runtime/runtime.js\"\n );\n}\n\nmodule.exports = function () {\n const visitor = {\n ImportDeclaration(path) {\n if (isRegeneratorSource(getImportSource(path))) {\n this.regeneratorImportExcluded = true;\n path.remove();\n }\n },\n Program(path) {\n path.get(\"body\").forEach(bodyPath => {\n if (isRegeneratorSource(getRequireSource(bodyPath))) {\n this.regeneratorImportExcluded = true;\n bodyPath.remove();\n }\n });\n },\n };\n\n return {\n name: \"preset-env/remove-regenerator\",\n visitor,\n pre() {\n this.regeneratorImportExcluded = false;\n },\n post() {\n if (this.opts.debug && this.regeneratorImportExcluded) {\n let filename = this.file.opts.filename;\n // normalize filename to generate consistent preset-env test fixtures\n if (process.env.BABEL_ENV === \"test\") {\n filename = filename.replace(/\\\\/g, \"/\");\n }\n console.log(\n `\\n[${filename}] Based on your targets, regenerator-runtime import excluded.`,\n );\n }\n },\n };\n};\n"],"mappings":"AAOA,MAAM;EAAEA,eAAe;EAAEC;AAAiB,CAAC,GAAGC,OAAO,CAAC,aAAa,CAAC;AAEpE,SAASC,mBAAmBA,CAACC,MAAM,EAAE;EACnC,OACEA,MAAM,KAAK,6BAA6B,IACxCA,MAAM,KAAK,gCAAgC;AAE/C;AAEAC,MAAM,CAACC,OAAO,GAAG,YAAY;EAC3B,MAAMC,OAAO,GAAG;IACdC,iBAAiBA,CAACC,IAAI,EAAE;MACtB,IAAIN,mBAAmB,CAACH,eAAe,CAACS,IAAI,CAAC,CAAC,EAAE;QAC9C,IAAI,CAACC,yBAAyB,GAAG,IAAI;QACrCD,IAAI,CAACE,MAAM,CAAC,CAAC;MACf;IACF,CAAC;IACDC,OAAOA,CAACH,IAAI,EAAE;MACZA,IAAI,CAACI,GAAG,CAAC,MAAM,CAAC,CAACC,OAAO,CAACC,QAAQ,IAAI;QACnC,IAAIZ,mBAAmB,CAACF,gBAAgB,CAACc,QAAQ,CAAC,CAAC,EAAE;UACnD,IAAI,CAACL,yBAAyB,GAAG,IAAI;UACrCK,QAAQ,CAACJ,MAAM,CAAC,CAAC;QACnB;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLK,IAAI,EAAE,+BAA+B;IACrCT,OAAO;IACPU,GAAGA,CAAA,EAAG;MACJ,IAAI,CAACP,yBAAyB,GAAG,KAAK;IACxC,CAAC;IACDQ,IAAIA,CAAA,EAAG;MACL,IAAI,IAAI,CAACC,IAAI,CAACC,KAAK,IAAI,IAAI,CAACV,yBAAyB,EAAE;QACrD,IAAIW,QAAQ,GAAG,IAAI,CAACC,IAAI,CAACH,IAAI,CAACE,QAAQ;QAEtC,IAAIE,OAAO,CAACC,GAAG,CAACC,SAAS,KAAK,MAAM,EAAE;UACpCJ,QAAQ,GAAGA,QAAQ,CAACK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;QACzC;QACAC,OAAO,CAACC,GAAG,CACT,MAAMP,QAAQ,+DAChB,CAAC;MACH;IACF;EACF,CAAC;AACH,CAAC","ignoreList":[]}

View File

@@ -1,4 +1,3 @@
;
exports.getImportSource = function ({
node
}) {

View File

@@ -1 +1 @@
{"version":3,"names":["exports","getImportSource","node","specifiers","length","source","value","getRequireSource","type","expression","callee","name","arguments","isPolyfillSource"],"sources":["../../src/polyfills/utils.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nexports.getImportSource = function ({ node }) {\n if (node.specifiers.length === 0) return node.source.value;\n};\n\nexports.getRequireSource = function ({ node }) {\n if (node.type !== \"ExpressionStatement\") return;\n const { expression } = node;\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"Identifier\" &&\n expression.callee.name === \"require\" &&\n expression.arguments.length === 1 &&\n expression.arguments[0].type === \"StringLiteral\"\n ) {\n return expression.arguments[0].value;\n }\n};\n\nexports.isPolyfillSource = function (source) {\n return source === \"@babel/polyfill\" || source === \"core-js\";\n};\n"],"mappings":";AAOAA,OAAO,CAACC,eAAe,GAAG,UAAU;EAAEC;AAAK,CAAC,EAAE;EAC5C,IAAIA,IAAI,CAACC,UAAU,CAACC,MAAM,KAAK,CAAC,EAAE,OAAOF,IAAI,CAACG,MAAM,CAACC,KAAK;AAC5D,CAAC;AAEDN,OAAO,CAACO,gBAAgB,GAAG,UAAU;EAAEL;AAAK,CAAC,EAAE;EAC7C,IAAIA,IAAI,CAACM,IAAI,KAAK,qBAAqB,EAAE;EACzC,MAAM;IAAEC;EAAW,CAAC,GAAGP,IAAI;EAC3B,IACEO,UAAU,CAACD,IAAI,KAAK,gBAAgB,IACpCC,UAAU,CAACC,MAAM,CAACF,IAAI,KAAK,YAAY,IACvCC,UAAU,CAACC,MAAM,CAACC,IAAI,KAAK,SAAS,IACpCF,UAAU,CAACG,SAAS,CAACR,MAAM,KAAK,CAAC,IACjCK,UAAU,CAACG,SAAS,CAAC,CAAC,CAAC,CAACJ,IAAI,KAAK,eAAe,EAChD;IACA,OAAOC,UAAU,CAACG,SAAS,CAAC,CAAC,CAAC,CAACN,KAAK;EACtC;AACF,CAAC;AAEDN,OAAO,CAACa,gBAAgB,GAAG,UAAUR,MAAM,EAAE;EAC3C,OAAOA,MAAM,KAAK,iBAAiB,IAAIA,MAAM,KAAK,SAAS;AAC7D,CAAC","ignoreList":[]}
{"version":3,"names":["exports","getImportSource","node","specifiers","length","source","value","getRequireSource","type","expression","callee","name","arguments","isPolyfillSource"],"sources":["../../src/polyfills/utils.cjs"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nexports.getImportSource = function ({ node }) {\n if (node.specifiers.length === 0) return node.source.value;\n};\n\nexports.getRequireSource = function ({ node }) {\n if (node.type !== \"ExpressionStatement\") return;\n const { expression } = node;\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"Identifier\" &&\n expression.callee.name === \"require\" &&\n expression.arguments.length === 1 &&\n expression.arguments[0].type === \"StringLiteral\"\n ) {\n return expression.arguments[0].value;\n }\n};\n\nexports.isPolyfillSource = function (source) {\n return source === \"@babel/polyfill\" || source === \"core-js\";\n};\n"],"mappings":"AAOAA,OAAO,CAACC,eAAe,GAAG,UAAU;EAAEC;AAAK,CAAC,EAAE;EAC5C,IAAIA,IAAI,CAACC,UAAU,CAACC,MAAM,KAAK,CAAC,EAAE,OAAOF,IAAI,CAACG,MAAM,CAACC,KAAK;AAC5D,CAAC;AAEDN,OAAO,CAACO,gBAAgB,GAAG,UAAU;EAAEL;AAAK,CAAC,EAAE;EAC7C,IAAIA,IAAI,CAACM,IAAI,KAAK,qBAAqB,EAAE;EACzC,MAAM;IAAEC;EAAW,CAAC,GAAGP,IAAI;EAC3B,IACEO,UAAU,CAACD,IAAI,KAAK,gBAAgB,IACpCC,UAAU,CAACC,MAAM,CAACF,IAAI,KAAK,YAAY,IACvCC,UAAU,CAACC,MAAM,CAACC,IAAI,KAAK,SAAS,IACpCF,UAAU,CAACG,SAAS,CAACR,MAAM,KAAK,CAAC,IACjCK,UAAU,CAACG,SAAS,CAAC,CAAC,CAAC,CAACJ,IAAI,KAAK,eAAe,EAChD;IACA,OAAOC,UAAU,CAACG,SAAS,CAAC,CAAC,CAAC,CAACN,KAAK;EACtC;AACF,CAAC;AAEDN,OAAO,CAACa,gBAAgB,GAAG,UAAUR,MAAM,EAAE;EAC3C,OAAOA,MAAM,KAAK,iBAAiB,IAAIA,MAAM,KAAK,SAAS;AAC7D,CAAC","ignoreList":[]}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/preset-env",
"version": "7.28.5",
"version": "7.28.6",
"description": "A Babel preset for each environment.",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-preset-env",
@@ -16,70 +16,70 @@
},
"main": "./lib/index.js",
"dependencies": {
"@babel/compat-data": "^7.28.5",
"@babel/helper-compilation-targets": "^7.27.2",
"@babel/helper-plugin-utils": "^7.27.1",
"@babel/compat-data": "^7.28.6",
"@babel/helper-compilation-targets": "^7.28.6",
"@babel/helper-plugin-utils": "^7.28.6",
"@babel/helper-validator-option": "^7.27.1",
"@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5",
"@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1",
"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3",
"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.6",
"@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
"@babel/plugin-syntax-import-assertions": "^7.27.1",
"@babel/plugin-syntax-import-attributes": "^7.27.1",
"@babel/plugin-syntax-import-assertions": "^7.28.6",
"@babel/plugin-syntax-import-attributes": "^7.28.6",
"@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
"@babel/plugin-transform-arrow-functions": "^7.27.1",
"@babel/plugin-transform-async-generator-functions": "^7.28.0",
"@babel/plugin-transform-async-to-generator": "^7.27.1",
"@babel/plugin-transform-async-generator-functions": "^7.28.6",
"@babel/plugin-transform-async-to-generator": "^7.28.6",
"@babel/plugin-transform-block-scoped-functions": "^7.27.1",
"@babel/plugin-transform-block-scoping": "^7.28.5",
"@babel/plugin-transform-class-properties": "^7.27.1",
"@babel/plugin-transform-class-static-block": "^7.28.3",
"@babel/plugin-transform-classes": "^7.28.4",
"@babel/plugin-transform-computed-properties": "^7.27.1",
"@babel/plugin-transform-block-scoping": "^7.28.6",
"@babel/plugin-transform-class-properties": "^7.28.6",
"@babel/plugin-transform-class-static-block": "^7.28.6",
"@babel/plugin-transform-classes": "^7.28.6",
"@babel/plugin-transform-computed-properties": "^7.28.6",
"@babel/plugin-transform-destructuring": "^7.28.5",
"@babel/plugin-transform-dotall-regex": "^7.27.1",
"@babel/plugin-transform-dotall-regex": "^7.28.6",
"@babel/plugin-transform-duplicate-keys": "^7.27.1",
"@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1",
"@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.28.6",
"@babel/plugin-transform-dynamic-import": "^7.27.1",
"@babel/plugin-transform-explicit-resource-management": "^7.28.0",
"@babel/plugin-transform-exponentiation-operator": "^7.28.5",
"@babel/plugin-transform-explicit-resource-management": "^7.28.6",
"@babel/plugin-transform-exponentiation-operator": "^7.28.6",
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
"@babel/plugin-transform-for-of": "^7.27.1",
"@babel/plugin-transform-function-name": "^7.27.1",
"@babel/plugin-transform-json-strings": "^7.27.1",
"@babel/plugin-transform-json-strings": "^7.28.6",
"@babel/plugin-transform-literals": "^7.27.1",
"@babel/plugin-transform-logical-assignment-operators": "^7.28.5",
"@babel/plugin-transform-logical-assignment-operators": "^7.28.6",
"@babel/plugin-transform-member-expression-literals": "^7.27.1",
"@babel/plugin-transform-modules-amd": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.28.6",
"@babel/plugin-transform-modules-systemjs": "^7.28.5",
"@babel/plugin-transform-modules-umd": "^7.27.1",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1",
"@babel/plugin-transform-new-target": "^7.27.1",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1",
"@babel/plugin-transform-numeric-separator": "^7.27.1",
"@babel/plugin-transform-object-rest-spread": "^7.28.4",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6",
"@babel/plugin-transform-numeric-separator": "^7.28.6",
"@babel/plugin-transform-object-rest-spread": "^7.28.6",
"@babel/plugin-transform-object-super": "^7.27.1",
"@babel/plugin-transform-optional-catch-binding": "^7.27.1",
"@babel/plugin-transform-optional-chaining": "^7.28.5",
"@babel/plugin-transform-optional-catch-binding": "^7.28.6",
"@babel/plugin-transform-optional-chaining": "^7.28.6",
"@babel/plugin-transform-parameters": "^7.27.7",
"@babel/plugin-transform-private-methods": "^7.27.1",
"@babel/plugin-transform-private-property-in-object": "^7.27.1",
"@babel/plugin-transform-private-methods": "^7.28.6",
"@babel/plugin-transform-private-property-in-object": "^7.28.6",
"@babel/plugin-transform-property-literals": "^7.27.1",
"@babel/plugin-transform-regenerator": "^7.28.4",
"@babel/plugin-transform-regexp-modifiers": "^7.27.1",
"@babel/plugin-transform-regenerator": "^7.28.6",
"@babel/plugin-transform-regexp-modifiers": "^7.28.6",
"@babel/plugin-transform-reserved-words": "^7.27.1",
"@babel/plugin-transform-shorthand-properties": "^7.27.1",
"@babel/plugin-transform-spread": "^7.27.1",
"@babel/plugin-transform-spread": "^7.28.6",
"@babel/plugin-transform-sticky-regex": "^7.27.1",
"@babel/plugin-transform-template-literals": "^7.27.1",
"@babel/plugin-transform-typeof-symbol": "^7.27.1",
"@babel/plugin-transform-unicode-escapes": "^7.27.1",
"@babel/plugin-transform-unicode-property-regex": "^7.27.1",
"@babel/plugin-transform-unicode-property-regex": "^7.28.6",
"@babel/plugin-transform-unicode-regex": "^7.27.1",
"@babel/plugin-transform-unicode-sets-regex": "^7.27.1",
"@babel/plugin-transform-unicode-sets-regex": "^7.28.6",
"@babel/preset-modules": "0.1.6-no-external-plugins",
"babel-plugin-polyfill-corejs2": "^0.4.14",
"babel-plugin-polyfill-corejs3": "^0.13.0",
@@ -91,10 +91,10 @@
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/core": "^7.28.6",
"@babel/core-7.12": "npm:@babel/core@7.12.9",
"@babel/helper-plugin-test-runner": "^7.27.1",
"@babel/traverse": "^7.28.5"
"@babel/traverse": "^7.28.6"
},
"engines": {
"node": ">=6.9.0"