From 532e4591caa5e11d44c8e1ec63cb7df693365ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 15 Jun 2020 12:11:35 +0200 Subject: [PATCH 1/4] Do `npm update` --- package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 554f1a7..85dfeca 100644 --- a/package.json +++ b/package.json @@ -4,28 +4,28 @@ "description": "convert module usage to inline expressions", "main": "index.js", "dependencies": { - "acorn-node": "^1.3.0", - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", + "acorn-node": "^1.8.2", + "concat-stream": "~1.6.2", + "convert-source-map": "^1.7.0", "duplexer2": "~0.1.4", - "escodegen": "^1.11.1", - "has": "^1.0.1", + "escodegen": "^1.14.2", + "has": "^1.0.3", "magic-string": "0.25.1", "merge-source-map": "1.0.4", - "object-inspect": "^1.6.0", - "readable-stream": "~2.3.3", - "scope-analyzer": "^2.0.1", + "object-inspect": "^1.7.0", + "readable-stream": "~2.3.7", + "scope-analyzer": "^2.1.1", "shallow-copy": "~0.0.1", "static-eval": "^2.0.5", - "through2": "~2.0.3" + "through2": "~2.0.5" }, "devDependencies": { "from2-string": "^1.1.0", "nanobench": "^2.1.1", "quote-stream": "^1.0.2", - "resolve": "^1.5.0", + "resolve": "^1.17.0", "source-map": "^0.6.1", - "tape": "^4.8.0", + "tape": "^4.13.3", "uglify-js": "3.3.12" }, "scripts": { From eaa38da89c9a92ecb3da4704bfe5fb42de5d9ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 15 Jun 2020 12:24:24 +0200 Subject: [PATCH 2/4] bump static-eval --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 85dfeca..8809e49 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "readable-stream": "~2.3.7", "scope-analyzer": "^2.1.1", "shallow-copy": "~0.0.1", - "static-eval": "^2.0.5", + "static-eval": "^2.1.0", "through2": "~2.0.5" }, "devDependencies": { From 7b23e661b28065067ac8725d71b928548f88df29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 15 Jun 2020 12:25:27 +0200 Subject: [PATCH 3/4] pass-through allowAccessToMethodsOnFunctions option --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 897d230..c94a9e1 100644 --- a/index.js +++ b/index.js @@ -19,6 +19,7 @@ module.exports = function parse (modules, opts) { if (!opts) opts = {}; var vars = opts.vars || {}; var varModules = opts.varModules || {}; + var evalOpts = { allowAccessToMethodsOnFunctions: opts.allowAccessToMethodsOnFunctions || false }; var parserOpts = copy(opts.parserOpts || {}); var updates = []; var moduleBindings = []; @@ -281,7 +282,7 @@ module.exports = function parse (modules, opts) { var xvars = getVars(node.parent, vars); xvars[node.name] = val; - var res = evaluate(node.parent, xvars); + var res = evaluate(node.parent, xvars, evalOpts); if (res !== undefined) { if (binding) binding.remove(node) updates.push({ From 3c18ee194fdb674ce590a65ace4e5e17c775733f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 15 Jun 2020 12:36:26 +0200 Subject: [PATCH 4/4] update tape --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8809e49..478e7c4 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "quote-stream": "^1.0.2", "resolve": "^1.17.0", "source-map": "^0.6.1", - "tape": "^4.13.3", + "tape": "^5.0.1", "uglify-js": "3.3.12" }, "scripts": {