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

Improve/fix applying babel to the transformer #294

Closed
fkling opened this issue Dec 5, 2018 · 1 comment
Closed

Improve/fix applying babel to the transformer #294

fkling opened this issue Dec 5, 2018 · 1 comment
Labels

Comments

@fkling
Copy link
Contributor

fkling commented Dec 5, 2018

Note: If you have problems running codemods and get Babel related errors, run jscodeshift with --no-babel.


The last change to src/Worker.js causes issues with babel-register. Passing module identifiers causes babel-register to look up those modules in the wrong places. Those modules should be required instead.

Furthermore, we probably don't want to transpile most of ES2015 features since people probably use a Node version that supports those. present-env already supports this:

If you want to compile against the current node version, you can specify "node": true or "node": "current", which would be the same as "node": process.versions.node.

https://babeljs.io/docs/en/babel-preset-env#targetsnode

but we should also include/exclude plugins based on the current node version.

@fkling fkling added the bug label Dec 5, 2018
@fkling fkling closed this as completed in cb92c48 Dec 6, 2018
@brieb
Copy link
Contributor

brieb commented Jan 10, 2019

Thank you for fixing this. So sorry for introducing this issue. Will keep this in mind for future reference. TIL.

Should we also add /\/node_modules\// to this ignore list?
cb92c48#diff-e957a0672425b8dcfdcfe9f8cccf36f7

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