Skip to content

Commit 8b8ef00

Browse files
committed
refactor: use Number.MAX_SAFE_INTEGER instead of Infinity for default limit
Using MAX_SAFE_INTEGER is more explicit and safer than Infinity for numeric operations
1 parent 0323b06 commit 8b8ef00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/glob/list-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ async function listFilteredDirectories(
393393
const absolutePath = path.resolve(dirPath)
394394
const directories: string[] = []
395395
let dirCount = 0
396-
const effectiveLimit = limit ?? Infinity
396+
const effectiveLimit = limit ?? Number.MAX_SAFE_INTEGER
397397

398398
// For environment details generation, we don't want to treat the root as a "target"
399399
// if we're doing a general recursive scan, as this would include hidden directories

0 commit comments

Comments
 (0)