1 line
36 KiB
Plaintext
1 line
36 KiB
Plaintext
{"version":3,"names":["_t","require","STATEMENT_OR_BLOCK_KEYS","VISITOR_KEYS","isBlockStatement","isExpression","isIdentifier","isLiteral","isStringLiteral","isType","matchesPattern","_matchesPattern","pattern","allowPartial","node","exports","has","key","_this$node","val","Array","isArray","length","isStatic","scope","is","isnt","equals","value","isNodeType","type","canHaveVariableDeclarationOrExpression","parentPath","isFor","canSwapBetweenExpressionAndStatement","replacement","isArrowFunctionExpression","isCompletionRecord","allowInsideFunction","path","first","container","isFunction","isProgram","isDoExpression","isStatementOrBlock","isLabeledStatement","includes","referencesImport","moduleSource","importName","isReferencedIdentifier","isJSXMemberExpression","property","name","isMemberExpression","isOptionalMemberExpression","computed","object","get","binding","getBinding","kind","parent","isImportDeclaration","source","isImportDefaultSpecifier","isImportNamespaceSpecifier","isImportSpecifier","imported","getSource","end","code","hub","getCode","slice","start","willIMaybeExecuteBefore","target","_guessExecutionStatusRelativeTo","getOuterFunction","getFunctionParent","getProgramParent","isExecutionUncertain","isExecutionUncertainInList","paths","maxIndex","i","parentKey","SYMBOL_CHECKING","Symbol","_guessExecutionStatusRelativeToCached","Map","base","cache","funcParent","this","_guessExecutionStatusRelativeToDifferentFunctionsCached","getAncestry","commonPath","commonIndex","indexOf","Error","divergence","listKey","keys","keyPosition","_guessExecutionStatusRelativeToDifferentFunctionsInternal","isFunctionDeclaration","isExportDeclaration","id","references","referencePaths","allStatus","childOfFunction","find","isCallExpression","status","nodeMap","cached","set","result","resolve","dangerous","resolved","_resolve","call","_resolved","push","isVariableDeclarator","constant","ret","isTypeCastExpression","targetKey","toComputedKey","targetName","isObjectExpression","props","prop","isProperty","match","isArrayExpression","isNaN","elems","elem","isConstantExpression","isRegExpLiteral","isTemplateLiteral","every","expression","isUnaryExpression","operator","isBinaryExpression","hasBinding","noGlobals","arguments","isInStrictMode","strictParent","sourceType","isClass","body","directive","directives"],"sources":["../../src/path/introspection.ts"],"sourcesContent":["// This file contains methods responsible for introspecting the current path for certain values.\n\nimport type NodePath from \"./index.ts\";\nimport {\n STATEMENT_OR_BLOCK_KEYS,\n VISITOR_KEYS,\n isBlockStatement,\n isExpression,\n isIdentifier,\n isLiteral,\n isStringLiteral,\n isType,\n matchesPattern as _matchesPattern,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n/**\n * Match the current node if it matches the provided `pattern`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\n\nexport function matchesPattern(\n this: NodePath,\n pattern: string,\n allowPartial?: boolean,\n): boolean {\n return _matchesPattern(this.node, pattern, allowPartial);\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * Check whether we have the input `key`. If the `key` references an array then we check\n * if the array has any items, otherwise we just check if it's falsy.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.has = function has<N extends t.Node>(\n this: NodePath<N>,\n key: keyof N,\n ): boolean {\n const val = (this.node as N)?.[key];\n if (val && Array.isArray(val)) {\n return !!val.length;\n } else {\n return !!val;\n }\n };\n}\n\nexport function isStatic(this: NodePath): boolean {\n return this.scope.isStatic(this.node);\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * Alias of `has`.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.is = exports.has;\n\n /**\n * Opposite of `has`.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.isnt = function isnt<N extends t.Node>(\n this: NodePath<N>,\n key: keyof N,\n ): boolean {\n // @ts-expect-error Babel 7\n return !this.has(key);\n };\n\n /**\n * Check whether the path node `key` strict equals `value`.\n */\n // eslint-disable-next-line no-restricted-globals\n exports.equals = function equals<N extends t.Node>(\n this: NodePath<N>,\n key: keyof N,\n value: any,\n ): boolean {\n return (this.node as N)[key] === value;\n };\n}\n\n/**\n * Check the type against our stored internal type of the node. This is handy when a node has\n * been removed yet we still internally know the type and need it to calculate node replacement.\n */\n\nexport function isNodeType(this: NodePath, type: string): boolean {\n return isType(this.type, type);\n}\n\n/**\n * This checks whether or not we're in one of the following positions:\n *\n * for (KEY in right);\n * for (KEY;;);\n *\n * This is because these spots allow VariableDeclarations AND normal expressions so we need\n * to tell the path replacement that it's ok to replace this with an expression.\n */\n\nexport function canHaveVariableDeclarationOrExpression(this: NodePath) {\n return (\n (this.key === \"init\" || this.key === \"left\") && this.parentPath.isFor()\n );\n}\n\n/**\n * This checks whether we are swapping an arrow function's body between an\n * expression and a block statement (or vice versa).\n *\n * This is because arrow functions may implicitly return an expression, which\n * is the same as containing a block statement.\n */\n\nexport function canSwapBetweenExpressionAndStatement(\n this: NodePath,\n replacement: t.Node,\n): boolean {\n if (this.key !== \"body\" || !this.parentPath.isArrowFunctionExpression()) {\n return false;\n }\n\n if (this.isExpression()) {\n return isBlockStatement(replacement);\n } else if (this.isBlockStatement()) {\n return isExpression(replacement);\n }\n\n return false;\n}\n\n/**\n * Check whether the current path references a completion record\n */\n\nexport function isCompletionRecord(\n this: NodePath,\n allowInsideFunction?: boolean,\n): boolean {\n let path = this;\n let first = true;\n\n do {\n const { type, container } = path;\n\n // we're in a function so can't be a completion record\n if (!first && (path.isFunction() || type === \"StaticBlock\")) {\n return !!allowInsideFunction;\n }\n\n first = false;\n\n // check to see if we're the last item in the container and if we are\n // we're a completion record!\n if (Array.isArray(container) && path.key !== container.length - 1) {\n return false;\n }\n } while (\n (path = path.parentPath) &&\n !path.isProgram() &&\n !path.isDoExpression()\n );\n\n return true;\n}\n\n/**\n * Check whether or not the current `key` allows either a single statement or block statement\n * so we can explode it if necessary.\n */\n\nexport function isStatementOrBlock(this: NodePath): boolean {\n if (\n this.parentPath.isLabeledStatement() ||\n isBlockStatement(this.container as t.Node)\n ) {\n return false;\n } else {\n return STATEMENT_OR_BLOCK_KEYS.includes(this.key as string);\n }\n}\n\n/**\n * Check if the currently assigned path references the `importName` of `moduleSource`.\n */\n\nexport function referencesImport(\n this: NodePath,\n moduleSource: string,\n importName: string,\n): boolean {\n if (!this.isReferencedIdentifier()) {\n if (\n (this.isJSXMemberExpression() &&\n this.node.property.name === importName) ||\n ((this.isMemberExpression() || this.isOptionalMemberExpression()) &&\n (this.node.computed\n ? isStringLiteral(this.node.property, { value: importName })\n : (this.node.property as t.Identifier).name === importName))\n ) {\n const object = (\n this as NodePath<t.MemberExpression | t.OptionalMemberExpression>\n ).get(\"object\");\n return (\n object.isReferencedIdentifier() &&\n object.referencesImport(moduleSource, \"*\")\n );\n }\n\n return false;\n }\n\n const binding = this.scope.getBinding((this.node as t.Identifier).name);\n if (!binding || binding.kind !== \"module\") return false;\n\n const path = binding.path;\n const parent = path.parentPath;\n if (!parent.isImportDeclaration()) return false;\n\n // check moduleSource\n if (parent.node.source.value === moduleSource) {\n if (!importName) return true;\n } else {\n return false;\n }\n\n if (path.isImportDefaultSpecifier() && importName === \"default\") {\n return true;\n }\n\n if (path.isImportNamespaceSpecifier() && importName === \"*\") {\n return true;\n }\n\n if (\n path.isImportSpecifier() &&\n isIdentifier(path.node.imported, { name: importName })\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Get the source code associated with this node.\n */\n\nexport function getSource(this: NodePath): string {\n const node = this.node;\n if (node.end) {\n const code = this.hub.getCode();\n if (code) return code.slice(node.start, node.end);\n }\n return \"\";\n}\n\nexport function willIMaybeExecuteBefore(\n this: NodePath,\n target: NodePath,\n): boolean {\n return this._guessExecutionStatusRelativeTo(target) !== \"after\";\n}\n\nfunction getOuterFunction(path: NodePath) {\n return path.isProgram()\n ? path\n : (\n path.parentPath.scope.getFunctionParent() ||\n path.parentPath.scope.getProgramParent()\n ).path;\n}\n\nfunction isExecutionUncertain(type: t.Node[\"type\"], key: string) {\n switch (type) {\n // a && FOO\n // a || FOO\n case \"LogicalExpression\":\n return key === \"right\";\n\n // a ? FOO : FOO\n // if (a) FOO; else FOO;\n case \"ConditionalExpression\":\n case \"IfStatement\":\n return key === \"consequent\" || key === \"alternate\";\n\n // while (a) FOO;\n case \"WhileStatement\":\n case \"DoWhileStatement\":\n case \"ForInStatement\":\n case \"ForOfStatement\":\n return key === \"body\";\n\n // for (a; b; FOO) FOO;\n case \"ForStatement\":\n return key === \"body\" || key === \"update\";\n\n // switch (a) { FOO }\n case \"SwitchStatement\":\n return key === \"cases\";\n\n // try { a } catch FOO finally { b }\n case \"TryStatement\":\n return key === \"handler\";\n\n // var [ x = FOO ]\n case \"AssignmentPattern\":\n return key === \"right\";\n\n // a?.[FOO]\n case \"OptionalMemberExpression\":\n return key === \"property\";\n\n // a?.(FOO)\n case \"OptionalCallExpression\":\n return key === \"arguments\";\n\n default:\n return false;\n }\n}\n\nfunction isExecutionUncertainInList(paths: NodePath[], maxIndex: number) {\n for (let i = 0; i < maxIndex; i++) {\n const path = paths[i];\n if (isExecutionUncertain(path.parent.type, path.parentKey)) {\n return true;\n }\n }\n return false;\n}\n\n// TODO(Babel 8)\n// This can be { before: boolean, after: boolean, unknown: boolean }.\n// This allows transforms like the tdz one to treat cases when the status\n// is both before and unknown/after like if it were before.\ntype RelativeExecutionStatus = \"before\" | \"after\" | \"unknown\";\n\n// Used to avoid infinite recursion in cases like\n// function f() { if (false) f(); }\n// f();\n// It also works with indirect recursion.\nconst SYMBOL_CHECKING = Symbol();\n\ntype ExecutionStatusCache = Map<\n t.Node,\n Map<t.Node, RelativeExecutionStatus | typeof SYMBOL_CHECKING>\n>;\n\n/**\n * Given a `target` check the execution status of it relative to the current path.\n *\n * \"Execution status\" simply refers to where or not we **think** this will execute\n * before or after the input `target` element.\n */\n\nexport function _guessExecutionStatusRelativeTo(\n this: NodePath,\n target: NodePath,\n): RelativeExecutionStatus {\n return _guessExecutionStatusRelativeToCached(this, target, new Map());\n}\n\nfunction _guessExecutionStatusRelativeToCached(\n base: NodePath,\n target: NodePath,\n cache: ExecutionStatusCache,\n): RelativeExecutionStatus {\n // check if the two paths are in different functions, we can't track execution of these\n const funcParent = {\n this: getOuterFunction(base),\n target: getOuterFunction(target),\n };\n\n // here we check the `node` equality as sometimes we may have different paths for the\n // same node due to path thrashing\n if (funcParent.target.node !== funcParent.this.node) {\n return _guessExecutionStatusRelativeToDifferentFunctionsCached(\n base,\n funcParent.target,\n cache,\n );\n }\n\n const paths = {\n target: target.getAncestry(),\n this: base.getAncestry(),\n };\n\n // If this is an ancestor of the target path,\n // e.g. f(g); where this is f and target is g.\n if (paths.target.includes(base)) return \"after\";\n if (paths.this.includes(target)) return \"before\";\n\n // get ancestor where the branches intersect\n let commonPath;\n const commonIndex = { target: 0, this: 0 };\n\n while (!commonPath && commonIndex.this < paths.this.length) {\n const path = paths.this[commonIndex.this];\n commonIndex.target = paths.target.indexOf(path);\n if (commonIndex.target >= 0) {\n commonPath = path;\n } else {\n commonIndex.this++;\n }\n }\n\n if (!commonPath) {\n throw new Error(\n \"Internal Babel error - The two compared nodes\" +\n \" don't appear to belong to the same program.\",\n );\n }\n\n if (\n isExecutionUncertainInList(paths.this, commonIndex.this - 1) ||\n isExecutionUncertainInList(paths.target, commonIndex.target - 1)\n ) {\n return \"unknown\";\n }\n\n const divergence = {\n this: paths.this[commonIndex.this - 1],\n target: paths.target[commonIndex.target - 1],\n };\n\n // container list so let's see which one is after the other\n // e.g. [ THIS, TARGET ]\n if (\n divergence.target.listKey &&\n divergence.this.listKey &&\n divergence.target.container === divergence.this.container\n ) {\n return divergence.target.key > divergence.this.key ? \"before\" : \"after\";\n }\n\n // otherwise we're associated by a parent node, check which key comes before the other\n const keys = VISITOR_KEYS[commonPath.type];\n const keyPosition = {\n this: keys.indexOf(divergence.this.parentKey),\n target: keys.indexOf(divergence.target.parentKey),\n };\n return keyPosition.target > keyPosition.this ? \"before\" : \"after\";\n}\n\nfunction _guessExecutionStatusRelativeToDifferentFunctionsInternal(\n base: NodePath,\n target: NodePath,\n cache: ExecutionStatusCache,\n): RelativeExecutionStatus {\n if (!target.isFunctionDeclaration()) {\n if (\n _guessExecutionStatusRelativeToCached(base, target, cache) === \"before\"\n ) {\n return \"before\";\n }\n return \"unknown\";\n } else if (target.parentPath.isExportDeclaration()) {\n return \"unknown\";\n }\n\n // so we're in a completely different function, if this is a function declaration\n // then we can be a bit smarter and handle cases where the function is either\n // a. not called at all (part of an export)\n // b. called directly\n const binding = target.scope.getBinding(target.node.id.name);\n\n // no references!\n if (!binding.references) return \"before\";\n\n const referencePaths: Array<NodePath> = binding.referencePaths;\n\n let allStatus;\n\n // verify that all the calls have the same execution status\n for (const path of referencePaths) {\n // if a reference is a child of the function we're checking against then we can\n // safely ignore it\n const childOfFunction = !!path.find(path => path.node === target.node);\n if (childOfFunction) continue;\n\n if (path.key !== \"callee\" || !path.parentPath.isCallExpression()) {\n // This function is passed as a reference, so we don't\n // know when it will be called.\n return \"unknown\";\n }\n\n const status = _guessExecutionStatusRelativeToCached(base, path, cache);\n\n if (allStatus && allStatus !== status) {\n return \"unknown\";\n } else {\n allStatus = status;\n }\n }\n\n return allStatus;\n}\n\nfunction _guessExecutionStatusRelativeToDifferentFunctionsCached(\n base: NodePath,\n target: NodePath,\n cache: ExecutionStatusCache,\n): RelativeExecutionStatus {\n let nodeMap = cache.get(base.node);\n let cached;\n\n if (!nodeMap) {\n cache.set(base.node, (nodeMap = new Map()));\n } else if ((cached = nodeMap.get(target.node))) {\n if (cached === SYMBOL_CHECKING) {\n return \"unknown\";\n }\n return cached;\n }\n\n nodeMap.set(target.node, SYMBOL_CHECKING);\n\n const result = _guessExecutionStatusRelativeToDifferentFunctionsInternal(\n base,\n target,\n cache,\n );\n\n nodeMap.set(target.node, result);\n return result;\n}\n\n/**\n * Resolve a \"pointer\" `NodePath` to it's absolute path.\n */\nexport function resolve(\n this: NodePath,\n dangerous?: boolean,\n resolved?: NodePath[],\n) {\n return _resolve.call(this, dangerous, resolved) || this;\n}\n\nexport function _resolve(\n this: NodePath,\n dangerous?: boolean,\n resolved?: NodePath[],\n): NodePath | undefined | null {\n // detect infinite recursion\n // todo: possibly have a max length on this just to be safe\n if (resolved?.includes(this)) return;\n\n // we store all the paths we've \"resolved\" in this array to prevent infinite recursion\n resolved = resolved || [];\n resolved.push(this);\n\n if (this.isVariableDeclarator()) {\n if (this.get(\"id\").isIdentifier()) {\n return this.get(\"init\").resolve(dangerous, resolved);\n } else {\n // otherwise it's a request for a pattern and that's a bit more tricky\n }\n } else if (this.isReferencedIdentifier()) {\n const binding = this.scope.getBinding(this.node.name);\n if (!binding) return;\n\n // reassigned so we can't really resolve it\n if (!binding.constant) return;\n\n // todo - lookup module in dependency graph\n if (binding.kind === \"module\") return;\n\n if (binding.path !== this) {\n const ret = binding.path.resolve(dangerous, resolved);\n // If the identifier resolves to parent node then we can't really resolve it.\n if (this.find(parent => parent.node === ret.node)) return;\n return ret;\n }\n } else if (this.isTypeCastExpression()) {\n // @ ts-ignore todo: babel-types\n return this.get(\"expression\").resolve(dangerous, resolved);\n } else if (dangerous && this.isMemberExpression()) {\n // this is dangerous, as non-direct target assignments will mutate it's state\n // making this resolution inaccurate\n\n const targetKey = this.toComputedKey();\n if (!isLiteral(targetKey)) return;\n\n // @ts-expect-error todo(flow->ts): NullLiteral\n const targetName = targetKey.value;\n\n const target = this.get(\"object\").resolve(dangerous, resolved);\n\n if (target.isObjectExpression()) {\n const props = target.get(\"properties\");\n for (const prop of props as any[]) {\n if (!prop.isProperty()) continue;\n\n const key = prop.get(\"key\");\n\n // { foo: obj }\n let match =\n prop.isnt(\"computed\") && key.isIdentifier({ name: targetName });\n\n // { \"foo\": \"obj\" } or { [\"foo\"]: \"obj\" }\n match = match || key.isLiteral({ value: targetName });\n\n if (match) return prop.get(\"value\").resolve(dangerous, resolved);\n }\n } else if (target.isArrayExpression() && !isNaN(+targetName)) {\n const elems = target.get(\"elements\");\n const elem = elems[targetName];\n if (elem) return elem.resolve(dangerous, resolved);\n }\n }\n}\n\nexport function isConstantExpression(this: NodePath): boolean {\n if (this.isIdentifier()) {\n const binding = this.scope.getBinding(this.node.name);\n if (!binding) return false;\n return binding.constant;\n }\n\n if (this.isLiteral()) {\n if (this.isRegExpLiteral()) {\n return false;\n }\n\n if (this.isTemplateLiteral()) {\n return this.get(\"expressions\").every(expression =>\n expression.isConstantExpression(),\n );\n }\n\n return true;\n }\n\n if (this.isUnaryExpression()) {\n if (this.node.operator !== \"void\") {\n return false;\n }\n\n return this.get(\"argument\").isConstantExpression();\n }\n\n if (this.isBinaryExpression()) {\n const { operator } = this.node;\n return (\n operator !== \"in\" &&\n operator !== \"instanceof\" &&\n this.get(\"left\").isConstantExpression() &&\n this.get(\"right\").isConstantExpression()\n );\n }\n\n if (this.isMemberExpression()) {\n return (\n !this.node.computed &&\n this.get(\"object\").isIdentifier({ name: \"Symbol\" }) &&\n !this.scope.hasBinding(\"Symbol\", { noGlobals: true })\n );\n }\n\n if (this.isCallExpression()) {\n return (\n this.node.arguments.length === 1 &&\n this.get(\"callee\").matchesPattern(\"Symbol.for\") &&\n !this.scope.hasBinding(\"Symbol\", { noGlobals: true }) &&\n this.get(\"arguments\")[0].isStringLiteral()\n );\n }\n\n return false;\n}\n\nexport function isInStrictMode(this: NodePath) {\n const start = this.isProgram() ? this : this.parentPath;\n\n const strictParent = start.find(path => {\n if (path.isProgram({ sourceType: \"module\" })) return true;\n\n if (path.isClass()) return true;\n\n if (\n path.isArrowFunctionExpression() &&\n !path.get(\"body\").isBlockStatement()\n ) {\n return false;\n }\n\n let body: t.BlockStatement | t.Program;\n if (path.isFunction()) {\n body = path.node.body as t.BlockStatement;\n } else if (path.isProgram()) {\n // @ts-expect-error TODO: TS thinks that `path` here cannot be\n // Program due to the `isProgram()` check at the beginning of\n // the function\n body = path.node;\n } else {\n return false;\n }\n\n for (const directive of body.directives) {\n if (directive.value.value === \"use strict\") {\n return true;\n }\n }\n });\n\n return !!strictParent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,EAAA,GAAAC,OAAA;AAUsB;EATpBC,uBAAuB;EACvBC,YAAY;EACZC,gBAAgB;EAChBC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,eAAe;EACfC,MAAM;EACNC,cAAc,EAAIC;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