aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/licenses.rs
AgeCommit message (Collapse)Author
2026-02-22fix(licenses): use 4-space JSON indentation to match Composernsfisis
Composer outputs JSON with 4-space indentation. Mozart was using serde_json::to_string_pretty which defaults to 2-space. Switch to a custom PrettyFormatter with explicit 4-space indent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(licenses): align error messages with Composer outputnsfisis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(async): migrate from blocking HTTP to async/await with tokionsfisis
Replace reqwest::blocking with async reqwest across the entire codebase. All command execute functions, registry API calls (packagist, downloader, resolver, lockfile), and the main entry point now use async/await with the tokio runtime. The pubgrub resolver runs on spawn_blocking since its DependencyProvider trait is synchronous, using Handle::block_on for async I/O within that context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(workspace): split monolithic crate into 6 workspace cratesnsfisis
Extract modules from the single `mozart` crate into 5 focused library crates to improve compilation parallelism and architectural clarity: - mozart-constraint: version constraint parser (independent) - mozart-core: base types, console, validation, platform utilities - mozart-archiver: archive creation (tar, zip, bzip2) - mozart-registry: Packagist API, cache, resolver, downloader, lockfile - mozart-autoload: autoloader generation and PHP scanner Refactor Console::from_cli and build_cache_config to accept primitive args instead of &Cli to break circular dependencies. Introduce [workspace.dependencies] for centralized version management. Remove 9 unused direct dependencies from the CLI crate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(console): add structured error handling, verbosity, and suggestionsnsfisis
Implement Phase 7.2 error handling & UX infrastructure: - Add exit_code module with MozartError, bail()/bail_silent() helpers, and Composer-compatible exit code constants (0-5, 100) - Redesign Console struct with Verbosity enum (Quiet/Normal/Verbose/ VeryVerbose/Debug), ANSI auto-detection via IsTerminal, and verbosity-gated output methods (info/verbose/debug/error) - Thread Console through all 33 command execute() signatures - Replace all std::process::exit() calls with structured MozartError returns handled in main() - Migrate eprintln\! status messages to console.info() for quiet-mode suppression - Add suggest module with Levenshtein distance and "Did you mean?" formatting for future package name suggestions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21fix(licenses): handle root license as array and add ANSI color to headernsfisis
composer.json allows license to be either a string or an array. Parse the raw JSON to support both forms, emit license as a proper array in JSON output, and apply console::comment() coloring to the text header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21fix(licenses): match Composer text output formatnsfisis
Add "Dependencies:" label and remove column headers/separator from text output to align with Composer's licenses command behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(licenses): implement licenses command with text, JSON, and summary outputnsfisis
Support listing dependency licenses from installed packages or lock file with --no-dev filtering, format validation, and sorted output. Includes unit tests for license extraction/counting and integration tests using temp dirs for both installed and locked package sources. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11change commands::*::execute() signaturesnsfisis
2026-02-11enable workspacensfisis