**feat: improve TensorFlow.js compatibility and remove unnecessary patches**

- Removed outdated Node.js v24 compatibility patches for `TextEncoder` and `TextDecoder` in `cli-wrapper.js` and other modules since TensorFlow.js now supports Node.js v24+ natively.
- Introduced a utility module `src/utils/tensorflowUtils.ts` for TensorFlow.js compatibility, defining global `PlatformNode` and related utilities.
- Enhanced `fileSystemStorage.ts` with improved Node.js module loading mechanisms for better compatibility across environments.
- Simplified dependency requirements by reducing the minimum Node.js version to `>=23.0.0`.
- Updated `package.json`, `cli-package/package.json`, and `README.md` versions to `0.9.25`.
- Harmonized `cli-package` and main package dependencies to ensure version alignment.
- Improved global compatibility with TensorFlow.js in mixed Node.js environments.

This update modernizes TensorFlow.js integration, reduces maintenance efforts, and aligns compatibility with current Node.js and TensorFlow.js capabilities.
This commit is contained in:
David Snelling 2025-07-02 16:16:19 -07:00
parent 16748436d1
commit eb46d816d7
20 changed files with 428 additions and 168 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@soulcraft/brainy-cli",
"version": "0.9.23",
"version": "0.9.25",
"description": "Command-line interface for the Brainy vector graph database",
"type": "module",
"bin": {
@ -39,7 +39,7 @@
"url": "https://github.com/soulcraft-research/brainy.git"
},
"dependencies": {
"@soulcraft/brainy": "0.9.22",
"@soulcraft/brainy": "0.9.25",
"commander": "^14.0.0",
"omelette": "^0.4.17"
},
@ -55,6 +55,6 @@
"typescript": "^5.1.6"
},
"engines": {
"node": ">=24.0.0"
"node": ">=23.0.0"
}
}
}