apex-code-coverage-transformer 2.5.2 → 2.6.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 +7 -0
- package/README.md +8 -0
- package/lib/hooks/postrun.js +2 -2
- package/lib/hooks/postrun.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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.6.0](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.5.2...v2.6.0) (2025-01-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* allow hook to run after hardis commands ([962847d](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/962847d640237bd8c6c16f7319e2756b005713ea))
|
|
14
|
+
|
|
8
15
|
## [2.5.2](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.5.1...v2.5.2) (2025-01-10)
|
|
9
16
|
|
|
10
17
|
|
package/README.md
CHANGED
|
@@ -129,6 +129,14 @@ The `.apexcodecovtransformer.config.json` should look like this:
|
|
|
129
129
|
|
|
130
130
|
If the `.apexcodecovtransformer.config.json` file isn't found, the hook will be skipped.
|
|
131
131
|
|
|
132
|
+
The post-run hook can also run after the [sfdx-hardis](https://github.com/hardisgroupcom/sfdx-hardis) commands `hardis:project:deploy:smart` (only if `COVERAGE_FORMATTER_JSON=true` environment variable is defined) and `hardis:org:test:apex` assuming you:
|
|
133
|
+
|
|
134
|
+
- Install both plugins, apex-code-coverage-transformer and sfdx-hardis, with the Salesforce CLI
|
|
135
|
+
- Create the `.apexcodecovtransformer.config.json` file in the root of your repo
|
|
136
|
+
- Set `deployCoverageJsonPath` and `testCoverageJsonPath` in `.apexcodecovtransformer.config.json` to `hardis-report/apex-coverage-results.json`
|
|
137
|
+
|
|
138
|
+
Since sfdx-hardis invokes Salesforce CLI commands, the hooks will fire twice per hardis command, once after the Salesforce CLI command and once after the sfdx-hardis command. The hook will end early without errors after the Salesforce CLI command and will run successfully after the sfdx-hardis command assuming the hardis report is found.
|
|
139
|
+
|
|
132
140
|
## Errors and Warnings
|
|
133
141
|
|
|
134
142
|
Any file in the coverage JSON that isn't found in any package directory will result in this warning:
|
package/lib/hooks/postrun.js
CHANGED
|
@@ -7,10 +7,10 @@ import { getRepoRoot } from '../helpers/getRepoRoot.js';
|
|
|
7
7
|
export const postrun = async function (options) {
|
|
8
8
|
let commandType;
|
|
9
9
|
let coverageJson;
|
|
10
|
-
if (['project:deploy:validate', 'project:deploy:start', 'project:deploy:report', 'project:deploy:resume'].includes(options.Command.id)) {
|
|
10
|
+
if (['project:deploy:validate', 'project:deploy:start', 'project:deploy:report', 'project:deploy:resume', 'hardis:project:deploy:smart'].includes(options.Command.id)) {
|
|
11
11
|
commandType = 'deploy';
|
|
12
12
|
}
|
|
13
|
-
else if (['apex:run:test', 'apex:get:test'].includes(options.Command.id)) {
|
|
13
|
+
else if (['apex:run:test', 'apex:get:test', 'hardis:org:test:apex'].includes(options.Command.id)) {
|
|
14
14
|
commandType = 'test';
|
|
15
15
|
}
|
|
16
16
|
else {
|
package/lib/hooks/postrun.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postrun.js","sourceRoot":"","sources":["../../src/hooks/postrun.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,CAAC,MA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if.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4.0.37",
|
|
7
7
|
"@salesforce/core": "^8.8.0",
|