Commit graph

67 commits

Author SHA1 Message Date
4389485fd7 0.19.0 2025-07-23 16:28:06 -07:00
d695d46a80 0.18.0 2025-07-23 16:27:10 -07:00
95142d32fa 0.17.0 2025-07-22 16:04:34 -07:00
8189b45f48 **chore(release): bump version to 0.16.0 and enhance project scripts**
- **Version Updates**:
  - Updated `cli-package/package.json` and `package-lock.json` from `0.15.0` to `0.16.0`.

- **NPM Script Enhancements**:
  - Added version-related scripts (`version`, `version:patch`, `version:minor`, `version:major`) to `web-service-package` and `cli-package`.
  - Introduced `deploy` and `dry-run` scripts to streamline build and deployment workflows.

- **Script Cleanup**:
  - Removed redundant `build:cli`, `deploy:cli`, and `deploy:web-service` scripts from the root `package.json`.

**Purpose**: Prepares for release 0.16.0 while introducing reusable and optimized build/release scripts, improving the development and deployment experience.
2025-07-22 10:53:52 -07:00
2ec3e4ea23 0.16.0 2025-07-22 10:43:34 -07:00
a03874fef2 **refactor(core): remove generate-version script and update prebuild/version workflows**
- **Removal of `generate-version.js`**:
  - Deleted `scripts/generate-version.js` as it is no longer required for version handling.
  - Removed associated output files, including `src/utils/version.ts`.

- **Prebuild and Version Process Updates**:
  - Updated `prebuild` and `version` scripts in `package.json` to reflect the new workflow:
    - Replaced `generate-version.js` with simplified echo commands for version updates and build steps.
  - Adjusted deployment scripts (`deploy:cli` and `deploy:web-service`) to align with the removal of the script.

- **Documentation and Config Updates**:
  - Cleaned up `README.md` by removing unused version badge references.
  - Updated `cli-package/package.json` to specify a version range (`^0.15.0`) for `@soulcraft/brainy`.

**Purpose**: This refactor simplifies the version handling process by removing outdated scripts, reducing maintenance overhead, and aligning workflows with project conventions. Improves clarity and consistency in both configuration and documentation.
2025-07-22 10:43:19 -07:00
2425b3ad42 Merge remote-tracking branch 'origin/main' 2025-07-22 10:22:40 -07:00
09c7d59aef **feat(web-service): add new web service package and deployment scripts**
- **New Web Service Package**:
  - Introduced `@soulcraft/brainy-web-service`, a REST API wrapper for the Brainy vector graph database.
  - Added documentation and features to support secure, read-only search and retrieval operations.

- **Deployment Support**:
  - Included comprehensive deployment instructions in the `web-service-package/README.md`:
    - Options for Docker, serverless platforms, and cloud providers (AWS, GCP, Azure, Cloudflare).
    - Example configurations for systemd, Nginx, and Docker Compose.

- **Scripts and Documentation Updates**:
  - Added `deploy:web-service` script to `package.json` for streamlined build and publishing.
  - Enhanced `README.md` to reflect the introduction of the web service package and its capabilities.

- **Purpose**:
  - This update extends Brainy’s functionality by providing a production-ready, easy-to-deploy REST API for search operations. It ensures flexibility for diverse deployment scenarios while maintaining security and high performance.
2025-07-22 10:22:38 -07:00
69a3c8504a 0.15.0 2025-07-21 14:00:40 -07:00
8e58c8d1cc 0.14.0 2025-07-18 12:01:38 -07:00
b16b9caccb 0.13.0 2025-07-18 10:41:24 -07:00
e12ecf8d72 **feat(core): enhance logging, storage options, and testing coverage**
- **Core Improvements**:
  - Refactored logging functions into a unified `logger` method for consistent output across the library.
  - Enabled the `forceMemoryStorage` option in `BrainyData` initialization for improved storage flexibility in tests and specific use cases.

- **TensorFlow.js and Environment Updates**:
  - Clarified the dependency structure in `README.md` to emphasize bundled dependencies and remove legacy peer dependency instructions.
  - Simplified and reformatted environment detection logic for better maintainability and readability.

