New
Updated jscodeshift to v0.3.26
Since v0.3.21, jscodeshift also supports babylon
(v6) and flow
as parsers. astexplorer was updated to respect the parser
export in the transform. I.e. you can now add
export const parser = 'flow';
to the transform and jscodeshift will use that parser: http://astexplorer.net/#/uIl3Ja2nAO
Babylon and flow have been added as additional parser options to recast
.
Note: If you change the parser in the transformer, you should also select the corresponding parser in the recast settings to properly reflect the AST:
Open preferences:
Select parser:
I also added a simple implementation for the stats
API method. When used, it will log the collected values to the console: http://astexplorer.net/#/u2ALD6fmMy (open the browser console):
Selected node indicator
A probably lesser known feature is that the just opened node in the tree view is available in the console (global scope) via $node
. The tree view know shows a = $node
after the name to indicate that.
Parser updates
Fixes
- Bring back jscodeshift code completion (b0742d7)