v0.6.0
A bunch of changes to get jscodeshift in a better shape. This is minor version update because important dependencies and parser configurations have changed.
New
- New CLI option
--parser-config
: This option accepts a path to a JSON file and overrides the default options for flow or babylon. This allows you to tweak parser settings (e.g. legacy decorators). (46d250f) - New CLI option
--stdin
: If provided, the list of files/directories is read from stdin. This makes it easier to pass large lists of files. (b6eaa0a) - New API in transforms:
api.report
lets you print arbitrary text to stdout. Useful if another tools consumes jscodeshift's stdout. (c902a00) Example:
// In the transform
api.report('some data');
// in stdout
REP path/to/file.js some data
Improvements
- Updated babylon to v7 adding support for newer flow features (#282 , @wanderley )
- Updated recast to v0.16, which includes a bunch of printing improvments (#289 , @majapw )
- Enable more features in babylon and flow (#278 , @mjesun ; #281 , @jbrown215 )
- Improve handling of large lists of files (62b12ad, 9c83c39)
Fixes
- JSXElements's
hasAttributes
method understands value-less Boolean attributes (#277 , @artemruts ) - More reliable printing to stdout (62b12ad)