- **Testing Enhancements**:
  - Added `tests/package-size-limit.test.ts` to monitor and validate npm package size against defined thresholds.
  - Updated `tests/environment.node.test.ts` and core tests to leverage `forceMemoryStorage` for better test setup standardization.
  - Improved test isolation with expanded `globalThis` utility definitions and cleanup logic.

- **Documentation**:
  - Added detailed best practices for debugging and organizing tests in `DEVELOPERS.md`.
  - Removed outdated installation hints from `package.json` and streamlined scripts by including `test:size` for package size validation.

**Purpose**: These changes unify core logging mechanisms, expand configurability of storage options, and improve testing reliability and coverage. Documentation and clarity are enhanced to align with updated functionality and best practices.
2025-07-17 10:00:28 -07:00
7878f200fc **docs: restructure CLI usage details and update scripts for clarity**
- **CLI Documentation Updates**:
  - Updated `README.md` to reflect the separation of CLI functionality into a new package: `@soulcraft/brainy-cli`.
  - Replaced inline CLI imports with instructions for installing and using `@soulcraft/brainy-cli`.
  - Clarified notes on keeping the main package lightweight by decoupling CLI functionality.

- **Script and Command Adjustments**:
  - Modified build instructions in `README.demo.md` to use `npm run build && npm run build:browser`.
  - Updated demo scripts in `package.json` to point to `/demo/index.html` instead of `/index.html`.
  - Revised style-check script in `CONTRIBUTING.md` to use `npm run check:style`.

- **Issues and Contribution Guidelines**:
  - Improved issue reporting section in `DEVELOPERS.md` with clearer guidelines and examples for bug and feature requests.

**Purpose**: These changes enhance documentation accuracy, streamline developer guidance, and ensure commands/scripts are up-to-date with current usage patterns.
2025-07-17 07:53:41 -07:00
491d1c1b89 0.12.0 2025-07-16 13:51:37 -07:00
77edae17c7 **chore: update dependencies in package-lock.json**
- **Added Dependencies**:
  - Introduced `@vitest/coverage-v8` for enhanced test coverage reporting.
  - Added various dev dependencies such as `@ampproject/remapping`, `@babel/parser`, `@babel/types`, and `ast-v8-to-istanbul` to support improved source mapping and code coverage analysis.
  - Included modules such as `html-escaper`, `path-scurry`, and `istanbul-lib-coverage` to align with updated testing and utility requirements.

- **Purpose**:
  - This update ensures compatibility with modern testing tools, facilitates advanced debugging, and supports enhanced test coverage capabilities. It also updates metadata for package resolutions.
2025-07-16 11:40:24 -07:00
d7150dbc30 **chore: streamline documentation, refine shims, and update dependencies**
- **Documentation Updates**:
  - Simplified server functionality details in `README.md`, removing cloud-specific deployment sections and focusing on core features for broader usability.

- **Shim Enhancements**:
  - Improved `util` shim in `rollup.config.js` to include `TextEncoder`/`TextDecoder` support and enhanced `types` checks (e.g., `isFloat32Array`, `isUint8Array`).

- **Dependency Updates**:
  - Added new dev dependencies (`@vitest/ui`, `jsdom`, `happy-dom`).
  - Updated `package-lock.json` with additional dependency resolutions and metadata for better compatibility and maintainability.

This commit aligns documentation with current project focus, enhances cross-platform support via refined shims, and ensures updated dependencies for development and testing environments.
2025-07-15 11:53:26 -07:00
19ed3dd081 **refactor(tests): consolidate and replace outdated environment test scripts**
- Removed obsolete scripts: `test-all-environments.js`, `test-fallback-function.js`, `test-fallback-simple.js`, `test-fix.js`, `test-tensorflow-textencoder.js`, `test-unified-encoding.js`, and `test-worker-utils.js`.
- Introduced `scripts/comprehensive-test.js` as a unified testing script covering all environments: Browser, Node.js, and CLI.
- Added `examples/cli-wrapper-example.js` to demonstrate a proper CLI implementation with TensorFlow.js initialization.

