Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
fix: concat identifier cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Aug 19, 2024
1 parent 93f2f48 commit 2ad64d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@list-kr/microshield-token-parser",
"type": "module",
"version": "1.0.3",
"version": "1.0.4",
"license": "Apache-2.0",
"scripts": {
"build": "pkgroll --src sources",
Expand Down
4 changes: 3 additions & 1 deletion sources/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export class AdvancedExtractor extends Extractor {
.filter(Identifier => {
return Identifier.getParent().getDescendantsOfKind(TsMorph.SyntaxKind.Identifier).length === 10
&& typeof Identifier.getFirstAncestorByKind(TsMorph.SyntaxKind.ReturnStatement) !== 'undefined'
&& Identifier.getFirstAncestorByKind(TsMorph.SyntaxKind.ReturnStatement).getText().includes('.concat([')
&& (Identifier.getFirstAncestorByKind(TsMorph.SyntaxKind.ReturnStatement).getText().includes('.concat([')
|| Identifier.getFirstAncestorByKind(TsMorph.SyntaxKind.ReturnStatement).getText().includes('/resources/')
|| Identifier.getFirstAncestorByKind(TsMorph.SyntaxKind.ReturnStatement).getText().includes('.endpoint'))
})
TokenIdentifierNodes.forEach(TokenIdentifier => {
const TokenDeclarationNode = TokenIdentifier.findReferences()[0].getDefinition().getDeclarationNode()
Expand Down

0 comments on commit 2ad64d9

Please sign in to comment.