[Pkg-javascript-commits] [node-esprima] 01/03: Imported Upstream version 2.7.3+ds

Julien Puydt julien.puydt at laposte.net
Sat Aug 27 09:26:23 UTC 2016


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

jpuydt-guest pushed a commit to branch master
in repository node-esprima.

commit 041642cffa64ba74dc47187fb00407e268807fe0
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sat Aug 27 10:56:58 2016 +0200

    Imported Upstream version 2.7.3+ds
---
 .travis.yml                                        |  1 +
 ChangeLog                                          |  4 ++
 appveyor.yml                                       |  2 +-
 bower.json                                         |  2 +-
 esprima.js                                         |  5 +-
 package.json                                       |  2 +-
 test/fixtures/tokenize/comment_division.js         |  1 +
 .../fixtures/tokenize/comment_division.tokens.json | 74 ++++++++++++++++++++++
 8 files changed, 86 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8e8d39b..303e7ac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,3 +8,4 @@ node_js:
   - "0.10"
   - "4"
   - "5"
+  - "6"
diff --git a/ChangeLog b/ChangeLog
index 864ab69..fd687ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-23: Version 2.7.3
+
+      * Fix tokenizer confusion with a comment (issue 1493, 1516)
+
 2016-02-02: Version 2.7.2
 
       * Fix out-of-bound error location in an invalid string literal (issue 1457)
diff --git a/appveyor.yml b/appveyor.yml
index 8799cfe..8761a24 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,7 +1,7 @@
 version: "{build}"
 
 environment:
-  nodejs_version: "0.12"
+  nodejs_version: "6"
 
 matrix:
   fast_finish: true
diff --git a/bower.json b/bower.json
index b5313aa..b463666 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
 {
     "name": "esprima",
-    "version": "2.7.2",
+    "version": "2.7.3",
     "main": "./esprima.js",
     "scripts": [
         "esprima.js"
diff --git a/esprima.js b/esprima.js
index 654e5fd..0cb0a93 100644
--- a/esprima.js
+++ b/esprima.js
@@ -1325,6 +1325,7 @@
         try {
             return new RegExp(pattern, flags);
         } catch (exception) {
+            /* istanbul ignore next */
             return null;
         }
     }
@@ -1521,7 +1522,7 @@
             return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z');
         }
 
-        previous = extra.tokenValues[extra.tokens.length - 1];
+        previous = extra.tokenValues[extra.tokenValues.length - 1];
         regex = (previous !== null);
 
         switch (previous) {
@@ -5707,7 +5708,7 @@
     }
 
     // Sync with *.json manifests.
-    exports.version = '2.7.2';
+    exports.version = '2.7.3';
 
     exports.tokenize = tokenize;
 
diff --git a/package.json b/package.json
index 051cbcb..f2d5912 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
     "esparse": "./bin/esparse.js",
     "esvalidate": "./bin/esvalidate.js"
   },
-  "version": "2.7.2",
+  "version": "2.7.3",
   "files": [
     "bin",
     "unit-tests.js",
diff --git a/test/fixtures/tokenize/comment_division.js b/test/fixtures/tokenize/comment_division.js
new file mode 100644
index 0000000..e31061c
--- /dev/null
+++ b/test/fixtures/tokenize/comment_division.js
@@ -0,0 +1 @@
+/* half */ 1/2
diff --git a/test/fixtures/tokenize/comment_division.tokens.json b/test/fixtures/tokenize/comment_division.tokens.json
new file mode 100644
index 0000000..9e78074
--- /dev/null
+++ b/test/fixtures/tokenize/comment_division.tokens.json
@@ -0,0 +1,74 @@
+[
+    {
+        "type": "BlockComment",
+        "value": " half ",
+        "range": [
+            0,
+            10
+        ],
+        "loc": {
+            "start": {
+                "line": 1,
+                "column": 0
+            },
+            "end": {
+                "line": 1,
+                "column": 10
+            }
+        }
+    },
+    {
+        "type": "Numeric",
+        "value": "1",
+        "range": [
+            11,
+            12
+        ],
+        "loc": {
+            "start": {
+                "line": 1,
+                "column": 11
+            },
+            "end": {
+                "line": 1,
+                "column": 12
+            }
+        }
+    },
+    {
+        "type": "Punctuator",
+        "value": "/",
+        "range": [
+            12,
+            13
+        ],
+        "loc": {
+            "start": {
+                "line": 1,
+                "column": 12
+            },
+            "end": {
+                "line": 1,
+                "column": 13
+            }
+        }
+    },
+    {
+        "type": "Numeric",
+        "value": "2",
+        "range": [
+            13,
+            14
+        ],
+        "loc": {
+            "start": {
+                "line": 1,
+                "column": 13
+            },
+            "end": {
+                "line": 1,
+                "column": 14
+            }
+        }
+    }
+]

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



More information about the Pkg-javascript-commits mailing list