runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
507 stars 65 forks source link

Inconsistent AST trees between typescript environments when running the tests #181

Closed priandsf closed 4 years ago

priandsf commented 4 years ago

it looks like the same tests are ran multiple times with different versions of typescript (3.5, ...3.8), but the AST tree is only complied once, with one version of typescript. Unfortunately, the AST trees are incompatible between the versions. In particular, the constants have different values: TS 3.5

    enum SyntaxKind {
        ExtendsKeyword = 87,

TS 3.8

    enum SyntaxKind {
        ExtendsKeyword = 90,

As a result, the code is not always testing the right values and fails where it should not. This is demonstrated in the LWC support PR (https://github.com/runem/web-component-analyzer/pull/175, src/analyze/flavors/lwc/utils.ts#90).

priandsf commented 4 years ago

Closing the issue as it is solved by using the ts from the context instead of the global imported one