monocart-coverage-reports 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/v8/v8.js CHANGED
@@ -186,17 +186,9 @@ const saveV8JsonReport = async (reportData, options, v8JsonOptions) => {
186
186
 
187
187
  const saveV8HtmlReport = async (reportData, options, v8HtmlOptions) => {
188
188
 
189
- // V8 only options, merged with root options
190
- const v8MergedOptions = {
191
- outputFile: options.outputFile,
192
- inline: options.inline,
193
- assetsPath: options.assetsPath,
194
- ... v8HtmlOptions
195
- };
196
-
197
189
  const {
198
190
  outputFile, inline, assetsPath
199
- } = v8MergedOptions;
191
+ } = v8HtmlOptions;
200
192
 
201
193
  // resolve full report path
202
194
  const reportPath = path.resolve(options.outputDir, outputFile);
@@ -317,18 +309,31 @@ const saveV8Report = async (v8list, options) => {
317
309
  // v8 reports
318
310
  const v8Map = options.reportGroup.v8;
319
311
 
312
+ // v8 html
313
+ const v8Options = v8Map.v8;
314
+ if (v8Options) {
315
+
316
+ // V8 only options, merged with root options
317
+ const v8HtmlOptions = {
318
+ outputFile: options.outputFile,
319
+ inline: options.inline,
320
+ assetsPath: options.assetsPath,
321
+ metrics: options.metrics,
322
+ ... v8Options
323
+ };
324
+
325
+ // add metrics to data
326
+ reportData.metrics = v8HtmlOptions.metrics;
327
+
328
+ outputPath = await saveV8HtmlReport(reportData, options, v8HtmlOptions);
329
+ }
330
+
320
331
  // v8 json
321
332
  const v8JsonOptions = v8Map['v8-json'];
322
333
  if (v8JsonOptions) {
323
334
  outputPath = await saveV8JsonReport(reportData, options, v8JsonOptions);
324
335
  }
325
336
 
326
- // v8 html
327
- const v8HtmlOptions = v8Map.v8;
328
- if (v8HtmlOptions) {
329
- outputPath = await saveV8HtmlReport(reportData, options, v8HtmlOptions);
330
- }
331
-
332
337
  const reportPath = Util.resolveReportPath(options, () => {
333
338
  return outputPath;
334
339
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monocart-coverage-reports",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Monocart coverage reports",
5
5
  "main": "lib/index.js",
6
6
  "exports": {