playwright-slack-report 1.1.93 → 1.1.95

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.
Files changed (2) hide show
  1. package/dist/cli.js +4 -5
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -64,6 +64,10 @@ program
64
64
  const agent = config.proxy ? new https_proxy_agent_1.HttpsProxyAgent(config.proxy) : undefined;
65
65
  const resultsParser = new ResultsParser_1.default();
66
66
  const resultSummary = await resultsParser.parseFromJsonFile(preCheckResult.jsonPath);
67
+ if (config.sendResults === 'on-failure' && resultSummary.failed === 0) {
68
+ console.log('⏩ Slack CLI reporter - no failures found');
69
+ process.exit(0);
70
+ }
67
71
  if (config.sendUsingBot) {
68
72
  const slackClient = new SlackClient_1.default(new web_api_1.WebClient(process.env.SLACK_BOT_USER_OAUTH_TOKEN, {
69
73
  logLevel: config.slackLogLevel,
@@ -109,11 +113,6 @@ async function sendResultsUsingBot({ resultSummary, slackClient, config, }) {
109
113
  if (config.slackLogLevel === web_api_1.LogLevel.DEBUG) {
110
114
  console.log({ config });
111
115
  }
112
- if (resultSummary.failures.length === 0
113
- && config.sendResults === 'on-failure') {
114
- console.log('⏩ Slack CLI reporter - no failures found');
115
- return true;
116
- }
117
116
  let summaryResults = resultSummary;
118
117
  const meta = replaceEnvVars(config.meta);
119
118
  summaryResults = { ...resultSummary, meta };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "dependencies": {
3
- "@slack/web-api": "^7.9.1",
3
+ "@slack/web-api": "^7.9.2",
4
4
  "@slack/webhook": "^7.0.5",
5
- "commander": "^13.0.0",
5
+ "commander": "^14.0.0",
6
6
  "https-proxy-agent": "^7.0.6",
7
7
  "ts-node": "^10.9.2",
8
- "zod": "^3.24.4"
8
+ "zod": "^3.25.28"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@playwright/test": "^1.52.0",
12
12
  "@slack/types": "^2.14.0",
13
- "@types/node": ">=22.15.17",
13
+ "@types/node": ">=22.15.21",
14
14
  "@typescript-eslint/eslint-plugin": "^5.30.6",
15
15
  "@typescript-eslint/parser": "^5.30.6",
16
16
  "dotenv": "^16.5.0",
@@ -36,7 +36,7 @@
36
36
  "cli-debug": "yarn build && npx . -c ./cli_config.json -j ./tests/test_data/valid_test_results.json"
37
37
  },
38
38
  "name": "playwright-slack-report",
39
- "version": "1.1.93",
39
+ "version": "1.1.95",
40
40
  "bin": {
41
41
  "playwright-slack-report": "dist/cli.js"
42
42
  },