# Smartarchive Development Hints ## Dependency Upgrades (2025-01-25) ### Completed Upgrades - **@git.zone/tsbuild**: ^2.6.6 → ^3.1.0 - **@git.zone/tsrun**: ^1.3.3 → ^2.0.0 - **@git.zone/tstest**: ^2.3.4 → ^3.1.3 - **@push.rocks/smartfile**: ^11.2.7 → ^13.0.0 ### Migration Notes #### Smartfile v13 Migration Smartfile v13 removed filesystem operations (`fs`, `memory`, `fsStream` namespaces). These were replaced with Node.js native `fs` and `fs/promises`: **Replacements made:** - `smartfile.fs.ensureDir(path)` → `fsPromises.mkdir(path, { recursive: true })` - `smartfile.fs.stat(path)` → `fsPromises.stat(path)` - `smartfile.fs.toReadStream(path)` → `fs.createReadStream(path)` - `smartfile.fs.toStringSync(path)` → `fsPromises.readFile(path, 'utf8')` - `smartfile.fs.listFileTree(dir, pattern)` → custom `listFileTree()` helper - `smartfile.fsStream.createReadStream(path)` → `fs.createReadStream(path)` - `smartfile.fsStream.createWriteStream(path)` → `fs.createWriteStream(path)` - `smartfile.memory.toFs(content, path)` → `fsPromises.writeFile(path, content)` **Still using from smartfile v13:** - `SmartFile` class (in-memory file representation) - `StreamFile` class (streaming file handling) ### Removed Dependencies - `through@2.3.8` - was unused in the codebase ## Architecture Notes - Uses `fflate` for ZIP/GZIP compression (pure JS, works in browser) - Uses `tar-stream` for TAR archive handling - Uses `file-type` for MIME type detection - Custom BZIP2 implementation in `ts/bzip2/` directory