@reportforge/playwright-pdf 0.15.0 → 0.15.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [0.15.1] - 2026-07-07
7
+
8
+ ### Changed
9
+
10
+ - **Release Recommendation copy is dash-free and data-driven.** The banner verdict reads `HOLD: N FAILURES` and the detail line now carries the per-run root-cause tally from failure analysis, e.g. "3 of 21 tests failed (2 assertion, 1 timeout). Each failure may be a product defect or an automation script issue. Review and verify manually before shipping." Falls back to the plain count when analysis is off; `flaky-by-retry` is excluded from the tally (flaky tests keep their own suffix). Timed-out variant matches.
11
+
12
+ ---
13
+
6
14
  ## [0.15.0] - 2026-07-07
7
15
 
8
16
  ### Changed
package/dist/cli/index.js CHANGED
@@ -6375,16 +6375,24 @@ var init_duration = __esm({
6375
6375
  });
6376
6376
 
6377
6377
  // src/analysis/SummaryWriter.ts
6378
- function buildOneLiner(clusters) {
6379
- if (clusters.length === 0) return "";
6378
+ function tallyEntries(clusters) {
6380
6379
  const byCategory = /* @__PURE__ */ new Map();
6381
6380
  for (const c of clusters) {
6382
6381
  byCategory.set(c.category, (byCategory.get(c.category) ?? 0) + c.count);
6383
6382
  }
6383
+ return [...byCategory.entries()].sort((a, b) => b[1] - a[1]);
6384
+ }
6385
+ function buildOneLiner(clusters) {
6386
+ if (clusters.length === 0) return "";
6384
6387
  const head = `${clusters.length} root ${clusters.length === 1 ? "cause" : "causes"}`;
6385
- const tally = [...byCategory.entries()].sort((a, b) => b[1] - a[1]).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
6388
+ const tally = tallyEntries(clusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
6386
6389
  return [head, ...tally].join(" \xB7 ");
6387
6390
  }
6391
+ function buildFailureTally(analysis) {
6392
+ if (!analysis) return "";
6393
+ const failureClusters = analysis.clusters.filter((c) => c.category !== "flaky-by-retry");
6394
+ return tallyEntries(failureClusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`).join(", ");
6395
+ }
6388
6396
  function dominantCategory(clusters) {
6389
6397
  return clusters[0]?.category ?? "unknown";
6390
6398
  }
@@ -6666,7 +6674,8 @@ var init_engine = __esm({
6666
6674
  baseCSS: this.fontsBundleCss + "\n" + this.readStyle("base.css"),
6667
6675
  templateCSS: "",
6668
6676
  chartjsScript: this.buildChartjsScript(),
6669
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
6677
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
6678
+ releaseGateTally: buildFailureTally(data.analysis)
6670
6679
  };
6671
6680
  }
6672
6681
  buildContext(data, template, userSections, slowTestThreshold) {
@@ -6690,7 +6699,8 @@ var init_engine = __esm({
6690
6699
  baseCSS,
6691
6700
  templateCSS,
6692
6701
  chartjsScript: this.buildChartjsScript(),
6693
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
6702
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
6703
+ releaseGateTally: buildFailureTally(data.analysis)
6694
6704
  };
6695
6705
  }
6696
6706
  buildChartjsScript() {
package/dist/index.js CHANGED
@@ -11291,16 +11291,24 @@ var SHORT_LABEL = {
11291
11291
  "flaky-by-retry": "flaky",
11292
11292
  unknown: "unclassified"
11293
11293
  };
11294
- function buildOneLiner(clusters) {
11295
- if (clusters.length === 0) return "";
11294
+ function tallyEntries(clusters) {
11296
11295
  const byCategory = /* @__PURE__ */ new Map();
11297
11296
  for (const c of clusters) {
11298
11297
  byCategory.set(c.category, (byCategory.get(c.category) ?? 0) + c.count);
11299
11298
  }
11299
+ return [...byCategory.entries()].sort((a, b) => b[1] - a[1]);
11300
+ }
11301
+ function buildOneLiner(clusters) {
11302
+ if (clusters.length === 0) return "";
11300
11303
  const head = `${clusters.length} root ${clusters.length === 1 ? "cause" : "causes"}`;
11301
- const tally = [...byCategory.entries()].sort((a, b) => b[1] - a[1]).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
11304
+ const tally = tallyEntries(clusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
11302
11305
  return [head, ...tally].join(" \xB7 ");
11303
11306
  }
11307
+ function buildFailureTally(analysis) {
11308
+ if (!analysis) return "";
11309
+ const failureClusters = analysis.clusters.filter((c) => c.category !== "flaky-by-retry");
11310
+ return tallyEntries(failureClusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`).join(", ");
11311
+ }
11304
11312
  function dominantCategory(clusters) {
11305
11313
  return clusters[0]?.category ?? "unknown";
11306
11314
  }
@@ -12443,7 +12451,8 @@ var TemplateEngine = class {
12443
12451
  baseCSS: this.fontsBundleCss + "\n" + this.readStyle("base.css"),
12444
12452
  templateCSS: "",
12445
12453
  chartjsScript: this.buildChartjsScript(),
12446
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
12454
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
12455
+ releaseGateTally: buildFailureTally(data.analysis)
12447
12456
  };
12448
12457
  }
12449
12458
  buildContext(data, template, userSections, slowTestThreshold) {
@@ -12467,7 +12476,8 @@ var TemplateEngine = class {
12467
12476
  baseCSS,
12468
12477
  templateCSS,
12469
12478
  chartjsScript: this.buildChartjsScript(),
12470
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
12479
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
12480
+ releaseGateTally: buildFailureTally(data.analysis)
12471
12481
  };
12472
12482
  }
12473
12483
  buildChartjsScript() {
@@ -14062,7 +14072,7 @@ var PdfReporter = class {
14062
14072
  this.liveConsole = false;
14063
14073
  this.options = parseOptions(rawOptions);
14064
14074
  this.dataCollector = new DataCollector(this.options.capture);
14065
- const version = true ? "0.15.0" : "0.x";
14075
+ const version = true ? "0.15.1" : "0.x";
14066
14076
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
14067
14077
  this.licenseClient = new LicenseClient({
14068
14078
  licenseKey: this.options.licenseKey,
package/dist/index.mjs CHANGED
@@ -11292,16 +11292,24 @@ var SHORT_LABEL = {
11292
11292
  "flaky-by-retry": "flaky",
11293
11293
  unknown: "unclassified"
11294
11294
  };
11295
- function buildOneLiner(clusters) {
11296
- if (clusters.length === 0) return "";
11295
+ function tallyEntries(clusters) {
11297
11296
  const byCategory = /* @__PURE__ */ new Map();
11298
11297
  for (const c of clusters) {
11299
11298
  byCategory.set(c.category, (byCategory.get(c.category) ?? 0) + c.count);
11300
11299
  }
11300
+ return [...byCategory.entries()].sort((a, b) => b[1] - a[1]);
11301
+ }
11302
+ function buildOneLiner(clusters) {
11303
+ if (clusters.length === 0) return "";
11301
11304
  const head = `${clusters.length} root ${clusters.length === 1 ? "cause" : "causes"}`;
11302
- const tally = [...byCategory.entries()].sort((a, b) => b[1] - a[1]).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
11305
+ const tally = tallyEntries(clusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`);
11303
11306
  return [head, ...tally].join(" \xB7 ");
11304
11307
  }
11308
+ function buildFailureTally(analysis) {
11309
+ if (!analysis) return "";
11310
+ const failureClusters = analysis.clusters.filter((c) => c.category !== "flaky-by-retry");
11311
+ return tallyEntries(failureClusters).map(([cat, count]) => `${count} ${SHORT_LABEL[cat]}`).join(", ");
11312
+ }
11305
11313
  function dominantCategory(clusters) {
11306
11314
  return clusters[0]?.category ?? "unknown";
11307
11315
  }
@@ -12444,7 +12452,8 @@ var TemplateEngine = class {
12444
12452
  baseCSS: this.fontsBundleCss + "\n" + this.readStyle("base.css"),
12445
12453
  templateCSS: "",
12446
12454
  chartjsScript: this.buildChartjsScript(),
12447
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
12455
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
12456
+ releaseGateTally: buildFailureTally(data.analysis)
12448
12457
  };
12449
12458
  }
12450
12459
  buildContext(data, template, userSections, slowTestThreshold) {
@@ -12468,7 +12477,8 @@ var TemplateEngine = class {
12468
12477
  baseCSS,
12469
12478
  templateCSS,
12470
12479
  chartjsScript: this.buildChartjsScript(),
12471
- watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX
12480
+ watermarkPageHeightPx: PAGE_CONTENT_HEIGHT_PX,
12481
+ releaseGateTally: buildFailureTally(data.analysis)
12472
12482
  };
12473
12483
  }
12474
12484
  buildChartjsScript() {
@@ -14063,7 +14073,7 @@ var PdfReporter = class {
14063
14073
  this.liveConsole = false;
14064
14074
  this.options = parseOptions(rawOptions);
14065
14075
  this.dataCollector = new DataCollector(this.options.capture);
14066
- const version = true ? "0.15.0" : "0.x";
14076
+ const version = true ? "0.15.1" : "0.x";
14067
14077
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
14068
14078
  this.licenseClient = new LicenseClient({
14069
14079
  licenseKey: this.options.licenseKey,
@@ -4,11 +4,12 @@
4
4
  <div class="release-gate__body">
5
5
  <div class="release-gate__label">Release Recommendation</div>
6
6
  <div class="release-gate__verdict release-gate__verdict--fail">
7
- HOLD &mdash; {{stats.failed}} FAILURE{{#if (gt stats.failed 1)}}S{{/if}}
7
+ HOLD: {{stats.failed}} FAILURE{{#if (gt stats.failed 1)}}S{{/if}}
8
8
  </div>
9
9
  <div class="release-gate__detail">
10
- {{stats.failed}} of {{stats.total}} tests failed. Review each failure &mdash; it may be a
11
- product defect or an automation script issue &mdash; and verify manually before shipping.
10
+ {{stats.failed}} of {{stats.total}} tests failed{{#if releaseGateTally}} ({{releaseGateTally}}){{/if}}.
11
+ Each failure may be a product defect or an automation script issue.
12
+ Review and verify manually before shipping.
12
13
  {{#if stats.flaky}} &nbsp;&middot;&nbsp; {{stats.flaky}} flaky (additional risk).{{/if}}
13
14
  </div>
14
15
  </div>
@@ -24,11 +25,12 @@
24
25
  <div class="release-gate__body">
25
26
  <div class="release-gate__label">Release Recommendation</div>
26
27
  <div class="release-gate__verdict release-gate__verdict--fail">
27
- HOLD &mdash; {{stats.timedOut}} TIMED OUT
28
+ HOLD: {{stats.timedOut}} TIMED OUT
28
29
  </div>
29
30
  <div class="release-gate__detail">
30
- {{stats.timedOut}} tests exceeded timeout &mdash; often an environment or automation
31
- issue. Review and verify manually before shipping.
31
+ {{stats.timedOut}} test{{#if (gt stats.timedOut 1)}}s{{/if}} exceeded timeout.
32
+ Timeouts are often environment or automation issues.
33
+ Review and verify manually before shipping.
32
34
  </div>
33
35
  </div>
34
36
  <div class="release-gate__meta">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportforge/playwright-pdf",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Playwright Test reporter that generates designed PDF reports: minimal, detailed, and executive templates with CI/CD integrations",
5
5
  "license": "MIT",
6
6
  "author": "ReportForge",