4.7 KiB
4.7 KiB
Changelog
2025-12-16 - 1.3.1 - fix(docs)
docs(readme): add "Directory Copy & Move" section with examples and options
- Adds README documentation for recursive directory copy and move with usage examples (basic copy/move, copy with filter, overwrite, preserve timestamps, applyFilter).
- Documents conflict handling modes for copy/move: merge (default), error, and replace.
- Documentation-only change — no code or API changes; recommended patch version bump.
2025-12-16 - 1.3.0 - feat(smartfs.directory)
feat(smartfs.directory): add directory copy/move with conflict handling and options
- Implement Directory.copy(targetPath) and Directory.move(targetPath) with provider-backed file operations (createDirectory, listDirectory, copyFile, deleteDirectory).
- Add new directory options and fluent setters: applyFilter, overwrite, preserveTimestamps, onConflict (defaults: applyFilter=true, overwrite=false, preserveTimestamps=false, onConflict='merge').
- Copy supports recursive listing, optional filtering (applyFilter), overwrite behavior and timestamp preservation; onConflict supports 'merge'|'error'|'replace'. Move performs copy then deletes the source.
- Add comprehensive tests for copy/move: basic copy, recursive copy, filter-based copy, applyFilter(false) behavior, overwrite handling, onConflict error/replace cases, move semantics, and copying empty directories.
- Update npmextra.json to use scoped keys (@git.zone/cli, @ship.zone/szci) and add release registry/access configuration.
2025-12-02 - 1.2.0 - feat(smartfs.directory)
Add directory treeHash: deterministic content-based hashing of directory trees with streaming and algorithm option
- Implement treeHash(options?) on SmartFsDirectory which computes a deterministic hash of a directory tree by hashing relative file paths and streaming file contents (default algorithm: 'sha256').
- Introduce ITreeHashOptions type (algorithm?: string) to allow selecting the hash algorithm (e.g. 'sha256', 'sha512').
- Use Node.js crypto to update the hash incrementally while streaming file data to keep memory usage low.
- Add tests in test/test.node.provider.ts covering treeHash behavior, determinism, algorithm selection, and empty-directory hashing.
- Update README with documentation, examples and explanation of treeHash use cases and behavior.
2025-11-30 - 1.1.3 - fix(smartfs.provider.node)
Default createDirectory to recursive=true when option not provided in Node provider
- Node provider: createDirectory now defaults to recursive=true when options.recursive is undefined.
- Prevents errors when creating nested directories without explicitly passing the recursive option.
- No API signature changes; behavior change is limited to the Node provider implementation.
2025-11-29 - 1.1.2 - fix(SmartFsProviderNode)
Fix Node provider watch path handling and remove main test entry
- Node provider: detect at start whether the watched path is a file or directory (fs.stat) and build fullPath accordingly so watching a single file does not incorrectly join the filename onto the file path.
- Watch callback: ensure events are evaluated against the configured filter using the correct full path.
- Tests: removed test/test.ts (main test entry that previously imported provider test files).
2025-11-29 - 1.1.1 - fix(smartfs.provider.node)
Default deleteDirectory to recursive=true in Node provider
- Changed SmartFsProviderNode.deleteDirectory to use recursive: options?.recursive ?? true when calling fs.rm.
- Directories will now be removed recursively by default when no recursive option is provided (was previously undefined).
- Retains force: true behavior to ignore missing targets and suppress errors.
2025-11-21 - 1.1.0 - feat(core)
Add SmartFS core library with providers, builders, interfaces, docs, tests and CI
- Add core TypeScript sources and public exports: SmartFs, SmartFsFile, SmartFsDirectory, SmartFsTransaction, SmartFsWatcher and ts/index.ts
- Add two providers: SmartFsProviderNode (Node.js fs/promises + fs.watch) and SmartFsProviderMemory (in-memory implementation used for testing)
- Add provider and type contracts: ISmartFsProvider, IProviderCapabilities and comprehensive mod.types definitions
- Implement transactions with prepare/execute/rollback, atomic writes, Web Streams-based read/write streams, and file watching with debouncing and filters
- Add tests entry (test/test.ts) and test scaffolding for memory and node providers
- Add package configuration (package.json, tsconfig.json, npmextra.json), documentation (readme.md, readme.hints.md) and plugins/paths helpers
- Add CI workflows and .gitignore
2025-11-21 - 1.0.1 - initial release
Initial project commit and setup.
- Project initialized with the initial scaffold and files
- Basic project configuration and versioning (1.0.1)