flakiness 0.253.0 → 0.255.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/lib/cli/cli.js +9 -7
- package/lib/junit.js +1 -1
- package/package.json +3 -3
- package/types/tsconfig.tsbuildinfo +1 -1
package/lib/cli/cli.js
CHANGED
|
@@ -1033,7 +1033,7 @@ import path7 from "path";
|
|
|
1033
1033
|
// ../package.json
|
|
1034
1034
|
var package_default = {
|
|
1035
1035
|
name: "@flakiness/monorepo",
|
|
1036
|
-
version: "0.
|
|
1036
|
+
version: "0.255.0",
|
|
1037
1037
|
type: "module",
|
|
1038
1038
|
private: true,
|
|
1039
1039
|
scripts: {
|
|
@@ -1514,7 +1514,7 @@ async function cmdAuthLogin(endpoint = DEFAULT_FLAKINESS_ENDPOINT) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
1516
|
// src/cli/cmd-convert.ts
|
|
1517
|
-
import { CIUtils, GitWorktree, writeReport } from "@flakiness/sdk";
|
|
1517
|
+
import { CIUtils, GitWorktree, ReportUtils as ReportUtils2, writeReport } from "@flakiness/sdk";
|
|
1518
1518
|
import fs3 from "fs/promises";
|
|
1519
1519
|
import path3 from "path";
|
|
1520
1520
|
|
|
@@ -1733,7 +1733,7 @@ async function traverseJUnitReport(context, node) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
async function parseJUnit(xmls, options) {
|
|
1735
1735
|
const report = {
|
|
1736
|
-
category: "junit",
|
|
1736
|
+
category: options.category ?? "junit",
|
|
1737
1737
|
commitId: options.commitId,
|
|
1738
1738
|
duration: options.runDuration,
|
|
1739
1739
|
startTimestamp: options.runStartTimestamp,
|
|
@@ -1803,9 +1803,10 @@ async function cmdConvert(junitPath, options) {
|
|
|
1803
1803
|
}
|
|
1804
1804
|
const { report, attachments } = await parseJUnit(xmlContents, {
|
|
1805
1805
|
commitId,
|
|
1806
|
-
defaultEnv: { name: options.envName },
|
|
1806
|
+
defaultEnv: ReportUtils2.createEnvironment({ name: options.envName }),
|
|
1807
1807
|
runStartTimestamp: Date.now(),
|
|
1808
|
-
runDuration: 0
|
|
1808
|
+
runDuration: 0,
|
|
1809
|
+
category: options.category
|
|
1809
1810
|
});
|
|
1810
1811
|
report.title = options.title ?? CIUtils.runTitle();
|
|
1811
1812
|
if (options.flakinessProject)
|
|
@@ -2436,13 +2437,14 @@ program.command("show").description("Show flakiness report").argument("[relative
|
|
|
2436
2437
|
reportViewerUrl: options.viewerUrl
|
|
2437
2438
|
});
|
|
2438
2439
|
}));
|
|
2439
|
-
program.command("convert-junit").description("Convert JUnit XML report(s) to Flakiness report format").argument("<junit-root-dir-path>", "Path to JUnit XML file or directory containing XML files").option("--env-name <name>", "Environment name for the report
|
|
2440
|
+
program.command("convert-junit").description("Convert JUnit XML report(s) to Flakiness report format").argument("<junit-root-dir-path>", "Path to JUnit XML file or directory containing XML files").option("--env-name <name>", "Environment name for the report (defaults to --category, or `junit` if neither is set)").option("--commit-id <id>", "Git commit ID (auto-detected if not provided)").addOption(new Option("--title <title>", "Human-readable report title (auto-detected from CI if not provided)").env("FLAKINESS_TITLE")).option("--output-dir <dir>", "Output directory for the report", "flakiness-report").option("-c, --category <category>", "Report category identifier (e.g. bun, rust). Defaults to `junit`.").addOption(optFlakinessProject).action(async (junitPath, options) => {
|
|
2440
2441
|
await runCommand(async () => {
|
|
2441
2442
|
await cmdConvert(junitPath, {
|
|
2442
|
-
envName: options.envName,
|
|
2443
|
+
envName: options.envName ?? options.category ?? "junit",
|
|
2443
2444
|
outputDir: options.outputDir,
|
|
2444
2445
|
commitId: options.commitId,
|
|
2445
2446
|
title: options.title,
|
|
2447
|
+
category: options.category,
|
|
2446
2448
|
flakinessProject: options.project
|
|
2447
2449
|
});
|
|
2448
2450
|
});
|
package/lib/junit.js
CHANGED
|
@@ -213,7 +213,7 @@ async function traverseJUnitReport(context, node) {
|
|
|
213
213
|
}
|
|
214
214
|
async function parseJUnit(xmls, options) {
|
|
215
215
|
const report = {
|
|
216
|
-
category: "junit",
|
|
216
|
+
category: options.category ?? "junit",
|
|
217
217
|
commitId: options.commitId,
|
|
218
218
|
duration: options.runDuration,
|
|
219
219
|
startTimestamp: options.runStartTimestamp,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flakiness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.255.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"flakiness": "./lib/cli/cli.js"
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@types/debug": "^4.1.13",
|
|
24
24
|
"@types/express": "^4.17.25",
|
|
25
25
|
"gray-matter": "^4.0.3",
|
|
26
|
-
"@flakiness/server": "0.
|
|
27
|
-
"@flakiness/shared": "0.
|
|
26
|
+
"@flakiness/server": "0.255.0",
|
|
27
|
+
"@flakiness/shared": "0.255.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@flakiness/flakiness-report": "^0.33.0",
|