-
Notifications
You must be signed in to change notification settings - Fork 21
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
Babel v7: Env Preset + nodent breaks in Babel generator #56
Comments
Can you try with fast-async in your plugins first and last, and let me know if it's different? |
There is just one plugin. The one used is from the PR of you to Babel. Should be pretty much identical to fast-async. Plus I use the latest nodent transform. |
Hi Mat! I have uploaded a small extracted demo case to a gist together with some results being produced: Please have a look. Should be pretty much reproducible for you as well. Hopefully this helps to track the issue down. |
I was having a few issues pushing changes to my Babel fork, which I eventually resolved by pulling the latest Babel source and re-merging before Can I suggest you pull the changes again and retry? Mixing Babel beta-versions (in this case .44 and .46) is clearly not a good base from which to test. |
@swernerx - thanks for the gist. It would be really good if you could just generate a repo I could clone and |
Unfortunately it seems that the env-preset is always executed before fast-async. See also: babel/babel#7815 |
Thanks for the repo :) The issue seems to be the Babel implementation of
I'll see if I can work out why. If you're not using the |
What do you mean by disabling? I am updating a generally used preset. I don't think I can communicate to all why for-of loops with await shouldn't be used. So it's not only about me. |
I meant if you want to continue your development while I look into it! |
Confirmed: this is a bug in nodent-transform - it produces an illegal Identifier transpiling the output of babel's for-of transform. I hope to be able to find/fix it soon. Thanks for the help in identifying and reproducing it! |
- Fix issue where `catch` body was incompletely transformed (see #109) - Fix issue where unreachable continuation generated an illegal Identifer after try-catch (see MatAtBread/fast-async#56)
… transforms. Removed the hack which worked-around the previous bug. See also: MatAtBread/fast-async#56
@swernerx - please let me know if this fixes the issue as expected |
Looks good for me! Thanks! |
I have another exception I got in a pretty trivial case.
Code:
Babelrc:
Command Line:
Exception:
I modified the generator a bit to catch this case:
Generated output with fix:
The problematic code is at line 35:
Do you have any idea what's wrong?
The text was updated successfully, but these errors were encountered: