From 9857e10cbb3f45515ab69c8b61416dd6dc0167b6 Mon Sep 17 00:00:00 2001 From: Frank Weigel Date: Wed, 14 Aug 2019 07:30:56 +0200 Subject: [PATCH 1/2] [FIX] Adapt to recent extension of estraverse's set of node types Fixes https://github.com/SAP/ui5-builder/issues/309 --- lib/lbt/analyzer/JSModuleAnalyzer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/lbt/analyzer/JSModuleAnalyzer.js b/lib/lbt/analyzer/JSModuleAnalyzer.js index 71845ac59..451338672 100644 --- a/lib/lbt/analyzer/JSModuleAnalyzer.js +++ b/lib/lbt/analyzer/JSModuleAnalyzer.js @@ -24,7 +24,7 @@ const EnrichedVisitorKeys = (function() { * E.g. in an IfExpression, the 'test' is always executed, whereas 'consequent' * and 'alternate' are only executed under certain conditions. * - * While visiting the AST of a JavaSCript file, the JSModuleAnalyzer uses this information + * While visiting the AST of a JavaScript file, the JSModuleAnalyzer uses this information * to decide whether a code block is executed conditionally or unconditionally. * Besides this information which is inherent to the language, the analyzer uses * additional knowledge about special APIS / constructs (e.g. the factory function of @@ -103,6 +103,10 @@ const EnrichedVisitorKeys = (function() { * import >>>a<<< from 'module'; */ ImportDefaultSpecifier: [], // local + /* + * Dynamic Import expression, the argument is evaluated unconditionally. + */ + ImportExpression: [], // source, /* * import >>>* as b<<< from 'module'; */ From 93fb862aac71202bcabaabf5f9e90b6c41042f8e Mon Sep 17 00:00:00 2001 From: Frank Weigel Date: Wed, 14 Aug 2019 08:27:39 +0200 Subject: [PATCH 2/2] Update package*.json --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0831c439..19995369d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2504,9 +2504,9 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "esutils": { "version": "2.0.3", diff --git a/package.json b/package.json index 1149b3981..196b60ded 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "escodegen": "^1.11.1", "escope": "^3.6.0", "esprima": "^4.0.1", - "estraverse": "^4.2.0", + "estraverse": "^4.3.0", "globby": "^10.0.1", "graceful-fs": "^4.2.1", "jsdoc": "3.5.5",