You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4cba17
Browse filesBrowse the repository at this point in the historyBrowse files
ci(types): render the types coverage comment from our own report
The comment listed every file's coverage, most at 100%. It now shows the
overall typed lines, the escape-hatch types the pull request adds or
removes, the files it changed, and, collapsed, only the files in lib/
and hot/ that still have an escape hatch or an untyped line.
? `\n#### Changed by this pull request\n\n${header}${changed.map(fileRow).join("\n")}\n`
425
+
: "\nThis pull request adds or removes no escape-hatch type.\n";
360
426
}
427
+
428
+
// Every file still owing a real type: an escape hatch or an untyped line.
429
+
constremaining=[
430
+
...newSet([
431
+
...Object.keys(headCounts),
432
+
...[...coverageByFile]
433
+
.filter(
434
+
([file,{ lines, typed }])=>
435
+
typed<lines&&
436
+
ESCAPE_HATCH_DIRECTORIES.some((directory)=>
437
+
file.startsWith(directory)
438
+
)
439
+
)
440
+
.map(([file])=>file)
441
+
])
442
+
].sort((a,b)=>{
443
+
consttotal=(/** @type {string} */file)=>
444
+
ESCAPE_HATCHES.reduce(
445
+
(sum,name)=>sum+countOf(headCounts,file,name),
446
+
0
447
+
);
448
+
returntotal(b)-total(a)||(a<b ? -1 : 1);
449
+
});
450
+
report+=`\n<details><summary>${remaining.length} file(s) in <code>lib/</code> and <code>hot/</code> still use an escape hatch or have untyped lines</summary>\n\n${header}${remaining.map(fileRow).join("\n")}\n\n</details>\n`;
0 commit comments