Skip to content

Commit 83ba23e

Browse files
committed
fix: widen IGNORED_DIRECTORY_NAMES to Set<string> for TS compatibility
Set.has() requires the argument to match the set's type parameter. Spreading as-const tuples into a Set infers a narrow literal union, which rejects entry.name (plain string) at the call site on line 178.
1 parent cafdb95 commit 83ba23e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/project-discovery.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export interface DiscoverProjectsOptions {
2020

2121
const DEFAULT_MAX_DEPTH = 4;
2222

23-
const IGNORED_DIRECTORY_NAMES = new Set([...EXCLUDED_DIRECTORY_NAMES, ...DISCOVERY_ONLY_IGNORED]);
23+
const IGNORED_DIRECTORY_NAMES: Set<string> = new Set([
24+
...EXCLUDED_DIRECTORY_NAMES,
25+
...DISCOVERY_ONLY_IGNORED
26+
]);
2427

2528
const STRONG_DIRECTORY_MARKERS = new Set(['.codebase-context', '.git']);
2629
const WORKSPACE_MARKERS = new Set(['lerna.json', 'nx.json', 'pnpm-workspace.yaml', 'turbo.json']);

0 commit comments

Comments
 (0)