@@ -24475,24 +24475,26 @@ async function run() {
2447524475This PR adds ${depIncrease} new dependencies (${baseDepCount} \u2192 ${currentDepCount}), which exceeds the threshold of ${dependencyThreshold}.`
2447624476 );
2447724477 }
24478- const duplicateWarnings = [];
24478+ const duplicateRows = [];
2447924479 for (const [packageName, currentVersionSet] of currentDeps) {
2448024480 if (currentVersionSet.size > duplicateThreshold) {
2448124481 const versions = Array.from(currentVersionSet).sort();
24482- duplicateWarnings .push(
24483- `\u{1F4E6} ** ${packageName}**: ${currentVersionSet.size} versions ( ${versions.join(", ")}) `
24482+ duplicateRows .push(
24483+ `| ${packageName} | ${currentVersionSet.size} versions | ${versions.join(", ")} | `
2448424484 );
2448524485 }
2448624486 }
24487- if (duplicateWarnings .length > 0) {
24487+ if (duplicateRows .length > 0) {
2448824488 const exampleCommand = getLsCommand(lockfilePath, "example-package");
2448924489 const helpMessage = exampleCommand ? `
2449024490
2449124491\u{1F4A1} To find out what depends on a specific package, run: \`${exampleCommand}\`` : "";
2449224492 messages.push(
2449324493 `## \u26A0\uFE0F Duplicate Dependencies (threshold: ${duplicateThreshold})
2449424494
24495- ${duplicateWarnings.join("\n")}${helpMessage}`
24495+ | \u{1F4E6} Package | \u{1F522} Version Count | \u{1F4CB} Versions |
24496+ | --- | --- | --- |
24497+ ${duplicateRows.join("\n")}${helpMessage}`
2449624498 );
2449724499 }
2449824500 const newVersions = [];
@@ -24519,16 +24521,16 @@ ${duplicateWarnings.join("\n")}${helpMessage}`
2451924521
2452024522This PR adds ${formatBytes(sizeData.totalSize)} of new dependencies, which exceeds the threshold of ${formatBytes(sizeThreshold)}.
2452124523
24522- | Package | Size |
24523- |---------| ------ |
24524+ | \u{1F4E6} Package | \u{1F4CF} Size |
24525+ | --- | --- |
2452424526${packageRows}`
2452524527 );
2452624528 }
2452724529 } catch (err) {
2452824530 core4.info(`Failed to calculate total dependency size increase: ${err}`);
2452924531 }
2453024532 }
24531- const provenanceWarnings = [];
24533+ const provenanceRows = [];
2453224534 for (const [packageName, currentVersionSet] of currentDeps) {
2453324535 const baseVersionSet = baseDeps.get(packageName);
2453424536 if (!baseVersionSet || baseVersionSet.size === 0) {
@@ -24552,24 +24554,24 @@ ${packageRows}`
2455224554 const minBaseTrust = getMinTrustLevel(baseProvenances.values());
2455324555 const minCurrentTrust = getMinTrustLevel(currentProvenances.values());
2455424556 if (minCurrentTrust.level < minBaseTrust.level) {
24555- provenanceWarnings .push(
24556- `\u{1F512} ** ${packageName}**: trust level decreased ( ${minBaseTrust.status} \u2192 ${minCurrentTrust.status}) `
24557+ provenanceRows .push(
24558+ `| ${packageName} | ${minBaseTrust.status} | ${minCurrentTrust.status} | `
2455724559 );
2455824560 }
2455924561 } catch (err) {
2456024562 core4.info(`Failed to check provenance for ${packageName}: ${err}`);
2456124563 }
2456224564 }
24563- if (provenanceWarnings .length > 0) {
24565+ if (provenanceRows .length > 0) {
2456424566 messages.push(
2456524567 `## \u26A0\uFE0F Package Trust Level Decreased
2456624568
2456724569> [!CAUTION]
2456824570> Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.
2456924571
24570- These packages have decreased trust levels:
24571-
24572- ${provenanceWarnings .join("\n")}`
24572+ | \u{1F4E6} Package | \u{1F512} Before | \u{1F513} After |
24573+ | --- | --- | --- |
24574+ ${provenanceRows .join("\n")}`
2457324575 );
2457424576 }
2457524577 const basePackagesPattern = core4.getInput("base-packages");
@@ -24605,8 +24607,8 @@ ${provenanceWarnings.join("\n")}`
2460524607
2460624608These packages exceed the size increase threshold of ${formatBytes(packSizeThreshold)}:
2460724609
24608- | Package | Base Size | Source Size | Size Change |
24609- |---------| -----------| -------------| ------------- |
24610+ | \u{1F4E6} Package | \u{1F4CF} Base Size | \u{1F4CF} Source Size | \u{1F4C8} Size Change |
24611+ | --- | --- | --- | --- |
2461024612${packRows}`
2461124613 );
2461224614 }
0 commit comments