Closed trivikr closed 4 months ago
Fixes: https://github.com/facebook/jscodeshift/issues/582
The ts files are not processed by default
ts
$ ../jscodeshift/bin/jscodeshift.js example.ts 2>&1 | head -n 1 No files selected, nothing to do.
The extensions had to be explicitly passed
$ ../jscodeshift/bin/jscodeshift.js --extensions=ts example.ts 2>&1 | head -n 1 Processing 1 files...
By default, the extensions is set to js
js
$ ../jscodeshift/bin/jscodeshift.js --help | grep -A 1 extensions --extensions=EXT transform files with these file extensions (comma separated list) (default: js)
The ts files are processed without requiring to pass extensions
$ ../jscodeshift/bin/jscodeshift.js example.ts 2>&1 | head -n 1 Processing 1 files...
The ts files are skipped if extensions do not allow it
$ ../jscodeshift/bin/jscodeshift.js --extensions=js example.ts 2>&1 | head -n 1 No files selected, nothing to do.
The ts files are processed if extensions allow it
By default, the extensions include all supported JavaScript/TypeScript files
$ ../jscodeshift/bin/jscodeshift.js --help | grep -A 1 extensions --extensions=EXT transform files with these file extensions (comma separated list) (default: cjs,es,es6,js,jsx,mjs,ts,tsx)
I'll try publish this by the end of the week.
Published as 0.15.2. Thanks for your contribution!
Description
Fixes: https://github.com/facebook/jscodeshift/issues/582
Testing
Before
The
ts
files are not processed by defaultThe extensions had to be explicitly passed
By default, the extensions is set to
js
After
The
ts
files are processed without requiring to pass extensionsThe
ts
files are skipped if extensions do not allow itThe
ts
files are processed if extensions allow itBy default, the extensions include all supported JavaScript/TypeScript files