-
Notifications
You must be signed in to change notification settings - Fork 84
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
Generators using escodegen-wallaby seem to be failing #27
Comments
I've made a pull request #28 that fixed the problem by downgrading escodegen-wallaby to 1.6.6 (preventing the use of 1.6.7) |
Good catch. Thank you. I am not sure if it would not be better (and cleaner) to refactor the code so it is compatible with the newer version. I will look into this - give me a couple of days to decide. |
The main problem is with the esprima-fb library. You can change the new elements that you append, but when loading the existing files, esprima-fb converts the nodes to ExportDeclaration elements. And because esprima-fb is not maintained, it could prove difficult to change that behavior... |
Oh, great you did some research. In this case freezing the version as you suggested is the only way to go. Quite a bummer, I have to admit :-/ |
Merged your PR - thank you. Published new version to NPM. I'll leave this open for now since I do not like the fact to rely on a deprecated module and forever be locked on a specific version of a dependent module that is still being developed. |
Seems Facebook has deprecated it in favor of Acorn and it's JSX plugin |
Just to update this issues. I have toyed around with acorn but things do not seem to be easy to adapt. I tried to add nodes the same way as used to from esprima-fb Unfortunately they do not seem to be inserted properly into the AST, generating source from the AST does not produce the source expected after inserting a node. So I will leave the version pinned for now. I marked this as help wanted so feel free to submit a PR. |
I'm experiencing a strange problem. My action and reducer generators are no longer working. They just return after a few seconds. When I disable the attachToConstants and attachToApp calls, the template file is written correctly. But the system fails in the escodegenJsx.generate call:
The thing I noticed, is that my tree is containing ExportDeclaration elements (and the generator also adds one). But my escodegen does not support this type (it does support ExportDefaultDeclaration and more). Is this bug introduced in some newer version of the generator and libraries?
The text was updated successfully, but these errors were encountered: