playwright-slack-report-burak 3.0.14 → 3.0.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/dist/src/ResultsParser.js +14 -0
- package/dist/src/SlackReporter.js +17 -0
- package/package.json +1 -1
|
@@ -18,6 +18,18 @@ try {
|
|
|
18
18
|
AdmZip = null;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
// Get package version
|
|
22
|
+
let packageVersion = 'unknown';
|
|
23
|
+
try {
|
|
24
|
+
const packageJsonPath = path.join(__dirname, '../../package.json');
|
|
25
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
26
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
27
|
+
packageVersion = packageJson.version || 'unknown';
|
|
28
|
+
}
|
|
29
|
+
} catch (e) {
|
|
30
|
+
// Version detection failed, use default
|
|
31
|
+
}
|
|
32
|
+
|
|
21
33
|
class ResultsParser {
|
|
22
34
|
result;
|
|
23
35
|
separateFlakyTests;
|
|
@@ -34,6 +46,8 @@ class ResultsParser {
|
|
|
34
46
|
constructor(options = { separateFlakyTests: false }) {
|
|
35
47
|
this.result = [];
|
|
36
48
|
this.separateFlakyTests = options.separateFlakyTests;
|
|
49
|
+
// Log package version
|
|
50
|
+
console.log(`📦 [ResultsParser] playwright-slack-report-burak v${packageVersion}`);
|
|
37
51
|
// Log shard detection in ResultsParser
|
|
38
52
|
console.log('🔍 [ResultsParser] Initialized with shard detection:');
|
|
39
53
|
console.log(`🔍 MATRIX_SHARD env: ${process.env.MATRIX_SHARD !== undefined ? `"${process.env.MATRIX_SHARD}"` : 'undefined'}`);
|
|
@@ -13,6 +13,21 @@ try {
|
|
|
13
13
|
// axios optional for GitHub Actions API detection
|
|
14
14
|
axios = null;
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
// Get package version
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
let packageVersion = 'unknown';
|
|
21
|
+
try {
|
|
22
|
+
const packageJsonPath = path.join(__dirname, '../../package.json');
|
|
23
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
24
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
25
|
+
packageVersion = packageJson.version || 'unknown';
|
|
26
|
+
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
// Version detection failed, use default
|
|
29
|
+
}
|
|
30
|
+
|
|
16
31
|
class SlackReporter {
|
|
17
32
|
customLayout;
|
|
18
33
|
customLayoutAsync;
|
|
@@ -32,6 +47,8 @@ class SlackReporter {
|
|
|
32
47
|
separateFlaky = false;
|
|
33
48
|
logs = [];
|
|
34
49
|
onBegin(fullConfig, suite) {
|
|
50
|
+
// Log package version
|
|
51
|
+
console.log(`📦 [SlackReporter] playwright-slack-report-burak v${packageVersion}`);
|
|
35
52
|
this.suite = suite;
|
|
36
53
|
this.logs = [];
|
|
37
54
|
const slackReporterConfig = fullConfig.reporter.filter((f) => f[0].toLowerCase().includes('slackreporter'))[0][1];
|
package/package.json
CHANGED