-
Notifications
You must be signed in to change notification settings - Fork 482
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
[Bug] jscodeshift@0.15.1 ignores the files not starting with .js
extension by default
#582
Comments
cc participants from previous discussion for awareness @robcmills @Daniel15 @lg-kialo |
There are two solutions I can think of for updated default value of extensions:
|
Example fix which allows all extensions by default #583 Although this fixes the regression, it will send all files for processing by default and will have a performance impact if the folder has lot of files. |
I find folks trip over this quite often. My thinking with |
I posted a safer fix at #584, which explicitly passes supported JavaScript and TypeScript files. |
.js
extension by default
Describe the bug
The jscodeshift ignores the file if it's extension does not match the default one
Steps to reproduce
Observed behavior
The file example.ts is not processed, even though CLI explicitly asked for it.
This happens as extensions is set to
js
by default, and the fix from #562 caused regression.Expected behavior
The file
example.ts
is processed, like it happens in0.15.0
If extensions is not explicitly specified by user, it should default to all extensions.
Additional context
This issue was noticed in downstream utility aws/aws-sdk-js-codemod#766 (comment)
The text was updated successfully, but these errors were encountered: