Skip to content

Commit a600f29

Browse files
chore: rename package to ctrf-cli (#8)
1 parent ac6c20e commit a600f29

File tree

6 files changed

+16
-33
lines changed

6 files changed

+16
-33
lines changed

CHANGELOG.md

Whitespace-only changes.

README.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CTRF CLI
22

3-
Various CTRF utilities available programatically and by command line
3+
Various CTRF utilities available from the command line
44

55
<div align="center">
66
<div style="padding: 1.5rem; border-radius: 8px; margin: 1rem 0; border: 1px solid #30363d;">
@@ -39,7 +39,7 @@ This might be useful if you need a single report, but your chosen reporter gener
3939
To merge CTRF reports in a specified directory, use the following command:
4040

4141
```sh
42-
npx ctrf merge <directory>
42+
npx ctrf-cli merge <directory>
4343
```
4444

4545
Replace `directory` with the path to the directory containing the CTRF reports you want to merge.
@@ -49,19 +49,19 @@ Replace `directory` with the path to the directory containing the CTRF reports y
4949
-o, --output `filename`: Output file name for the merged report. Default is ctrf-report.json.
5050

5151
```sh
52-
npx ctrf merge <directory> --output my-merged-report.json
52+
npx ctrf-cli merge <directory> --output my-merged-report.json
5353
```
5454

5555
-d, --output-dir `directory`: Output directory for the merged report. Default is the same directory as the input reports.
5656

5757
```sh
58-
npx ctrf merge <directory> --output-dir /path/to/output
58+
npx ctrf-cli merge <directory> --output-dir /path/to/output
5959
```
6060

6161
-k, --keep-reports: Keep existing reports after merging. By default, the original reports will be deleted after merging.
6262

6363
```sh
64-
npx ctrf merge <directory> --keep-reports
64+
npx ctrf-cli merge <directory> --keep-reports
6565
```
6666

6767
## Flaky
@@ -72,7 +72,7 @@ Usage
7272
To output flaky tests, use the following command:
7373

7474
```sh
75-
npx ctrf flaky <file-path>
75+
npx ctrf-cli flaky <file-path>
7676
```
7777

7878
Replace <file-path> with the path to the CTRF report file you want to analyze.
@@ -87,22 +87,6 @@ Found 1 flaky test(s) in reports/sample-report.json:
8787
- Test Name: Test 1, Retries: 2
8888
```
8989

90-
## Programmatic Methods
91-
92-
```sh
93-
npm install ctrf
94-
```
95-
96-
The following programmatic methods are available:
97-
98-
`mergeReports` - This method merges multiple CTRF reports into a single report.
99-
100-
`readSingleReport` - Reads and parses a single CTRF report file from a specified file path.
101-
102-
`readReportsFromDirectory` - Reads all CTRF report files from a given directory.
103-
104-
`readReportsFromGlobPattern` - Reads all CTRF report files from a given glob pattern.
105-
10690
## What is CTRF?
10791

10892
CTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ctrf",
3-
"version": "0.0.12",
4-
"description": "",
2+
"name": "ctrf-cli",
3+
"version": "0.0.1",
4+
"description": "Various CTRF utilities available from the command line",
55
"main": "dist/index.js",
66
"bin": {
77
"ctrf": "dist/cli.js"
@@ -13,10 +13,7 @@
1313
"dist/",
1414
"README.md"
1515
],
16-
"repository": {
17-
"type": "git",
18-
"url": "https://github.com/ctrf-io/ctrf-cli"
19-
},
16+
"repository": "github:ctrf-io/ctrf-cli",
2017
"homepage": "https://ctrf.io",
2118
"author": "Matthew Thomas",
2219
"license": "MIT",

src/methods/merge-reports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// TO BE REMOVED, WILL USE THE CTRF LIBRARY INSTEAD
12
import { CtrfReport, Summary } from "../../types/ctrf";
23

34
/**

src/methods/read-reports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// TO BE REMOVED, WILL USE THE CTRF LIBRARY INSTEAD
12
import fs from 'fs';
23
import path from 'path';
34
import { CtrfReport } from '../../types/ctrf';

0 commit comments

Comments
 (0)