From 3bdb014d25dd9dd0838bdfa3d3efc8e31b39c2c0 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Sun, 30 Nov 2025 18:10:25 +0000 Subject: [PATCH] fix(smartfs.provider.node): Default createDirectory to recursive=true when option not provided in Node provider --- changelog.md | 7 +++++++ ts/00_commitinfo_data.ts | 2 +- ts/providers/smartfs.provider.node.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 0a1db66..3e724ad 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 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 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 627e9ac..a16ca04 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.2', + version: '1.1.3', description: 'a cross platform extendable fs module' } diff --git a/ts/providers/smartfs.provider.node.ts b/ts/providers/smartfs.provider.node.ts index 2957f46..b5d5efa 100644 --- a/ts/providers/smartfs.provider.node.ts +++ b/ts/providers/smartfs.provider.node.ts @@ -237,7 +237,7 @@ export class SmartFsProviderNode implements ISmartFsProvider { public async createDirectory(path: string, options?: { recursive?: boolean; mode?: number }): Promise { await fs.mkdir(path, { - recursive: options?.recursive, + recursive: options?.recursive ?? true, mode: options?.mode, }); }