1 line
22 KiB
Plaintext
1 line
22 KiB
Plaintext
{"version":3,"names":["Definition","PatternVisitor","OriginalPatternVisitor","Referencer","OriginalReferencer","Scope","ScopeManager","require","getKeys","fallback","visitorKeysMap","getVisitorValues","nodeType","client","FLOW_FLIPPED_ALIAS_KEYS","VISITOR_KEYS","getTypesInfo","flowFlippedAliasKeys","concat","Object","entries","o","keys","map","k","reduce","acc","key","value","includes","propertyTypes","callProperties","type","values","indexers","properties","types","params","argument","elementType","qualification","rest","returnType","typeAnnotation","typeParameters","id","ArrayPattern","node","elements","forEach","visit","ObjectPattern","_client","WeakMap","constructor","options","scopeManager","_classPrivateFieldInitSpec","_classPrivateFieldSet","visitPattern","callback","_checkIdentifierOrVisit","left","processRightHandNodes","visitor","rightHandNodes","visitClass","_node$superTypeParame","_visitArray","decorators","typeParamScope","_nestTypeParamScope","_visitTypeAnnotation","implements","superTypeParameters","close","visitFunction","visitProperty","_node$value","InterfaceDeclaration","_createScopeVariable","extends","body","TypeAlias","right","ClassProperty","_visitClassProperty","ClassPrivateProperty","PropertyDefinition","ClassPrivateMethod","MethodDefinition","DeclareModule","_visitDeclareX","DeclareFunction","DeclareVariable","DeclareClass","OptionalMemberExpression","MemberExpression","computed","__nestClassFieldInitializerScope","__nestScope","__currentScope","name","currentScope","variableScope","__define","parentScope","scope","j","length","bind","Array","isArray","visitorValues","_classPrivateFieldGet","i","visitorValue","propertyType","nodeProperty","loopPropertyNode","l","nodeList","module","exports","analyzeScope","ast","parserOptions","_parserOptions$ecmaFe","ignoreEval","optimistic","directive","nodejsScope","sourceType","ecmaFeatures","globalReturn","impliedStrict","ecmaVersion","childVisitorKeys","getVisitorKeys","referencer"],"sources":["../src/analyze-scope.cts"],"sourcesContent":["import type { Client } from \"./client.cts\";\n\nconst {\n Definition,\n PatternVisitor: OriginalPatternVisitor,\n Referencer: OriginalReferencer,\n Scope,\n ScopeManager,\n} = (\n process.env.BABEL_8_BREAKING\n ? require(\"eslint-scope\")\n : require(\"@nicolo-ribaudo/eslint-scope-5-internals\")\n) as import(\"./types.cts\").Scope;\nconst { getKeys: fallback } = require(\"eslint-visitor-keys\");\n\nlet visitorKeysMap: Record<string, string[]>;\nfunction getVisitorValues(nodeType: string, client: Client) {\n if (visitorKeysMap) return visitorKeysMap[nodeType];\n\n const { FLOW_FLIPPED_ALIAS_KEYS, VISITOR_KEYS } = client.getTypesInfo();\n\n const flowFlippedAliasKeys = FLOW_FLIPPED_ALIAS_KEYS.concat([\n \"ArrayPattern\",\n \"ClassDeclaration\",\n \"ClassExpression\",\n \"FunctionDeclaration\",\n \"FunctionExpression\",\n \"Identifier\",\n \"ObjectPattern\",\n \"RestElement\",\n ]);\n\n visitorKeysMap = Object.entries(VISITOR_KEYS).reduce((acc, [key, value]) => {\n if (!flowFlippedAliasKeys.includes(value)) {\n // @ts-expect-error FIXME: value is not assignable to type string[]\n acc[key] = value;\n }\n return acc;\n }, {});\n\n return visitorKeysMap[nodeType];\n}\n\nconst propertyTypes = {\n // loops\n callProperties: { type: \"loop\", values: [\"value\"] },\n indexers: { type: \"loop\", values: [\"key\", \"value\"] },\n properties: { type: \"loop\", values: [\"argument\", \"value\"] },\n types: { type: \"loop\" },\n params: { type: \"loop\" },\n // single property\n argument: { type: \"single\" },\n elementType: { type: \"single\" },\n qualification: { type: \"single\" },\n rest: { type: \"single\" },\n returnType: { type: \"single\" },\n // others\n typeAnnotation: { type: \"typeAnnotation\" },\n typeParameters: { type: \"typeParameters\" },\n id: { type: \"id\" },\n};\n\nclass PatternVisitor extends OriginalPatternVisitor {\n ArrayPattern(node: any) {\n node.elements.forEach(this.visit, this);\n }\n\n ObjectPattern(node: any) {\n node.properties.forEach(this.visit, this);\n }\n}\n\nclass Referencer extends OriginalReferencer {\n #client;\n\n constructor(options: any, scopeManager: any, client: Client) {\n super(options, scopeManager);\n this.#client = client;\n }\n\n // inherits.\n visitPattern(node: any, options: any, callback: any) {\n if (!node) {\n return;\n }\n\n // Visit type annotations.\n this._checkIdentifierOrVisit(node.typeAnnotation);\n if (node.type === \"AssignmentPattern\") {\n this._checkIdentifierOrVisit(node.left.typeAnnotation);\n }\n\n // Overwrite `super.visitPattern(node, options, callback)` in order to not visit `ArrayPattern#typeAnnotation` and `ObjectPattern#typeAnnotation`.\n if (typeof options === \"function\") {\n callback = options;\n options = { processRightHandNodes: false };\n }\n\n const visitor = new PatternVisitor(this.options, node, callback);\n visitor.visit(node);\n\n // Process the right hand nodes recursively.\n if (options.processRightHandNodes) {\n visitor.rightHandNodes.forEach(this.visit, this);\n }\n }\n\n // inherits.\n visitClass(node: any) {\n // Decorators.\n this._visitArray(node.decorators);\n\n // Flow type parameters.\n const typeParamScope = this._nestTypeParamScope(node);\n\n // Flow super types.\n this._visitTypeAnnotation(node.implements);\n this._visitTypeAnnotation(node.superTypeParameters?.params);\n\n // Basic.\n super.visitClass(node);\n\n // Close the type parameter scope.\n if (typeParamScope) {\n this.close(node);\n }\n }\n\n // inherits.\n visitFunction(node: any) {\n const typeParamScope = this._nestTypeParamScope(node);\n\n // Flow return types.\n this._checkIdentifierOrVisit(node.returnType);\n\n // Basic.\n super.visitFunction(node);\n\n // Close the type parameter scope.\n if (typeParamScope) {\n this.close(node);\n }\n }\n\n // inherits.\n visitProperty(node: any) {\n if (node.value?.type === \"TypeCastExpression\") {\n this._visitTypeAnnotation(node.value);\n }\n this._visitArray(node.decorators);\n super.visitProperty(node);\n }\n\n InterfaceDeclaration(node: any) {\n this._createScopeVariable(node, node.id);\n\n const typeParamScope = this._nestTypeParamScope(node);\n\n // TODO: Handle mixins\n this._visitArray(node.extends);\n this.visit(node.body);\n\n if (typeParamScope) {\n this.close(node);\n }\n }\n\n TypeAlias(node: any) {\n this._createScopeVariable(node, node.id);\n\n const typeParamScope = this._nestTypeParamScope(node);\n\n this.visit(node.right);\n\n if (typeParamScope) {\n this.close(node);\n }\n }\n\n ClassProperty(node: any) {\n this._visitClassProperty(node);\n }\n\n ClassPrivateProperty(node: any) {\n this._visitClassProperty(node);\n }\n\n PropertyDefinition(node: any) {\n this._visitClassProperty(node);\n }\n\n // TODO: Update to visit type annotations when TypeScript/Flow support this syntax.\n ClassPrivateMethod(node: any) {\n super.MethodDefinition(node);\n }\n\n DeclareModule(node: any) {\n this._visitDeclareX(node);\n }\n\n DeclareFunction(node: any) {\n this._visitDeclareX(node);\n }\n\n DeclareVariable(node: any) {\n this._visitDeclareX(node);\n }\n\n DeclareClass(node: any) {\n this._visitDeclareX(node);\n }\n\n // visit OptionalMemberExpression as a MemberExpression.\n OptionalMemberExpression(node: any) {\n super.MemberExpression(node);\n }\n\n _visitClassProperty(node: any) {\n const { computed, key, typeAnnotation, decorators, value } = node;\n\n this._visitArray(decorators);\n if (computed) this.visit(key);\n this._visitTypeAnnotation(typeAnnotation);\n\n if (value) {\n if (this.scopeManager.__nestClassFieldInitializerScope) {\n this.scopeManager.__nestClassFieldInitializerScope(value);\n } else {\n // Given that ESLint 7 didn't have a \"class field initializer\" scope,\n // we create a plain method scope. Semantics are the same.\n this.scopeManager.__nestScope(\n new Scope(\n this.scopeManager,\n \"function\",\n this.scopeManager.__currentScope,\n value,\n true,\n ),\n );\n }\n this.visit(value);\n this.close(value);\n }\n }\n\n _visitDeclareX(node: any) {\n if (node.id) {\n this._createScopeVariable(node, node.id);\n }\n\n const typeParamScope = this._nestTypeParamScope(node);\n if (typeParamScope) {\n this.close(node);\n }\n }\n\n _createScopeVariable(node: any, name: any) {\n this.currentScope().variableScope.__define(\n name,\n new Definition(\"Variable\", name, node, null, null, null),\n );\n }\n\n _nestTypeParamScope(node: any) {\n if (!node.typeParameters) {\n return null;\n }\n\n const parentScope = this.scopeManager.__currentScope;\n const scope = new Scope(\n this.scopeManager,\n \"type-parameters\",\n parentScope,\n node,\n false,\n );\n\n this.scopeManager.__nestScope(scope);\n for (let j = 0; j < node.typeParameters.params.length; j++) {\n const name = node.typeParameters.params[j];\n scope.__define(name, new Definition(\"TypeParameter\", name, name));\n if (name.typeAnnotation) {\n this._checkIdentifierOrVisit(name);\n }\n }\n scope.__define = parentScope.__define.bind(parentScope);\n\n return scope;\n }\n\n _visitTypeAnnotation(node: any) {\n if (!node) {\n return;\n }\n if (Array.isArray(node)) {\n node.forEach(this._visitTypeAnnotation, this);\n return;\n }\n\n // get property to check (params, id, etc...)\n const visitorValues = getVisitorValues(node.type, this.#client);\n if (!visitorValues) {\n return;\n }\n\n // can have multiple properties\n for (let i = 0; i < visitorValues.length; i++) {\n const visitorValue = visitorValues[i];\n const propertyType = (propertyTypes as Record<string, any>)[visitorValue];\n const nodeProperty = node[visitorValue];\n // check if property or type is defined\n if (propertyType == null || nodeProperty == null) {\n continue;\n }\n if (propertyType.type === \"loop\") {\n for (let j = 0; j < nodeProperty.length; j++) {\n if (Array.isArray(propertyType.values)) {\n for (let k = 0; k < propertyType.values.length; k++) {\n const loopPropertyNode = nodeProperty[j][propertyType.values[k]];\n if (loopPropertyNode) {\n this._checkIdentifierOrVisit(loopPropertyNode);\n }\n }\n } else {\n this._checkIdentifierOrVisit(nodeProperty[j]);\n }\n }\n } else if (propertyType.type === \"single\") {\n this._checkIdentifierOrVisit(nodeProperty);\n } else if (propertyType.type === \"typeAnnotation\") {\n this._visitTypeAnnotation(node.typeAnnotation);\n } else if (propertyType.type === \"typeParameters\") {\n for (let l = 0; l < node.typeParameters.params.length; l++) {\n this._checkIdentifierOrVisit(node.typeParameters.params[l]);\n }\n } else if (propertyType.type === \"id\") {\n if (node.id.type === \"Identifier\") {\n this._checkIdentifierOrVisit(node.id);\n } else {\n this._visitTypeAnnotation(node.id);\n }\n }\n }\n }\n\n _checkIdentifierOrVisit(node: any) {\n if (node?.typeAnnotation) {\n this._visitTypeAnnotation(node.typeAnnotation);\n } else if (node?.type === \"Identifier\") {\n this.visit(node);\n } else {\n this._visitTypeAnnotation(node);\n }\n }\n\n _visitArray(nodeList: any[]) {\n if (nodeList) {\n for (const node of nodeList) {\n this.visit(node);\n }\n }\n }\n}\n\nexport = function analyzeScope(ast: any, parserOptions: any, client: Client) {\n const options = {\n ignoreEval: true,\n optimistic: false,\n directive: false,\n nodejsScope:\n ast.sourceType === \"script\" &&\n parserOptions.ecmaFeatures?.globalReturn === true,\n impliedStrict: false,\n sourceType: ast.sourceType,\n ecmaVersion: parserOptions.ecmaVersion,\n fallback,\n childVisitorKeys: client.getVisitorKeys(),\n };\n\n const scopeManager = new ScopeManager(options);\n const referencer = new Referencer(options, scopeManager, client);\n\n referencer.visit(ast);\n\n return scopeManager as any;\n};\n"],"mappings":";;;;;;;AAEA,MAAM;EACJA,UAAU;EACVC,cAAc,EAAEC,sBAAsB;EACtCC,UAAU,EAAEC,kBAAkB;EAC9BC,KAAK;EACLC;AACF,CAAC,GAGKC,OAAO,CAAC,0CAA0C,CACxB;AAChC,MAAM;EAAEC,OAAO,EAAEC;AAAS,CAAC,GAAGF,OAAO,CAAC,qBAAqB,CAAC;AAE5D,IAAIG,cAAwC;AAC5C,SAASC,gBAAgBA,CAACC,QAAgB,EAAEC,MAAc,EAAE;EAC1D,IAAIH,cAAc,EAAE,OAAOA,cAAc,CAACE,QAAQ,CAAC;EAEnD,MAAM;IAAEE,uBAAuB;IAAEC;EAAa,CAAC,GAAGF,MAAM,CAACG,YAAY,CAAC,CAAC;EAEvE,MAAMC,oBAAoB,GAAGH,uBAAuB,CAACI,MAAM,CAAC,CAC1D,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,aAAa,CACd,CAAC;EAEFR,cAAc,GAAG,CAAAS,MAAA,CAAAC,OAAA,KAAAC,CAAA,IAAAF,MAAA,CAAAG,IAAA,CAAAD,CAAA,EAAAE,GAAA,CAAAC,CAAA,KAAAA,CAAA,EAAAH,CAAA,CAAAG,CAAA,MAAeT,YAAY,CAAC,CAACU,MAAM,CAAC,CAACC,GAAG,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC1E,IAAI,CAACX,oBAAoB,CAACY,QAAQ,CAACD,KA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