index.js.map
17.3 KB
{"version":3,"names":["declare","api","options","assertVersion","strictNamespace","mjsStrictNamespace","allowTopLevelThis","strict","strictMode","noInterop","importInterop","lazy","allowCommonJSExports","loose","constantReexports","assumption","enumerableModuleMeta","noIncompleteNsImportDetection","Array","isArray","every","item","Error","getAssertion","localName","template","expression","ast","moduleExportsVisitor","ReferencedIdentifier","path","node","name","localBinding","scope","getBinding","rootBinding","parentPath","isObjectProperty","value","isObjectPattern","isAssignmentExpression","left","replaceWith","UpdateExpression","arg","get","isIdentifier","t","assignmentExpression","operator","AssignmentExpression","right","sequenceExpression","isPattern","ids","getOuterBindingIdentifiers","Object","keys","filter","pre","file","set","visitor","CallExpression","has","isImport","callee","rename","parent","transformDynamicImport","Program","exit","state","isModule","simplifyAccess","Set","traverse","moduleName","getModuleName","opts","stringLiteral","meta","headers","rewriteModuleStatementsAndPrepareHeader","exportName","esNamespaceOnly","filename","test","source","metadata","loadExpr","callExpression","identifier","header","isSideEffectImport","expressionStatement","init","wrapInterop","interop","statement","loc","push","buildNamespaceInitStatements","ensureStatementsHoisted","unshiftContainer","forEach","indexOf","isVariableDeclaration","registerDeclaration"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport {\n isModule,\n rewriteModuleStatementsAndPrepareHeader,\n type RewriteModuleStatementsAndPrepareHeaderOptions,\n isSideEffectImport,\n buildNamespaceInitStatements,\n ensureStatementsHoisted,\n wrapInterop,\n getModuleName,\n} from \"@babel/helper-module-transforms\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport type { Visitor, Scope } from \"@babel/traverse\";\n\nimport { transformDynamicImport } from \"./dynamic-import\";\n\nexport interface Options extends PluginOptions {\n allowCommonJSExports?: boolean;\n allowTopLevelThis?: boolean;\n importInterop?: RewriteModuleStatementsAndPrepareHeaderOptions[\"importInterop\"];\n lazy?: RewriteModuleStatementsAndPrepareHeaderOptions[\"lazy\"];\n loose?: boolean;\n mjsStrictNamespace?: boolean;\n noInterop?: boolean;\n strict?: boolean;\n strictMode?: boolean;\n strictNamespace?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(7);\n\n const {\n // 'true' for imports to strictly have .default, instead of having\n // destructuring-like behavior for their properties. This matches the behavior\n // of the initial Node.js (v12) behavior when importing a CommonJS without\n // the __esMoule property.\n // .strictNamespace is for non-mjs files, mjsStrictNamespace if for mjs files.\n strictNamespace = false,\n mjsStrictNamespace = strictNamespace,\n\n allowTopLevelThis,\n strict,\n strictMode,\n noInterop,\n importInterop,\n lazy = false,\n // Defaulting to 'true' for now. May change before 7.x major.\n allowCommonJSExports = true,\n loose = false,\n } = options;\n\n const constantReexports = api.assumption(\"constantReexports\") ?? loose;\n const enumerableModuleMeta = api.assumption(\"enumerableModuleMeta\") ?? loose;\n const noIncompleteNsImportDetection = (api.assumption(\n \"noIncompleteNsImportDetection\",\n ) ?? false) as boolean;\n\n if (\n typeof lazy !== \"boolean\" &&\n typeof lazy !== \"function\" &&\n (!Array.isArray(lazy) || !lazy.every(item => typeof item === \"string\"))\n ) {\n throw new Error(`.lazy must be a boolean, array of strings, or a function`);\n }\n\n if (typeof strictNamespace !== \"boolean\") {\n throw new Error(`.strictNamespace must be a boolean, or undefined`);\n }\n if (typeof mjsStrictNamespace !== \"boolean\") {\n throw new Error(`.mjsStrictNamespace must be a boolean, or undefined`);\n }\n\n const getAssertion = (localName: string) => template.expression.ast`\n (function(){\n throw new Error(\n \"The CommonJS '\" + \"${localName}\" + \"' variable is not available in ES6 modules.\" +\n \"Consider setting setting sourceType:script or sourceType:unambiguous in your \" +\n \"Babel config for this file.\");\n })()\n `;\n\n const moduleExportsVisitor: Visitor<{ scope: Scope }> = {\n ReferencedIdentifier(path) {\n const localName = path.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n if (\n // redeclared in this scope\n rootBinding !== localBinding ||\n (path.parentPath.isObjectProperty({ value: path.node }) &&\n path.parentPath.parentPath.isObjectPattern()) ||\n path.parentPath.isAssignmentExpression({ left: path.node }) ||\n path.isAssignmentExpression({ left: path.node })\n ) {\n return;\n }\n\n path.replaceWith(getAssertion(localName));\n },\n\n UpdateExpression(path) {\n const arg = path.get(\"argument\");\n if (!arg.isIdentifier()) return;\n const localName = arg.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n path.replaceWith(\n t.assignmentExpression(\n path.node.operator[0] + \"=\",\n arg.node,\n getAssertion(localName),\n ),\n );\n },\n\n AssignmentExpression(path) {\n const left = path.get(\"left\");\n if (left.isIdentifier()) {\n const localName = left.node.name;\n if (localName !== \"module\" && localName !== \"exports\") return;\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = this.scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n } else if (left.isPattern()) {\n const ids = left.getOuterBindingIdentifiers();\n const localName = Object.keys(ids).filter(localName => {\n if (localName !== \"module\" && localName !== \"exports\") return false;\n\n return (\n this.scope.getBinding(localName) ===\n path.scope.getBinding(localName)\n );\n })[0];\n\n if (localName) {\n const right = path.get(\"right\");\n right.replaceWith(\n t.sequenceExpression([right.node, getAssertion(localName)]),\n );\n }\n }\n },\n };\n\n return {\n name: \"transform-modules-commonjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"commonjs\");\n },\n\n visitor: {\n CallExpression(path) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) return;\n if (!t.isImport(path.node.callee)) return;\n\n let { scope } = path;\n do {\n scope.rename(\"require\");\n } while ((scope = scope.parent));\n\n transformDynamicImport(path, noInterop, this.file);\n },\n\n Program: {\n exit(path, state) {\n if (!isModule(path)) return;\n\n // Rename the bindings auto-injected into the scope so there is no\n // risk of conflict between the bindings.\n path.scope.rename(\"exports\");\n path.scope.rename(\"module\");\n path.scope.rename(\"require\");\n path.scope.rename(\"__filename\");\n path.scope.rename(\"__dirname\");\n\n // Rewrite references to 'module' and 'exports' to throw exceptions.\n // These objects are specific to CommonJS and are not available in\n // real ES6 implementations.\n if (!allowCommonJSExports) {\n simplifyAccess(path, new Set([\"module\", \"exports\"]), false);\n path.traverse(moduleExportsVisitor, {\n scope: path.scope,\n });\n }\n\n let moduleName = getModuleName(this.file.opts, options);\n // @ts-expect-error todo(flow->ts): do not reuse variables\n if (moduleName) moduleName = t.stringLiteral(moduleName);\n\n const { meta, headers } = rewriteModuleStatementsAndPrepareHeader(\n path,\n {\n exportName: \"exports\",\n constantReexports,\n enumerableModuleMeta,\n strict,\n strictMode,\n allowTopLevelThis,\n noInterop,\n importInterop,\n lazy,\n esNamespaceOnly:\n typeof state.filename === \"string\" &&\n /\\.mjs$/.test(state.filename)\n ? mjsStrictNamespace\n : strictNamespace,\n noIncompleteNsImportDetection,\n filename: this.file.opts.filename,\n },\n );\n\n for (const [source, metadata] of meta.source) {\n const loadExpr = t.callExpression(t.identifier(\"require\"), [\n t.stringLiteral(source),\n ]);\n\n let header: t.Statement;\n if (isSideEffectImport(metadata)) {\n if (metadata.lazy) throw new Error(\"Assertion failure\");\n\n header = t.expressionStatement(loadExpr);\n } else {\n const init =\n wrapInterop(path, loadExpr, metadata.interop) || loadExpr;\n\n if (metadata.lazy) {\n header = template.statement.ast`\n function ${metadata.name}() {\n const data = ${init};\n ${metadata.name} = function(){ return data; };\n return data;\n }\n `;\n } else {\n header = template.statement.ast`\n var ${metadata.name} = ${init};\n `;\n }\n }\n header.loc = metadata.loc;\n\n headers.push(header);\n headers.push(\n ...buildNamespaceInitStatements(\n meta,\n metadata,\n constantReexports,\n ),\n );\n }\n\n ensureStatementsHoisted(headers);\n path.unshiftContainer(\"body\", headers);\n path.get(\"body\").forEach(path => {\n if (headers.indexOf(path.node) === -1) return;\n if (path.isVariableDeclaration()) {\n path.scope.registerDeclaration(path);\n }\n });\n },\n },\n },\n };\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AAIA;;eAee,IAAAA,0BAAA,EAAQ,CAACC,GAAD,EAAMC,OAAN,KAA2B;EAAA;;EAChDD,GAAG,CAACE,aAAJ,CAAkB,CAAlB;EAEA,MAAM;IAMJC,eAAe,GAAG,KANd;IAOJC,kBAAkB,GAAGD,eAPjB;IASJE,iBATI;IAUJC,MAVI;IAWJC,UAXI;IAYJC,SAZI;IAaJC,aAbI;IAcJC,IAAI,GAAG,KAdH;IAgBJC,oBAAoB,GAAG,IAhBnB;IAiBJC,KAAK,GAAG;EAjBJ,IAkBFX,OAlBJ;EAoBA,MAAMY,iBAAiB,sBAAGb,GAAG,CAACc,UAAJ,CAAe,mBAAf,CAAH,8BAA0CF,KAAjE;EACA,MAAMG,oBAAoB,uBAAGf,GAAG,CAACc,UAAJ,CAAe,sBAAf,CAAH,+BAA6CF,KAAvE;EACA,MAAMI,6BAA6B,uBAAIhB,GAAG,CAACc,UAAJ,CACrC,+BADqC,CAAJ,+BAE9B,KAFL;;EAIA,IACE,OAAOJ,IAAP,KAAgB,SAAhB,IACA,OAAOA,IAAP,KAAgB,UADhB,KAEC,CAACO,KAAK,CAACC,OAAN,CAAcR,IAAd,CAAD,IAAwB,CAACA,IAAI,CAACS,KAAL,CAAWC,IAAI,IAAI,OAAOA,IAAP,KAAgB,QAAnC,CAF1B,CADF,EAIE;IACA,MAAM,IAAIC,KAAJ,CAAW,0DAAX,CAAN;EACD;;EAED,IAAI,OAAOlB,eAAP,KAA2B,SAA/B,EAA0C;IACxC,MAAM,IAAIkB,KAAJ,CAAW,kDAAX,CAAN;EACD;;EACD,IAAI,OAAOjB,kBAAP,KAA8B,SAAlC,EAA6C;IAC3C,MAAM,I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