Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cem-plugin-template: 'SourceFile' becomes 'JsDocUnknownType' in analyzer >= 0.5.6 #183

Open
au-z opened this issue Jul 21, 2022 · 0 comments

Comments

@au-z
Copy link

au-z commented Jul 21, 2022

Hi, I am working on a new cem-plugin using a fork of the cem-plugin-template provided here (thanks for this template btw!)

I noticed some odd behavior between versions 0.5.5 and 0.5.6 of the analyzer plugin. I'm hoping you can offer some clarification on the differences between these versions and what I can do to test my plugin against the latest version of the analyzer.

The behavior is observed with the unchanged plugin template files.

  1. I install "@custom-elements-manifest/analyzer": "0.5.5", and run the analyzer on my file using the start script.
    analyzePhase prints 305 SourceFile for the root node of the source and continues to each of the node's children.
    My plugin works as expected with this version and produces the "correct" custom-elements.json.

  2. I bump the package version to "@custom-elements-manifest/analyzer": "0.5.6",, install, and re-run the analyzer on my file.
    analyzePhase prints 305 JSDocUnknownType for the root node and fails to continue to any children. The subsequent custom-elements.json file contains no declarations nor exports.

Isn't the analyzePhase function supposed to iterate over each node in the AST?
Is there a change I should make to the template to make the plugin behave in this way?

Thanks for any help you can provide!

@au-z au-z changed the title cem-plugin-template - 'SourceFile' becomes 'JsDocUnknownType' in 0.5.6 cem-plugin-template: 'SourceFile' becomes 'JsDocUnknownType' in analyzer >= 0.5.6 Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant