forked from silverwind/updates
dedupe in table - fixes #65
This commit is contained in:
parent
6bc490e1cc
commit
f8576b882d
11
updates.js
11
updates.js
@ -342,10 +342,14 @@ function highlightDiff(a, b, added) {
|
||||
|
||||
function formatDeps(deps) {
|
||||
const arr = [["NAME", "OLD", "NEW", "AGE", "INFO"]];
|
||||
const seen = new Set();
|
||||
|
||||
for (const [key, data] of Object.entries(deps)) {
|
||||
const name = key.split(sep)[1];
|
||||
if (seen.has(name)) continue;
|
||||
seen.add(name);
|
||||
arr.push([
|
||||
key.split(sep)[1],
|
||||
name,
|
||||
highlightDiff(data.old, data.new, false),
|
||||
highlightDiff(data.new, data.old, true),
|
||||
data.age || "",
|
||||
@ -606,10 +610,7 @@ function extractCerts(str) {
|
||||
}
|
||||
|
||||
async function getCerts(extra = []) {
|
||||
return [
|
||||
...(await import("node:tls")).rootCertificates,
|
||||
...extra,
|
||||
];
|
||||
return [...(await import("node:tls")).rootCertificates, ...extra];
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
Loading…
Reference in New Issue
Block a user