benjamn / ast-types

Esprima-compatible implementation of the Mozilla JS Parser API
MIT License
1.14k stars 198 forks source link

[Flow] did not recognize object of type "PropertyDefinition" #728

Open buschco opened 2 years ago

buschco commented 2 years ago

Got this while using jscodeshift and tracked it down to this project. I was able to fix this error with this PR.

I added PropertyDefinition in this PR from there

@benjamn you merged #514 maybe you can have a look here too 🙏 ?

vilnytskyi commented 1 year ago

@benjamn any chance this will get merged?

stereokai commented 1 year ago

Any news about this?

stereokai commented 1 year ago

@benjamn I merged #727 to the latest master of this repo (I forked it yesterday) and I can confirm it solves the bug. It allows recast to use acorn with the latest ecma script support. Well done @buschco

more7dev commented 2 months ago

Is there any chance for a merge and new release with this issue fixed? I have the same problem using recast in configuration with espree parser, since recast uses ast-types for processing what espree returns. This issue blocks parsing modern javascript code with private class properties.

stereokai commented 2 months ago

@more7dev this repo seems to be abandoned, check out @pionxzh'a fork

pionxzh commented 2 months ago

My fork includes ast-types and recast. My strategy is a bit aggressive, use it with caution. 🙏

more7dev commented 2 months ago

@pionxzh Thanks for your work. I`ve tried to use recast-x instead of recast and seems that this issue is fixed there.

Unfortunately, it`s not the happy end yet, because I have encountered another, quite similar issue, which I have described in ast-types-x project: https://github.com/pionxzh/ast-types-x/issues/6

pionxzh commented 2 months ago

@more7dev Done. Thanks for the ping. I wasn't aware that fork repos do not enable the "watch all activities" by default.