diff --git a/changelog.md b/changelog.md index 9e1a5d3..634a615 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2025-11-29 - 13.1.0 - feat(smartfs) +Integrate @push.rocks/smartfs and wire SmartFileFactory.nodeFs to return a real SmartFs instance + +- Add runtime dependency @push.rocks/smartfs@^1.1.0 to package.json (previous peerDependency removed). +- Export smartfs from ts/plugins.ts so internal modules can access SmartFs and providers. +- Implement SmartFileFactory.nodeFs() to instantiate plugins.smartfs.SmartFs with SmartFsProviderNode and return a factory bound to that SmartFs. +- Enable factory-created SmartFile/StreamFile/VirtualDirectory instances to use the bound SmartFs for filesystem operations (read/write/streams). + ## 2025-11-22 - 13.0.1 - fix(smartfile) Stream and filesystem integrations: remove fs-extra, switch to fs/promises.rename, add Web WritableStream compatibility, and use smartFs recursive directory methods; update plugins exports and README. diff --git a/package.json b/package.json index 71193d2..365d3b2 100644 --- a/package.json +++ b/package.json @@ -50,15 +50,8 @@ "@push.rocks/smartstream": "^3.2.5", "@types/js-yaml": "^4.0.9", "glob": "^11.0.3", - "js-yaml": "^4.1.0" - }, - "peerDependencies": { - "@push.rocks/smartfs": "^1.0.0" - }, - "peerDependenciesMeta": { - "@push.rocks/smartfs": { - "optional": true - } + "js-yaml": "^4.1.0", + "@push.rocks/smartfs": "^1.1.0" }, "devDependencies": { "@git.zone/tsbuild": "^2.6.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b58dcb1..cee7c6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: specifier: ^1.0.7 version: 1.0.7 '@push.rocks/smartfs': - specifier: ^1.0.0 + specifier: ^1.1.0 version: 1.1.0 '@push.rocks/smarthash': specifier: ^3.2.3 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 2082a22..d69cea6 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartfile', - version: '13.0.1', + version: '13.1.0', description: 'High-level file representation classes (SmartFile, StreamFile, VirtualDirectory) for efficient in-memory file management in Node.js using TypeScript. Works seamlessly with @push.rocks/smartfs for filesystem operations.' } diff --git a/ts/classes.smartfile.factory.ts b/ts/classes.smartfile.factory.ts index 6a1d9bf..4a4af97 100644 --- a/ts/classes.smartfile.factory.ts +++ b/ts/classes.smartfile.factory.ts @@ -14,9 +14,7 @@ export class SmartFileFactory { * Creates a default factory using Node.js filesystem provider */ public static nodeFs(): SmartFileFactory { - // Temporarily using a placeholder - will be replaced with actual SmartFs initialization - // const smartFs = new SmartFs(new SmartFsProviderNode()); - const smartFs = null; // Placeholder + const smartFs = new plugins.smartfs.SmartFs(new plugins.smartfs.SmartFsProviderNode()); return new SmartFileFactory(smartFs); } diff --git a/ts/plugins.ts b/ts/plugins.ts index 5383446..7726126 100644 --- a/ts/plugins.ts +++ b/ts/plugins.ts @@ -10,6 +10,7 @@ export { fs, fsPromises, path, stream }; import * as lik from '@push.rocks/lik'; import * as smartfileInterfaces from '@push.rocks/smartfile-interfaces'; import * as smartdelay from '@push.rocks/smartdelay'; +import * as smartfs from '@push.rocks/smartfs'; import * as smarthash from '@push.rocks/smarthash'; import * as smartjson from '@push.rocks/smartjson'; import * as smartmime from '@push.rocks/smartmime'; @@ -22,6 +23,7 @@ export { lik, smartfileInterfaces, smartdelay, + smartfs, smarthash, smartjson, smartmime,