This refactor simplifies the testing structure by consolidating redundant scripts into a single comprehensive script while ensuring robust cross-environment coverage.
2025-07-14 11:12:51 -07:00
c68515dc92 0.11.0 2025-07-11 12:15:28 -07:00
f0db5b471f **feat(tests): add tests for TextEncoder, TensorFlow.js, and fallback mechanisms**
- Introduced `test-fallback-function.js` and `test-fallback-simple.js` to validate `executeInThread` fallback functionality with both named and anonymous compute-intensive functions.
- Added `test-tensorflow-textencoder.js` for TensorFlow.js and TextEncoder tests in a Node.js environment.
- Created `test-tensorflow-textencoder.html` for browser-based TensorFlow.js and TextEncoder tests.
- Implemented cross-environment test support in `cli-package/src/test-tensorflow-textencoder.ts` for CLI functionality.
- Enhanced `src/utils/embedding.ts`, `textEncoding.ts`, and `brainy-wrapper.js` to include updated global `TextEncoder` and `TextDecoder` utilities for compatibility and worker improvements.
- Standardized and expanded utility methods in `PlatformNode` for broader support, including `isFloat32Array` and `isTypedArray` checks.
- Updated Node.js requirement to `>= 24.4.0` across documentation and configuration files for compatibility improvements.

This update introduces comprehensive testing for fallback mechanisms, TensorFlow.js, and TextEncoder across multiple environments, ensuring robustness and compatibility.
2025-07-11 11:11:56 -07:00
00039f836f **chore(release): bump version to 0.10.0 and refactor project structure**
- Updated version to `0.10.0` in `README.md`, `cli-package/package.json`, and `src/utils/version.ts`.
- Removed `CHANGELOG.md` from the root and `cli-package`, as GitHub auto-generates release notes.
- Refactored `brainy-wrapper.js` to simplify utility methods (`isFloat32Array` and `isTypedArray`) by moving them to instance-level definitions.
- Standardized Node.js version requirement to `>= 24.3.0` across documentation and configuration files.
- Improved `textEncoding.ts` by introducing a unified `Platform` class for cross-environment compatibility (Node.js and browser).
- Restructured scripts:
  - Replaced outdated commands (e.g., `test-cli` -> `test:cli` and `test-all` -> `test:all`) for consistency.
  - Removed changelog updates from `scripts/create-github-release.js` as part of simplification.
- Enhanced `patch-textencoder.js` to also patch `worker.js` for both `TextEncoder` and `TextDecoder`.

This release improves compatibility with Node.js 24, simplifies the deployment/changelog process, and refines text encoding and worker functionalities.
2025-07-07 10:19:04 -07:00
1a88aecdb6 0.10.0 2025-07-07 09:25:22 -07:00
1d1c10d287 0.9.37 2025-07-04 14:42:41 -07:00
da760a34ed **feat(cli, workers): introduce text encoding patches and worker improvements**
- Added `cli-package/brainy-wrapper.js` to patch global `TextEncoder` and `TextDecoder` for Node.js environments, ensuring compatibility with TensorFlow.js.
- Implemented unified text encoding utilities in `cli-package/src/utils/textEncoding.ts` for cross-environment consistency.
- Enhanced `src/worker.js` and introduced `src/worker.ts` to improve worker execution with better function serialization and error handling.
- Updated `package.json`:
  - Modified the `build` script to include a patch for `TextEncoder`.
  - Added `test-all` script for multi-environment testing.
  - Introduced the Puppeteer dependency for browser testing.
- Created a favicon generation script `scripts/create-favicon.js` using a base64-encoded icon.
- Added `scripts/test-all-environments.js` to run automated tests across Node.js, browser, and CLI environments.
- Enhanced `src/utils/workerUtils.ts` to support improved fallback mechanisms and robust worker pooling.

This update improves the project's compatibility across environments, refines worker functionalities, and adds comprehensive testing support for reliability.
2025-07-04 14:42:33 -07:00
9293328e72 **chore(deploy): remove GitHub release automation from deploy:cli script**
- Updated `package.json` to modify the `deploy:cli` script by removing the call to `scripts/create-github-release.js`.
- Simplified the deployment process for the CLI package by decoupling GitHub release creation.

