feat(config): backup v1 file before v2 migration

- Add timestamped backup at `~/.cc-switch/config.v1.backup.<ts>.json`
- Keep provider files untouched; only cc-switch metadata is backed up
- Remove UI notification plan; backup only as requested
- Update CHANGELOG with migration backup notes
This commit is contained in:
Jason
2025-09-01 10:49:31 +08:00
parent 47b06b7773
commit b00e8de26f
3 changed files with 26 additions and 2 deletions

View File

@@ -44,6 +44,11 @@ For users upgrading from v2.x (Electron version):
- The app will automatically migrate your existing provider configurations
- Window position and size preferences have been reset to defaults
#### Backup on v1→v2 Migration (cc-switch internal config)
- When the app detects an old v1 config structure at `~/.cc-switch/config.json`, it now creates a timestamped backup before writing the new v2 structure.
- Backup location: `~/.cc-switch/config.v1.backup.<timestamp>.json`
- This only concerns cc-switch's own metadata file; your actual provider files under `~/.claude/` and `~/.codex/` are untouched.
### 🛠️ Development
- Added `pnpm typecheck` command for TypeScript validation
- Added `pnpm format` and `pnpm format:check` for code formatting
@@ -64,4 +69,4 @@ For users upgrading from v2.x (Electron version):
### Features
- Basic provider management
- Claude Code integration
- Configuration file handling
- Configuration file handling