Adapt per review

This commit is contained in:
Reinier Criel 2025-10-27 09:23:47 -07:00
parent 9dacf5cff3
commit 190607de92
27 changed files with 191 additions and 114 deletions

View file

@ -7,7 +7,7 @@ import {
writeDatabaseToLocalCache,
} from "../config/configFile.js";
import { ui } from "../environment/userInteraction.js";
import { getEcoSystem } from "../config/settings.js";
import { getEcoSystem, ECOSYSTEM_PY } from "../config/settings.js";
let cachedMalwareDatabase = null;
@ -18,7 +18,7 @@ let cachedMalwareDatabase = null;
*/
function normalizePackageName(name) {
const ecosystem = getEcoSystem();
if (ecosystem === "py") {
if (ecosystem === ECOSYSTEM_PY) {
return name.toLowerCase().replace(/[-_.]+/g, "-");
}