This change aims to streamline the CLI deployment workflow, allowing more flexibility in managing GitHub releases.
2025-07-04 12:38:00 -07:00
ac97ad232a 0.9.36 2025-07-04 12:32:24 -07:00
d5d5ad3985 0.9.35 2025-07-04 12:29:44 -07:00
6d13a6737e **chore(release): enhance deployment workflows with GitHub release automation**
- Added functionality to auto-generate GitHub releases:
  - Included `scripts/create-github-release.js` to automate release creation with notes.
  - Modified `scripts/publish-cli.js` to create GitHub releases after publishing packages.
  - Updated `package.json` to call the GitHub release script during `deploy` and `deploy:cli` commands.
- Introduced `CHANGELOG.md` for both main and CLI packages:
  - Enabled auto-updating of CHANGELOG.md from GitHub release notes.
  - Added a new `scripts/update-changelog.js` script to synchronize release details with changelogs.
  - Ensured `CHANGELOG.md` files are included in the published packages.
- Improved documentation visibility by displaying release notes on npmjs.com.

This update streamlines the release process, ensuring consistent documentation, and aligns npm releases with corresponding GitHub releases for better transparency.
2025-07-04 12:29:38 -07:00
cc3350c578 **chore(deps): update dependencies and Node.js version requirements**
- Updated Node.js version requirement to `>=24.3.0` in `README.md` and `package-lock.json`.
- Upgraded `TypeScript` to version `5.4.5` and synced references.
- Updated multiple dependencies, including:
  - `@aws-sdk/client-s3` to `^3.540.0`.
  - `uuid` to `^9.0.1`.
  - Development tools such as `eslint` to `^8.57.0`, `typescript-eslint` plugins to `^7.4.0`, and more.
- Refreshed transitive dependencies with up-to-date versions for consistency and performance.

This update ensures compatibility with the latest Node.js features, aligns TypeScript references, and keeps the project dependencies up-to-date for improved stability and functionality.
2025-07-04 12:19:48 -07:00
6f76143ebc 0.9.34 2025-07-04 11:37:22 -07:00
f33a76d959 0.9.33 2025-07-04 10:53:36 -07:00
30ae9d2138 chore(version): bump version to 0.9.32 and update references
- Updated version to `0.9.32` in `README.md`, `cli-package/package.json`, and `src/utils/version.ts`.
- Synced `@soulcraft/brainy` dependency version to `0.9.32` in the CLI package for consistency.
- Renamed npm scripts `publish` to `deploy` and `publish:cli` to `deploy:cli`, aligning terminology with deployment workflows.
- Updated npm version badge in `README.md` to reflect the new version.

This update ensures consistent versioning across the project, aligns CLI and main package references, and enhances clarity in deployment script naming.
2025-07-02 16:56:21 -07:00
72ac117ed9 0.9.32 2025-07-02 16:54:24 -07:00
72093b615f 0.9.31 2025-07-02 16:52:55 -07:00
be56ea52b7 **chore(version): bump version to 0.9.30 and enhance publishing instructions**
- Updated version to `0.9.30` in `package.json`, `cli-package/package.json`, `src/utils/version.ts`, and `README.md`.
- Synced `@soulcraft/brainy` dependency version to `0.9.30` for CLI package consistency.
- Modified npm version badge in `README.md` to reflect the new version.
- Added detailed publishing instructions in `docs/publishing-cli.md` to guide users on publishing both, main, or CLI packages.
- Introduced new npm scripts `publish:cli` and `build:cli` for streamlined package-specific operations.

This update ensures cohesive versioning, provides clearer publishing guidelines, and improves maintainability with new build/publish scripts.
2025-07-02 16:33:30 -07:00
dabd76e5a3 **chore(version): bump version to 0.9.30 and update package references**
- Updated version to `0.9.30` in `package.json` and `cli-package/package.json`.
- Synchronized `@soulcraft/brainy` dependency version to `0.9.30` in the CLI package for consistency.
- Updated repository URL format to use `git+https` for both `package.json` files.

