Skip to content
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

Distributed app looks to have incorrect compilation #4

Closed
danielo515 opened this issue Jul 9, 2021 · 2 comments
Closed

Distributed app looks to have incorrect compilation #4

danielo515 opened this issue Jul 9, 2021 · 2 comments
Labels

Comments

@danielo515
Copy link

Hello.
Thanks for this great project.
I noticed that the compiled output of this package has a problem on it. Despite it is using the requireInterop helper, it still tries to access the default exported property, which is not required:

// getfieldNames.js
function addFieldNames(type) {
  var fieldNames = _astTypes["default"].getFieldNames({
    type: type
  });

That throws an exception because prop default does not exist.
I tested on node 14.
Changing it to this makes it work:

// getfieldNames.js
function addFieldNames(type) {
  var fieldNames = _astTypes.getFieldNames({
    type: type
  });
@jedwards1211
Copy link
Contributor

Huh that's odd, I couldn't reproduce it, as interopRequireDefault creates an object with a default property as far as I can tell. But, I had an old version of @types/jscodeshift that was pulling in a different version of ast-types, so I don't doubt there was some issue...I went ahead and changed all those statements to import * as t from 'ast-types'. There should be a release once CI passes!

@jedwards1211
Copy link
Contributor

🎉 This issue has been resolved in version 1.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants