diff --git a/changelog.md b/changelog.md index 687be51..adc97b0 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index aaacbd7..d130f5e 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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' } diff --git a/ts/providers/smartfs.provider.node.ts b/ts/providers/smartfs.provider.node.ts index e103526..e3aae95 100644 --- a/ts/providers/smartfs.provider.node.ts +++ b/ts/providers/smartfs.provider.node.ts @@ -244,7 +244,7 @@ export class SmartFsProviderNode implements ISmartFsProvider { public async deleteDirectory(path: string, options?: { recursive?: boolean }): Promise { await fs.rm(path, { - recursive: options?.recursive, + recursive: options?.recursive ?? true, force: true, }); }