🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@babel/plugin-transform-react-jsx

Package Overview
Dependencies
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-react-jsx - npm Package Compare versions

Comparing version
8.0.0-alpha.17
to
8.0.0-beta.0
+1
-1
lib/create-plugin.js.map

@@ -1,1 +0,1 @@

{"version":3,"names":["jsx","declare","template","types","t","addNamed","addNamespace","isModule","annotateAsPure","DEFAULT","importSource","runtime","pragma","pragmaFrag","JSX_SOURCE_ANNOTATION_REGEX","JSX_RUNTIME_ANNOTATION_REGEX","JSX_ANNOTATION_REGEX","JSX_FRAG_ANNOTATION_REGEX","get","pass","name","set","v","hasProto","node","properties","some","value","isObjectProperty","computed","shorthand","isIdentifier","key","isStringLiteral","createPlugin","development","_","options","pure","PURE_ANNOTATION","throwIfNamespace","filter","RUNTIME_DEFAULT","IMPORT_SOURCE_DEFAULT","PRAGMA_DEFAULT","PRAGMA_FRAG_DEFAULT","Error","useBuiltInsFormatted","JSON","stringify","useBuiltIns","injectMetaPropertiesVisitor","JSXOpeningElement","path","state","attributes","isThisAllowed","scope","push","jsxAttribute","jsxIdentifier","jsxExpressionContainer","thisExpression","makeSource","pushContainer","inherits","visitor","JSXNamespacedName","buildCodeFrameError","JSXSpreadChild","Program","enter","file","source","sourceSet","pragmaSet","pragmaFragSet","ast","comments","comment","sourceMatches","exec","runtimeMatches","jsxMatches","jsxFragMatches","createElement","toMemberExpression","fragment","cloneNode","define","id","createImportLazily","traverse","JSXFragment","exit","callExpr","buildCreateElementFragmentCall","buildJSXFragmentCall","replaceWith","JSXElement","shouldUseCreateElement","buildCreateElementCall","buildJSXElementCall","JSXAttribute","isJSXElement","isDerivedClass","classPath","superClass","isFunctionParent","isArrowFunctionExpression","isMethod","kind","parentPath","isTSModuleBlock","parent","call","args","callExpression","openingPath","seenPropsSpread","i","length","attr","isJSXAttribute","isJSXSpreadAttribute","convertJSXIdentifier","isJSXIdentifier","isReferenced","isValidIdentifier","type","stringLiteral","isJSXMemberExpression","memberExpression","object","property","isJSXNamespacedName","namespace","convertAttributeValue","isJSXExpressionContainer","expression","accumulateAttribute","array","attribute","arg","argument","isObjectExpression","spreadElement","booleanLiteral","replace","extra","raw","objectProperty","buildChildrenProperty","children","childrenNode","arrayExpression","undefined","identifier","getTag","attribsArray","extracted","Object","create","sourceSelfError","keyValue","react","buildChildren","attribs","buildJSXOpeningElementAttributes","objectExpression","buildUndefinedNode","__source","__self","props","reduce","nullLiteral","buildCreateElementOpeningElementAttributes","tagExpr","tagName","isCompatTag","found","isSpreadElement","getSource","importName","actualSource","reference","importedInterop","importPosition","split","map","location","loc","fileNameIdentifier","filename","generateUidIdentifier","getProgramParent","init","makeTrace","start","line","column","lineNumber","column0Based","fileLineLiteral","numericLiteral","fileColumnLiteral","pluginName","slice"],"sources":["../src/create-plugin.ts"],"sourcesContent":["import jsx from \"@babel/plugin-syntax-jsx\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { addNamed, addNamespace, isModule } from \"@babel/helper-module-imports\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type {\n CallExpression,\n Class,\n Expression,\n Identifier,\n JSXAttribute,\n JSXElement,\n JSXFragment,\n JSXOpeningElement,\n JSXSpreadAttribute,\n MemberExpression,\n ObjectExpression,\n Program,\n} from \"@babel/types\";\n\nconst DEFAULT = {\n importSource: \"react\",\n runtime: \"automatic\",\n pragma: \"React.createElement\",\n pragmaFrag: \"React.Fragment\",\n};\n\nconst JSX_SOURCE_ANNOTATION_REGEX =\n /^\\s*(?:\\*\\s*)?@jsxImportSource\\s+(\\S+)\\s*$/m;\nconst JSX_RUNTIME_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxRuntime\\s+(\\S+)\\s*$/m;\n\nconst JSX_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsx\\s+(\\S+)\\s*$/m;\nconst JSX_FRAG_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxFrag\\s+(\\S+)\\s*$/m;\n\nconst get = (pass: PluginPass, name: string) =>\n pass.get(`@babel/plugin-react-jsx/${name}`);\nconst set = (pass: PluginPass, name: string, v: any) =>\n pass.set(`@babel/plugin-react-jsx/${name}`, v);\n\nfunction hasProto(node: t.ObjectExpression) {\n return node.properties.some(\n value =>\n t.isObjectProperty(value, { computed: false, shorthand: false }) &&\n (t.isIdentifier(value.key, { name: \"__proto__\" }) ||\n t.isStringLiteral(value.key, { value: \"__proto__\" })),\n );\n}\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns: boolean;\n useSpread?: boolean;\n}\nexport default function createPlugin({\n name,\n development,\n}: {\n name: string;\n development: boolean;\n}) {\n return declare((_, options: Options) => {\n const {\n pure: PURE_ANNOTATION,\n\n throwIfNamespace = true,\n\n filter,\n\n runtime: RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING\n ? \"automatic\"\n : development\n ? \"automatic\"\n : \"classic\",\n\n importSource: IMPORT_SOURCE_DEFAULT = DEFAULT.importSource,\n pragma: PRAGMA_DEFAULT = DEFAULT.pragma,\n pragmaFrag: PRAGMA_FRAG_DEFAULT = DEFAULT.pragmaFrag,\n } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/plugin-transform-react-jsx: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/plugin-transform-react-jsx: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n \"@babel/plugin-transform-react-jsx\"\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ]\n}`,\n );\n }\n\n if (filter != null && RUNTIME_DEFAULT === \"automatic\") {\n throw new Error(\n '@babel/plugin-transform-react-jsx: \"filter\" option can not be used with automatic runtime. If you are upgrading from Babel 7, please specify `runtime: \"classic\"`.',\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { useSpread = false, useBuiltIns = false } = options;\n\n if (RUNTIME_DEFAULT === \"classic\") {\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n }\n }\n\n const injectMetaPropertiesVisitor: Visitor<PluginPass> = {\n JSXOpeningElement(path, state) {\n const attributes = [];\n if (isThisAllowed(path.scope)) {\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__self\"),\n t.jsxExpressionContainer(t.thisExpression()),\n ),\n );\n }\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__source\"),\n t.jsxExpressionContainer(makeSource(path, state)),\n ),\n );\n path.pushContainer(\"attributes\", attributes);\n },\n };\n\n return {\n name,\n inherits: jsx,\n visitor: {\n JSXNamespacedName(path) {\n if (throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n },\n\n JSXSpreadChild(path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n },\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let runtime: string = RUNTIME_DEFAULT;\n\n let source: string = IMPORT_SOURCE_DEFAULT;\n let pragma: string = PRAGMA_DEFAULT;\n let pragmaFrag: string = PRAGMA_FRAG_DEFAULT;\n\n let sourceSet = !!options.importSource;\n let pragmaSet = !!options.pragma;\n let pragmaFragSet = !!options.pragmaFrag;\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (sourceMatches) {\n source = sourceMatches[1];\n sourceSet = true;\n }\n\n const runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (runtimeMatches) {\n runtime = runtimeMatches[1];\n }\n\n const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);\n if (jsxMatches) {\n pragma = jsxMatches[1];\n pragmaSet = true;\n }\n const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (jsxFragMatches) {\n pragmaFrag = jsxFragMatches[1];\n pragmaFragSet = true;\n }\n }\n }\n\n set(state, \"runtime\", runtime);\n if (runtime === \"classic\") {\n if (sourceSet) {\n throw path.buildCodeFrameError(\n `importSource cannot be set when runtime is classic.`,\n );\n }\n\n const createElement = toMemberExpression(pragma);\n const fragment = toMemberExpression(pragmaFrag);\n\n set(state, \"id/createElement\", () => t.cloneNode(createElement));\n set(state, \"id/fragment\", () => t.cloneNode(fragment));\n\n set(state, \"defaultPure\", pragma === DEFAULT.pragma);\n } else if (runtime === \"automatic\") {\n if (pragmaSet || pragmaFragSet) {\n throw path.buildCodeFrameError(\n `pragma and pragmaFrag cannot be set when runtime is automatic.`,\n );\n }\n\n const define = (name: string, id: string) =>\n set(state, name, createImportLazily(state, path, id, source));\n\n define(\"id/jsx\", development ? \"jsxDEV\" : \"jsx\");\n define(\"id/jsxs\", development ? \"jsxDEV\" : \"jsxs\");\n define(\"id/createElement\", \"createElement\");\n define(\"id/fragment\", \"Fragment\");\n\n set(state, \"defaultPure\", source === DEFAULT.importSource);\n } else {\n throw path.buildCodeFrameError(\n `Runtime must be either \"classic\" or \"automatic\".`,\n );\n }\n\n if (development) {\n path.traverse(injectMetaPropertiesVisitor, state);\n }\n },\n\n // TODO(Babel 8): Decide if this should be removed or brought back.\n // see: https://github.com/babel/babel/pull/12253#discussion_r513086528\n //\n // exit(path, state) {\n // if (\n // get(state, \"runtime\") === \"classic\" &&\n // get(state, \"pragmaSet\") &&\n // get(state, \"usedFragment\") &&\n // !get(state, \"pragmaFragSet\")\n // ) {\n // throw new Error(\n // \"transform-react-jsx: pragma has been set but \" +\n // \"pragmaFrag has not been set\",\n // );\n // }\n // },\n },\n\n JSXFragment: {\n exit(path, file) {\n let callExpr;\n if (get(file, \"runtime\") === \"classic\") {\n callExpr = buildCreateElementFragmentCall(path, file);\n } else {\n callExpr = buildJSXFragmentCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXElement: {\n exit(path, file) {\n let callExpr;\n if (\n get(file, \"runtime\") === \"classic\" ||\n shouldUseCreateElement(path)\n ) {\n callExpr = buildCreateElementCall(path, file);\n } else {\n callExpr = buildJSXElementCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXAttribute(path) {\n if (t.isJSXElement(path.node.value)) {\n path.node.value = t.jsxExpressionContainer(path.node.value);\n }\n },\n },\n };\n\n // Returns whether the class has specified a superclass.\n function isDerivedClass(classPath: NodePath<Class>) {\n return classPath.node.superClass !== null;\n }\n\n // Returns whether `this` is allowed at given scope.\n function isThisAllowed(scope: Scope) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n if (!path.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (path.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(path.parentPath.parentPath as NodePath<Class>);\n }\n if (path.isTSModuleBlock()) {\n // If the closest parent is a TS Module block, `this` will not be allowed.\n return false;\n }\n } while ((scope = scope.parent));\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n\n function call(\n pass: PluginPass,\n name: string,\n args: CallExpression[\"arguments\"],\n ) {\n const node = t.callExpression(get(pass, `id/${name}`)(), args);\n if (PURE_ANNOTATION ?? get(pass, \"defaultPure\")) annotateAsPure(node);\n return node;\n }\n\n // We want to use React.createElement, even in the case of\n // jsx, for <div {...props} key={key} /> to distinguish it\n // from <div key={key} {...props} />. This is an intermediary\n // step while we deprecate key spread from props. Afterwards,\n // we will stop using createElement in the transform.\n function shouldUseCreateElement(path: NodePath<JSXElement>) {\n const openingPath = path.get(\"openingElement\");\n const attributes = openingPath.node.attributes;\n\n let seenPropsSpread = false;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n if (\n seenPropsSpread &&\n t.isJSXAttribute(attr) &&\n attr.name.name === \"key\"\n ) {\n return true;\n } else if (t.isJSXSpreadAttribute(attr)) {\n seenPropsSpread = true;\n }\n }\n return false;\n }\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (t.isJSXIdentifier(node)) {\n if (node.name === \"this\" && t.isReferenced(node, parent)) {\n return t.thisExpression();\n } else if (t.isValidIdentifier(node.name, false)) {\n // @ts-expect-error cast AST type to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return t.stringLiteral(node.name);\n }\n } else if (t.isJSXMemberExpression(node)) {\n return t.memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (t.isJSXNamespacedName(node)) {\n /**\n * If the flag \"throwIfNamespace\" is false\n * print XMLNamespace like string literal\n */\n return t.stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n // todo: this branch should be unreachable\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (t.isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function accumulateAttribute(\n array: ObjectExpression[\"properties\"],\n attribute: NodePath<JSXAttribute | JSXSpreadAttribute>,\n ) {\n if (t.isJSXSpreadAttribute(attribute.node)) {\n const arg = attribute.node.argument;\n // Collect properties into props array if spreading object expression\n if (t.isObjectExpression(arg) && !hasProto(arg)) {\n array.push(...arg.properties);\n } else {\n array.push(t.spreadElement(arg));\n }\n return array;\n }\n\n const value = convertAttributeValue(\n attribute.node.name.name !== \"key\"\n ? attribute.node.value || t.booleanLiteral(true)\n : attribute.node.value,\n );\n\n if (attribute.node.name.name === \"key\" && value === null) {\n throw attribute.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n if (\n t.isStringLiteral(value) &&\n !t.isJSXExpressionContainer(attribute.node.value)\n ) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (t.isJSXNamespacedName(attribute.node.name)) {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(\n attribute.node.name.namespace.name +\n \":\" +\n attribute.node.name.name.name,\n );\n } else if (t.isValidIdentifier(attribute.node.name.name, false)) {\n // @ts-expect-error mutating AST\n attribute.node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(attribute.node.name.name);\n }\n\n array.push(\n t.inherits(\n t.objectProperty(\n // @ts-expect-error The attribute.node.name is an Identifier now\n attribute.node.name,\n value,\n ),\n attribute.node,\n ),\n );\n return array;\n }\n\n function buildChildrenProperty(children: Expression[]) {\n let childrenNode;\n if (children.length === 1) {\n childrenNode = children[0];\n } else if (children.length > 1) {\n childrenNode = t.arrayExpression(children);\n } else {\n return undefined;\n }\n\n return t.objectProperty(t.identifier(\"children\"), childrenNode);\n }\n\n // Builds JSX into:\n // Production: React.jsx(type, arguments, key)\n // Development: React.jsxDEV(type, arguments, key, isStaticChildren, source, self)\n function buildJSXElementCall(path: NodePath<JSXElement>, file: PluginPass) {\n const openingPath = path.get(\"openingElement\");\n const args: t.Expression[] = [getTag(openingPath)];\n\n const attribsArray = [];\n const extracted = Object.create(null);\n\n // for React.jsx, key, __source (dev), and __self (dev) is passed in as\n // a separate argument rather than in the args object. We go through the\n // props and filter out these three keywords so we can pass them in\n // as separate arguments later\n for (const attr of openingPath.get(\"attributes\")) {\n if (attr.isJSXAttribute() && t.isJSXIdentifier(attr.node.name)) {\n const { name } = attr.node.name;\n switch (name) {\n case \"__source\":\n case \"__self\":\n if (extracted[name]) throw sourceSelfError(path, name);\n /* falls through */\n case \"key\": {\n const keyValue = convertAttributeValue(attr.node.value);\n if (keyValue === null) {\n throw attr.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n extracted[name] = keyValue;\n break;\n }\n default:\n attribsArray.push(attr);\n }\n } else {\n attribsArray.push(attr);\n }\n }\n\n const children = t.react.buildChildren(path.node);\n\n let attribs: t.ObjectExpression;\n\n if (attribsArray.length || children.length) {\n attribs = buildJSXOpeningElementAttributes(\n attribsArray,\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n );\n } else {\n // attributes should never be null\n attribs = t.objectExpression([]);\n }\n\n args.push(attribs);\n\n if (development) {\n // isStaticChildren, __source, and __self are only used in development\n // automatically include __source and __self in this plugin\n // so we can eliminate the need for separate Babel plugins in Babel 8\n args.push(\n extracted.key ?? path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n if (extracted.__source) {\n args.push(extracted.__source);\n if (extracted.__self) args.push(extracted.__self);\n } else if (extracted.__self) {\n args.push(path.scope.buildUndefinedNode(), extracted.__self);\n }\n } else if (extracted.key !== undefined) {\n args.push(extracted.key);\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds props for React.jsx. This function adds children into the props\n // and ensures that props is always an object\n function buildJSXOpeningElementAttributes(\n attribs: NodePath<JSXAttribute | JSXSpreadAttribute>[],\n children: Expression[],\n ) {\n const props = attribs.reduce(accumulateAttribute, []);\n\n // In React.jsx, children is no longer a separate argument, but passed in\n // through the argument object\n if (children?.length > 0) {\n props.push(buildChildrenProperty(children));\n }\n\n return t.objectExpression(props);\n }\n\n // Builds JSX Fragment <></> into\n // Production: React.jsx(type, arguments)\n // Development: React.jsxDEV(type, { children })\n function buildJSXFragmentCall(\n path: NodePath<JSXFragment>,\n file: PluginPass,\n ) {\n const args = [get(file, \"id/fragment\")()];\n\n const children = t.react.buildChildren(path.node);\n\n args.push(\n t.objectExpression(\n children.length > 0\n ? [\n buildChildrenProperty(\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n ),\n ]\n : [],\n ),\n );\n\n if (development) {\n args.push(\n path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds JSX Fragment <></> into\n // React.createElement(React.Fragment, null, ...children)\n function buildCreateElementFragmentCall(\n path: NodePath<JSXFragment>,\n file: PluginPass,\n ) {\n if (filter && !filter(path.node, file)) return;\n\n return call(file, \"createElement\", [\n get(file, \"id/fragment\")(),\n t.nullLiteral(),\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n // Builds JSX into:\n // Production: React.createElement(type, arguments, children)\n // Development: React.createElement(type, arguments, children, source, self)\n function buildCreateElementCall(\n path: NodePath<JSXElement>,\n file: PluginPass,\n ) {\n const openingPath = path.get(\"openingElement\");\n\n return call(file, \"createElement\", [\n getTag(openingPath),\n buildCreateElementOpeningElementAttributes(\n file,\n path,\n openingPath.get(\"attributes\"),\n ),\n // @ts-expect-error JSXSpreadChild has been transformed in convertAttributeValue\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n function getTag(openingPath: NodePath<JSXOpeningElement>) {\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n\n let tagName: string;\n if (t.isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (t.isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n if (t.react.isCompatTag(tagName)) {\n return t.stringLiteral(tagName);\n } else {\n return tagExpr;\n }\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n function buildCreateElementOpeningElementAttributes(\n file: PluginPass,\n path: NodePath<JSXElement>,\n attribs: NodePath<JSXAttribute | JSXSpreadAttribute>[],\n ) {\n const runtime = get(file, \"runtime\");\n if (!process.env.BABEL_8_BREAKING) {\n if (runtime !== \"automatic\") {\n const objs = [];\n const props = attribs.reduce(accumulateAttribute, []);\n\n if (!useSpread) {\n // Convert syntax to use multiple objects instead of spread\n let start = 0;\n props.forEach((prop, i) => {\n if (t.isSpreadElement(prop)) {\n if (i > start) {\n objs.push(t.objectExpression(props.slice(start, i)));\n }\n objs.push(prop.argument);\n start = i + 1;\n }\n });\n if (props.length > start) {\n objs.push(t.objectExpression(props.slice(start)));\n }\n } else if (props.length) {\n objs.push(t.objectExpression(props));\n }\n\n if (!objs.length) {\n return t.nullLiteral();\n }\n\n if (objs.length === 1) {\n if (\n !(\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n t.isObjectExpression(props[0].argument)\n )\n ) {\n return objs[0];\n }\n }\n\n // looks like we have multiple objects\n if (!t.isObjectExpression(objs[0])) {\n objs.unshift(t.objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n\n // spread it\n return t.callExpression(helper, objs);\n }\n }\n\n const props: ObjectExpression[\"properties\"] = [];\n const found = Object.create(null);\n\n for (const attr of attribs) {\n const { node } = attr;\n const name =\n t.isJSXAttribute(node) &&\n t.isJSXIdentifier(node.name) &&\n node.name.name;\n\n if (\n runtime === \"automatic\" &&\n (name === \"__source\" || name === \"__self\")\n ) {\n if (found[name]) throw sourceSelfError(path, name);\n found[name] = true;\n }\n\n accumulateAttribute(props, attr);\n }\n\n return props.length === 1 &&\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n !t.isObjectExpression(props[0].argument)\n ? props[0].argument\n : props.length > 0\n ? t.objectExpression(props)\n : t.nullLiteral();\n }\n });\n\n function getSource(source: string, importName: string) {\n switch (importName) {\n case \"Fragment\":\n return `${source}/${development ? \"jsx-dev-runtime\" : \"jsx-runtime\"}`;\n case \"jsxDEV\":\n return `${source}/jsx-dev-runtime`;\n case \"jsx\":\n case \"jsxs\":\n return `${source}/jsx-runtime`;\n case \"createElement\":\n return source;\n }\n }\n\n function createImportLazily(\n pass: PluginPass,\n path: NodePath<Program>,\n importName: string,\n source: string,\n ): () => Identifier | MemberExpression {\n return () => {\n const actualSource = getSource(source, importName);\n if (isModule(path)) {\n let reference = get(pass, `imports/${importName}`);\n if (reference) return t.cloneNode(reference);\n\n reference = addNamed(path, importName, actualSource, {\n importedInterop: \"uncompiled\",\n importPosition: \"after\",\n });\n set(pass, `imports/${importName}`, reference);\n\n return reference;\n } else {\n let reference = get(pass, `requires/${actualSource}`);\n if (reference) {\n reference = t.cloneNode(reference);\n } else {\n reference = addNamespace(path, actualSource, {\n importedInterop: \"uncompiled\",\n });\n set(pass, `requires/${actualSource}`, reference);\n }\n\n return t.memberExpression(reference, t.identifier(importName));\n }\n };\n }\n}\n\nfunction toMemberExpression(id: string): Identifier | MemberExpression {\n return (\n id\n .split(\".\")\n .map(name => t.identifier(name))\n // @ts-expect-error - The Array#reduce does not have a signature\n // where the type of initial value differs from callback return type\n .reduce((object, property) => t.memberExpression(object, property))\n );\n}\n\nfunction makeSource(path: NodePath, state: PluginPass) {\n const location = path.node.loc;\n if (!location) {\n // the element was generated and doesn't have location information\n return path.scope.buildUndefinedNode();\n }\n\n // @ts-expect-error todo: avoid mutating PluginPass\n if (!state.fileNameIdentifier) {\n const { filename = \"\" } = state;\n\n const fileNameIdentifier = path.scope.generateUidIdentifier(\"_jsxFileName\");\n path.scope.getProgramParent().push({\n id: fileNameIdentifier,\n init: t.stringLiteral(filename),\n });\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier = fileNameIdentifier;\n }\n\n return makeTrace(\n t.cloneNode(\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier,\n ),\n location.start.line,\n location.start.column,\n );\n}\n\nfunction makeTrace(\n fileNameIdentifier: Identifier,\n lineNumber?: number,\n column0Based?: number,\n) {\n const fileLineLiteral =\n lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();\n\n const fileColumnLiteral =\n column0Based != null ? t.numericLiteral(column0Based + 1) : t.nullLiteral();\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n}\n\nfunction sourceSelfError(path: NodePath, name: string) {\n const pluginName = `transform-react-jsx-${name.slice(2)}`;\n\n return path.buildCodeFrameError(\n `Duplicate ${name} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`,\n );\n}\n"],"mapp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AC,CAAC2K,WAAW,CAAC,CAAC;EAErE,MAAM8B,iBAAiB,GACrBH,YAAY,IAAI,IAAI,GAAGtM,CAAC,CAACwM,cAAc,CAACF,YAAY,GAAG,CAAC,CAAC,GAAGtM,CAAC,CAAC2K,WAAW,CAAC,CAAC;EAE7E,OAAO7K,QAAQ,CAACyI,UAAU,CAAC9D,GAAG;AAChC,gBAAgBmH,kBAAkB;AAClC,kBAAkBW,eAAe;AACjC,oBAAoBE,iBAAiB;AACrC,IAAI;AACJ;AAEA,SAAS1C,eAAeA,CAAC9G,IAAc,EAAEjC,IAAY,EAAE;EACrD,MAAM0L,UAAU,GAAG,uBAAuB1L,IAAI,CAAC2L,KAAK,CAAC,CAAC,CAAC,EAAE;EAEzD,OAAO1J,IAAI,CAACe,mBAAmB,CAC7B,aAAahD,IAAI,yDAAyD0L,UAAU,+LACtF,CAAC;AACH","ignoreList":[]}
{"version":3,"names":["jsx","declare","template","types","t","addNamed","addNamespace","isModule","annotateAsPure","DEFAULT","importSource","runtime","pragma","pragmaFrag","JSX_SOURCE_ANNOTATION_REGEX","JSX_RUNTIME_ANNOTATION_REGEX","JSX_ANNOTATION_REGEX","JSX_FRAG_ANNOTATION_REGEX","get","pass","name","set","v","hasProto","node","properties","some","value","isObjectProperty","computed","shorthand","isIdentifier","key","isStringLiteral","createPlugin","development","_","options","pure","PURE_ANNOTATION","throwIfNamespace","filter","RUNTIME_DEFAULT","IMPORT_SOURCE_DEFAULT","PRAGMA_DEFAULT","PRAGMA_FRAG_DEFAULT","Error","useBuiltInsFormatted","JSON","stringify","useBuiltIns","injectMetaPropertiesVisitor","JSXOpeningElement","path","state","attributes","isThisAllowed","scope","push","jsxAttribute","jsxIdentifier","jsxExpressionContainer","thisExpression","makeSource","pushContainer","inherits","visitor","JSXNamespacedName","buildCodeFrameError","JSXSpreadChild","Program","enter","file","source","sourceSet","pragmaSet","pragmaFragSet","ast","comments","comment","sourceMatches","exec","runtimeMatches","jsxMatches","jsxFragMatches","createElement","toMemberExpression","fragment","cloneNode","define","id","createImportLazily","traverse","JSXFragment","exit","callExpr","buildCreateElementFragmentCall","buildJSXFragmentCall","replaceWith","JSXElement","shouldUseCreateElement","buildCreateElementCall","buildJSXElementCall","JSXAttribute","isJSXElement","isDerivedClass","classPath","superClass","isFunctionParent","isArrowFunctionExpression","isMethod","kind","parentPath","isTSModuleBlock","parent","call","args","callExpression","openingPath","seenPropsSpread","i","length","attr","isJSXAttribute","isJSXSpreadAttribute","convertJSXIdentifier","isJSXIdentifier","isReferenced","isValidIdentifier","type","stringLiteral","isJSXMemberExpression","memberExpression","object","property","isJSXNamespacedName","namespace","convertAttributeValue","isJSXExpressionContainer","expression","accumulateAttribute","array","attribute","arg","argument","isObjectExpression","spreadElement","booleanLiteral","replace","extra","raw","objectProperty","buildChildrenProperty","children","childrenNode","arrayExpression","undefined","identifier","getTag","attribsArray","extracted","Object","create","sourceSelfError","keyValue","react","buildChildren","attribs","buildJSXOpeningElementAttributes","objectExpression","buildUndefinedNode","__source","__self","props","reduce","nullLiteral","buildCreateElementOpeningElementAttributes","tagExpr","tagName","isCompatTag","found","isSpreadElement","getSource","importName","actualSource","reference","importedInterop","importPosition","split","map","location","loc","fileNameIdentifier","filename","generateUidIdentifier","getProgramParent","init","makeTrace","start","line","column","lineNumber","column0Based","fileLineLiteral","numericLiteral","fileColumnLiteral","pluginName","slice"],"sources":["../src/create-plugin.ts"],"sourcesContent":["import jsx from \"@babel/plugin-syntax-jsx\";\nimport { declare } from \"@babel/helper-plugin-utils\";\nimport { template, types as t } from \"@babel/core\";\nimport type { PluginPass, NodePath, Scope, Visitor } from \"@babel/core\";\nimport { addNamed, addNamespace, isModule } from \"@babel/helper-module-imports\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport type {\n CallExpression,\n Class,\n Expression,\n Identifier,\n JSXAttribute,\n JSXElement,\n JSXFragment,\n JSXOpeningElement,\n JSXSpreadAttribute,\n MemberExpression,\n ObjectExpression,\n Program,\n} from \"@babel/types\";\n\nconst DEFAULT = {\n importSource: \"react\",\n runtime: \"automatic\",\n pragma: \"React.createElement\",\n pragmaFrag: \"React.Fragment\",\n};\n\nconst JSX_SOURCE_ANNOTATION_REGEX =\n /^\\s*(?:\\*\\s*)?@jsxImportSource\\s+(\\S+)\\s*$/m;\nconst JSX_RUNTIME_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxRuntime\\s+(\\S+)\\s*$/m;\n\nconst JSX_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsx\\s+(\\S+)\\s*$/m;\nconst JSX_FRAG_ANNOTATION_REGEX = /^\\s*(?:\\*\\s*)?@jsxFrag\\s+(\\S+)\\s*$/m;\n\nconst get = (pass: PluginPass, name: string) =>\n pass.get(`@babel/plugin-react-jsx/${name}`);\nconst set = (pass: PluginPass, name: string, v: any) =>\n pass.set(`@babel/plugin-react-jsx/${name}`, v);\n\nfunction hasProto(node: t.ObjectExpression) {\n return node.properties.some(\n value =>\n t.isObjectProperty(value, { computed: false, shorthand: false }) &&\n (t.isIdentifier(value.key, { name: \"__proto__\" }) ||\n t.isStringLiteral(value.key, { value: \"__proto__\" })),\n );\n}\n\nexport interface Options {\n filter?: (node: t.Node, pass: PluginPass) => boolean;\n importSource?: string;\n pragma?: string;\n pragmaFrag?: string;\n pure?: string;\n runtime?: \"automatic\" | \"classic\";\n throwIfNamespace?: boolean;\n useBuiltIns: boolean;\n useSpread?: boolean;\n}\nexport default function createPlugin({\n name,\n development,\n}: {\n name: string;\n development: boolean;\n}) {\n return declare((_, options: Options) => {\n const {\n pure: PURE_ANNOTATION,\n\n throwIfNamespace = true,\n\n filter,\n\n runtime: RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING\n ? \"automatic\"\n : development\n ? \"automatic\"\n : \"classic\",\n\n importSource: IMPORT_SOURCE_DEFAULT = DEFAULT.importSource,\n pragma: PRAGMA_DEFAULT = DEFAULT.pragma,\n pragmaFrag: PRAGMA_FRAG_DEFAULT = DEFAULT.pragmaFrag,\n } = options;\n\n if (process.env.BABEL_8_BREAKING) {\n if (\"useSpread\" in options) {\n throw new Error(\n '@babel/plugin-transform-react-jsx: Since Babel 8, an inline object with spread elements is always used, and the \"useSpread\" option is no longer available. Please remove it from your config.',\n );\n }\n\n if (\"useBuiltIns\" in options) {\n const useBuiltInsFormatted = JSON.stringify(options.useBuiltIns);\n throw new Error(\n `@babel/plugin-transform-react-jsx: Since \"useBuiltIns\" is removed in Babel 8, you can remove it from the config.\n- Babel 8 now transforms JSX spread to object spread. If you need to transpile object spread with\n\\`useBuiltIns: ${useBuiltInsFormatted}\\`, you can use the following config\n{\n \"plugins\": [\n \"@babel/plugin-transform-react-jsx\"\n [\"@babel/plugin-transform-object-rest-spread\", { \"loose\": true, \"useBuiltIns\": ${useBuiltInsFormatted} }]\n ]\n}`,\n );\n }\n\n if (filter != null && RUNTIME_DEFAULT === \"automatic\") {\n throw new Error(\n '@babel/plugin-transform-react-jsx: \"filter\" option can not be used with automatic runtime. If you are upgrading from Babel 7, please specify `runtime: \"classic\"`.',\n );\n }\n } else {\n // eslint-disable-next-line no-var\n var { useSpread = false, useBuiltIns = false } = options;\n\n if (RUNTIME_DEFAULT === \"classic\") {\n if (typeof useSpread !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useSpread (defaults to false)\",\n );\n }\n\n if (typeof useBuiltIns !== \"boolean\") {\n throw new Error(\n \"transform-react-jsx currently only accepts a boolean option for \" +\n \"useBuiltIns (defaults to false)\",\n );\n }\n\n if (useSpread && useBuiltIns) {\n throw new Error(\n \"transform-react-jsx currently only accepts useBuiltIns or useSpread \" +\n \"but not both\",\n );\n }\n }\n }\n\n const injectMetaPropertiesVisitor: Visitor<PluginPass> = {\n JSXOpeningElement(path, state) {\n const attributes = [];\n if (isThisAllowed(path.scope)) {\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__self\"),\n t.jsxExpressionContainer(t.thisExpression()),\n ),\n );\n }\n attributes.push(\n t.jsxAttribute(\n t.jsxIdentifier(\"__source\"),\n t.jsxExpressionContainer(makeSource(path, state)),\n ),\n );\n path.pushContainer(\"attributes\", attributes);\n },\n };\n\n return {\n name,\n inherits: jsx,\n visitor: {\n JSXNamespacedName(path) {\n if (throwIfNamespace) {\n throw path.buildCodeFrameError(\n `Namespace tags are not supported by default. React's JSX doesn't support namespace tags. \\\nYou can set \\`throwIfNamespace: false\\` to bypass this warning.`,\n );\n }\n },\n\n JSXSpreadChild(path) {\n throw path.buildCodeFrameError(\n \"Spread children are not supported in React.\",\n );\n },\n\n Program: {\n enter(path, state) {\n const { file } = state;\n let runtime: string = RUNTIME_DEFAULT;\n\n let source: string = IMPORT_SOURCE_DEFAULT;\n let pragma: string = PRAGMA_DEFAULT;\n let pragmaFrag: string = PRAGMA_FRAG_DEFAULT;\n\n let sourceSet = !!options.importSource;\n let pragmaSet = !!options.pragma;\n let pragmaFragSet = !!options.pragmaFrag;\n\n if (file.ast.comments) {\n for (const comment of file.ast.comments) {\n const sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (sourceMatches) {\n source = sourceMatches[1];\n sourceSet = true;\n }\n\n const runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (runtimeMatches) {\n runtime = runtimeMatches[1];\n }\n\n const jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);\n if (jsxMatches) {\n pragma = jsxMatches[1];\n pragmaSet = true;\n }\n const jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(\n comment.value,\n );\n if (jsxFragMatches) {\n pragmaFrag = jsxFragMatches[1];\n pragmaFragSet = true;\n }\n }\n }\n\n set(state, \"runtime\", runtime);\n if (runtime === \"classic\") {\n if (sourceSet) {\n throw path.buildCodeFrameError(\n `importSource cannot be set when runtime is classic.`,\n );\n }\n\n const createElement = toMemberExpression(pragma);\n const fragment = toMemberExpression(pragmaFrag);\n\n set(state, \"id/createElement\", () => t.cloneNode(createElement));\n set(state, \"id/fragment\", () => t.cloneNode(fragment));\n\n set(state, \"defaultPure\", pragma === DEFAULT.pragma);\n } else if (runtime === \"automatic\") {\n if (pragmaSet || pragmaFragSet) {\n throw path.buildCodeFrameError(\n `pragma and pragmaFrag cannot be set when runtime is automatic.`,\n );\n }\n\n const define = (name: string, id: string) =>\n set(state, name, createImportLazily(state, path, id, source));\n\n define(\"id/jsx\", development ? \"jsxDEV\" : \"jsx\");\n define(\"id/jsxs\", development ? \"jsxDEV\" : \"jsxs\");\n define(\"id/createElement\", \"createElement\");\n define(\"id/fragment\", \"Fragment\");\n\n set(state, \"defaultPure\", source === DEFAULT.importSource);\n } else {\n throw path.buildCodeFrameError(\n `Runtime must be either \"classic\" or \"automatic\".`,\n );\n }\n\n if (development) {\n path.traverse(injectMetaPropertiesVisitor, state);\n }\n },\n },\n\n JSXFragment: {\n exit(path, file) {\n let callExpr;\n if (get(file, \"runtime\") === \"classic\") {\n callExpr = buildCreateElementFragmentCall(path, file);\n } else {\n callExpr = buildJSXFragmentCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXElement: {\n exit(path, file) {\n let callExpr;\n if (\n get(file, \"runtime\") === \"classic\" ||\n shouldUseCreateElement(path)\n ) {\n callExpr = buildCreateElementCall(path, file);\n } else {\n callExpr = buildJSXElementCall(path, file);\n }\n\n path.replaceWith(t.inherits(callExpr, path.node));\n },\n },\n\n JSXAttribute(path) {\n if (t.isJSXElement(path.node.value)) {\n path.node.value = t.jsxExpressionContainer(path.node.value);\n }\n },\n },\n };\n\n // Returns whether the class has specified a superclass.\n function isDerivedClass(classPath: NodePath<Class>) {\n return classPath.node.superClass !== null;\n }\n\n // Returns whether `this` is allowed at given scope.\n function isThisAllowed(scope: Scope) {\n // This specifically skips arrow functions as they do not rewrite `this`.\n do {\n const { path } = scope;\n if (path.isFunctionParent() && !path.isArrowFunctionExpression()) {\n if (!path.isMethod()) {\n // If the closest parent is a regular function, `this` will be rebound, therefore it is fine to use `this`.\n return true;\n }\n // Current node is within a method, so we need to check if the method is a constructor.\n if (path.node.kind !== \"constructor\") {\n // We are not in a constructor, therefore it is always fine to use `this`.\n return true;\n }\n // Now we are in a constructor. If it is a derived class, we do not reference `this`.\n return !isDerivedClass(path.parentPath.parentPath as NodePath<Class>);\n }\n if (path.isTSModuleBlock()) {\n // If the closest parent is a TS Module block, `this` will not be allowed.\n return false;\n }\n } while ((scope = scope.parent));\n // We are not in a method or function. It is fine to use `this`.\n return true;\n }\n\n function call(\n pass: PluginPass,\n name: string,\n args: CallExpression[\"arguments\"],\n ) {\n const node = t.callExpression(get(pass, `id/${name}`)(), args);\n if (PURE_ANNOTATION ?? get(pass, \"defaultPure\")) annotateAsPure(node);\n return node;\n }\n\n // We want to use React.createElement, even in the case of\n // jsx, for <div {...props} key={key} /> to distinguish it\n // from <div key={key} {...props} />. This is an intermediary\n // step while we deprecate key spread from props. Afterwards,\n // we will stop using createElement in the transform.\n function shouldUseCreateElement(path: NodePath<JSXElement>) {\n const openingPath = path.get(\"openingElement\");\n const attributes = openingPath.node.attributes;\n\n let seenPropsSpread = false;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n if (\n seenPropsSpread &&\n t.isJSXAttribute(attr) &&\n attr.name.name === \"key\"\n ) {\n return true;\n } else if (t.isJSXSpreadAttribute(attr)) {\n seenPropsSpread = true;\n }\n }\n return false;\n }\n\n function convertJSXIdentifier(\n node: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName,\n parent: t.JSXOpeningElement | t.JSXMemberExpression,\n ): t.ThisExpression | t.StringLiteral | t.MemberExpression | t.Identifier {\n if (t.isJSXIdentifier(node)) {\n if (node.name === \"this\" && t.isReferenced(node, parent)) {\n return t.thisExpression();\n } else if (t.isValidIdentifier(node.name, false)) {\n // @ts-expect-error cast AST type to Identifier\n node.type = \"Identifier\";\n return node as unknown as t.Identifier;\n } else {\n return t.stringLiteral(node.name);\n }\n } else if (t.isJSXMemberExpression(node)) {\n return t.memberExpression(\n convertJSXIdentifier(node.object, node),\n convertJSXIdentifier(node.property, node),\n );\n } else if (t.isJSXNamespacedName(node)) {\n /**\n * If the flag \"throwIfNamespace\" is false\n * print XMLNamespace like string literal\n */\n return t.stringLiteral(`${node.namespace.name}:${node.name.name}`);\n }\n\n // todo: this branch should be unreachable\n return node;\n }\n\n function convertAttributeValue(\n node: t.JSXAttribute[\"value\"] | t.BooleanLiteral,\n ) {\n if (t.isJSXExpressionContainer(node)) {\n return node.expression;\n } else {\n return node;\n }\n }\n\n function accumulateAttribute(\n array: ObjectExpression[\"properties\"],\n attribute: NodePath<JSXAttribute | JSXSpreadAttribute>,\n ) {\n if (t.isJSXSpreadAttribute(attribute.node)) {\n const arg = attribute.node.argument;\n // Collect properties into props array if spreading object expression\n if (t.isObjectExpression(arg) && !hasProto(arg)) {\n array.push(...arg.properties);\n } else {\n array.push(t.spreadElement(arg));\n }\n return array;\n }\n\n const value = convertAttributeValue(\n attribute.node.name.name !== \"key\"\n ? attribute.node.value || t.booleanLiteral(true)\n : attribute.node.value,\n );\n\n if (attribute.node.name.name === \"key\" && value === null) {\n throw attribute.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n if (\n t.isStringLiteral(value) &&\n !t.isJSXExpressionContainer(attribute.node.value)\n ) {\n value.value = value.value.replace(/\\n\\s+/g, \" \");\n\n // \"raw\" JSXText should not be used from a StringLiteral because it needs to be escaped.\n delete value.extra?.raw;\n }\n\n if (t.isJSXNamespacedName(attribute.node.name)) {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(\n attribute.node.name.namespace.name +\n \":\" +\n attribute.node.name.name.name,\n );\n } else if (t.isValidIdentifier(attribute.node.name.name, false)) {\n // @ts-expect-error mutating AST\n attribute.node.name.type = \"Identifier\";\n } else {\n // @ts-expect-error mutating AST\n attribute.node.name = t.stringLiteral(attribute.node.name.name);\n }\n\n array.push(\n t.inherits(\n t.objectProperty(\n // @ts-expect-error The attribute.node.name is an Identifier now\n attribute.node.name,\n value,\n ),\n attribute.node,\n ),\n );\n return array;\n }\n\n function buildChildrenProperty(children: Expression[]) {\n let childrenNode;\n if (children.length === 1) {\n childrenNode = children[0];\n } else if (children.length > 1) {\n childrenNode = t.arrayExpression(children);\n } else {\n return undefined;\n }\n\n return t.objectProperty(t.identifier(\"children\"), childrenNode);\n }\n\n // Builds JSX into:\n // Production: React.jsx(type, arguments, key)\n // Development: React.jsxDEV(type, arguments, key, isStaticChildren, source, self)\n function buildJSXElementCall(path: NodePath<JSXElement>, file: PluginPass) {\n const openingPath = path.get(\"openingElement\");\n const args: t.Expression[] = [getTag(openingPath)];\n\n const attribsArray = [];\n const extracted = Object.create(null);\n\n // for React.jsx, key, __source (dev), and __self (dev) is passed in as\n // a separate argument rather than in the args object. We go through the\n // props and filter out these three keywords so we can pass them in\n // as separate arguments later\n for (const attr of openingPath.get(\"attributes\")) {\n if (attr.isJSXAttribute() && t.isJSXIdentifier(attr.node.name)) {\n const { name } = attr.node.name;\n switch (name) {\n case \"__source\":\n case \"__self\":\n if (extracted[name]) throw sourceSelfError(path, name);\n /* falls through */\n case \"key\": {\n const keyValue = convertAttributeValue(attr.node.value);\n if (keyValue === null) {\n throw attr.buildCodeFrameError(\n 'Please provide an explicit key value. Using \"key\" as a shorthand for \"key={true}\" is not allowed.',\n );\n }\n\n extracted[name] = keyValue;\n break;\n }\n default:\n attribsArray.push(attr);\n }\n } else {\n attribsArray.push(attr);\n }\n }\n\n const children = t.react.buildChildren(path.node);\n\n let attribs: t.ObjectExpression;\n\n if (attribsArray.length || children.length) {\n attribs = buildJSXOpeningElementAttributes(\n attribsArray,\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n );\n } else {\n // attributes should never be null\n attribs = t.objectExpression([]);\n }\n\n args.push(attribs);\n\n if (development) {\n // isStaticChildren, __source, and __self are only used in development\n // automatically include __source and __self in this plugin\n // so we can eliminate the need for separate Babel plugins in Babel 8\n args.push(\n extracted.key ?? path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n if (extracted.__source) {\n args.push(extracted.__source);\n if (extracted.__self) args.push(extracted.__self);\n } else if (extracted.__self) {\n args.push(path.scope.buildUndefinedNode(), extracted.__self);\n }\n } else if (extracted.key !== undefined) {\n args.push(extracted.key);\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds props for React.jsx. This function adds children into the props\n // and ensures that props is always an object\n function buildJSXOpeningElementAttributes(\n attribs: NodePath<JSXAttribute | JSXSpreadAttribute>[],\n children: Expression[],\n ) {\n const props = attribs.reduce(accumulateAttribute, []);\n\n // In React.jsx, children is no longer a separate argument, but passed in\n // through the argument object\n if (children?.length > 0) {\n props.push(buildChildrenProperty(children));\n }\n\n return t.objectExpression(props);\n }\n\n // Builds JSX Fragment <></> into\n // Production: React.jsx(type, arguments)\n // Development: React.jsxDEV(type, { children })\n function buildJSXFragmentCall(\n path: NodePath<JSXFragment>,\n file: PluginPass,\n ) {\n const args = [get(file, \"id/fragment\")()];\n\n const children = t.react.buildChildren(path.node);\n\n args.push(\n t.objectExpression(\n children.length > 0\n ? [\n buildChildrenProperty(\n //@ts-expect-error The children here contains JSXSpreadChild,\n // which will be thrown later\n children,\n ),\n ]\n : [],\n ),\n );\n\n if (development) {\n args.push(\n path.scope.buildUndefinedNode(),\n t.booleanLiteral(children.length > 1),\n );\n }\n\n return call(file, children.length > 1 ? \"jsxs\" : \"jsx\", args);\n }\n\n // Builds JSX Fragment <></> into\n // React.createElement(React.Fragment, null, ...children)\n function buildCreateElementFragmentCall(\n path: NodePath<JSXFragment>,\n file: PluginPass,\n ) {\n if (filter && !filter(path.node, file)) return;\n\n return call(file, \"createElement\", [\n get(file, \"id/fragment\")(),\n t.nullLiteral(),\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n // Builds JSX into:\n // Production: React.createElement(type, arguments, children)\n // Development: React.createElement(type, arguments, children, source, self)\n function buildCreateElementCall(\n path: NodePath<JSXElement>,\n file: PluginPass,\n ) {\n const openingPath = path.get(\"openingElement\");\n\n return call(file, \"createElement\", [\n getTag(openingPath),\n buildCreateElementOpeningElementAttributes(\n file,\n path,\n openingPath.get(\"attributes\"),\n ),\n // @ts-expect-error JSXSpreadChild has been transformed in convertAttributeValue\n ...t.react.buildChildren(path.node),\n ]);\n }\n\n function getTag(openingPath: NodePath<JSXOpeningElement>) {\n const tagExpr = convertJSXIdentifier(\n openingPath.node.name,\n openingPath.node,\n );\n\n let tagName: string;\n if (t.isIdentifier(tagExpr)) {\n tagName = tagExpr.name;\n } else if (t.isStringLiteral(tagExpr)) {\n tagName = tagExpr.value;\n }\n\n if (t.react.isCompatTag(tagName)) {\n return t.stringLiteral(tagName);\n } else {\n return tagExpr;\n }\n }\n\n /**\n * The logic for this is quite terse. It's because we need to\n * support spread elements. We loop over all attributes,\n * breaking on spreads, we then push a new object containing\n * all prior attributes to an array for later processing.\n */\n function buildCreateElementOpeningElementAttributes(\n file: PluginPass,\n path: NodePath<JSXElement>,\n attribs: NodePath<JSXAttribute | JSXSpreadAttribute>[],\n ) {\n const runtime = get(file, \"runtime\");\n if (!process.env.BABEL_8_BREAKING) {\n if (runtime !== \"automatic\") {\n const objs = [];\n const props = attribs.reduce(accumulateAttribute, []);\n\n if (!useSpread) {\n // Convert syntax to use multiple objects instead of spread\n let start = 0;\n props.forEach((prop, i) => {\n if (t.isSpreadElement(prop)) {\n if (i > start) {\n objs.push(t.objectExpression(props.slice(start, i)));\n }\n objs.push(prop.argument);\n start = i + 1;\n }\n });\n if (props.length > start) {\n objs.push(t.objectExpression(props.slice(start)));\n }\n } else if (props.length) {\n objs.push(t.objectExpression(props));\n }\n\n if (!objs.length) {\n return t.nullLiteral();\n }\n\n if (objs.length === 1) {\n if (\n !(\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n t.isObjectExpression(props[0].argument)\n )\n ) {\n return objs[0];\n }\n }\n\n // looks like we have multiple objects\n if (!t.isObjectExpression(objs[0])) {\n objs.unshift(t.objectExpression([]));\n }\n\n const helper = useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n\n // spread it\n return t.callExpression(helper, objs);\n }\n }\n\n const props: ObjectExpression[\"properties\"] = [];\n const found = Object.create(null);\n\n for (const attr of attribs) {\n const { node } = attr;\n const name =\n t.isJSXAttribute(node) &&\n t.isJSXIdentifier(node.name) &&\n node.name.name;\n\n if (\n runtime === \"automatic\" &&\n (name === \"__source\" || name === \"__self\")\n ) {\n if (found[name]) throw sourceSelfError(path, name);\n found[name] = true;\n }\n\n accumulateAttribute(props, attr);\n }\n\n return props.length === 1 &&\n t.isSpreadElement(props[0]) &&\n // If an object expression is spread element's argument\n // it is very likely to contain __proto__ and we should stop\n // optimizing spread element\n !t.isObjectExpression(props[0].argument)\n ? props[0].argument\n : props.length > 0\n ? t.objectExpression(props)\n : t.nullLiteral();\n }\n });\n\n function getSource(source: string, importName: string) {\n switch (importName) {\n case \"Fragment\":\n return `${source}/${development ? \"jsx-dev-runtime\" : \"jsx-runtime\"}`;\n case \"jsxDEV\":\n return `${source}/jsx-dev-runtime`;\n case \"jsx\":\n case \"jsxs\":\n return `${source}/jsx-runtime`;\n case \"createElement\":\n return source;\n }\n }\n\n function createImportLazily(\n pass: PluginPass,\n path: NodePath<Program>,\n importName: string,\n source: string,\n ): () => Identifier | MemberExpression {\n return () => {\n const actualSource = getSource(source, importName);\n if (isModule(path)) {\n let reference = get(pass, `imports/${importName}`);\n if (reference) return t.cloneNode(reference);\n\n reference = addNamed(path, importName, actualSource, {\n importedInterop: \"uncompiled\",\n importPosition: \"after\",\n });\n set(pass, `imports/${importName}`, reference);\n\n return reference;\n } else {\n let reference = get(pass, `requires/${actualSource}`);\n if (reference) {\n reference = t.cloneNode(reference);\n } else {\n reference = addNamespace(path, actualSource, {\n importedInterop: \"uncompiled\",\n });\n set(pass, `requires/${actualSource}`, reference);\n }\n\n return t.memberExpression(reference, t.identifier(importName));\n }\n };\n }\n}\n\nfunction toMemberExpression(id: string): Identifier | MemberExpression {\n return (\n id\n .split(\".\")\n .map(name => t.identifier(name))\n // @ts-expect-error - The Array#reduce does not have a signature\n // where the type of initial value differs from callback return type\n .reduce((object, property) => t.memberExpression(object, property))\n );\n}\n\nfunction makeSource(path: NodePath, state: PluginPass) {\n const location = path.node.loc;\n if (!location) {\n // the element was generated and doesn't have location information\n return path.scope.buildUndefinedNode();\n }\n\n // @ts-expect-error todo: avoid mutating PluginPass\n if (!state.fileNameIdentifier) {\n const { filename = \"\" } = state;\n\n const fileNameIdentifier = path.scope.generateUidIdentifier(\"_jsxFileName\");\n path.scope.getProgramParent().push({\n id: fileNameIdentifier,\n init: t.stringLiteral(filename),\n });\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier = fileNameIdentifier;\n }\n\n return makeTrace(\n t.cloneNode(\n // @ts-expect-error todo: avoid mutating PluginPass\n state.fileNameIdentifier,\n ),\n location.start.line,\n location.start.column,\n );\n}\n\nfunction makeTrace(\n fileNameIdentifier: Identifier,\n lineNumber?: number,\n column0Based?: number,\n) {\n const fileLineLiteral =\n lineNumber != null ? t.numericLiteral(lineNumber) : t.nullLiteral();\n\n const fileColumnLiteral =\n column0Based != null ? t.numericLiteral(column0Based + 1) : t.nullLiteral();\n\n return template.expression.ast`{\n fileName: ${fileNameIdentifier},\n lineNumber: ${fileLineLiteral},\n columnNumber: ${fileColumnLiteral},\n }`;\n}\n\nfunction sourceSelfError(path: NodePath, name: string) {\n const pluginName = `transform-react-jsx-${name.slice(2)}`;\n\n return path.buildCodeFrameError(\n `Duplicate ${name} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`,\n );\n}\n"],"m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C,CAAC2K,WAAW,CAAC,CAAC;EAErE,MAAM8B,iBAAiB,GACrBH,YAAY,IAAI,IAAI,GAAGtM,CAAC,CAACwM,cAAc,CAACF,YAAY,GAAG,CAAC,CAAC,GAAGtM,CAAC,CAAC2K,WAAW,CAAC,CAAC;EAE7E,OAAO7K,QAAQ,CAACyI,UAAU,CAAC9D,GAAG;AAChC,gBAAgBmH,kBAAkB;AAClC,kBAAkBW,eAAe;AACjC,oBAAoBE,iBAAiB;AACrC,IAAI;AACJ;AAEA,SAAS1C,eAAeA,CAAC9G,IAAc,EAAEjC,IAAY,EAAE;EACrD,MAAM0L,UAAU,GAAG,uBAAuB1L,IAAI,CAAC2L,KAAK,CAAC,CAAC,CAAC,EAAE;EAEzD,OAAO1J,IAAI,CAACe,mBAAmB,CAC7B,aAAahD,IAAI,yDAAyD0L,UAAU,+LACtF,CAAC;AACH","ignoreList":[]}
{
"name": "@babel/plugin-transform-react-jsx",
"version": "8.0.0-alpha.17",
"version": "8.0.0-beta.0",
"description": "Turn JSX into React function calls",

@@ -20,18 +20,18 @@ "repository": {

"dependencies": {
"@babel/helper-annotate-as-pure": "^8.0.0-alpha.17",
"@babel/helper-module-imports": "^8.0.0-alpha.17",
"@babel/helper-plugin-utils": "^8.0.0-alpha.17",
"@babel/plugin-syntax-jsx": "^8.0.0-alpha.17",
"@babel/types": "^8.0.0-alpha.17"
"@babel/helper-annotate-as-pure": "^8.0.0-beta.0",
"@babel/helper-module-imports": "^8.0.0-beta.0",
"@babel/helper-plugin-utils": "^8.0.0-beta.0",
"@babel/plugin-syntax-jsx": "^8.0.0-beta.0",
"@babel/types": "^8.0.0-beta.0"
},
"peerDependencies": {
"@babel/core": "^8.0.0-alpha.17"
"@babel/core": "^8.0.0-beta.0"
},
"devDependencies": {
"@babel/core": "^8.0.0-alpha.17",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.17",
"@babel/traverse": "^8.0.0-alpha.17"
"@babel/core": "^8.0.0-beta.0",
"@babel/helper-plugin-test-runner": "^8.0.0-beta.0",
"@babel/traverse": "^8.0.0-beta.0"
},
"engines": {
"node": "^18.20.0 || ^20.17.0 || >=22.8.0"
"node": "^20.19.0 || >=22.12.0"
},

@@ -38,0 +38,0 @@ "author": "The Babel Team (https://babel.dev/team)",