[INTERNAL] JSModuleAnalyzer: Remove invalid log usage#354
Conversation
Change usage from non existing log.debug to log.verbose
|
Got introduced with #341 |
codeworrior
left a comment
There was a problem hiding this comment.
I would rather fix the existing test. The log lines ARE already covered by the EVOBundle test in JSModuleAnalyzer. But the test unfortunately totally stifles all errors.
The issue is caused by line https://github.com/SAP/ui5-builder/blob/master/test/lib/lbt/analyzer/JSModuleAnalyzer.js#L97,
In JSModuleAnalyzer test the analyzeModule function will fail if there is an error.
Good point! Addressed it with 4ce5d9d |
| }); | ||
|
|
||
| // Note: this test still fails as the evo-style bundles don't declare the names of the | ||
| // contained raw-modules any longer. |
There was a problem hiding this comment.
Was this comment removed intentionally?
There was a problem hiding this comment.
I guess, yes. Because this TODO was, what #341 wanted to addressed (migration of 3562114).
There was a problem hiding this comment.
I thought this fix made the tests not fail anymore therefore I removed it
…i5-builder#354) Change usage from non existing log.debug to log.verbose In JSModuleAnalyzer test the analyzeModule function will fail if there is an error.
A new module lib/lbt/utils/parseUtils is introduced that exposes a parseJS function and a Syntax object with all AST node types. The new module is used in all places where JavaScript code is parsed (incl. tests). The module uses espree v6 for parsing instead of esprima. This is the maximum version that can be used without introducing breaking changes to the tooling (higher versions of espree require higher node versions than documented in our package.json). The set of allowed parser options is limited to ease a later migration to another parser. Fixes SAP/ui5-tooling SAP/ui5-builder#354 Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
Change usage from non existing log.debug to log.verbose.
This code was not yet covered by tests. The new tests ensure that the code is run through and no error is thrown.