index.js.map 18.2 KB
{"version":3,"names":["pluginCorejs2","_pluginCorejs2","default","pluginCorejs3","_pluginCorejs3","pluginRegenerator","_pluginRegenerator","pluginsCompat","supportsStaticESM","caller","declare","api","options","dirname","assertVersion","corejs","helpers","useRuntimeHelpers","regenerator","useRuntimeRegenerator","useESModules","version","runtimeVersion","absoluteRuntime","proposals","rawVersion","Boolean","corejsVersion","Number","includes","Error","JSON","stringify","DUAL_MODE_RUNTIME","supportsCJSDefault","hasMinVersion","has","obj","key","Object","prototype","hasOwnProperty","call","esModules","injectCoreJS2","injectCoreJS3","moduleName","HEADER_HELPERS","modulePath","getRuntimePath","createCorejsPlugin","plugin","regeneratorPlugin","_","filename","inherits","createRegeneratorPlugin","undefined","name","method","absoluteImports","useBabelRuntime","ext","pre","file","set","availableHelper","t","arrowFunctionExpression","identifier","isInteropHelper","indexOf","blockHoist","isModule","path","helpersDir","node","sourceType","helperPath","resolveFSPath","addDefaultImport","cache","Map","source","nameHint","isHelper","cacheKey","cached","get","cloneNode","addDefault","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 } from \"@babel/core\";\n\nimport { hasMinVersion } from \"./helpers\";\nimport getRuntimePath, { resolveFSPath } from \"./get-runtime-path\";\nimport type { PluginAPI, PluginObject, CallerMetadata } from \"@babel/core\";\n\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\nconst pluginsCompat = \"#__secret_key__@babel/runtime__compatibility\";\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\ninterface CoreJS2PluginOptions {\n  absoluteImports: string | false;\n  method: \"usage-pure\";\n  [pluginsCompat]: {\n    runtimeVersion: string;\n    useBabelRuntime: string | false;\n    ext: string;\n  };\n}\n\ninterface RegeneratorPluginOptions {\n  absoluteImports: string | false;\n  method: \"usage-pure\";\n  [pluginsCompat]: {\n    useBabelRuntime: string | false;\n  };\n}\n\ninterface CoreJS3PluginOptions {\n  absoluteImports: string | false;\n  method: \"usage-pure\";\n  proposals: boolean;\n  version: number;\n  [pluginsCompat]: {\n    useBabelRuntime: string | false;\n    ext: string;\n  };\n}\n\nexport default declare((api, options: Options, dirname) => {\n  api.assertVersion(7);\n\n  const {\n    corejs,\n    helpers: useRuntimeHelpers = true,\n    regenerator: useRuntimeRegenerator = true,\n    useESModules = false,\n    version: runtimeVersion = \"7.0.0-beta.0\",\n    absoluteRuntime = false,\n  } = options;\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  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 injectCoreJS2 = corejsVersion === 2;\n  const injectCoreJS3 = corejsVersion === 3;\n\n  const moduleName = injectCoreJS3\n    ? \"@babel/runtime-corejs3\"\n    : injectCoreJS2\n    ? \"@babel/runtime-corejs2\"\n    : \"@babel/runtime\";\n\n  const HEADER_HELPERS = [\"interopRequireWildcard\", \"interopRequireDefault\"];\n\n  const modulePath = getRuntimePath(moduleName, dirname, absoluteRuntime);\n\n  function createCorejsPlugin<Options extends {}>(\n    plugin: (\n      api: PluginAPI,\n      options: Options,\n      filename: string,\n    ) => 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\n  // TODO: Remove this in Babel 8\n  function createRegeneratorPlugin(\n    options: RegeneratorPluginOptions,\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\n  return {\n    name: \"transform-runtime\",\n\n    inherits: injectCoreJS2\n      ? createCorejsPlugin<CoreJS2PluginOptions>(\n          pluginCorejs2,\n          {\n            method: \"usage-pure\",\n            absoluteImports: absoluteRuntime ? modulePath : false,\n            [pluginsCompat]: {\n              runtimeVersion,\n              useBabelRuntime: modulePath,\n              ext: \"\",\n            },\n          },\n          createRegeneratorPlugin({\n            method: \"usage-pure\",\n            absoluteImports: absoluteRuntime ? modulePath : false,\n            [pluginsCompat]: { useBabelRuntime: modulePath },\n          }),\n        )\n      : injectCoreJS3\n      ? createCorejsPlugin<CoreJS3PluginOptions>(\n          pluginCorejs3,\n          {\n            method: \"usage-pure\",\n            version: 3,\n            proposals,\n            absoluteImports: absoluteRuntime ? modulePath : false,\n            [pluginsCompat]: { useBabelRuntime: modulePath, ext: \"\" },\n          },\n          createRegeneratorPlugin({\n            method: \"usage-pure\",\n            absoluteImports: absoluteRuntime ? modulePath : false,\n            [pluginsCompat]: { useBabelRuntime: modulePath },\n          }),\n        )\n      : createRegeneratorPlugin({\n          method: \"usage-pure\",\n          absoluteImports: absoluteRuntime ? modulePath : false,\n          [pluginsCompat]: { useBabelRuntime: modulePath },\n        }),\n\n    pre(file) {\n      if (!useRuntimeHelpers) return;\n\n      file.set(\"helperGenerator\", (name: string) => {\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 (!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/regeneratorRuntime import.\n            //\n            // We must wrap it in a function, because built-in Babel helpers\n            // are functions.\n            //\n            // TODO: Remove this in Babel 8.\n            return t.arrowFunctionExpression(\n              [],\n              t.identifier(\"regeneratorRuntime\"),\n            );\n          }\n          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;;AACA;;AACA;;AAEA;;AACA;;AAGA;;AACA;;AACA;;AACA,MAAMA,aAAa,GAAIC,0BAAc,CAACC,OAAf,IACrBD,0BADF;AAEA,MAAME,aAAa,GAAIC,2BAAc,CAACF,OAAf,IACrBE,2BADF;AAEA,MAAMC,iBAAiB,GAAIC,+BAAkB,CAACJ,OAAnB,IACzBI,+BADF;AAGA,MAAMC,aAAa,GAAG,8CAAtB;;AAEA,SAASC,iBAAT,CAA2BC,MAA3B,EAA+D;EAE7D,OAAO,CAAC,EAACA,MAAD,YAACA,MAAM,CAAED,iBAAT,CAAR;AACD;;eAwCc,IAAAE,0BAAA,EAAQ,CAACC,GAAD,EAAMC,OAAN,EAAwBC,OAAxB,KAAoC;EACzDF,GAAG,CAACG,aAAJ,CAAkB,CAAlB;EAEA,MAAM;IACJC,MADI;IAEJC,OAAO,EAAEC,iBAAiB,GAAG,IAFzB;IAGJC,WAAW,EAAEC,qBAAqB,GAAG,IAHjC;IAIJC,YAAY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