[Pkg-javascript-commits] [node-detective] 91/119: fix acorn options

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:44:38 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 2562fd992cec80a2a688d2a4a80ebd5b723ebb86
Author: Andres Suarez <zertosh at gmail.com>
Date:   Sat May 23 19:58:39 2015 -0400

    fix acorn options
    
    * "strictSemicolons" and "allowTrailingCommas" where dropped in 1.0.0 (https://github.com/marijnh/acorn/pull/216#issuecomment-78616411)
    * "forbidReserved" was renamed to "allowReserved", inverted its meaning and default value.
    * acorn doesn't have a "tolerant" option - that's an esprima thing
---
 index.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/index.js b/index.js
index 906c4ce..73b4d1b 100644
--- a/index.js
+++ b/index.js
@@ -9,12 +9,10 @@ function parse (src, opts) {
         ecmaVersion: defined(opts.ecmaVersion, 6),
         ranges: defined(opts.ranges, opts.range),
         locations: defined(opts.locations, opts.loc),
+        allowReserved: defined(opts.allowReserved, true),
         allowReturnOutsideFunction: defined(
             opts.allowReturnOutsideFunction, true
-        ),
-        strictSemicolons: defined(opts.strictSemicolons, false),
-        allowTrailingCommas: defined(opts.allowTrailingCommas, true),
-        forbidReserved: defined(opts.forbidReserved, false)
+        )
     });
 }
 var escodegen = require('escodegen');
@@ -51,7 +49,6 @@ var exports = module.exports = function (src, opts) {
 exports.find = function (src, opts) {
     if (!opts) opts = {};
     opts.parse = opts.parse || {};
-    opts.parse.tolerant = true;
     
     var word = opts.word === undefined ? 'require' : opts.word;
     if (typeof src !== 'string') src = String(src);

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