Commit graph

18 commits

Author SHA1 Message Date
e2373b798e **feat(scripts): add automated release workflow script**
- Introduced `release-workflow.js` to streamline the release process:
  - Automates version updates (`patch`, `minor`, `major`).
  - Generates changelogs based on commit messages.
  - Creates GitHub releases with autogenerated notes.
  - Publishes packages to NPM.
- Enhanced documentation in `README.md` with detailed release instructions, both automated and manual.
- Updated related test cases and ensured compatibility.

**Purpose**: Simplify and standardize the release
2025-07-31 13:40:28 -07:00
e76995ee98 chore(changelog): remove manual changelog update script
- Deleted `scripts/update-changelog.js`, as it became obsolete with the adoption of `standard-version` for automated versioning and changelog management.
- Ensured repository alignment with the updated workflow outlined in prior
2025-07-31 13:22:22 -07:00
79df44351c **chore: remove outdated changelog and summary documents**
- Deleted `CHANGES.md`, `CHANGES_SUMMARY.md`, `CONCURRENCY_ANALYSIS.md`, `CONCURRENCY_IMPLEMENTATION_SUMMARY.md`, and related developer documentation files.
- Removed redundant or legacy content no longer aligned with the current codebase and workflows.
- Updated repository to reflect streamlined documentation approach, reducing clutter and improving maintainability.

**Purpose**: Simplify and declutter repository by removing obsolete documentation files, ensuring it remains focused and relevant.
2025-07-30 11:51:39 -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
3c7846b79d **chore: remove comprehensive test scripts and related documentation**
- Removed the `scripts/comprehensive-test.js` script and its auxiliary files (`node-test.js`, `TENSORFLOW_NODEJS.md`, and `scripts/test-cli-locally.js`).
- These files encompassed unified testing across environments (Browser, Node.js, and CLI) and TensorFlow.js compatibility.
- Reflects a strategic decision to deprecate integrated testing workflow in favor of modular testing approaches and project simplification.

This cleanup aligns with the ongoing effort to streamline the repository and remove redundant or outdated test infrastructure.
2025-07-15 11:50:37 -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
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
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
4cbc9ae4db **chore(version): bump version to 0.9.35 and update references**
- Updated version to `0.9.35` in `README.md`, `cli-package/package.json`, and `src/utils/version.ts`.
- Synced `@soulcraft/brainy` dependency version to `0.9.35` in the CLI package for consistency.
- Updated npm version badge in `README.md` to reflect the new version.
- Enhanced GitHub release script (`scripts/create-github-release.js`) to check and push tags to remote if they exist locally.

This update ensures consistent versioning across the project and improves release automation with better tag management.
2025-07-04 12:32:21 -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
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
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
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
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
7e3e6654a9 **feat(cli, scripts): introduce CLI package and automated publishing process**
- Added a new `@soulcraft/brainy-cli` package to provide a dedicated CLI interface for the Brainy database.
- Implemented a CLI wrapper script (`cli-wrapper.js`) to manage global package execution and version handling.
- Introduced `scripts/publish-cli.js` to automate synchronized publishing of the main package and CLI, ensuring version consistency.
- Created documentation for CLI usage and publishing workflow (`publishing-cli.md`).
- Updated `package.json` to include CLI-related build and deploy scripts.
- Adjusted `README.md` to document the CLI package, usage instructions, and build separation.

This feature introduces a standalone CLI package, improves deployment automation, and enhances documentation to align with the updated architecture.
2025-07-02 11:32:06 -07:00
79c293559a feat(scripts, project): add comprehensive code style enforcement script and update style-related workflows
- Created `scripts/check-code-style.js` to enforce coding standards.
  - Includes ESLint, Prettier checks, and custom semicolon rule validation.
  - Outputs actionable feedback for style violations.
- Updated `CONTRIBUTING.md` to document new code style workflows and commands.
- Added style commands to `package.json`:
  - `lint`, `lint:fix`, `format`, `check-format`, and `check-style`.
- Refactored `demo/index.html` to use `Object.defineProperty` for better global property management and prevent conflicts.

These changes enhance the automation of code quality checks, streamline developer workflows, and improve reliability in global property handling for the demo.
2025-06-30 09:51:53 -07:00
5a8a6c1ba3 Initial commit 2025-06-24 11:41:30 -07:00