Releases: fkling/astexplorer
Releases · fkling/astexplorer
v1.6.0
v1.5.0
v1.4.0
Improvements
- Computed properties (i.e. AST node properties that are not added by the parser by default, but added by astexplorer) are now indicated by a
*
before the name.
Fixes
v1.3.0
New
Transformers can now return a source map as well, which allows us to highlight the corresponding code in the output editor (#79):
Big thanks to @RReverser again!
Parser updates
- Updated parse5 to v2 (#76)
Improvements / fixes
- Autofocus works better with recursive trees (87401c0).
- Fixes around category switching and parser loading (be13958, ec81ced).
- jscodeshift's
registerMethods
method can now be used in astexplorer. It doesn't throw errors about duplicate custom methods on rerun anymore (#80).
Most other commits focused on
- improving astexplorer's loading time through better bundling and cache settings
- code organization
v1.2.0
New
Thanks to the tremendous efforts of @RReverser, we now have support for different languages! (#62, #63, #65)
New Parsers
- CSSOM (CSS)
- PostCSS (CSS)
- rework (CSS)
- htmlparser2 (HTML)
- parse5 (HTML)
New Transformers
- PostCSS (CSS)
In addition, adding new parsers and transformers is now even easier. See the updated README and the source.
Improvements
- With the introduction of categories, the chosen parser is now stored in code snippets! (07a6bce)
- Style improvements (#60, @jdichev)
Updates
- Update traceur to v0.0.93, which adds JSX support ( #64 , @RReverser)
v1.1.0
Parsers
- Support for traceur and uglify-js added by @RReverser.
acorn-jsx
plugin support by (also @RReverser)
UI/UX
- There is a new option in the Tree view called "autofocus". If selected (default), the AST node at the cursor location in the code editor is opened by default and scrolled into the view.
v1.0.0
I thought it might make sense to tag releases to keep better track of new features.
Parsers
- babylon v6 and babel v6 can now be selected, in addition to babylon v5 and babel v5
UI/UX improvements
- The last opened / toggled node is now accessible in the console via the global variable
$node
. This makes it easier to inspect and play with an AST node. - AST node methods are now rendered in the tree. Clicking such a method invokes it and the function will be replaced with the value it returns. Of course this may not always work without errors (e.g. if the method expects arguments). In that case you can use
$node
in the console and run the method there.
Methods can be hidden via the "Hide functions" checkbox
Other
- Parsers have been given more control over how to render an AST node. Parsers don't have to return a nested plain object structure anymore. Instead, when a node ist rendered, the
forEachProperty
of the parser is called, via which the parser can tell the rendered which keys and values to render for the given node. This also allows the parser to add custom properties without having to traverse the whole AST upfront. - The tree renderer now keeps track of which AST nodes have been rendered / opened. This allows it to detect recursive structures in which case it won't try to open nested, recursive nodes.
Overall these changes should make it easier to add new parsers, even if the structure of the resulting AST isn't well known.