You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
29 KiB
1 line
29 KiB
1 month ago
|
{"version":3,"names":["_semver","require","_debug","_filterItems","_moduleTransformations","_normalizeOptions","_shippedProposals","_pluginsCompatData","_babelPluginPolyfillCorejs","_babel7Plugins","_helperCompilationTargets","_availablePlugins","_helperPluginUtils","pluginCoreJS3","_pluginCoreJS3","default","isPluginRequired","targets","support","isRequired","compatData","filterStageFromList","list","stageList","Object","keys","reduce","result","item","has","pluginLists","withProposals","withoutBugfixes","pluginsList","withBugfixes","assign","pluginsBugfixesList","withoutProposals","proposalPlugins","getPluginList","proposals","bugfixes","getPlugin","pluginName","plugin","availablePlugins","Error","transformIncludesAndExcludes","opts","opt","target","test","add","all","plugins","Set","builtIns","exports","getSpecialModulesPluginNames","modules","shouldTransformDynamicImport","babelVersion","modulesPluginNames","push","moduleTransformations","console","warn","getCoreJSOptions","useBuiltIns","corejs","polyfillTargets","include","exclude","shippedProposals","debug","method","version","toString","undefined","noRuntimeName","getPolyfillPlugins","regenerator","polyfillPlugins","pluginOptions","major","babel7","pluginCoreJS2","legacyBabelPolyfillPlugin","usage","deprecated","pluginRegenerator","removeRegeneratorEntryPlugin","getLocalTargets","optionsTargets","ignoreBrowserslistConfig","configPath","browserslistEnv","api","esmodules","browsers","getTargets","onBrowserslistConfigFound","config","addExternalDependency","supportsStaticESM","caller","supportsDynamicImport","supportsExportNamespaceFrom","_default","declarePreset","assertVersion","babelTargets","optionsExclude","forceAllTransforms","optionsInclude","optionsModules","normalizeOptions","loose","spec","semver","lt","hasUglifyTarget","uglify","transformTargets","pluginNames","filterItems","pluginSyntaxMap","addProposalSyntaxPlugins","proposalSyntaxPlugins","removeUnsupportedItems","removeUnnecessaryItems","overlappingPlugins","pluginUseBuiltIns","Array","from","map","deprecatedAssertSyntax","concat","log","JSON","stringify","prettifyTargets","forEach","logPlugin","getModulesPluginNames","transformations","shouldTransformESM","shouldTransformExportNamespaceFrom"],"sources":["../src/index.ts"],"sourcesContent":["import semver, { type SemVer } from \"semver\";\nimport { logPlugin } from \"./debug.ts\";\nimport {\n addProposalSyntaxPlugins,\n removeUnnecessaryItems,\n removeUnsupportedItems,\n} from \"./filter-items.ts\";\nimport moduleTransformations from \"./module-transformations.ts\";\nimport normalizeOptions from \"./normalize-options.ts\";\nimport {\n pluginSyntaxMap,\n proposalPlugins,\n proposalSyntaxPlugins,\n} from \"./shipped-proposals.ts\";\nimport {\n plugins as pluginsList,\n pluginsBugfixes as pluginsBugfixesList,\n overlappingPlugins,\n} from \"./plugins-compat-data.ts\";\n\nimport type { CallerMetadata, PresetAPI } from \"@babel/core\";\n\nimport _pluginCoreJS3 from \"babel-plugin-polyfill-corejs3\";\n// TODO(Babel 8): Just use the default import\nconst pluginCoreJS3 = _pluginCoreJS3.default || _pluginCoreJS3;\n\n// TODO(Babel 8): Remove this\nimport babel7 from \"./polyfills/babel-7-plugins.cjs\";\n\nimport getTargets, {\n prettifyTargets,\n filterItems,\n isRequired,\n} from \"@babel/helper-compilation-targets\";\nimport type { Targets, InputTargets } from \"@babel/helper-compilation-targets\";\nimport availablePlugins from \"./available-plugins.ts\";\nimport { declarePreset } from \"@babel/helper-plugin-utils\";\n\nimport type { BuiltInsOption, ModuleOption, Options } from \"./types.ts\";\nexport type { Options };\n\n// TODO: Remove in Babel 8\nexport function isPluginRequired(targets: Targets, support: Targets) {\n return isRequired(\"fake-name\", targets, {\n compatData: { \"fake-name\": support },\n });\n}\n\nfunction filterStageFromList(\n list: { [feature: string]: Targets },\n stageList: Set<string>,\n) {\n return Object.keys(list).reduce((result, item) => {\n if (!stageList.has(item)) {\n // @ts-expect-error todo: refin
|