Skip to content

Releases: fkling/astexplorer

v1.6.0

23 Dec 23:11
Compare
Choose a tag to compare

New

Hide location info from tree view ( #87 )

hide_loc

v1.5.0

14 Dec 17:17
Compare
Choose a tag to compare

New parser

graphql-js ( #84 ) added by @fson

v1.4.0

12 Dec 20:50
Compare
Choose a tag to compare

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

  • Source map highlighting and source code with leading empty lines caused astexplorer to hang ( #82 ).
  • Module selector didn't work for babylon6 ( #81 )
  • Added back leadingComments and trailingComments properties to typescript nodes (f933252).

v1.3.0

12 Dec 06:48
Compare
Choose a tag to compare

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

08 Dec 05:34
Compare
Choose a tag to compare

New

Thanks to the tremendous efforts of @RReverser, we now have support for different languages! (#62, #63, #65)

screen shot 2015-12-07 at 9 27 47 pm

New Parsers

New Transformers

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

23 Nov 16:54
Compare
Choose a tag to compare

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.

autofocus

v1.0.0

21 Nov 06:51
Compare
Choose a tag to compare

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 forEachPropertyof 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.