monocart-coverage-reports 2.9.2 → 2.10.0

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.
@@ -87,14 +87,16 @@ const saveIstanbulReports = (coverageData, fileSources, options) => {
87
87
  // create a context for report generation
88
88
  const context = istanbulLibReport.createContext(contextOptions);
89
89
 
90
- const istanbulGroup = options.reportGroup.istanbul;
91
- Object.keys(istanbulGroup).forEach((reportName) => {
92
- const t1 = Date.now();
93
- const reportOptions = istanbulGroup[reportName];
94
- const report = istanbulReports.create(reportName, reportOptions);
95
- report.execute(context);
96
- Util.logTime(`┌ [generate] saved report: ${reportName}`, t1);
97
- });
90
+ const istanbulGroup = options.reportGroup.get('istanbul');
91
+ // already has
92
+ if (istanbulGroup) {
93
+ for (const [reportName, reportOptions] of istanbulGroup) {
94
+ const t1 = Date.now();
95
+ const report = istanbulReports.create(reportName, reportOptions);
96
+ report.execute(context);
97
+ Util.logTime(`┌ [generate] saved report: ${reportName}`, t1);
98
+ }
99
+ }
98
100
 
99
101
  // add watermarks and color
100
102
  const coverageReport = new IstanbulSummary();
@@ -109,6 +111,7 @@ const saveIstanbulReports = (coverageData, fileSources, options) => {
109
111
  const coverageResults = {
110
112
  type: 'istanbul',
111
113
  reportPath,
114
+ version: Util.version,
112
115
  name: options.name,
113
116
  watermarks: contextOptions.watermarks,
114
117
  // summary and files