mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-06 22:01:44 +08:00
* fix(config): sort JSON keys alphabetically for deterministic output Ensures settings.json keys are written in sorted order, preventing non-deterministic git diffs when switching configs. * test(config): add unit tests for sort_json_keys and fix formatting Cover top-level sort, nested recursion, array order preservation, primitive pass-through, empty collections, and the core determinism guarantee (different insertion orders must yield identical output). Also fix line-length in write_json_file flagged by `cargo fmt --check`. --------- Co-authored-by: Jason <farion1231@gmail.com>