runem / web-component-analyzer

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

Fix built-in property visibility bug cause by LwcFlavor #229

Closed justinfagnani closed 2 years ago

justinfagnani commented 2 years ago

This was a rough one to figure out.

The way flavors work they all get a chance to work against a definition and potentially refine features. A bug in LwcFlavor caused it to do work again non-LWC definitions and part of its feature refinement is to default all class members to protected visibility. This refinement was running against all built-in definitions cause built-in public properties to be changed to protected. This was only caught by one security test in lit-analyzer because lit-analyzer filters out non-public fields before type-checking.

justinfagnani commented 2 years ago

Great. This is passing with npm test but failing with npm run test:all - apparently it can't find the built-in script element definition in that config.

justinfagnani commented 2 years ago

All tests passing now. @rictic