runem / web-component-analyzer

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

Fix build #225

Closed justinfagnani closed 3 years ago

justinfagnani commented 3 years ago

Fixes #224

I compared the output against the current published package (see the lib/esm folder here) and thing look in place. The type defs now mirror the source layout, which I guess is a change in Rollup or the TypeScript plugin. Seems right, as I don't know how the chunked- type defs would have been found previously.

I also fixed "no any" lint warnings that were preventing a clean commit, and renamed a utility function that seemed named wrong.

cc @43081j

43081j commented 3 years ago

Looks good to me. CI seems to fail because ava doesn't understand esm. Maybe we need to configure it to load the cjs entry point or turn on esm?

edit:

the module being commonjs has caused it, ts-node expects commonjs apparently with ava.

TS_MODULE=current TS_NODE_PROJECT='./tsconfig.test.json' ava

would let us use another tsconfig which outputs commonjs. ava's esm support doesn't seem great but we could try that too

justinfagnani commented 3 years ago

Thanks for figuring that out... I had two tsonfigs for a sec, but went back to one in favor of an override in the Rollup config. I can swap the settings. ts-node is a pain.

justinfagnani commented 3 years ago

I don't know what's going on with the tests. They're failing on CI due a 1-col different indent. When I fix that it fails locally for me.

43081j commented 3 years ago

@justinfagnani did you ever figure it out? i had that problem at some point too and ended up pushing the one that worked in CI 🤔