apex-code-coverage-transformer 2.6.1 → 2.7.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@
5
5
 
6
6
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
7
7
 
8
+ ## [2.7.0](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.6.1...v2.7.0) (2025-01-15)
9
+
10
+
11
+ ### Features
12
+
13
+ * add async processing and sort files in report ([ef0c011](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/ef0c011895f378e7aedc5c6568b9b9ec0e9574bf))
14
+
8
15
  ## [2.6.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.6.0...v2.6.1) (2025-01-15)
9
16
 
10
17
 
@@ -4,6 +4,7 @@ export function generateReport(coverageObj, format) {
4
4
  if (format === 'lcovonly') {
5
5
  if ('files' in coverageObj) {
6
6
  let lcovOutput = '';
7
+ coverageObj.files.sort((a, b) => a.sourceFile.localeCompare(b.sourceFile));
7
8
  for (const file of coverageObj.files) {
8
9
  lcovOutput += `TN:\nSF:${file.sourceFile}\n`;
9
10
  lcovOutput += 'FNF:0\nFNH:0\n';
@@ -19,6 +20,9 @@ export function generateReport(coverageObj, format) {
19
20
  }
20
21
  }
21
22
  const isHeadless = format === 'cobertura' || format === 'clover';
23
+ if ('files' in coverageObj) {
24
+ coverageObj.files.sort((a, b) => a.sourceFile.localeCompare(b.sourceFile));
25
+ }
22
26
  let xml = create(coverageObj).end({ prettyPrint: true, indent: ' ', headless: isHeadless });
23
27
  if (format === 'cobertura') {
24
28
  xml = `<?xml version="1.0" ?>\n<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">\n${xml}`;
@@ -1 +1 @@
1
- {"version":3,"file":"generateReport.js","sourceRoot":"","sources":["../../src/helpers/generateReport.ts"],"names":[],"mappings":"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AAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7E,CAAC;IACD,IAAI,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;IAE7F,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;QAC3B,GAAG,GAAG,8GAA8G,GAAG,EAAE,CAAC;IAC5H,CAAC;SAAM,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,GAAG,GAAG,2CAA2C,GAAG,EAAE,CAAC;IACzD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function getConcurrencyThreshold(): number;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+ import { availableParallelism } from 'node:os';
3
+ export function getConcurrencyThreshold() {
4
+ const AVAILABLE_PARALLELISM = availableParallelism ? availableParallelism() : Infinity;
5
+ return Math.min(AVAILABLE_PARALLELISM, 6);
6
+ }
7
+ //# sourceMappingURL=getConcurrencyThreshold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConcurrencyThreshold.js","sourceRoot":"","sources":["../../src/helpers/getConcurrencyThreshold.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,UAAU,uBAAuB;IACrC,MAAM,qBAAqB,GAAW,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE/F,OAAO,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;AAC5C,CAAC"}
@@ -1,30 +1,37 @@
1
1
  'use strict';
2
2
  /* eslint-disable no-await-in-loop */
3
+ import async from 'async';
3
4
  import { getCoverageHandler } from '../handlers/getCoverageHandler.js';
4
5
  import { getPackageDirectories } from './getPackageDirectories.js';
5
6
  import { findFilePath } from './findFilePath.js';
6
7
  import { generateReport } from './generateReport.js';
7
8
  import { setCoveredLines } from './setCoveredLines.js';
9
+ import { getConcurrencyThreshold } from './getConcurrencyThreshold.js';
8
10
  export async function transformDeployCoverageReport(data, format) {
9
11
  const warnings = [];
10
12
  let filesProcessed = 0;
11
13
  const { repoRoot, packageDirectories } = await getPackageDirectories();
12
14
  const handler = getCoverageHandler(format);
13
- for (const fileName in data) {
14
- if (!Object.hasOwn(data, fileName))
15
- continue;
15
+ const processFile = async (fileName) => {
16
16
  const fileInfo = data[fileName];
17
17
  const formattedFileName = fileName.replace(/no-map[\\/]+/, '');
18
18
  const relativeFilePath = await findFilePath(formattedFileName, packageDirectories, repoRoot);
19
19
  if (!relativeFilePath) {
20
20
  warnings.push(`The file name ${formattedFileName} was not found in any package directory.`);
21
- continue;
21
+ return false;
22
22
  }
23
23
  const updatedLines = await setCoveredLines(relativeFilePath, repoRoot, fileInfo.s);
24
24
  fileInfo.s = updatedLines;
25
25
  handler.processFile(relativeFilePath, formattedFileName, fileInfo.s);
26
- filesProcessed++;
27
- }
26
+ return true;
27
+ };
28
+ const concurrencyLimit = getConcurrencyThreshold();
29
+ await async.mapLimit(Object.keys(data).filter((fileName) => Object.hasOwn(data, fileName)), concurrencyLimit, async (fileName) => {
30
+ const result = await processFile(fileName);
31
+ if (result) {
32
+ filesProcessed++;
33
+ }
34
+ });
28
35
  const coverageObj = handler.finalize();
29
36
  const xml = generateReport(coverageObj, format);
30
37
  return { xml, warnings, filesProcessed };
@@ -1 +1 @@
1
- {"version":3,"file":"transformDeployCoverageReport.js","sourceRoot":"","sources":["../../src/helpers/transformDeployCoverageReport.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE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AC,gBAAgB,EAAE,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,iBAAiB,iBAAiB,0CAA0C,CAAC,CAAC;YAC5F,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACnF,QAAQ,CAAC,CAAC,GAAG,YAAY,CAAC;QAE1B,OAAO,CAAC,WAAW,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,uBAAuB,EAAE,CAAC;IACnD,MAAM,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAgB,EAAE,EAAE;QACvI,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC;YACX,cAAc,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEhD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AAC3C,CAAC"}
@@ -1,32 +1,39 @@
1
1
  'use strict';
2
2
  /* eslint-disable no-await-in-loop */
3
+ import async from 'async';
3
4
  import { getCoverageHandler } from '../handlers/getCoverageHandler.js';
4
5
  import { getPackageDirectories } from './getPackageDirectories.js';
5
6
  import { findFilePath } from './findFilePath.js';
6
7
  import { generateReport } from './generateReport.js';
8
+ import { getConcurrencyThreshold } from './getConcurrencyThreshold.js';
7
9
  export async function transformTestCoverageReport(testCoverageData, format) {
8
10
  const warnings = [];
9
11
  let filesProcessed = 0;
10
12
  const { repoRoot, packageDirectories } = await getPackageDirectories();
11
13
  const handler = getCoverageHandler(format);
12
- let coverageData = testCoverageData;
13
- if (!Array.isArray(coverageData)) {
14
- coverageData = [coverageData]; // Ensure the data is an array
15
- }
16
- for (const data of coverageData) {
14
+ // Ensure testCoverageData is an array
15
+ const coverageData = Array.isArray(testCoverageData) ? testCoverageData : [testCoverageData];
16
+ const processFile = async (data) => {
17
17
  const name = data?.name;
18
18
  const lines = data?.lines;
19
19
  if (!name || !lines)
20
- continue;
20
+ return false;
21
21
  const formattedFileName = name.replace(/no-map[\\/]+/, '');
22
22
  const relativeFilePath = await findFilePath(formattedFileName, packageDirectories, repoRoot);
23
- if (relativeFilePath === undefined) {
23
+ if (!relativeFilePath) {
24
24
  warnings.push(`The file name ${formattedFileName} was not found in any package directory.`);
25
- continue;
25
+ return false;
26
26
  }
27
27
  handler.processFile(relativeFilePath, formattedFileName, lines);
28
- filesProcessed++;
29
- }
28
+ return true;
29
+ };
30
+ const concurrencyLimit = getConcurrencyThreshold();
31
+ await async.mapLimit(coverageData, concurrencyLimit, async (data) => {
32
+ const result = await processFile(data);
33
+ if (result) {
34
+ filesProcessed++;
35
+ }
36
+ });
30
37
  const coverageObj = handler.finalize();
31
38
  const xml = generateReport(coverageObj, format);
32
39
  return { xml, warnings, filesProcessed };
@@ -1 +1 @@
1
- {"version":3,"file":"transformTestCoverageReport.js","sourceRoot":"","sources":["../../src/helpers/transformTestCoverageReport.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;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AAC;QAC3D,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAE7F,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,iBAAiB,iBAAiB,0CAA0C,CAAC,CAAC;YAC5F,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,CAAC,WAAW,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,uBAAuB,EAAE,CAAC;IACnD,MAAM,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAsB,EAAE,EAAE;QACpF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACX,cAAc,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEhD,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC;AAC3C,CAAC"}
package/oclif.lock CHANGED
@@ -2478,6 +2478,11 @@
2478
2478
  resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz"
2479
2479
  integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
2480
2480
 
2481
+ "@types/async@^3.2.24":
2482
+ version "3.2.24"
2483
+ resolved "https://registry.yarnpkg.com/@types/async/-/async-3.2.24.tgz#3a96351047575bbcf2340541b2d955a35339608f"
2484
+ integrity sha512-8iHVLHsCCOBKjCF2KwFe0p9Z3rfM9mL+sSP8btyR5vTjJRAqpBYD28/ZLgXPf0pjG1VxOvtCV/BgXkQbpSe8Hw==
2485
+
2481
2486
  "@types/chai@^4.3.14":
2482
2487
  version "4.3.20"
2483
2488
  resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc"
@@ -3070,6 +3075,11 @@ async@^3.2.3:
3070
3075
  resolved "https://registry.npmjs.org/async/-/async-3.2.4.tgz"
3071
3076
  integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==
3072
3077
 
3078
+ async@^3.2.6:
3079
+ version "3.2.6"
3080
+ resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce"
3081
+ integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==
3082
+
3073
3083
  asynckit@^0.4.0:
3074
3084
  version "0.4.0"
3075
3085
  resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
@@ -8031,16 +8041,7 @@ stack-utils@^2.0.6:
8031
8041
  dependencies:
8032
8042
  escape-string-regexp "^2.0.0"
8033
8043
 
8034
- "string-width-cjs@npm:string-width@^4.2.0":
8035
- version "4.2.3"
8036
- resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
8037
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
8038
- dependencies:
8039
- emoji-regex "^8.0.0"
8040
- is-fullwidth-code-point "^3.0.0"
8041
- strip-ansi "^6.0.1"
8042
-
8043
- string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
8044
+ "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
8044
8045
  version "4.2.3"
8045
8046
  resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
8046
8047
  integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -8148,14 +8149,7 @@ stringify-entities@^4.0.0:
8148
8149
  character-entities-html4 "^2.0.0"
8149
8150
  character-entities-legacy "^3.0.0"
8150
8151
 
8151
- "strip-ansi-cjs@npm:strip-ansi@^6.0.1":
8152
- version "6.0.1"
8153
- resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
8154
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
8155
- dependencies:
8156
- ansi-regex "^5.0.1"
8157
-
8158
- strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8152
+ "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
8159
8153
  version "6.0.1"
8160
8154
  resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
8161
8155
  integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -8914,7 +8908,7 @@ workerpool@^6.5.1:
8914
8908
  resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
8915
8909
  integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==
8916
8910
 
8917
- "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
8911
+ "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
8918
8912
  version "7.0.0"
8919
8913
  resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
8920
8914
  integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -8932,15 +8926,6 @@ wrap-ansi@^6.2.0:
8932
8926
  string-width "^4.1.0"
8933
8927
  strip-ansi "^6.0.0"
8934
8928
 
8935
- wrap-ansi@^7.0.0:
8936
- version "7.0.0"
8937
- resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
8938
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
8939
- dependencies:
8940
- ansi-styles "^4.0.0"
8941
- string-width "^4.1.0"
8942
- strip-ansi "^6.0.0"
8943
-
8944
8929
  wrap-ansi@^8.1.0:
8945
8930
  version "8.1.0"
8946
8931
  resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz"
@@ -85,5 +85,5 @@
85
85
  ]
86
86
  }
87
87
  },
88
- "version": "2.6.1"
88
+ "version": "2.7.0"
89
89
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "apex-code-coverage-transformer",
3
3
  "description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into SonarQube, Clover, LCovOnly, or Cobertura format.",
4
- "version": "2.6.1",
4
+ "version": "2.7.0",
5
5
  "dependencies": {
6
6
  "@oclif/core": "^4.0.37",
7
7
  "@salesforce/core": "^8.8.0",
8
8
  "@salesforce/sf-plugins-core": "^12.1.1",
9
+ "async": "^3.2.6",
9
10
  "xmlbuilder2": "^3.1.1"
10
11
  },
11
12
  "devDependencies": {
@@ -14,6 +15,7 @@
14
15
  "@oclif/plugin-command-snapshot": "^5.2.24",
15
16
  "@salesforce/cli-plugins-testkit": "^5.3.39",
16
17
  "@salesforce/dev-scripts": "^10.2.11",
18
+ "@types/async": "^3.2.24",
17
19
  "@types/node": "18",
18
20
  "eslint-plugin-sf-plugin": "^1.20.13",
19
21
  "husky": "^9.1.7",