fix(smartfs.provider.node): Default deleteDirectory to recursive=true in Node provider

This commit is contained in:
2025-11-29 20:26:02 +00:00
parent 20e59d82f4
commit c9e45a9abe
3 changed files with 9 additions and 2 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 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

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartfs',
version: '1.1.0',
version: '1.1.1',
description: 'a cross platform extendable fs module'
}

View File

@@ -244,7 +244,7 @@ export class SmartFsProviderNode implements ISmartFsProvider {
public async deleteDirectory(path: string, options?: { recursive?: boolean }): Promise<void> {
await fs.rm(path, {
recursive: options?.recursive,
recursive: options?.recursive ?? true,
force: true,
});
}