[Pkg-javascript-commits] [node-detective] 38/119: update to esprima 1.0.2
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:44:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-detective.
commit d1236402d2be071f9d70e9e31496edaf92e46d93
Author: Roman Shtylman <shtylman at gmail.com>
Date: Fri Nov 23 22:12:30 2012 -0500
update to esprima 1.0.2
fix off by one error in source splice
---
index.js | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index cbd8c8a..7c8840a 100644
--- a/index.js
+++ b/index.js
@@ -35,7 +35,7 @@ exports.find = function (src, opts) {
&& node.type === 'CallExpression'
&& c.type === 'Identifier'
&& c.name === word
- && src.slice(c.range[0], c.range[1] + 1) === word
+ && src.slice(c.range[0], c.range[1]) === word
;
}
@@ -51,7 +51,7 @@ exports.find = function (src, opts) {
}
else {
var r = node.arguments[0].range;
- var s = src.slice(r[0], r[1] + 1);
+ var s = src.slice(r[0], r[1]);
modules.expressions.push(s);
}
});
diff --git a/package.json b/package.json
index af79e06..21f4145 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"test" : "tap test/*.js"
},
"dependencies" : {
- "esprima" : "~0.9.9"
+ "esprima" : "1.0.2"
},
"devDependencies" : {
"tap" : "~0.2.6"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-detective.git
More information about the Pkg-javascript-commits
mailing list