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

Julien Puydt julien.puydt at laposte.net
Thu Oct 6 08:31:39 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.13
in repository node-recast.

commit 0373008aeaf5f9321d9021cb86a4d4d04bd2c649
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sat Sep 10 07:38:57 2016 +0200

    New upstream version 0.11.13
---
 lib/printer.js  |  6 ++++--
 package.json    |  6 +++---
 test/printer.js | 12 +++++++-----
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/lib/printer.js b/lib/printer.js
index 23e5738..161ff96 100644
--- a/lib/printer.js
+++ b/lib/printer.js
@@ -251,7 +251,7 @@ function genericPrintNoParens(path, options, print) {
     case "AssignmentPattern":
         return concat([
             path.call(print, "left"),
-            "=",
+            " = ",
             path.call(print, "right")
         ]);
 
@@ -1712,7 +1712,7 @@ function printFunctionParams(path, options, print) {
             var i = defExprPath.getName();
             var p = printed[i];
             if (p && defExprPath.getValue()) {
-                printed[i] = concat([p, "=", print(defExprPath)]);
+                printed[i] = concat([p, " = ", print(defExprPath)]);
             }
         }, "defaults");
     }
@@ -1727,6 +1727,8 @@ function printFunctionParams(path, options, print) {
         joined = fromString(",\n").join(printed);
         if (options.trailingComma && !fun.rest) {
             joined = concat([joined, ",\n"]);
+        } else {
+            joined = concat([joined, "\n"]);
         }
         return concat(["\n", joined.indent(options.tabWidth)]);
     }
diff --git a/package.json b/package.json
index d39395b..4ed34eb 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
     "parsing",
     "pretty-printing"
   ],
-  "version": "0.11.12",
+  "version": "0.11.13",
   "homepage": "http://github.com/benjamn/recast",
   "repository": {
     "type": "git",
@@ -29,12 +29,12 @@
   },
   "dependencies": {
     "ast-types": "0.9.0",
-    "esprima": "~2.7.1",
+    "esprima": "~3.0.0",
     "private": "~0.1.5",
     "source-map": "~0.5.0"
   },
   "devDependencies": {
-    "babylon": "~6.8.0",
+    "babylon": "~6.9.1",
     "esprima-fb": "^15001.1001.0-dev-harmony-fb",
     "mocha": "~3.0.1"
   },
diff --git a/test/printer.js b/test/printer.js
index ac34c2e..ea7f95b 100644
--- a/test/printer.js
+++ b/test/printer.js
@@ -280,7 +280,8 @@ describe("printer", function() {
         "              param */ a,",
         "  // other params",
         "  b, c, // see?",
-        "  d) {",
+        "  d",
+        ") {",
         "  return a + b + c + d;",
         "}"
     ];
@@ -294,7 +295,8 @@ describe("printer", function() {
         "  b,",
         "  // see?",
         "  c,",
-        "  d) {",
+        "  d",
+        ") {",
         "  return a + b + c + d;",
         "}"
     ];
@@ -487,7 +489,7 @@ describe("printer", function() {
 
         assert.strictEqual(
             printer.print(funExpr).code,
-            "function a(b, c=1, ...d) {}"
+            "function a(b, c = 1, ...d) {}"
         );
 
         var arrowFunExpr = b.arrowFunctionExpression(
@@ -503,7 +505,7 @@ describe("printer", function() {
 
         assert.strictEqual(
             printer.print(arrowFunExpr).code,
-            "(b, c=1, ...d) => {}"
+            "(b, c = 1, ...d) => {}"
         );
     });
 
@@ -886,7 +888,7 @@ describe("printer", function() {
 
     it("should support AssignmentPattern and RestElement", function() {
         var code = [
-            "function foo(a, [b, c]=d(a), ...[e, f, ...rest]) {",
+            "function foo(a, [b, c] = d(a), ...[e, f, ...rest]) {",
             "  return [a, b, c, e, f, rest];",
             "}"
         ].join(eol);

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