allure-playwright 2.0.0-beta.11 → 2.0.0-beta.15
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/README.md +63 -1
- package/dist/helpers.d.ts +24 -0
- package/dist/helpers.js +105 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -12
- package/dist/index.js.map +1 -1
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -7,7 +7,9 @@ This project implements Allure integration with [Playwright Test](https://playwr
|
|
|
7
7
|
```bash
|
|
8
8
|
npm i -D @playwright/test allure-playwright
|
|
9
9
|
```
|
|
10
|
+
|
|
10
11
|
or via yarn:
|
|
12
|
+
|
|
11
13
|
```bash
|
|
12
14
|
yarn add @playwright/test allure-playwright --dev
|
|
13
15
|
```
|
|
@@ -18,7 +20,7 @@ Either add **allure-playwright** into **playwright.config.ts**:
|
|
|
18
20
|
|
|
19
21
|
```js
|
|
20
22
|
{
|
|
21
|
-
reporter:
|
|
23
|
+
reporter: "allure-playwright";
|
|
22
24
|
}
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -31,12 +33,72 @@ npx playwright test --reporter=line,allure-playwright
|
|
|
31
33
|
Specify location for allure results:
|
|
32
34
|
|
|
33
35
|
Mac / Linux
|
|
36
|
+
|
|
34
37
|
```bash
|
|
35
38
|
ALLURE_RESULTS_DIR=my-allure-results npx playwright test --reporter=line,allure-playwright
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
Windows
|
|
42
|
+
|
|
39
43
|
```bash
|
|
40
44
|
set ALLURE_RESULTS_DIR=my-allure-results
|
|
41
45
|
npx playwright test --reporter=line,allure-playwright
|
|
42
46
|
```
|
|
47
|
+
|
|
48
|
+
## Proving extra information
|
|
49
|
+
|
|
50
|
+
You can use allure labels to provide extra information about tests such via
|
|
51
|
+
|
|
52
|
+
- label
|
|
53
|
+
- link
|
|
54
|
+
- id
|
|
55
|
+
- epic
|
|
56
|
+
- feature
|
|
57
|
+
- story
|
|
58
|
+
- suite
|
|
59
|
+
- parentSuite
|
|
60
|
+
- subSuite
|
|
61
|
+
- owner
|
|
62
|
+
- severity
|
|
63
|
+
- tag
|
|
64
|
+
- issue
|
|
65
|
+
- tms
|
|
66
|
+
|
|
67
|
+
### Labels Usage
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
import { test, expect } from "@playwright/test";
|
|
71
|
+
import { allure } from "allure-playwright";
|
|
72
|
+
|
|
73
|
+
test("basic test", async ({ page }, testInfo) => {
|
|
74
|
+
allure.epic("Some Epic");
|
|
75
|
+
allure.story("Some Story");
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Links Usage
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
import { test, expect } from "@playwright/test";
|
|
83
|
+
import { allure } from "allure-playwright";
|
|
84
|
+
|
|
85
|
+
test("basic test", async ({ page }, testInfo) => {
|
|
86
|
+
allure.link({ url: "https://playwright.dev", name: "playwright-site" });
|
|
87
|
+
allure.issue({
|
|
88
|
+
url: "https://github.com/allure-framework/allure-js/issues/352",
|
|
89
|
+
name: "Target issue",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Attachments Usage
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
import { test, expect } from "@playwright/test";
|
|
98
|
+
|
|
99
|
+
test("basic test", async ({ page }, testInfo) => {
|
|
100
|
+
const path = testInfo.outputPath("screenshot.png");
|
|
101
|
+
await page.screenshot({ path });
|
|
102
|
+
testInfo.attachments.push({ name: "screenshot", path, contentType: "image/png" });
|
|
103
|
+
});
|
|
104
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Label, Link } from "allure-js-commons";
|
|
2
|
+
export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
|
|
3
|
+
export interface Metadata {
|
|
4
|
+
labels?: Label[];
|
|
5
|
+
links?: Link[];
|
|
6
|
+
}
|
|
7
|
+
export declare class allure {
|
|
8
|
+
static addMetadataAttachment(metadata: Metadata): void;
|
|
9
|
+
static label(label: Label | Label[]): void;
|
|
10
|
+
static link(link: Link): void;
|
|
11
|
+
static id(id: string): void;
|
|
12
|
+
static epic(epic: string): void;
|
|
13
|
+
static feature(epic: string): void;
|
|
14
|
+
static story(story: string): void;
|
|
15
|
+
static suite(name: string): void;
|
|
16
|
+
static parentSuite(name: string): void;
|
|
17
|
+
static subSuite(name: string): void;
|
|
18
|
+
static owner(owner: string): void;
|
|
19
|
+
static severity(severity: string): void;
|
|
20
|
+
static tag(tag: string): void;
|
|
21
|
+
static issue(issueData: Omit<Link, "type">): void;
|
|
22
|
+
static tms(issueData: Omit<Link, "type">): void;
|
|
23
|
+
}
|
|
24
|
+
export { LabelName } from "allure-js-commons";
|
package/dist/helpers.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LabelName = exports.allure = exports.ALLURE_METADATA_CONTENT_TYPE = void 0;
|
|
7
|
+
const test_1 = __importDefault(require("@playwright/test"));
|
|
8
|
+
const allure_js_commons_1 = require("allure-js-commons");
|
|
9
|
+
exports.ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
|
|
10
|
+
class allure {
|
|
11
|
+
static addMetadataAttachment(metadata) {
|
|
12
|
+
test_1.default.info().attach("allure-metadata.json", {
|
|
13
|
+
contentType: exports.ALLURE_METADATA_CONTENT_TYPE,
|
|
14
|
+
body: Buffer.from(JSON.stringify(metadata), "utf8"),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
static label(label) {
|
|
18
|
+
this.addMetadataAttachment({
|
|
19
|
+
labels: Array.isArray(label) ? label : [label],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
static link(link) {
|
|
23
|
+
this.addMetadataAttachment({
|
|
24
|
+
links: Array.isArray(link) ? link : [link],
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
static id(id) {
|
|
28
|
+
this.label({
|
|
29
|
+
value: id,
|
|
30
|
+
name: allure_js_commons_1.LabelName.AS_ID,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
static epic(epic) {
|
|
34
|
+
this.label({
|
|
35
|
+
name: allure_js_commons_1.LabelName.EPIC,
|
|
36
|
+
value: epic,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
static feature(epic) {
|
|
40
|
+
this.label({
|
|
41
|
+
name: allure_js_commons_1.LabelName.FEATURE,
|
|
42
|
+
value: epic,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
static story(story) {
|
|
46
|
+
this.label({
|
|
47
|
+
name: allure_js_commons_1.LabelName.STORY,
|
|
48
|
+
value: story,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
static suite(name) {
|
|
52
|
+
this.label({
|
|
53
|
+
name: allure_js_commons_1.LabelName.SUITE,
|
|
54
|
+
value: name,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
static parentSuite(name) {
|
|
58
|
+
this.label({
|
|
59
|
+
name: allure_js_commons_1.LabelName.PARENT_SUITE,
|
|
60
|
+
value: name,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
static subSuite(name) {
|
|
64
|
+
this.label({
|
|
65
|
+
name: allure_js_commons_1.LabelName.SUB_SUITE,
|
|
66
|
+
value: name,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
static owner(owner) {
|
|
70
|
+
this.label({
|
|
71
|
+
name: allure_js_commons_1.LabelName.OWNER,
|
|
72
|
+
value: owner,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
static severity(severity) {
|
|
76
|
+
this.label({
|
|
77
|
+
name: allure_js_commons_1.LabelName.SEVERITY,
|
|
78
|
+
value: severity,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
static tag(tag) {
|
|
82
|
+
this.label({
|
|
83
|
+
name: allure_js_commons_1.LabelName.TAG,
|
|
84
|
+
value: tag,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
static issue(issueData) {
|
|
88
|
+
this.link({
|
|
89
|
+
url: issueData.url,
|
|
90
|
+
name: issueData.name,
|
|
91
|
+
type: allure_js_commons_1.LinkType.ISSUE,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
static tms(issueData) {
|
|
95
|
+
this.link({
|
|
96
|
+
url: issueData.url,
|
|
97
|
+
name: issueData.name,
|
|
98
|
+
type: allure_js_commons_1.LinkType.TMS,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.allure = allure;
|
|
103
|
+
var allure_js_commons_2 = require("allure-js-commons");
|
|
104
|
+
Object.defineProperty(exports, "LabelName", { enumerable: true, get: function () { return allure_js_commons_2.LabelName; } });
|
|
105
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,yDAAqE;AAGxD,QAAA,4BAA4B,GAAG,sCAAsC,CAAC;AAMnF,MAAa,MAAM;IACjB,MAAM,CAAC,qBAAqB,CAAC,QAAkB;QAC7C,cAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,sBAAsB,EAAC;YACxC,WAAW,EAAE,oCAA4B;YACzC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;SACpD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAsB;QACjC,IAAI,CAAC,qBAAqB,CAA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
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
5
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
6
17
|
const path_1 = __importDefault(require("path"));
|
|
7
18
|
const allure_js_commons_1 = require("allure-js-commons");
|
|
19
|
+
const helpers_1 = require("./helpers");
|
|
8
20
|
class AllureReporter {
|
|
9
21
|
onBegin(config, suite) {
|
|
10
22
|
this.config = config;
|
|
@@ -20,6 +32,7 @@ class AllureReporter {
|
|
|
20
32
|
const resultsDir = process.env.ALLURE_RESULTS_DIR || path_1.default.join(process.cwd(), "allure-results");
|
|
21
33
|
const runtime = new allure_js_commons_1.AllureRuntime({ resultsDir, writer: writerForTest });
|
|
22
34
|
const processSuite = (suite, parent) => {
|
|
35
|
+
var _a, _b;
|
|
23
36
|
const groupName = "Root";
|
|
24
37
|
const group = parent.startGroup(groupName);
|
|
25
38
|
for (const test of suite.tests) {
|
|
@@ -41,7 +54,7 @@ class AllureReporter {
|
|
|
41
54
|
}
|
|
42
55
|
allureTest.historyId = test.titlePath().slice(1).join(" ");
|
|
43
56
|
allureTest.fullName = test.title;
|
|
44
|
-
allureTest.status = statusToAllureStats(result.status);
|
|
57
|
+
allureTest.status = statusToAllureStats(result.status, test.expectedStatus);
|
|
45
58
|
if (result.error) {
|
|
46
59
|
const message = result.error.message && stripAscii(result.error.message);
|
|
47
60
|
let trace = result.error.stack && stripAscii(result.error.stack);
|
|
@@ -53,11 +66,32 @@ class AllureReporter {
|
|
|
53
66
|
trace,
|
|
54
67
|
};
|
|
55
68
|
}
|
|
69
|
+
for (const step of result.steps) {
|
|
70
|
+
appendStep(allureTest, step);
|
|
71
|
+
}
|
|
56
72
|
for (const attachment of result.attachments) {
|
|
57
|
-
|
|
73
|
+
if (!attachment.body && !attachment.path) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (attachment.contentType === helpers_1.ALLURE_METADATA_CONTENT_TYPE) {
|
|
77
|
+
if (!attachment.body) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const metadata = JSON.parse(attachment.body.toString());
|
|
81
|
+
(_a = metadata.links) === null || _a === void 0 ? void 0 : _a.forEach((val) => allureTest.addLink(val.url, val.name, val.type));
|
|
82
|
+
(_b = metadata.labels) === null || _b === void 0 ? void 0 : _b.forEach((val) => allureTest.addLabel(val.name, val.value));
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
let fileName;
|
|
58
86
|
if (attachment.body) {
|
|
59
87
|
fileName = runtime.writeAttachment(attachment.body, attachment.contentType);
|
|
60
88
|
}
|
|
89
|
+
else {
|
|
90
|
+
if (!fs_1.default.existsSync(attachment.path)) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
fileName = runtime.writeAttachmentFromPath(attachment.path, attachment.contentType);
|
|
94
|
+
}
|
|
61
95
|
allureTest.addAttachment(attachment.name, attachment.contentType, fileName);
|
|
62
96
|
if (attachment.name === "diff") {
|
|
63
97
|
allureTest.addLabel("testType", "screenshotDiff");
|
|
@@ -89,21 +123,30 @@ class AllureReporter {
|
|
|
89
123
|
}
|
|
90
124
|
}
|
|
91
125
|
}
|
|
92
|
-
const statusToAllureStats = (status) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return allure_js_commons_1.Status.FAILED;
|
|
96
|
-
case "passed":
|
|
97
|
-
return allure_js_commons_1.Status.PASSED;
|
|
98
|
-
case "skipped":
|
|
99
|
-
return allure_js_commons_1.Status.SKIPPED;
|
|
100
|
-
case "timedOut":
|
|
101
|
-
return allure_js_commons_1.Status.BROKEN;
|
|
126
|
+
const statusToAllureStats = (status, expectedStatus) => {
|
|
127
|
+
if (status === "skipped") {
|
|
128
|
+
return allure_js_commons_1.Status.SKIPPED;
|
|
102
129
|
}
|
|
130
|
+
if (status === "timedOut") {
|
|
131
|
+
return allure_js_commons_1.Status.BROKEN;
|
|
132
|
+
}
|
|
133
|
+
if (status === expectedStatus) {
|
|
134
|
+
return allure_js_commons_1.Status.PASSED;
|
|
135
|
+
}
|
|
136
|
+
return allure_js_commons_1.Status.FAILED;
|
|
103
137
|
};
|
|
104
138
|
exports.default = AllureReporter;
|
|
105
139
|
const asciiRegex = new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))", "g");
|
|
106
140
|
const stripAscii = (str) => {
|
|
107
141
|
return str.replace(asciiRegex, "");
|
|
108
142
|
};
|
|
143
|
+
const appendStep = (parent, step) => {
|
|
144
|
+
const allureStep = parent.startStep(step.title, step.startTime.getTime());
|
|
145
|
+
allureStep.endStep(step.startTime.getTime() + step.duration);
|
|
146
|
+
allureStep.status = step.error ? allure_js_commons_1.Status.FAILED : allure_js_commons_1.Status.PASSED;
|
|
147
|
+
for (const child of step.steps || []) {
|
|
148
|
+
appendStep(allureStep, child);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
__exportStar(require("./helpers"), exports);
|
|
109
152
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA,4CAAoB;AACpB,gDAAwB;AAGxB,yDAS2B;AAE3B,uCAAmE;AAEnE,MAAM,cAAc;IAIlB,OAAO,CAAC,MAAkB,EAAE,KAAY;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,KAAK;QACH,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,iCAAiC;YACjE,CAAC,CAAC,IAAI,wCAAoB,EAAE;YAC5B,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;QAChG,MAAM,OAAO,GAAG,IAAI,iCAAa,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;QACzE,MAAM,YAAY,GAAG,CAAC,KAAY,EAAE,MAAmC,EAAQ,EAAE;;YAC/E,MAAM,SAAS,GAAG,MAAM,CAAC;YACzB,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC3C,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE;gBAC9B,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;oBACjC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;oBAC7C,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;oBAC5C,MAAM,UAA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D,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,0BAAM,CAAC,MAAM,CAAC,CAAC,CAAC,0BAAM,CAAC,MAAM,CAAC;IAC/D,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE;QACpC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;KAC/B;AACH,CAAC,CAAC;AAEF,4CAA0B"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-playwright",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.15",
|
|
4
4
|
"description": "Allure Playwright integration",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Microsoft Corporation"
|
|
8
8
|
},
|
|
9
|
-
"repository": "https://github.com/allure-framework/allure-
|
|
9
|
+
"repository": "https://github.com/allure-framework/allure-js",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"playwright",
|
|
12
12
|
"allure"
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"clean": "rimraf ./dist ./out",
|
|
18
18
|
"compile": "tsc",
|
|
19
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
20
|
-
"build": "npm run compile",
|
|
21
19
|
"generate-report": "allure generate ./out/allure-results -o ./out/allure-report --clean",
|
|
22
20
|
"allure-report": "allure serve ./out/allure-results",
|
|
23
21
|
"test": "playwright test -c test",
|
|
@@ -25,10 +23,16 @@
|
|
|
25
23
|
"lint:fix": "eslint ./src --ext .ts --fix"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
|
-
"@playwright/test": "^1.
|
|
26
|
+
"@playwright/test": "^1.18.0",
|
|
27
|
+
"eslint": "^7.32.0",
|
|
28
|
+
"prettier": "^2.3.2",
|
|
29
|
+
"rimraf": "^3.0.2",
|
|
30
|
+
"typescript": "^4.4.2"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"allure-js-commons": "
|
|
33
|
+
"allure-js-commons": "2.0.0-beta.15"
|
|
32
34
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
]
|
|
38
|
+
}
|