From 75ea6d8989e44cbff6da3d5a0b15e6dd6d943d7a Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 5 Oct 2026 12:41:51 -0700
Subject: [PATCH 1/4] Show package names in DT result summaries
Collapsed result sections otherwise look identical, making it hard to
find a package without expanding every report.
---
packages/dtslint-runner/src/post-results.ts | 3 ++-
packages/dtslint-runner/test/results.test.ts | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/dtslint-runner/src/post-results.ts b/packages/dtslint-runner/src/post-results.ts
index e899c68774..38d80bc143 100644
--- a/packages/dtslint-runner/src/post-results.ts
+++ b/packages/dtslint-runner/src/post-results.ts
@@ -181,13 +181,14 @@ function getDiffReports(main: Errors, branch: Errors): DiffReport[] {
}
function formatReport(report: DiffReport, maxErrorLength = Infinity): string {
+ const packageName = escapeHtml((report.branch ?? report.main)!.path);
const errors = [
...(report.main ? [`Main error:\n${formatProjects(report.main)}${formatError(report.main, maxErrorLength)}`] : []),
...(report.branch
? [`Branch error:\n${formatProjects(report.branch)}${formatError(report.branch, maxErrorLength)}`]
: []),
];
- return `${report.title}
\n\n${formatPackage((report.branch ?? report.main)!)}\n${errors.join("\n")}\n${report.title}
\n\n${formatPackage((report.branch ?? report.main)!)}\n${errors.join("\n")}\n${packageName}newfixedchanged
old`); expect(comment).toContain(`
new`); expect(comment).toContain("
old failure"); @@ -188,6 +188,7 @@ test("escapes diagnostic HTML and refuses non-DT links", () => { }, ], )!; + expect(comment).toContain("
<example><example>");
expect(comment).toContain("</pre><script>alert("oops")</script>\n```\n& <T>");
expect(comment).not.toContain("