mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 00:22:34 +00:00
feat(core)!: refactor to symlink-based shared data architecture (v3.2.0)
BREAKING CHANGE: Shared data architecture refactored from copy-based to symlink-based. Architecture Change: - OLD: ~/.claude/ → [COPY 500ms] → ~/.ccs/shared/ → [SYMLINK] → instance/ - NEW: ~/.claude/ → [SYMLINK <1ms] → ~/.ccs/shared/ → [SYMLINK] → instance/ Performance Improvements: - Install time: 500ms → 100ms (60% faster) - Symlink creation: <1ms per directory (500x faster than copy) - Zero data duplication between profiles - Live updates: instant propagation across all profiles Implementation Changes: - bin/shared-manager.js: Added circular symlink detection, v3.1.1→v3.2.0 migration - installers/install.sh: Replaced copy logic with symlink creation - installers/install.ps1: Replaced copy logic with symlink creation + Developer Mode check - scripts/postinstall.js: Updated to call migrateFromV311() - tests/: Added symlink chain validation tests (bash + PowerShell) Migration: - Automatic upgrade from v3.1.1 - User customizations preserved in ~/.claude/ - No manual action required Testing: - All integration tests passed (6/6) - Symlink chain validated on Linux - Migration with data preservation validated - Windows fallback logic preserved for non-Developer Mode
This commit is contained in:
@@ -89,15 +89,16 @@ function createConfigFiles() {
|
||||
}
|
||||
}
|
||||
|
||||
// Migrate from ~/.claude/ to ~/.ccs/shared/ (v3.1.1)
|
||||
// Migrate from v3.1.1 to v3.2.0 (symlink architecture)
|
||||
console.log('');
|
||||
try {
|
||||
const SharedManager = require('../bin/shared-manager');
|
||||
const sharedManager = new SharedManager();
|
||||
sharedManager.migrateToSharedStructure();
|
||||
sharedManager.migrateFromV311();
|
||||
sharedManager.ensureSharedDirectories();
|
||||
} catch (err) {
|
||||
console.warn('[!] Migration warning:', err.message);
|
||||
console.warn(' You can manually copy files from ~/.claude/ to ~/.ccs/shared/');
|
||||
console.warn(' Migration will retry on next run');
|
||||
}
|
||||
console.log('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user