@allurereport/reader 3.16.1 → 3.17.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.
@@ -37,6 +37,10 @@ const matchesAllure2File = (fileName) => {
37
37
  return true;
38
38
  if (fileName.endsWith("-check.json"))
39
39
  return true;
40
+ if (fileName.endsWith("-perf.json"))
41
+ return true;
42
+ if (fileName === "performance.json")
43
+ return true;
40
44
  if (fileName.endsWith("-container.json"))
41
45
  return true;
42
46
  if (fileName.endsWith("-globals.json"))
@@ -72,6 +76,20 @@ export const allure2 = {
72
76
  return false;
73
77
  }
74
78
  }
79
+ if (originalFileName.endsWith("-perf.json") || originalFileName === "performance.json") {
80
+ try {
81
+ const results = await data.asJson();
82
+ if (!Array.isArray(results)) {
83
+ return false;
84
+ }
85
+ await visitor.visitMetrics(results, { readerId, metadata: { originalFileName } });
86
+ return true;
87
+ }
88
+ catch (e) {
89
+ console.error("error parsing", originalFileName, e);
90
+ return false;
91
+ }
92
+ }
75
93
  if (originalFileName.endsWith("-result.json")) {
76
94
  try {
77
95
  const parsed = await data.asJson();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/reader",
3
- "version": "3.16.1",
3
+ "version": "3.17.0",
4
4
  "description": "Collection of utilities which helps to process different kind of test results as Allure Results",
5
5
  "keywords": [
6
6
  "allure",
@@ -26,9 +26,9 @@
26
26
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
27
27
  },
28
28
  "dependencies": {
29
- "@allurereport/core-api": "3.16.1",
30
- "@allurereport/plugin-api": "3.16.1",
31
- "@allurereport/reader-api": "3.16.1",
29
+ "@allurereport/core-api": "3.17.0",
30
+ "@allurereport/plugin-api": "3.17.0",
31
+ "@allurereport/reader-api": "3.17.0",
32
32
  "fast-xml-parser": "^5.7.0"
33
33
  },
34
34
  "devDependencies": {