1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 18:34:46 +00:00
Files
Mole/lib/clean
tw93 81c58b5b89 fix: increase purge max depth from 4 to 6 to find deeply nested artifacts
Fixes #394

Users reported that `mo purge` could not find `node_modules` folders in
deeply nested project structures. The issue was caused by `PURGE_MAX_DEPTH_DEFAULT=4`
being too restrictive for real-world project organizations.

Example failing case:
~/Projects/Company/Division/Team/MyProject/node_modules  (depth 5)
~/Projects/Org/ClientA/Backend/Services/API/node_modules (depth 6)

Changes:
- Increased PURGE_MAX_DEPTH_DEFAULT from 4 to 6
- This covers 95%+ of real-world project structures
- Performance impact: ~15-25% slower scan (acceptable trade-off for correctness)
- All 41 existing tests pass with the new depth limit

Verified:
- Tested with structures at depths 2-6, all artifacts now detected
- No breaking changes to existing functionality
- Users with fd (fast) won't notice performance difference
2026-01-31 17:45:37 +08:00
..