New features:
- Add orphaned LaunchAgent/LaunchDaemon detection with 5-layer verification
- Layer 1: Check if program path exists
- Layer 2: Verify AssociatedBundleIdentifiers via mdfind
- Layer 3: Check Application Support directory activity (7 days)
- Layer 4: Fuzzy match app name in /Applications
- Layer 5: Special handling for PrivilegedHelperTools
- Only process user-level ~/Library/LaunchAgents (safer than system-level)
- Unload agent before removal using launchctl
Bug fixes:
- Handle paths with spaces correctly in orphaned_app_data cleanup
- Add nullglob state management to prevent word splitting
- Use IFS=$'\n' for proper array iteration
- Only count successful deletions (check safe_clean return value)
Tests:
- Add 4 new tests for is_launch_item_orphaned edge cases
- Add tests for space handling and deletion count accuracy
Uninstalling mole with Zap will automatically remove also the directories that brew creates for it. -> More complete uninstallation
Also updated the test about uninstalling
Replace glob pattern with find command to properly clean dotfiles
in Trash when osascript fallback is used. The old pattern
~/.Trash/* does not match files starting with "." in bash.
This fix ensures that hidden files like .DS_Store, .hidden_file,
etc. are properly removed when cleaning the Trash.
- Change Rosetta 2 status from warning to info
- Remove auto-fix suggestion for missing Rosetta 2
- Update tests to reflect new behavior (3 -> 2 expected fixes)
- Replace parentheses with commas for supplementary info
- Use commas instead of em-dashes for separators
- Update bullet points from - to * in some contexts
- Improve version extraction regex with fallback logic
- Refactor JetBrains Toolbox cleanup with _restore_whitelist helper
- Add MOLE_EDGE_APP_PATHS env var for test isolation
- Fix Edge old versions tests to avoid scanning system Edge installation
- Test install.sh success message with version
- Test fallback version when no success message
- Test empty output handling
- Test avoiding wrong parentheses content extraction
- Export MOLE_DRY_RUN env var for subprocess visibility
- Add || true to grep commands to prevent pipeline failures
- Add dry-run test for clean_orphaned_system_services
- Simplify clean_local_snapshots tests
- Replace 48-line custom function with one-line safe_clean call
- Remove unnecessary interactive confirmation (consistent with other browser caches)
- Simplify tests to verify Puppeteer cache is in clean_browsers output
- Net: -93 lines of code for same functionality
The clean_empty_library_items function intentionally skips empty file cleanup
to avoid removing app sentinel files (as noted in lib/clean/user.sh:77).
Updated the test to only verify empty folder cleanup, matching current behavior.
- Restore performance test threshold to 200ms (from 500ms)
User caching is highly effective (~8ms for 100 calls)
- Add unit tests for colorizeTemp() covering thresholds and edge cases
- Add Homebrew cask detection and use 'brew uninstall --cask' for proper cleanup
- Add real-time progress feedback during uninstallation
- Optimize scroll performance by only redrawing visible items
- Replace Python-based Dock removal with PlistBuddy for better compatibility
- Add comprehensive tests for Homebrew functionality
Fixes#306
This commit addresses several code quality issues identified in the
recent bash 3.2 compatibility fixes:
1. Remove redundant array length check in is_whitelisted()
- The second check for array length > 0 is unnecessary after
already checking for length == 0
2. Clean up commented dangerous cleanup code in dev.sh
- Replace commented-out code with clear documentation
- Add explicit notes explaining why certain paths are excluded
- Improves maintainability by preventing confusion
3. Enhance test coverage for excluded paths
- Add tests to verify Mix archives are NOT cleaned
- Add tests to verify Stack programs are NOT cleaned
- Add tests to verify VS Code workspace storage is NOT cleaned
- These tests ensure critical data remains protected
All changes pass ShellCheck, syntax validation, and formatting checks.
Fixes#263
- Change regex from \.\. to (^|/)\.\.(/|$) to only match path components
- Firefox uses ..files suffix in IndexedDB dirs (e.g., name..files)
- Still blocks actual traversal: /tmp/../etc
- Added test cases for Firefox compatibility
- All 16 tests passing
- Add '/Library/Input Methods' to application scan paths
- Unprotect Sogou, QQ, and Baidu input methods from system critical list
- Enhance file cleanup logic to detect input method plugins and caches
- Allow clean uninstallation and deep cleaning of WeType, Sogou, etc.