From 74bd19c0632b6e336581333e0ee97cdba28757af Mon Sep 17 00:00:00 2001 From: Loi Nguyen Date: Sun, 26 Jul 2026 17:26:17 +0700 Subject: [PATCH] Remove redundant recommended-dependency duplicate guard Address review feedback: modsByName is built from annotatedMods so the advisories array always exists, and each source mod is iterated once with no duplicate dependencies, so the existence check can never fail. Push the recommended_dependency advisory directly. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01G8b9dEaJtpvydzz4ttM7JH --- packages/lib/src/data/ModPack.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/lib/src/data/ModPack.ts b/packages/lib/src/data/ModPack.ts index 1db62177..33251845 100644 --- a/packages/lib/src/data/ModPack.ts +++ b/packages/lib/src/data/ModPack.ts @@ -122,15 +122,10 @@ export function applyModRecordAdvisories( continue; } - if (!targetMod.advisories.some( - advisory => advisory.type === "recommended_dependency" - && advisory.sourceModName === sourceMod.name - )) { - targetMod.advisories.push({ - type: "recommended_dependency", - sourceModName: sourceMod.name, - }); - } + targetMod.advisories.push({ + type: "recommended_dependency", + sourceModName: sourceMod.name, + }); } }