Refactored the application to improve performance, maintainability, and binary size. Key Changes: - **Core Algorithm**: Switched to a parallel, single-pass tree construction algorithm for O(N) traversal. - **Architecture**: Extract core logic from `main.rs` to `lib.rs` to enable unit testing. - **Testing**: Added comprehensive unit tests and integration tests (`tests/cli.rs`) covering CLI arguments and output formats. - **Benchmarking**: Added `criterion` benchmarks for performance tracking. - **Dependencies**: - Removed `walkdir` (logic replaced by `ignore` + custom tree). - Removed `humansize` (consolidated to `byte-unit`). - Replaced `chrono` with lightweight `time` crate. - Removed unused `atty`. - **Reporting**: Optimized CSV and JSON output for correctness and zero-copy performance. - **Documentation**: Updated CHANGELOG.md and bumped version to 0.2.0.
1.9 KiB
1.9 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.2.0] - 2026-01-22
Changed
- Refactored core traversal logic to a single-pass, in-memory tree construction algorithm. This visits every file exactly once, replacing the previous
O(N \times Depth)behavior withO(N). - Switched default CSV output to use the
csvcrate for robust escaping (fixes issues with filenames containing commas). - Optimized JSON output to use zero-copy serialization, improving performance and memory usage.
Added
- Added
MANUAL.mdwith comprehensive usage documentation. - Added comprehensive test suite (unit and integration tests).
- Added performance benchmarks using
criterion.
Removed
- Removed
walkdirdependency (replaced byignore::WalkBuilderfor all traversal). - Removed
humansize(consolidated tobyte-unit). - Removed
chrono(replaced with lightweighttime). - Removed
atty(unused).
[0.1.0] - 2026-01-22
Added
- Core directory traversal and size calculation logic.
- Parallel processing using
rayonfor high performance. - Rich table output format using
comfy-tablewith colored entries. - Recursive depth control via
-d/--depth. - Minimum size filtering via
-m/--min-size. - Multi-column sorting support (
--sort). - Relative path display by default, with
-f/--path-fulloverride. - "Total size" summary with dual units (Binary/Decimal) and block counts.
- Concurrency control via
-j/--threads. .gitignoreand.ignorefile support via-i/--ignore.- Multiple output formats: Text (Table), CSV, JSON (
--format). - Save to file functionality with auto-naming (
--save). - Shell completion generation (
--completions).