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

fix: preserve file extension for remote file #317

Merged
merged 1 commit into from Sep 9, 2019

Conversation

samselikoff
Copy link
Contributor

@samselikoff samselikoff commented Apr 20, 2019

There is behavior in this program that depends on the extension
of the transformFile, notably how babel runs (or doesn't).

There was a bug when requesting a remote transformFile authored as
an ES6 module because of the temp filename being used.

This commit preserves the original file extension used when writing
the remote file to the temp one.

Fixes #316

@samselikoff
Copy link
Contributor Author

This is my first contribution to this project - let me know if I'm missing anything in my commit!

src/Runner.js Outdated Show resolved Hide resolved
There is behavior in this program that depends on the extension
of the transformFile, notably how babel runs (or doesn't).

There was a bug when requesting a remote transformFile authored as
an ES6 module because of the temp filename being used.

This commit preserves the original file extension used when writing
the remote file to the temp one.
@samselikoff
Copy link
Contributor Author

Nice, didn't know about that! Updated.

@rajasegar
Copy link

@samselikoff Is the error you are talking about is the same as #316

@samselikoff
Copy link
Contributor Author

Yep, this should be the fix!

@CvX
Copy link

CvX commented Jul 22, 2019

It does indeed fix #316! 🙂
Anyone interested can use this PR via npx:

npx samselikoff/jscodeshift#fix-remote-transform-file -t https://url.here/codemod.js tests

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

Successfully merging this pull request may close these issues.

Errors when running transform file from URL
6 participants