open-wc / custom-elements-manifest

Custom Elements Manifest is a file format that describes custom elements in your project.
https://custom-elements-manifest.open-wc.org/
226 stars 37 forks source link

[Analyzer] Broken manifest with new decorator standard "accessor" keyword #243

Closed brian-patrick-3 closed 3 months ago

brian-patrick-3 commented 3 months ago

Since upgrading to Lit 3.x and migrating all of our decorators to the new standard which requires the accessor keyword in front, the analyzer is unable to build my manifest properly. This is problematic because now a bunch of private properties marked @internal or @ignore are now showing up in our Storybook docs. Ex:

  /** Some private property.
   * @internal
   */
  @state()
  accessor _prop!: string;
thepassle commented 3 months ago

Whats the problem? Do you see any errors? Or it just doesnt output the properties?

thepassle commented 3 months ago

I see what's happening. The version of ts that the analyzer uses doesn't support the accessor keyword yet (it was introduced in 4.9.0). Updating the ts version to 4.9.0 breaks a bunch of tests, because apparently they changed the way how decorators are represented in the AST, so this will take a little bit of reworking. Ill try to take a stab at it this week, or feel free to create a PR if you need it sooner :)

thepassle commented 3 months ago

Ive updated the internally used TS version to 5.4.2, so I expect that this will be fixed in that version. I released it as 0.9.4. Please feel free to reopen if the issue persists :)

brian-patrick-3 commented 3 months ago

@thepassle Thank you so much, saved me a lot of headache this morning!