[Pkg-javascript-commits] [node-recast] 01/01: New upstream version 0.11.14

Julien Puydt julien.puydt at laposte.net
Thu Oct 6 08:31:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to annotated tag upstream/0.11.14
in repository node-recast.

commit 4a8eb5a02f4211eaaaac1cb05f08cec497db333c
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Thu Oct 6 08:44:55 2016 +0200

    New upstream version 0.11.14
---
 README.md     | 5 +++++
 lib/parser.js | 1 +
 package.json  | 2 +-
 test/jsx.js   | 7 ++-----
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 7cb75c1..9ef9299 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,11 @@ Note that you are free to mix and match syntax trees parsed from different sourc
 
 Note also that the source maps generated by Recast are character-by-character maps, so meaningful identifier names are not recorded at this time. This approach leads to higher-resolution debugging in modern browsers, at the expense of somewhat larger map sizes. Striking the perfect balance here is an area for future exploration, but such improvements will not require any breaking changes to the interface demonstrated above.
 
+Options
+---
+All Recast API functions take second parameter with configuration options, documented in
+[options.js](https://github.com/benjamn/recast/blob/master/lib/options.js)
+
 Motivation
 ---
 
diff --git a/lib/parser.js b/lib/parser.js
index fa2fef9..77308ca 100644
--- a/lib/parser.js
+++ b/lib/parser.js
@@ -24,6 +24,7 @@ exports.parse = function parse(source, options) {
 
     var comments = [];
     var program = options.parser.parse(sourceWithoutTabs, {
+        jsx: true,
         loc: true,
         locations: true,
         range: options.range,
diff --git a/package.json b/package.json
index 4ed34eb..8cc40cc 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
     "parsing",
     "pretty-printing"
   ],
-  "version": "0.11.13",
+  "version": "0.11.14",
   "homepage": "http://github.com/benjamn/recast",
   "repository": {
     "type": "git",
diff --git a/test/jsx.js b/test/jsx.js
index ea1c511..082dd09 100644
--- a/test/jsx.js
+++ b/test/jsx.js
@@ -4,13 +4,10 @@ var types = require("../lib/types");
 
 describe("JSX Compatability", function() {
   var printer = new Printer({ tabWidth: 2 });
-  var parseOptions = {
-    parser: require("esprima-fb")
-  };
 
   function check(source) {
-    var ast1 = parse(source, parseOptions);
-    var ast2 = parse(printer.printGenerically(ast1).code, parseOptions);
+    var ast1 = parse(source);
+    var ast2 = parse(printer.printGenerically(ast1).code);
     types.astNodesAreEquivalent.assert(ast1, ast2);
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-recast.git



More information about the Pkg-javascript-commits mailing list