apex-code-coverage-transformer 2.23.0 → 2.23.1
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 +128 -5
- package/lib/commands/acc-transformer/transform.js +2 -2
- package/lib/commands/acc-transformer/transform.js.map +1 -1
- package/lib/handlers/BaseHandler.d.ts +1 -1
- package/lib/hooks/finally.js +1 -1
- package/lib/hooks/finally.js.map +1 -1
- package/lib/transformers/coverageProcessor.d.ts +1 -1
- package/lib/transformers/coverageProcessor.js +2 -2
- package/lib/transformers/coverageProcessor.js.map +1 -1
- package/lib/transformers/coverageTransformer.js +3 -3
- package/lib/transformers/coverageTransformer.js.map +1 -1
- package/lib/transformers/reportGenerator.js +2 -2
- package/lib/transformers/reportGenerator.js.map +1 -1
- package/lib/utils/getPackageDirectories.js.map +1 -1
- package/lib/utils/getRepoRoot.js +3 -3
- package/lib/utils/getRepoRoot.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +97 -79
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.23.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.23.0...v2.23.1) (2026-06-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update all deps, drop Node 20 support ([#323](https://github.com/mcarvin8/apex-code-coverage-transformer/issues/323)) ([a172ba5](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/a172ba53c3dd7dc4521cbf13f70392c0b6f29bd3))
|
|
14
|
+
|
|
8
15
|
## [2.23.0](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v2.22.1...v2.23.0) (2026-06-17)
|
|
9
16
|
|
|
10
17
|
|
package/README.md
CHANGED
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
[](https://codecov.io/gh/mcarvin8/apex-code-coverage-transformer)
|
|
8
8
|
[](https://dashboard.stryker-mutator.io/reports/github.com/mcarvin8/apex-code-coverage-transformer/main)
|
|
9
9
|
|
|
10
|
-
A Salesforce CLI plugin that
|
|
11
|
-
|
|
12
|
-
> Missing an output format via `--format`? Open an [issue](https://github.com/mcarvin8/apex-code-coverage-transformer/issues) or submit a [pull request](https://github.com/mcarvin8/apex-code-coverage-transformer/blob/main/CONTRIBUTING.md).
|
|
10
|
+
A Salesforce CLI plugin that transforms (and optionally merges) Apex code coverage JSON from deployments or test runs into formats used by SonarQube, Codecov, GitHub, GitLab, Azure DevOps, Bitbucket, and other tools, keeping coverage visible across pull requests, CI/CD pipelines, and code quality platforms.
|
|
13
11
|
|
|
14
12
|
<details>
|
|
15
13
|
<summary>Table of Contents</summary>
|
|
@@ -23,6 +21,8 @@ A Salesforce CLI plugin that converts Apex code coverage JSON (from deploy or te
|
|
|
23
21
|
- [CI/CD Integration](#cicd-integration)
|
|
24
22
|
- [Automatic Transformation (Hook)](#automatic-transformation-hook)
|
|
25
23
|
- [Troubleshooting](#troubleshooting)
|
|
24
|
+
- [Questions or Issues?](#questions-or-issues)
|
|
25
|
+
- [License](#license)
|
|
26
26
|
|
|
27
27
|
</details>
|
|
28
28
|
|
|
@@ -144,7 +144,7 @@ GLOBAL FLAGS
|
|
|
144
144
|
Use `-f` / `--format` to choose the output format. Multiple `-f` values produce multiple files with the format in the name (e.g. `coverage-sonar.xml`, `coverage-cobertura.xml`).
|
|
145
145
|
|
|
146
146
|
| Format | Description | Typical use | Example |
|
|
147
|
-
|
|
147
|
+
|----------------|----------------------------|-----------------------------------------|-----------------------------------------------------------------------------------------|
|
|
148
148
|
| sonar | SonarQube generic coverage | SonarQube, SonarCloud | `sf acc-transformer transform -j "coverage.json" -r "coverage.xml" -f "sonar"` |
|
|
149
149
|
| cobertura | Cobertura XML | Codecov, Azure, Jenkins, GitLab, GitHub | `sf acc-transformer transform -j "coverage.json" -r "coverage.xml" -f "cobertura"` |
|
|
150
150
|
| jacoco | JaCoCo XML | Codecov, Jenkins, Maven, Gradle | `sf acc-transformer transform -j "coverage.json" -r "coverage.xml" -f "jacoco"` |
|
|
@@ -272,6 +272,86 @@ The `github-actions` format emits one [`::warning`](https://docs.github.com/en/a
|
|
|
272
272
|
|
|
273
273
|
Pairs with [`sf-cat`](https://www.github.com/mcarvin8/sf-cat) for code quality annotations on the same diff if you use Salesforce Code Analyzer.
|
|
274
274
|
|
|
275
|
+
#### Merging coverage from parallel test suites
|
|
276
|
+
|
|
277
|
+
If you split Apex tests across parallel jobs (e.g. by test class grouping or suite), upload each run's JSON as an artifact and merge them in a final step. Covered lines are unioned — a line covered in any suite counts as covered in the final report.
|
|
278
|
+
|
|
279
|
+
```yaml
|
|
280
|
+
jobs:
|
|
281
|
+
test-suite-a:
|
|
282
|
+
runs-on: ubuntu-latest
|
|
283
|
+
steps:
|
|
284
|
+
- uses: actions/checkout@v4
|
|
285
|
+
with:
|
|
286
|
+
fetch-depth: 0
|
|
287
|
+
# ... shared setup steps (Node, SF CLI, auth) ...
|
|
288
|
+
- name: Run Suite A
|
|
289
|
+
run: sf apex run test --code-coverage --output-dir coverage-a --target-org ci-org
|
|
290
|
+
- name: Upload Suite A coverage
|
|
291
|
+
uses: actions/upload-artifact@v4
|
|
292
|
+
with:
|
|
293
|
+
name: coverage-a
|
|
294
|
+
path: coverage-a/test-result-codecoverage.json
|
|
295
|
+
|
|
296
|
+
test-suite-b:
|
|
297
|
+
runs-on: ubuntu-latest
|
|
298
|
+
steps:
|
|
299
|
+
- uses: actions/checkout@v4
|
|
300
|
+
with:
|
|
301
|
+
fetch-depth: 0
|
|
302
|
+
# ... shared setup steps ...
|
|
303
|
+
- name: Run Suite B
|
|
304
|
+
run: sf apex run test --code-coverage --output-dir coverage-b --target-org ci-org
|
|
305
|
+
- name: Upload Suite B coverage
|
|
306
|
+
uses: actions/upload-artifact@v4
|
|
307
|
+
with:
|
|
308
|
+
name: coverage-b
|
|
309
|
+
path: coverage-b/test-result-codecoverage.json
|
|
310
|
+
|
|
311
|
+
merge-coverage:
|
|
312
|
+
runs-on: ubuntu-latest
|
|
313
|
+
needs: [test-suite-a, test-suite-b]
|
|
314
|
+
steps:
|
|
315
|
+
- uses: actions/checkout@v4
|
|
316
|
+
with:
|
|
317
|
+
fetch-depth: 0
|
|
318
|
+
- uses: actions/setup-node@v4
|
|
319
|
+
with:
|
|
320
|
+
node-version: '20'
|
|
321
|
+
- run: npm install -g @salesforce/cli@latest
|
|
322
|
+
- run: echo y | sf plugins install apex-code-coverage-transformer
|
|
323
|
+
- name: Download Suite A coverage
|
|
324
|
+
uses: actions/download-artifact@v4
|
|
325
|
+
with:
|
|
326
|
+
name: coverage-a
|
|
327
|
+
path: coverage-a
|
|
328
|
+
- name: Download Suite B coverage
|
|
329
|
+
uses: actions/download-artifact@v4
|
|
330
|
+
with:
|
|
331
|
+
name: coverage-b
|
|
332
|
+
path: coverage-b
|
|
333
|
+
- name: Merge and transform coverage
|
|
334
|
+
run: |
|
|
335
|
+
sf acc-transformer transform \
|
|
336
|
+
-j "coverage-a/test-result-codecoverage.json" \
|
|
337
|
+
-j "coverage-b/test-result-codecoverage.json" \
|
|
338
|
+
-r "coverage.xml" \
|
|
339
|
+
-f "sonar"
|
|
340
|
+
- name: SonarCloud Scan
|
|
341
|
+
uses: SonarSource/sonarcloud-github-action@master
|
|
342
|
+
env:
|
|
343
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
344
|
+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
345
|
+
with:
|
|
346
|
+
args: >
|
|
347
|
+
-Dsonar.projectKey=your-project-key
|
|
348
|
+
-Dsonar.organization=your-org
|
|
349
|
+
-Dsonar.sources=force-app
|
|
350
|
+
-Dsonar.coverageReportPaths=coverage.xml
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Swap the final upload step for any tool from the [Codecov](#codecov) or [GitHub Actions](#github-actions) examples above — the merge command stays the same regardless of destination.
|
|
354
|
+
|
|
275
355
|
### GitLab CI
|
|
276
356
|
|
|
277
357
|
```yaml
|
|
@@ -309,6 +389,45 @@ apex-tests:
|
|
|
309
389
|
path: coverage.xml
|
|
310
390
|
```
|
|
311
391
|
|
|
392
|
+
### Azure DevOps
|
|
393
|
+
|
|
394
|
+
```yaml
|
|
395
|
+
trigger:
|
|
396
|
+
- main
|
|
397
|
+
|
|
398
|
+
pool:
|
|
399
|
+
vmImage: ubuntu-latest
|
|
400
|
+
|
|
401
|
+
steps:
|
|
402
|
+
- task: NodeTool@0
|
|
403
|
+
inputs:
|
|
404
|
+
versionSpec: '20.x'
|
|
405
|
+
displayName: Set up Node.js
|
|
406
|
+
|
|
407
|
+
- script: npm install -g @salesforce/cli@latest
|
|
408
|
+
displayName: Install Salesforce CLI
|
|
409
|
+
|
|
410
|
+
- script: echo y | sf plugins install apex-code-coverage-transformer
|
|
411
|
+
displayName: Install Apex Code Coverage Transformer
|
|
412
|
+
|
|
413
|
+
- script: echo $(SFDX_AUTH_URL) | sf org login sfdx-url --sfdx-url-stdin --alias ci-org
|
|
414
|
+
displayName: Authenticate to Salesforce
|
|
415
|
+
|
|
416
|
+
- script: sf apex run test --code-coverage --output-dir coverage --target-org ci-org
|
|
417
|
+
displayName: Run Apex Tests
|
|
418
|
+
|
|
419
|
+
- script: sf acc-transformer transform -j "coverage/test-result-codecoverage.json" -r "coverage.xml" -f "cobertura"
|
|
420
|
+
displayName: Transform Coverage to Cobertura
|
|
421
|
+
|
|
422
|
+
- task: PublishCodeCoverageResults@2
|
|
423
|
+
inputs:
|
|
424
|
+
summaryFileLocation: coverage.xml
|
|
425
|
+
pathToSources: $(Build.SourcesDirectory)
|
|
426
|
+
displayName: Publish Coverage to Azure DevOps
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Set `SFDX_AUTH_URL` as a secret pipeline variable. Coverage appears in the pipeline's **Code Coverage** tab.
|
|
430
|
+
|
|
312
431
|
## Automatic Transformation (Hook)
|
|
313
432
|
|
|
314
433
|
Create `.apexcodecovtransformer.config.json` in the project root to transform coverage automatically after:
|
|
@@ -324,7 +443,7 @@ Create `.apexcodecovtransformer.config.json` in the project root to transform co
|
|
|
324
443
|
Sample configs: [Salesforce CLI](https://raw.githubusercontent.com/mcarvin8/apex-code-coverage-transformer/main/defaults/salesforce-cli/.apexcodecovtransformer.config.json), [SFDX Hardis](https://raw.githubusercontent.com/mcarvin8/apex-code-coverage-transformer/main/defaults/sfdx-hardis/.apexcodecovtransformer.config.json).
|
|
325
444
|
|
|
326
445
|
| Key | Required | Description |
|
|
327
|
-
|
|
446
|
+
|----------------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
328
447
|
| `deployCoverageJsonPath` | For deploy | Path to deploy coverage JSON. |
|
|
329
448
|
| `testCoverageJsonPath` | For test | Path to test coverage JSON. |
|
|
330
449
|
| `outputReportPath` | No | Output path (default: `coverage.[xml/info/json]` by format). |
|
|
@@ -402,6 +521,10 @@ The coverage report has been written to: coverage.xml
|
|
|
402
521
|
[16:10:20.826] DEBUG (sf:setCoveredLines): Remapping out-of-range covered line 190 to line 1 in force-app/main/default/triggers/AccountTrigger.trigger (file has 105 lines)
|
|
403
522
|
```
|
|
404
523
|
|
|
524
|
+
## Questions or Issues?
|
|
525
|
+
|
|
526
|
+
Questions, issues? Missing an output format via `--format`? Open an [issue](https://github.com/mcarvin8/apex-code-coverage-transformer/issues).
|
|
527
|
+
|
|
405
528
|
## License
|
|
406
529
|
|
|
407
530
|
[MIT](LICENSE.md)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
3
2
|
import { Messages } from '@salesforce/core';
|
|
3
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
4
4
|
import { transformCoverageReport } from '../../transformers/coverageTransformer.js';
|
|
5
|
-
import { formatOptions } from '../../utils/constants.js';
|
|
6
5
|
import { DEFAULT_MAX_ANNOTATIONS } from '../../transformers/generators/generateGitHubActions.js';
|
|
6
|
+
import { formatOptions } from '../../utils/constants.js';
|
|
7
7
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
8
8
|
const messages = Messages.loadMessages('apex-code-coverage-transformer', 'transformer.transform');
|
|
9
9
|
export default class TransformerTransform extends SfCommand {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/commands/acc-transformer/transform.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/commands/acc-transformer/transform.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,gCAAgC,EAAE,uBAAuB,CAAC,CAAC;AAElG,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAqC;IAC9E,MAAM,CAAmB,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAClE,MAAM,CAAmB,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1E,MAAM,CAAmB,QAAQ,GAAG,QAAQ,CAAC,WAAW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ageObject, IstanbulCoverageObject, JaCoCoCoverageObject, JsonSummaryCoverageObject, LcovCoverageObject, MarkdownCoverageObject, OpenCoverCoverageObject, SimpleCovCoverageObject, SonarCoverageObject } from '../utils/types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Abstract base class for coverage handlers providing common utilities.
|
|
4
4
|
* Reduces code duplication across different format handlers.
|
package/lib/hooks/finally.js
CHANGED
|
@@ -60,7 +60,7 @@ export const hook = async function (options) {
|
|
|
60
60
|
const jsonString = await readFile(configPath, 'utf-8');
|
|
61
61
|
configFile = JSON.parse(jsonString);
|
|
62
62
|
}
|
|
63
|
-
catch
|
|
63
|
+
catch {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const outputReport = configFile.outputReportPath || 'coverage.xml';
|
package/lib/hooks/finally.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finally.js","sourceRoot":"","sources":["../../src/hooks/finally.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;
|
|
1
|
+
{"version":3,"file":"finally.js","sourceRoot":"","sources":["../../src/hooks/finally.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;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,SAAS,gBAAgB,CAAC,gBAAwB,EAAE,gBAAwB,EAAE,UAAoB;IAChG,MAAM,IA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GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,oBAAoB,IAAI,GAAG,CAAC;IAE/G,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAChC,OAAO;IACT,CAAC;IAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAClC,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,CAAC;IAC1F,MAAM,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getCoverageHandler } from '../handlers/getHandler.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CoverageProcessingContext, DeployCoverageData, LineTotals, ProcessResult, TestCoverageData } from '../utils/types.js';
|
|
3
3
|
export declare function createHandlers(formats: string[]): Map<string, ReturnType<typeof getCoverageHandler>>;
|
|
4
4
|
export declare function countLines(lines: Record<string, number>): LineTotals;
|
|
5
5
|
export declare function processDeployCoverage(data: DeployCoverageData, context: CoverageProcessingContext): Promise<ProcessResult>;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { matchesGlob } from '../utils/globMatcher.js';
|
|
6
5
|
import { getCoverageHandler } from '../handlers/getHandler.js';
|
|
7
6
|
import { findFilePath } from '../utils/findFilePath.js';
|
|
8
|
-
import {
|
|
7
|
+
import { matchesGlob } from '../utils/globMatcher.js';
|
|
9
8
|
import { mapLimit } from '../utils/mapLimit.js';
|
|
9
|
+
import { setCoveredLines } from '../utils/setCoveredLines.js';
|
|
10
10
|
export function createHandlers(formats) {
|
|
11
11
|
const handlers = new Map();
|
|
12
12
|
for (const format of formats) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverageProcessor.js","sourceRoot":"","sources":["../../src/transformers/coverageProcessor.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"coverageProcessor.js","sourceRoot":"","sources":["../../src/transformers/coverageProcessor.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAA8B,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAS1F,MAAM,UAAU,cAAc,CAAC,OAAiB;IAC9C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiD,CAAC;IAC1E,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CACvB,MAA6B;IAE7B,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,eAAe,IAAI,MAAM,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,YAAoB;IAChD,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,C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'../utils/getPackageDirectories.js';
|
|
4
3
|
import { buildFilePathCache } from '../utils/buildFilePathCache.js';
|
|
5
4
|
import { getConcurrencyThreshold } from '../utils/getConcurrencyThreshold.js';
|
|
6
|
-
import {
|
|
5
|
+
import { getPackageDirectories } from '../utils/getPackageDirectories.js';
|
|
7
6
|
import { tryReadJson } from '../utils/readJson.js';
|
|
8
|
-
import {
|
|
7
|
+
import { checkCoverageDataType } from '../utils/setCoverageDataType.js';
|
|
9
8
|
import { mergeDeployCoverageData, mergeTestCoverageData } from './coverageDataMerger.js';
|
|
10
9
|
import { createHandlers, processDeployCoverage, processTestCoverage } from './coverageProcessor.js';
|
|
10
|
+
import { generateAndWriteReport } from './reportGenerator.js';
|
|
11
11
|
export async function transformCoverageReport(jsonFilePaths, outputReportPath, formats, ignoreDirs, options) {
|
|
12
12
|
const warnings = [];
|
|
13
13
|
const finalPaths = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverageTransformer.js","sourceRoot":"","sources":["../../src/transformers/coverageTransformer.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"coverageTransformer.js","sourceRoot":"","sources":["../../src/transformers/coverageTransformer.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,YAAY,CAAC;AAEb,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAQxE,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;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C,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAErH,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;QACnD,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;QACnH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI,OAAO,EAAE,WAAW,KAAK,SAAS,IAAI,QAAQ,GAAG,GAAG,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAC/E,MAAM,IAAI,KAAK,CACb,eAAe,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,sCAAsC,OAAO,CAAC,WAAW,IAAI,CACxG,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { writeFile } from 'node:fs/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { basename, dirname, extname, join } from 'node:path';
|
|
3
3
|
import XMLBuilder from 'fast-xml-builder';
|
|
4
4
|
import { HandlerRegistry } from '../handlers/HandlerRegistry.js';
|
|
5
5
|
import { builderOptions, XML_HEADER_CONFIG } from '../utils/constants.js';
|
|
6
|
+
import { generateGitHubActions } from './generators/generateGitHubActions.js';
|
|
6
7
|
import { generateHtml } from './generators/generateHtml.js';
|
|
7
8
|
import { generateMarkdown } from './generators/generateMarkdown.js';
|
|
8
|
-
import { generateGitHubActions } from './generators/generateGitHubActions.js';
|
|
9
9
|
function isXmlReportFormat(format) {
|
|
10
10
|
return format in XML_HEADER_CONFIG;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportGenerator.js","sourceRoot":"","sources":["../../src/transformers/reportGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"reportGenerator.js","sourceRoot":"","sources":["../../src/transformers/reportGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAS1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAMpE,SAAS,iBAAiB,CAAC,MAAc;IACvC,OAAO,MAAM,IAAI,iBAAiB,CAAC;AACrC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAmF;IAC9G,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAyB,CAAC;IAC1D,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAyB,CAAC;IACtD,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAA6B,CAAC;IAClE,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,GAAkC,EAAE,IAAI,EAAE,cAAc,CAAC;IAChH,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CA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B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjF,OAAO,CAAC,MAAM,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5G,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,eAAe,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageDirectories.js","sourceRoot":"","sources":["../../src/utils/getPackageDirectories.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"getPackageDirectories.js","sourceRoot":"","sources":["../../src/utils/getPackageDirectories.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,iBAA2B;IAE3B,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,WAAW,EAAE,CAG1D,CAAC;IAEF,MAAM,cAAc,GAAW,MAAM,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACzE,MAAM,WAAW,GAAgB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAgB,CAAC;IAE3E,MAAM,kBAAkB,GAAG,WAAW,CAAC,kBAAkB;SACtD,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B;SAC/F,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAEzD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;AAC1C,CAAC"}
|
package/lib/utils/getRepoRoot.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { access } from 'node:fs/promises';
|
|
3
|
-
import {
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
4
|
async function findRepoRoot(dir) {
|
|
5
5
|
const filePath = join(dir, 'sfdx-project.json');
|
|
6
6
|
try {
|
|
@@ -8,11 +8,11 @@ async function findRepoRoot(dir) {
|
|
|
8
8
|
await access(filePath);
|
|
9
9
|
return { repoRoot: dir, dxConfigFilePath: filePath };
|
|
10
10
|
}
|
|
11
|
-
catch {
|
|
11
|
+
catch (error) {
|
|
12
12
|
const parentDir = dirname(dir);
|
|
13
13
|
if (dir === parentDir) {
|
|
14
14
|
// Reached the root without finding the file, throw an error
|
|
15
|
-
throw new Error('sfdx-project.json not found in any parent directory.');
|
|
15
|
+
throw new Error('sfdx-project.json not found in any parent directory.', { cause: error });
|
|
16
16
|
}
|
|
17
17
|
// Recursively search in the parent directory
|
|
18
18
|
return findRepoRoot(parentDir);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRepoRoot.js","sourceRoot":"","sources":["../../src/utils/getRepoRoot.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getRepoRoot.js","sourceRoot":"","sources":["../../src/utils/getRepoRoot.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,KAAK,UAAU,YAAY,CAAC,GAAW;IACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,6DAA6D;QAC7D,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,4DAA4D;YAC5D,MAAM,IAAI,KAAK,CAAC,sDAAsD,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5F,CAAC;QACD,6CAA6C;QAC7C,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;AAClC,CAAC"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-code-coverage-transformer",
|
|
3
|
-
"description": "Transform Salesforce Apex code coverage
|
|
4
|
-
"version": "2.23.
|
|
3
|
+
"description": "Transform Salesforce Apex code coverage JSON for SonarQube, SonarCloud, GitHub, GitLab, Azure, and Bitbucket",
|
|
4
|
+
"version": "2.23.1",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@oclif/core": "4.
|
|
7
|
-
"@salesforce/core": "8.
|
|
8
|
-
"@salesforce/sf-plugins-core": "12.2.
|
|
6
|
+
"@oclif/core": "4.11.11",
|
|
7
|
+
"@salesforce/core": "8.31.4",
|
|
8
|
+
"@salesforce/sf-plugins-core": "12.2.25",
|
|
9
9
|
"fast-xml-builder": "1.2.0"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@commitlint/
|
|
14
|
-
"@
|
|
15
|
-
"@salesforce/cli-plugins-testkit": "5.3.
|
|
12
|
+
"@biomejs/biome": "2.5.1",
|
|
13
|
+
"@commitlint/cli": "21.1.0",
|
|
14
|
+
"@commitlint/config-conventional": "21.1.0",
|
|
15
|
+
"@salesforce/cli-plugins-testkit": "5.3.62",
|
|
16
16
|
"@salesforce/dev-config": "4.3.3",
|
|
17
|
-
"@salesforce/prettier-config": "0.0.4",
|
|
18
17
|
"@stryker-mutator/core": "9.6.1",
|
|
19
18
|
"@stryker-mutator/vitest-runner": "9.6.1",
|
|
20
|
-
"@types/node": "
|
|
21
|
-
"@vitest/coverage-v8": "4.1.
|
|
22
|
-
"eslint-config-salesforce-typescript": "4.0.1",
|
|
23
|
-
"eslint-plugin-sf-plugin": "1.20.26",
|
|
19
|
+
"@types/node": "25.9.4",
|
|
20
|
+
"@vitest/coverage-v8": "4.1.9",
|
|
24
21
|
"husky": "9.1.7",
|
|
25
|
-
"
|
|
22
|
+
"knip": "6.23.0",
|
|
23
|
+
"lint-staged": "17.0.8",
|
|
24
|
+
"oclif": "4.23.24",
|
|
26
25
|
"shx": "0.4.0",
|
|
27
26
|
"ts-node": "10.9.2",
|
|
28
|
-
"typescript": "
|
|
29
|
-
"vitest": "4.1.
|
|
30
|
-
"wireit": "0.14.
|
|
27
|
+
"typescript": "6.0.3",
|
|
28
|
+
"vitest": "4.1.9",
|
|
29
|
+
"wireit": "0.14.13"
|
|
31
30
|
},
|
|
32
31
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
32
|
+
"node": ">=22.0.0"
|
|
34
33
|
},
|
|
35
34
|
"files": [
|
|
36
35
|
"/lib",
|
|
@@ -40,36 +39,30 @@
|
|
|
40
39
|
"/CHANGELOG.md"
|
|
41
40
|
],
|
|
42
41
|
"keywords": [
|
|
43
|
-
"force",
|
|
44
42
|
"salesforce",
|
|
45
43
|
"salesforcedx",
|
|
46
44
|
"sf",
|
|
47
45
|
"sf-plugin",
|
|
48
46
|
"sfdx",
|
|
49
47
|
"sfdx-plugin",
|
|
50
|
-
"xml",
|
|
51
|
-
"json",
|
|
52
|
-
"sonarqube",
|
|
53
|
-
"sonarcloud",
|
|
54
48
|
"apex",
|
|
55
49
|
"coverage",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"clover",
|
|
50
|
+
"code-coverage",
|
|
51
|
+
"test-coverage",
|
|
59
52
|
"converter",
|
|
60
53
|
"transformer",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"gitlab",
|
|
66
|
-
"github",
|
|
67
|
-
"azure",
|
|
68
|
-
"bitbucket",
|
|
54
|
+
"xml",
|
|
55
|
+
"json",
|
|
56
|
+
"cobertura",
|
|
57
|
+
"clover",
|
|
69
58
|
"jacoco",
|
|
70
59
|
"lcov",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
60
|
+
"sonarqube",
|
|
61
|
+
"sonarcloud",
|
|
62
|
+
"github",
|
|
63
|
+
"gitlab",
|
|
64
|
+
"azure",
|
|
65
|
+
"bitbucket"
|
|
73
66
|
],
|
|
74
67
|
"license": "MIT",
|
|
75
68
|
"oclif": {
|
|
@@ -90,27 +83,57 @@
|
|
|
90
83
|
"flexibleTaxonomy": true
|
|
91
84
|
},
|
|
92
85
|
"scripts": {
|
|
93
|
-
"command-docs": "oclif readme",
|
|
94
86
|
"build": "wireit",
|
|
95
|
-
"clean
|
|
87
|
+
"clean": "wireit",
|
|
88
|
+
"clean:build": "wireit",
|
|
89
|
+
"clean:package-manager": "wireit",
|
|
96
90
|
"compile": "wireit",
|
|
97
91
|
"format": "wireit",
|
|
98
92
|
"lint": "wireit",
|
|
93
|
+
"lint:dependencies": "wireit",
|
|
99
94
|
"postpack": "shx rm -f oclif.manifest.json oclif.lock",
|
|
100
95
|
"prepack": "wireit",
|
|
101
|
-
"prepare": "husky
|
|
96
|
+
"prepare": "husky",
|
|
102
97
|
"test": "wireit",
|
|
103
|
-
"test:compile": "wireit",
|
|
104
98
|
"test:mutation": "stryker run",
|
|
105
99
|
"test:mutation:incremental": "node scripts/incremental-mutation.mjs",
|
|
106
|
-
"test:nuts": "
|
|
107
|
-
"test:only": "wireit"
|
|
108
|
-
"version": "oclif readme"
|
|
100
|
+
"test:nuts": "wireit",
|
|
101
|
+
"test:only": "wireit"
|
|
109
102
|
},
|
|
110
103
|
"publishConfig": {
|
|
111
104
|
"access": "public"
|
|
112
105
|
},
|
|
113
106
|
"wireit": {
|
|
107
|
+
"clean": {
|
|
108
|
+
"command": "shx rm -rf 'reports/*' oclif.manifest.json oclif.lock package.tgz 'apex-code-coverage-transformer-*.tgz' 'stderr*.txt' 'stdout*.txt' '.stryker-tmp/*'",
|
|
109
|
+
"files": [
|
|
110
|
+
".stryker-tmp/*",
|
|
111
|
+
"lib",
|
|
112
|
+
"oclif.manifest.json",
|
|
113
|
+
"oclif.lock",
|
|
114
|
+
"package.tgz",
|
|
115
|
+
"reports/*",
|
|
116
|
+
"apex-code-coverage-transformer-v*.tgz",
|
|
117
|
+
"stderr*.txt",
|
|
118
|
+
"stdout*.txt"
|
|
119
|
+
],
|
|
120
|
+
"dependencies": [
|
|
121
|
+
"clean:build"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"clean:build": {
|
|
125
|
+
"command": "shx rm -rf lib .wireit",
|
|
126
|
+
"files": [
|
|
127
|
+
".wireit/*",
|
|
128
|
+
"lib/*"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"clean:package-manager": {
|
|
132
|
+
"command": "shx rm -rf node_modules tsconfig.tsbuildinfo",
|
|
133
|
+
"files": [
|
|
134
|
+
"node_modules/*"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
114
137
|
"build": {
|
|
115
138
|
"dependencies": [
|
|
116
139
|
"compile",
|
|
@@ -131,27 +154,38 @@
|
|
|
131
154
|
"clean": "if-file-deleted"
|
|
132
155
|
},
|
|
133
156
|
"format": {
|
|
134
|
-
"command": "
|
|
157
|
+
"command": "biome format --write src test",
|
|
135
158
|
"files": [
|
|
136
159
|
"src/**/*.ts",
|
|
137
160
|
"test/**/*.ts",
|
|
138
|
-
"
|
|
139
|
-
"command-snapshot.json",
|
|
140
|
-
".prettier*"
|
|
161
|
+
"biome.json"
|
|
141
162
|
],
|
|
142
163
|
"output": []
|
|
143
164
|
},
|
|
144
165
|
"lint": {
|
|
145
|
-
"command": "
|
|
166
|
+
"command": "biome check src test",
|
|
146
167
|
"files": [
|
|
147
168
|
"src/**/*.ts",
|
|
148
169
|
"test/**/*.ts",
|
|
149
170
|
"messages/**",
|
|
150
|
-
"
|
|
171
|
+
"biome.json",
|
|
151
172
|
"**/tsconfig.json"
|
|
152
173
|
],
|
|
153
174
|
"output": []
|
|
154
175
|
},
|
|
176
|
+
"lint:dependencies": {
|
|
177
|
+
"command": "knip",
|
|
178
|
+
"files": [
|
|
179
|
+
"src/**/*.ts",
|
|
180
|
+
"test/**/*.ts",
|
|
181
|
+
"knip.config.ts",
|
|
182
|
+
"package.json"
|
|
183
|
+
],
|
|
184
|
+
"output": [],
|
|
185
|
+
"dependencies": [
|
|
186
|
+
"lint"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
155
189
|
"prepack": {
|
|
156
190
|
"command": "oclif manifest && oclif readme",
|
|
157
191
|
"files": [
|
|
@@ -182,6 +216,19 @@
|
|
|
182
216
|
"lint"
|
|
183
217
|
]
|
|
184
218
|
},
|
|
219
|
+
"test:nuts": {
|
|
220
|
+
"command": "vitest run --config ./vitest.nut.config.ts && shx rm -f oclif.manifest.json oclif.lock *.tsbuildinfo",
|
|
221
|
+
"files": [
|
|
222
|
+
"test/**/*.nut.ts",
|
|
223
|
+
"**/tsconfig.json",
|
|
224
|
+
"vitest.nut.config.ts"
|
|
225
|
+
],
|
|
226
|
+
"output": [],
|
|
227
|
+
"dependencies": [
|
|
228
|
+
"build",
|
|
229
|
+
"prepack"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
185
232
|
"test:only": {
|
|
186
233
|
"command": "vitest run --coverage",
|
|
187
234
|
"env": {
|
|
@@ -195,35 +242,6 @@
|
|
|
195
242
|
"!*.nut.ts"
|
|
196
243
|
],
|
|
197
244
|
"output": []
|
|
198
|
-
},
|
|
199
|
-
"test:command-reference": {
|
|
200
|
-
"command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
|
|
201
|
-
"files": [
|
|
202
|
-
"src/**/*.ts",
|
|
203
|
-
"messages/**",
|
|
204
|
-
"package.json"
|
|
205
|
-
],
|
|
206
|
-
"output": [
|
|
207
|
-
"tmp/root"
|
|
208
|
-
]
|
|
209
|
-
},
|
|
210
|
-
"test:deprecation-policy": {
|
|
211
|
-
"command": "\"./bin/dev\" snapshot:compare",
|
|
212
|
-
"files": [
|
|
213
|
-
"src/**/*.ts"
|
|
214
|
-
],
|
|
215
|
-
"output": [],
|
|
216
|
-
"dependencies": [
|
|
217
|
-
"compile"
|
|
218
|
-
]
|
|
219
|
-
},
|
|
220
|
-
"test:json-schema": {
|
|
221
|
-
"command": "\"./bin/dev\" schema:compare",
|
|
222
|
-
"files": [
|
|
223
|
-
"src/**/*.ts",
|
|
224
|
-
"schemas"
|
|
225
|
-
],
|
|
226
|
-
"output": []
|
|
227
245
|
}
|
|
228
246
|
},
|
|
229
247
|
"exports": "./lib/index.js",
|