-
Notifications
You must be signed in to change notification settings - Fork 196
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
exportSpecifier builder and probably others are broken in ^0.14.0 #425
Comments
Oh I see now what the problem is: in 0.13.4, But There's probably a problem with some of the other defs that got moved. Seems like the ordering is tricky. Should all the es6+ defs be moved after esprima? |
I've got this problem as well what is the best way to fix it? downgrade for now? is there a changelog for this? |
I downgraded for the time being. If you look at https://github.com/benjamn/ast-types/blob/master/main.ts, you can see how you could copy this code into your own bootstrapper and tweak the available defs/ordering -- assuming you're not using a tool like |
where is a good place to add these regressions tests? |
You can use the j.exportSpecifier.from({
exported: j.identifier('something'),
local: j.identifier('something'), // Optional
}) |
I don't fully understand what's supposed to happen when a node type is defined in two places (esprima and es6) but it seems to be causing problems for
exportSpecifier
:Can't reproduce this issue in 0.13.4.
I noticed that field names
id
andname
come from the esprima defs, whereas the field nameexported
comes from the es6 defs.The text was updated successfully, but these errors were encountered: