hexo/node_modules/@babel/plugin-transform-modules-sy.../lib/index.js.map

1 line
42 KiB
Plaintext

{"version":3,"names":["buildTemplate","template","statement","buildExportAll","MISSING_PLUGIN_WARNING","MISSING_PLUGIN_ERROR","getExportSpecifierName","node","stringSpecifiers","type","name","stringValue","value","isIdentifierName","add","Error","constructExportCall","path","exportIdent","exportNames","exportValues","exportStarTarget","statements","length","push","t","expressionStatement","callExpression","stringLiteral","objectProperties","i","exportName","exportValue","objectProperty","has","identifier","objectExpression","exportObj","scope","generateUid","variableDeclaration","variableDeclarator","KEY","generateUidIdentifier","EXPORT_OBJ","TARGET","assignmentExpression","memberExpression","declare","api","options","assertVersion","systemGlobal","allowTopLevelThis","reassignmentVisited","WeakSet","reassignmentVisitor","arg","isAssignmentExpression","get","isObjectPattern","isArrayPattern","exprs","Object","keys","getBindingIdentifiers","getBinding","exportedNames","exports","exportedName","buildCall","expression","replaceWith","sequenceExpression","isIdentifier","isPostUpdateExpression","isUpdateExpression","prefix","binaryExpression","operator","unaryExpression","cloneNode","argument","numericLiteral","pre","file","set","visitor","CallExpression","state","isImport","callee","console","warn","buildDynamicImport","specifier","contextIdent","MetaProperty","meta","property","ReferencedIdentifier","hasBinding","Program","enter","Set","rewriteThis","exit","exportMap","create","modules","beforeBody","setters","sources","variableIds","removedPaths","addExportName","key","val","pushModule","source","specifiers","module","forEach","m","imports","concat","buildExportCall","body","isFunctionDeclaration","isClassDeclaration","id","toExpression","isVariableDeclaration","kind","isImportDeclaration","removeBinding","remove","isExportAllDeclaration","isExportDefaultDeclaration","declar","declaration","buildUndefinedNode","isExportNamedDeclaration","isFunction","isClass","nodes","local","exported","binding","replaceWithMultiple","setterBody","target","isImportNamespaceSpecifier","isImportDefaultSpecifier","importSpecifier","isImportSpecifier","imported","hasExportStar","isExportSpecifier","isStringLiteral","functionExpression","blockStatement","moduleName","getModuleName","opts","hoistVariables","hasInit","unshift","map","traverse","hasTLA","AwaitExpression","stop","Function","skip","noScope","SYSTEM_REGISTER","BEFORE_BODY","MODULE_NAME","SETTERS","arrayExpression","EXECUTE","SOURCES","EXPORT_IDENTIFIER","CONTEXT_IDENTIFIER"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport hoistVariables from \"@babel/helper-hoist-variables\";\nimport { template, types as t } from \"@babel/core\";\nimport {\n buildDynamicImport,\n getModuleName,\n rewriteThis,\n} from \"@babel/helper-module-transforms\";\nimport type { PluginOptions } from \"@babel/helper-module-transforms\";\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\nimport type { NodePath, Scope, Visitor } from \"@babel/traverse\";\n\nconst buildTemplate = template.statement(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n`);\n\nconst buildExportAll = template.statement(`\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`);\n\nconst MISSING_PLUGIN_WARNING = `\\\nWARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n`;\n\nconst MISSING_PLUGIN_ERROR = `\\\nERROR: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8\n no longer transforms import() without using that plugin.\n`;\n\n//todo: use getExportSpecifierName in `helper-module-transforms` when this library is refactored to NodePath usage.\n\nexport function getExportSpecifierName(\n node: t.Node,\n stringSpecifiers: Set<string>,\n): string {\n if (node.type === \"Identifier\") {\n return node.name;\n } else if (node.type === \"StringLiteral\") {\n const stringValue = node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${node.type}`,\n );\n }\n}\n\ntype PluginState = {\n contextIdent: string;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set<string>;\n};\n\ntype ModuleMetadata = {\n key: string;\n imports: any[];\n exports: any[];\n};\n\nfunction constructExportCall(\n path: NodePath<t.Program>,\n exportIdent: t.Identifier,\n exportNames: string[],\n exportValues: t.Expression[],\n exportStarTarget: t.Identifier | null,\n stringSpecifiers: Set<string>,\n) {\n const statements = [];\n if (!exportStarTarget) {\n if (exportNames.length === 1) {\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [\n t.stringLiteral(exportNames[0]),\n exportValues[0],\n ]),\n ),\n );\n } else {\n const objectProperties = [];\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n objectProperties.push(\n t.objectProperty(\n stringSpecifiers.has(exportName)\n ? t.stringLiteral(exportName)\n : t.identifier(exportName),\n exportValue,\n ),\n );\n }\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.objectExpression(objectProperties)]),\n ),\n );\n }\n } else {\n const exportObj = path.scope.generateUid(\"exportObj\");\n\n statements.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(exportObj), t.objectExpression([])),\n ]),\n );\n\n statements.push(\n buildExportAll({\n KEY: path.scope.generateUidIdentifier(\"key\"),\n EXPORT_OBJ: t.identifier(exportObj),\n TARGET: exportStarTarget,\n }),\n );\n\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i];\n const exportValue = exportValues[i];\n\n statements.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(\n t.identifier(exportObj),\n t.identifier(exportName),\n ),\n exportValue,\n ),\n ),\n );\n }\n\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.identifier(exportObj)]),\n ),\n );\n }\n return statements;\n}\n\nexport interface Options extends PluginOptions {\n allowTopLevelThis?: boolean;\n systemGlobal?: string;\n}\n\ntype ReassignmentVisitorState = {\n scope: Scope;\n exports: any;\n buildCall: (name: string, value: t.Expression) => t.ExpressionStatement;\n};\n\nexport default declare<PluginState>((api, options: Options) => {\n api.assertVersion(7);\n\n const { systemGlobal = \"System\", allowTopLevelThis = false } = options;\n const reassignmentVisited = new WeakSet();\n\n const reassignmentVisitor: Visitor<ReassignmentVisitorState> = {\n \"AssignmentExpression|UpdateExpression\"(\n path: NodePath<t.AssignmentExpression | t.UpdateExpression>,\n ) {\n if (reassignmentVisited.has(path.node)) return;\n reassignmentVisited.add(path.node);\n\n const arg = path.isAssignmentExpression()\n ? path.get(\"left\")\n : path.get(\"argument\");\n\n if (arg.isObjectPattern() || arg.isArrayPattern()) {\n const exprs: t.SequenceExpression[\"expressions\"] = [path.node];\n for (const name of Object.keys(arg.getBindingIdentifiers())) {\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) {\n return;\n }\n const exportedNames = this.exports[name];\n if (!exportedNames) continue;\n for (const exportedName of exportedNames) {\n exprs.push(\n this.buildCall(exportedName, t.identifier(name)).expression,\n );\n }\n }\n path.replaceWith(t.sequenceExpression(exprs));\n return;\n }\n\n if (!arg.isIdentifier()) return;\n\n const name = arg.node.name;\n\n // redeclared in this scope\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;\n\n const exportedNames = this.exports[name];\n if (!exportedNames) return;\n\n let node: t.Expression = path.node;\n\n // if it is a non-prefix update expression (x++ etc)\n // then we must replace with the expression (_export('x', x + 1), x++)\n // in order to ensure the same update expression value\n const isPostUpdateExpression = t.isUpdateExpression(node, {\n prefix: false,\n });\n if (isPostUpdateExpression) {\n node = t.binaryExpression(\n // @ts-expect-error The operator of a post-update expression must be \"++\" | \"--\"\n node.operator[0],\n t.unaryExpression(\n \"+\",\n t.cloneNode(\n // @ts-expect-error node is UpdateExpression\n node.argument,\n ),\n ),\n t.numericLiteral(1),\n );\n }\n\n for (const exportedName of exportedNames) {\n node = this.buildCall(exportedName, node).expression;\n }\n\n if (isPostUpdateExpression) {\n node = t.sequenceExpression([node, path.node]);\n }\n\n path.replaceWith(node);\n },\n };\n\n return {\n name: \"transform-modules-systemjs\",\n\n pre() {\n this.file.set(\"@babel/plugin-transform-modules-*\", \"systemjs\");\n },\n\n visitor: {\n CallExpression(path, state: PluginState) {\n if (t.isImport(path.node.callee)) {\n if (!this.file.has(\"@babel/plugin-proposal-dynamic-import\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(MISSING_PLUGIN_ERROR);\n } else {\n console.warn(MISSING_PLUGIN_WARNING);\n }\n }\n\n path.replaceWith(\n buildDynamicImport(path.node, false, true, specifier =>\n t.callExpression(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"import\"),\n ),\n [specifier],\n ),\n ),\n );\n }\n },\n\n MetaProperty(path, state: PluginState) {\n if (\n path.node.meta.name === \"import\" &&\n path.node.property.name === \"meta\"\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"meta\"),\n ),\n );\n }\n },\n\n ReferencedIdentifier(path, state) {\n if (\n path.node.name === \"__moduleName\" &&\n !path.scope.hasBinding(\"__moduleName\")\n ) {\n path.replaceWith(\n t.memberExpression(\n t.identifier(state.contextIdent),\n t.identifier(\"id\"),\n ),\n );\n }\n },\n\n Program: {\n enter(path, state) {\n state.contextIdent = path.scope.generateUid(\"context\");\n state.stringSpecifiers = new Set();\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n },\n exit(path, state) {\n const scope = path.scope;\n const exportIdent = scope.generateUid(\"export\");\n const { contextIdent, stringSpecifiers } = state;\n\n const exportMap: Record<string, string[]> = Object.create(null);\n const modules: ModuleMetadata[] = [];\n\n const beforeBody = [];\n const setters: t.Expression[] = [];\n const sources: t.StringLiteral[] = [];\n const variableIds = [];\n const removedPaths = [];\n\n function addExportName(key: string, val: string) {\n exportMap[key] = exportMap[key] || [];\n exportMap[key].push(val);\n }\n\n function pushModule(\n source: string,\n key: \"imports\" | \"exports\",\n specifiers: t.ModuleSpecifier[] | t.ExportAllDeclaration,\n ) {\n let module: ModuleMetadata;\n modules.forEach(function (m) {\n if (m.key === source) {\n module = m;\n }\n });\n if (!module) {\n modules.push(\n (module = { key: source, imports: [], exports: [] }),\n );\n }\n module[key] = module[key].concat(specifiers);\n }\n\n function buildExportCall(name: string, val: t.Expression) {\n return t.expressionStatement(\n t.callExpression(t.identifier(exportIdent), [\n t.stringLiteral(name),\n val,\n ]),\n );\n }\n\n const exportNames = [];\n const exportValues: t.Expression[] = [];\n\n const body = path.get(\"body\");\n\n for (const path of body) {\n if (path.isFunctionDeclaration()) {\n beforeBody.push(path.node);\n removedPaths.push(path);\n } else if (path.isClassDeclaration()) {\n variableIds.push(t.cloneNode(path.node.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(path.node.id),\n t.toExpression(path.node),\n ),\n ),\n );\n } else if (path.isVariableDeclaration()) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n path.node.kind = \"var\";\n } else if (path.isImportDeclaration()) {\n const source = path.node.source.value;\n pushModule(source, \"imports\", path.node.specifiers);\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n scope.removeBinding(name);\n variableIds.push(t.identifier(name));\n }\n path.remove();\n } else if (path.isExportAllDeclaration()) {\n pushModule(path.node.source.value, \"exports\", path.node);\n path.remove();\n } else if (path.isExportDefaultDeclaration()) {\n const declar = path.node.declaration;\n if (t.isClassDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n exportNames.push(\"default\");\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(id),\n t.toExpression(declar),\n ),\n ),\n );\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n removedPaths.push(path);\n }\n } else if (t.isFunctionDeclaration(declar)) {\n const id = declar.id;\n if (id) {\n beforeBody.push(declar);\n exportNames.push(\"default\");\n exportValues.push(t.cloneNode(id));\n addExportName(id.name, \"default\");\n } else {\n exportNames.push(\"default\");\n exportValues.push(t.toExpression(declar));\n }\n removedPaths.push(path);\n } else {\n // @ts-expect-error TSDeclareFunction is not expected here\n path.replaceWith(buildExportCall(\"default\", declar));\n }\n } else if (path.isExportNamedDeclaration()) {\n const declar = path.node.declaration;\n\n if (declar) {\n path.replaceWith(declar);\n\n if (t.isFunction(declar)) {\n const name = declar.id.name;\n addExportName(name, name);\n beforeBody.push(declar);\n exportNames.push(name);\n exportValues.push(t.cloneNode(declar.id));\n removedPaths.push(path);\n } else if (t.isClass(declar)) {\n const name = declar.id.name;\n exportNames.push(name);\n exportValues.push(scope.buildUndefinedNode());\n variableIds.push(t.cloneNode(declar.id));\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(declar.id),\n t.toExpression(declar),\n ),\n ),\n );\n addExportName(name, name);\n } else {\n if (t.isVariableDeclaration(declar)) {\n // Convert top-level variable declarations to \"var\",\n // because they must be hoisted\n declar.kind = \"var\";\n }\n for (const name of Object.keys(\n t.getBindingIdentifiers(declar),\n )) {\n addExportName(name, name);\n }\n }\n } else {\n const specifiers = path.node.specifiers;\n if (specifiers?.length) {\n if (path.node.source) {\n pushModule(path.node.source.value, \"exports\", specifiers);\n path.remove();\n } else {\n const nodes = [];\n\n for (const specifier of specifiers) {\n // @ts-expect-error This isn't an \"export ... from\" declaration\n // because path.node.source is falsy, so the local specifier exists.\n const { local, exported } = specifier;\n\n const binding = scope.getBinding(local.name);\n const exportedName = getExportSpecifierName(\n exported,\n stringSpecifiers,\n );\n // hoisted function export\n if (\n binding &&\n t.isFunctionDeclaration(binding.path.node)\n ) {\n exportNames.push(exportedName);\n exportValues.push(t.cloneNode(local));\n }\n // only globals also exported this way\n else if (!binding) {\n nodes.push(buildExportCall(exportedName, local));\n }\n addExportName(local.name, exportedName);\n }\n\n path.replaceWithMultiple(nodes);\n }\n } else {\n path.remove();\n }\n }\n }\n }\n\n modules.forEach(function (specifiers) {\n const setterBody = [];\n const target = scope.generateUid(specifiers.key);\n\n for (let specifier of specifiers.imports) {\n if (t.isImportNamespaceSpecifier(specifier)) {\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.identifier(target),\n ),\n ),\n );\n } else if (t.isImportDefaultSpecifier(specifier)) {\n specifier = t.importSpecifier(\n specifier.local,\n t.identifier(\"default\"),\n );\n }\n\n if (t.isImportSpecifier(specifier)) {\n const { imported } = specifier;\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.memberExpression(\n t.identifier(target),\n specifier.imported,\n /* computed */ imported.type === \"StringLiteral\",\n ),\n ),\n ),\n );\n }\n }\n\n if (specifiers.exports.length) {\n const exportNames = [];\n const exportValues = [];\n let hasExportStar = false;\n\n for (const node of specifiers.exports) {\n if (t.isExportAllDeclaration(node)) {\n hasExportStar = true;\n } else if (t.isExportSpecifier(node)) {\n const exportedName = getExportSpecifierName(\n node.exported,\n stringSpecifiers,\n );\n exportNames.push(exportedName);\n exportValues.push(\n t.memberExpression(\n t.identifier(target),\n node.local,\n t.isStringLiteral(node.local),\n ),\n );\n } else {\n // todo\n }\n }\n\n setterBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n hasExportStar ? t.identifier(target) : null,\n stringSpecifiers,\n ),\n );\n }\n\n sources.push(t.stringLiteral(specifiers.key));\n setters.push(\n t.functionExpression(\n null,\n [t.identifier(target)],\n t.blockStatement(setterBody),\n ),\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 hoistVariables(path, (id, name, hasInit) => {\n variableIds.push(id);\n if (!hasInit && name in exportMap) {\n for (const exported of exportMap[name]) {\n exportNames.push(exported);\n exportValues.push(scope.buildUndefinedNode());\n }\n }\n });\n\n if (variableIds.length) {\n beforeBody.unshift(\n t.variableDeclaration(\n \"var\",\n variableIds.map(id => t.variableDeclarator(id)),\n ),\n );\n }\n\n if (exportNames.length) {\n beforeBody.push(\n ...constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n null,\n stringSpecifiers,\n ),\n );\n }\n\n path.traverse(reassignmentVisitor, {\n exports: exportMap,\n buildCall: buildExportCall,\n scope,\n });\n\n for (const path of removedPaths) {\n path.remove();\n }\n\n let hasTLA = false;\n path.traverse({\n AwaitExpression(path) {\n hasTLA = true;\n path.stop();\n },\n Function(path) {\n path.skip();\n },\n // @ts-expect-error - todo: add noScope to type definitions\n noScope: true,\n });\n\n path.node.body = [\n buildTemplate({\n SYSTEM_REGISTER: t.memberExpression(\n t.identifier(systemGlobal),\n t.identifier(\"register\"),\n ),\n BEFORE_BODY: beforeBody,\n MODULE_NAME: moduleName,\n SETTERS: t.arrayExpression(setters),\n EXECUTE: t.functionExpression(\n null,\n [],\n t.blockStatement(path.node.body),\n false,\n hasTLA,\n ),\n SOURCES: t.arrayExpression(sources),\n EXPORT_IDENTIFIER: t.identifier(exportIdent),\n CONTEXT_IDENTIFIER: t.identifier(contextIdent),\n }),\n ];\n },\n },\n },\n };\n});\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAMA;AAGA,MAAMA,aAAa,GAAGC,cAAQ,CAACC,SAAS,CAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AAEF,MAAMC,cAAc,GAAGF,cAAQ,CAACC,SAAS,CAAE;AAC3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