This update ensures consistent versioning across the project, maintains alignment between main and CLI package dependencies, and standardizes repository URL formatting.
2025-07-02 16:27:53 -07:00
4222b3801e 0.9.29 2025-07-02 16:22:32 -07:00
852ddb57dc 0.9.28 2025-07-02 16:21:50 -07:00
bf1d7e2ce6 **chore(version): bump version to 0.9.27 and update package references**
- Updated version to `0.9.27` in `package.json`, `cli-package/package.json`, `README.md`, and `src/utils/version.ts`.
- Synchronized `@soulcraft/brainy` dependency version to `0.9.27` in CLI package for consistency.
- Updated npm version badge in `README.md` to reflect `0.9.27`.

This update ensures accurate versioning across the project and maintains alignment between main and CLI package dependencies.
2025-07-02 16:20:52 -07:00
c1498cc8c8 0.9.26 2025-07-02 16:18:03 -07:00
5edea683c6 **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.
2025-07-02 16:16:19 -07:00
e9f51e1bf3 0.9.23 2025-07-02 12:55:01 -07:00
72c9e371b3 **feat(cli): add local testing script for CLI and update versions**
- Introduced `scripts/test-cli-locally.js` to streamline local testing of the CLI package before publishing.
   - Builds main and CLI packages, creates local tarballs, and installs the CLI package globally for testing.
   - Ensures version synchronization between main and CLI packages during testing.
- Updated `cli-package/package.json` version to `0.9.23` and synchronized `@soulcraft/brainy` dependency to `0.9.22`.
- Patched `TextEncoder` fallback for Node.js v24 in `cli-wrapper.js` to ensure overall CLI compatibility.
- Added new `test-cli` npm script to `package.json`.

This update simplifies the CLI local testing process, maintains version alignment, and improves readiness for Node.js v24.
2025-07-02 12:54:50 -07:00
0e78e14e1a 0.9.22 2025-07-02 12:38:51 -07:00
1796b31fc0 0.9.21 2025-07-02 12:28:09 -07:00
b89c8710a0 **chore(version): bump version to 0.9.20 and update package configurations**
- Updated version to `0.9.20` across `package.json`, `cli-package/package.json`, `src/utils/version.ts`, and `cli-package/package-lock.json`.
- Updated npm version badge in `README.md` to reflect `0.9.20`.
- Adjusted `package.json` to include additional files in the distribution bundle, such as `dist/unified.js`, `dist/brainy.min.js`, and other key directories.
- Updated `@soulcraft/brainy` dependency to `0.9.20` in CLI package to align dependencies with the latest version.
- Resolved dependency integrity updates in `package-lock.json`.
- Improved dependency management for better version consistency and distribution.

This release ensures up-to-date versioning, improved distribution content management, and enhanced dependency alignment.
2025-07-02 12:28:00 -07:00
3fdb160188 0.9.20 2025-07-02 12:18:20 -07:00
6e23644d11 0.9.19 2025-07-02 12:15:50 -07:00
6abc0ee5c1 **chore(version): bump version to 0.9.18 and update build configurations**
- Updated version to `0.9.18` in `package.json`, `cli-package/package.json`, and `src/utils/version.ts`.
- Updated npm badge in `README.md` to reflect version `0.9.18`.
- Adjusted `publish-cli.js` to synchronize publishing of the main and CLI packages with enhanced build steps.
- Introduced `tsconfig.json` updates to include type paths (`types.d.ts`) in CLI for better type handling.
- Refined CLI scripts for improved TypeScript annotations and better code structure.
- Removed `@types/omelette` and `omelette` dependencies along with associated CLI configurations to simplify the codebase.
- Updated `.gitignore` to exclude CLI `dist` directory for cleaner repository management.
- Added `deploy:both` npm script for combined publishing of main and CLI packages.

This release ensures version consistency, improves CLI workflows, and enhances type handling while decluttering unused dependencies.
2025-07-02 12:15:35 -07:00
da9a37b15c 0.9.18 2025-07-02 11:56:15 -07:00
3f4266ae4f **refactor(cli): remove unused Brainy CLI implementation**
- Deleted the entire `src/cli.ts` file, effectively removing the Brainy CLI component.
- The change streamlines the codebase by eliminating unused and redundant code related to the CLI.
- This refactor supports maintaining a cleaner and more focused project architecture.
2025-07-02 11:55:44 -07:00