diff --git a/src/usage/scanner.ts b/src/usage/scanner.ts index 3811012..5f9808e 100644 --- a/src/usage/scanner.ts +++ b/src/usage/scanner.ts @@ -1,7 +1,8 @@ import fs from "node:fs"; import path from "node:path"; +// Shared with lockfile scanning in utils/file.ts; additions affect both code paths. +import { EXCLUDED_DIRS } from "../constants.js"; -const IGNORED_DIRS = new Set(["node_modules", ".git", "dist", "build", "coverage"]); const ALLOWED_EXTS = new Set([".js", ".jsx", ".ts", ".tsx", ".mjs", ".cjs"]); // Matches: @@ -57,7 +58,7 @@ export function scanProjectForPackageUsage( const fullPath = path.join(dir, entry.name); if (entry.isDirectory()) { - if (!IGNORED_DIRS.has(entry.name) && !entry.name.startsWith(".")) { + if (!EXCLUDED_DIRS.has(entry.name) && !entry.name.startsWith(".")) { walk(fullPath); } } else if (entry.isFile()) {