open-wc / custom-elements-manifest-deprecated

Custom Elements Manifest is a file format that describes custom elements in your project.
8 stars 4 forks source link

Crash when analyzing chessboard-element #60

Closed justinfagnani closed 3 years ago

justinfagnani commented 3 years ago

I was testing the analyzer against https://github.com/justinfagnani/chessboard-element and got this error:

/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/dist/ast/handleCustomElementsDefine.js:24
        elementClass = node.parent.arguments[1].text;
                                            ^

TypeError: Cannot read property '1' of undefined
    at Object.handleCustomElementsDefine (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/dist/ast/handleCustomElementsDefine.js:24:45)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/dist/create.js:287:46)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27028:24)
    at Object.forEachChild (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27255:21)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/dist/create.js:308:30)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27028:24)
    at Object.forEachChild (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27253:24)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/dist/create.js:308:30)
    at visitNode (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27028:24)
    at Object.forEachChild (/Users/justinfagnani/Projects/Personal/chessboardjs/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:27253:24)
thepassle commented 3 years ago

This is fixed in v0.1.9 of the new analyzer. I made sure to test it against chessboard-element to make sure everything works as intended