apex-code-coverage-transformer
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -8,2 +8,9 @@ <!-- markdownlint-disable MD024 MD025 --> | ||
## [2.7.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.7.0...v2.7.1) (2025-01-16) | ||
### Bug Fixes | ||
* sorting on each coverage format handler ([b7b9244](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/b7b9244dddc54c1c96b88fafa81ba561c946c0ac)) | ||
## [2.7.0](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.6.1...v2.7.0) (2025-01-15) | ||
@@ -10,0 +17,0 @@ |
@@ -72,2 +72,5 @@ 'use strict'; | ||
finalize() { | ||
if (this.coverageObj.coverage?.project?.file) { | ||
this.coverageObj.coverage.project.file.sort((a, b) => a['@path'].localeCompare(b['@path'])); | ||
} | ||
return this.coverageObj; | ||
@@ -74,0 +77,0 @@ } |
@@ -65,2 +65,10 @@ 'use strict'; | ||
finalize() { | ||
if (this.coverageObj.coverage?.packages?.package) { | ||
this.coverageObj.coverage.packages.package.sort((a, b) => a['@name'].localeCompare(b['@name'])); | ||
for (const pkg of this.coverageObj.coverage.packages.package) { | ||
if (pkg.classes?.class) { | ||
pkg.classes.class.sort((a, b) => a['@filename'].localeCompare(b['@filename'])); | ||
} | ||
} | ||
} | ||
return this.coverageObj; | ||
@@ -67,0 +75,0 @@ } |
@@ -29,2 +29,5 @@ 'use strict'; | ||
finalize() { | ||
if ('files' in this.coverageObj && Array.isArray(this.coverageObj.files)) { | ||
this.coverageObj.files.sort((a, b) => a.sourceFile.localeCompare(b.sourceFile)); | ||
} | ||
return this.coverageObj; | ||
@@ -31,0 +34,0 @@ } |
@@ -24,2 +24,5 @@ 'use strict'; | ||
finalize() { | ||
if (this.coverageObj.coverage?.file) { | ||
this.coverageObj.coverage.file.sort((a, b) => a['@path'].localeCompare(b['@path'])); | ||
} | ||
return this.coverageObj; | ||
@@ -26,0 +29,0 @@ } |
@@ -7,3 +7,2 @@ 'use strict'; | ||
let lcovOutput = ''; | ||
coverageObj.files.sort((a, b) => a.sourceFile.localeCompare(b.sourceFile)); | ||
for (const file of coverageObj.files) { | ||
@@ -24,5 +23,2 @@ lcovOutput += `TN:\nSF:${file.sourceFile}\n`; | ||
const isHeadless = format === 'cobertura' || format === 'clover'; | ||
if ('files' in coverageObj) { | ||
coverageObj.files.sort((a, b) => a.sourceFile.localeCompare(b.sourceFile)); | ||
} | ||
let xml = create(coverageObj).end({ prettyPrint: true, indent: ' ', headless: isHeadless }); | ||
@@ -29,0 +25,0 @@ if (format === 'cobertura') { |
'use strict'; | ||
/* eslint-disable no-await-in-loop */ | ||
import async from 'async'; | ||
import { mapLimit } from 'async'; | ||
import { getCoverageHandler } from '../handlers/getCoverageHandler.js'; | ||
@@ -29,3 +28,3 @@ import { getPackageDirectories } from './getPackageDirectories.js'; | ||
const concurrencyLimit = getConcurrencyThreshold(); | ||
await async.mapLimit(Object.keys(data).filter((fileName) => Object.hasOwn(data, fileName)), concurrencyLimit, async (fileName) => { | ||
await mapLimit(Object.keys(data).filter((fileName) => Object.hasOwn(data, fileName)), concurrencyLimit, async (fileName) => { | ||
const result = await processFile(fileName); | ||
@@ -32,0 +31,0 @@ if (result) { |
'use strict'; | ||
/* eslint-disable no-await-in-loop */ | ||
import async from 'async'; | ||
import { mapLimit } from 'async'; | ||
import { getCoverageHandler } from '../handlers/getCoverageHandler.js'; | ||
@@ -31,3 +30,3 @@ import { getPackageDirectories } from './getPackageDirectories.js'; | ||
const concurrencyLimit = getConcurrencyThreshold(); | ||
await async.mapLimit(coverageData, concurrencyLimit, async (data) => { | ||
await mapLimit(coverageData, concurrencyLimit, async (data) => { | ||
const result = await processFile(data); | ||
@@ -34,0 +33,0 @@ if (result) { |
@@ -88,3 +88,3 @@ { | ||
}, | ||
"version": "2.7.0" | ||
"version": "2.7.1" | ||
} |
{ | ||
"name": "apex-code-coverage-transformer", | ||
"description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into SonarQube, Clover, LCovOnly, or Cobertura format.", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"dependencies": { | ||
@@ -6,0 +6,0 @@ "@oclif/core": "^4.0.37", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
485671
1019