diff --git a/.travis.yml b/.travis.yml index 3242452..5e27204 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,6 @@ node_js: - '9' - '8' - '6' - - '4' - - '0.12' - - '0.10' - - '0.8' - - '0.6' before_install: - 'nvm install-latest-npm' install: diff --git a/index.js b/index.js index 0c979c9..265b2ed 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ var acorn = require('acorn') -var xtend = require('xtend') var CJSParser = acorn.Parser .extend(require('./lib/bigint')) @@ -9,7 +8,7 @@ var ESModulesParser = CJSParser function mapOptions (opts) { if (!opts) opts = {} - return xtend({ + return Object.assign({ ecmaVersion: 2019, allowHashBang: true, allowReturnOutsideFunction: true @@ -21,7 +20,7 @@ function getParser (opts) { return opts.sourceType === 'module' ? ESModulesParser : CJSParser } -module.exports = exports = xtend(acorn, { +module.exports = exports = Object.assign({}, acorn, { parse: function parse (src, opts) { return getParser(opts).parse(src, mapOptions(opts)) }, diff --git a/package.json b/package.json index 361ef07..f0c4325 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ "dependencies": { "acorn": "^6.0.2", "acorn-dynamic-import": "^4.0.0", - "acorn-walk": "^6.1.0", - "xtend": "^4.0.1" + "acorn-walk": "^6.1.0" }, "devDependencies": { "acorn-bigint": "^0.3.1",