Commit graph

20 commits

Author SHA1 Message Date
7b51829418 **chore(version, docs): bump version to 0.9.14 and update build documentation**
- Updated `npm` badge in `README.md` to reflect version `0.9.14`.
- Updated `VERSION` constant in `src/utils/version.ts` to `0.9.14`.
- Replaced `build:all` script references in documentation with separate `build` and `build:browser` commands for better clarity.
- Adjusted `demo` script to build both Node.js and browser versions before running the demo.
- Updated prerequisites in `README.demo.md` to align with the new build workflow.
- Refined `package.json` `files` field to clean up package distribution artifacts.

These changes ensure version consistency, clarify build processes, and improve documentation to streamline the developer experience.
2025-07-02 10:20:58 -07:00
5d9128991f **chore(version, build): bump version to 0.9.13 and enhance CLI build configuration**
- Updated `npm` badge in `README.md` to reflect version `0.9.13`.
- Updated `VERSION` constant in `src/utils/version.ts` to `0.9.13`.
- Refined `rollup.config.js` to conditionally export configurations based on build type (`cli` or `main`).
- Added `build:cli` script in `package.json` for CLI-specific builds.
- Updated `cli` script to include CLI build step for executable generation.
- Adjusted `package.json` `files` field to exclude CLI build artifacts in package distribution.

These changes ensure version consistency, improve CLI build workflows, and align the package distribution with project requirements.
2025-07-02 09:24:09 -07:00
de627c5dfa feat(demo, docs): introduce threading test demos for browser and fallback, enhance threading documentation
- Added `test-browser-worker.html` to demonstrate threading with Web Workers in browser environments.
- Added `test-fallback.html` to verify fallback functionality when threading is unavailable.
- Created `THREADING.md` to document unified threading implementation, including Node.js Worker Threads, Web Workers, and fallback mechanisms.
- Updated Node.js version requirement in `README.md` and `package.json` to `>=24.0.0` for compatibility with improved Worker Threads API.
- Enhanced `workerUtils.ts` to implement threading with a worker pool for Node.js and added Web Worker execution logic for browsers.
- Enabled environment-aware threading availability in `environment.ts`.
- Updated `rollup.config.js` to include CLI configurations for streamlined builds.
- Adjusted `.gitignore` to exclude test artifacts and package files.

These changes provide comprehensive testing and documentation of threading functionality, improve cross-environment compatibility, and enhance developer workflows.
2025-07-01 10:39:12 -07:00
02502a6f10 **chore(version): bump version to 0.9.12 in README and utils**
- Updated `npm` badge in `README.md` to reflect version `0.9.12`.
- Updated `VERSION` constant in `src/utils/version.ts` to `0.9.12`.

These changes ensure version consistency across documentation and codebase in preparation for release.
2025-06-30 11:29:56 -07:00
f946328823 fix(src/utils): improve readability of findUSELoadFunction parameters
- Refactored function signature to include line breaks for enhanced readability and adherence to style guidelines.
- No functional changes introduced, ensuring consistent behavior.

These adjustments improve code clarity and maintain alignment with project formatting standards.
2025-06-30 11:00:36 -07:00
99a8cbfe2c fix(src/augmentationPipeline): remove unnecessary whitespace for formatting consistency
- Eliminated redundant line break to ensure consistent code formatting.
- Aligns the file with project coding standards for better readability and maintainability.
2025-06-30 09:39:25 -07:00
ef83af4b55 fix(src/utils): enhance type definition and improve load function detection
- Updated `findUSELoadFunction` return type for better type safety and clarity.
- Enhanced load function detection logic with improved readability and consistency.
- Applied formatting adjustments, such as line breaks and removal of redundant semicolons, to adhere to coding standards.

These changes ensure stronger type enforcement, align with project style guidelines, and improve maintainability of Universal Sentence Encoder initialization logic.
2025-06-30 09:39:16 -07:00
cabe0a3a08 fix(src/brainyData): enforce consistent formatting and improve fallback mechanisms
- Applied consistent formatting improvements, including line breaks, parentheses usage, and object destructuring, to enhance code readability and maintainability.
- Enhanced the fallback mechanism during Universal Sentence Encoder initialization by implementing a retry approach with error handling.
- Refactored `addBatch` processing for both vector and text items to improve clarity and adhere to project coding standards.
- Optimized initialization safeguards with structured retry implementations, ensuring robust error resiliency.

These changes align the codebase with established formatting guidelines and improve the reliability of embedding initialization processes.
2025-06-30 09:39:06 -07:00
fe4de2f7a0 fix(README, src/utils): bump version to 0.9.11
- Updated `npm` shield in `README.md` to reflect the new version (v0.9.11).
- Incremented `VERSION` constant in `src/utils/version.ts` to align with the release update.

These changes ensure documentation and source files remain consistent with the latest release version.
2025-06-27 14:07:39 -07:00
bba9a0c219 feat(src/brainyData, src/utils): enhance embedding efficiency with batch processing and initialize safeguards
- Added batch embedding support with `defaultBatchEmbeddingFunction`, leveraging shared model instances for optimized performance.
- Integrated `isInitializing` flag to prevent recursive initialization and ensure smooth concurrent operation handling during `BrainyData` initialization.
- Pre-loaded Universal Sentence Encoder in `BrainyData` to prevent delays during embedding.
- Introduced fallback mechanisms in embedding initialization for better error resiliency and model reusability.
- Updated `addBatch` with support for batchSize and refactored text/vector processing logic for clearer separation and memory management.
- Improved GPU and CPU backend selection in Universal Sentence Encoder for compatibility across environments.
- Enhanced memory management by cleaning tensors after embedding operations.
- Updated README with instructions for batch embedding, threading updates, and GPU/CPU optimizations.
2025-06-27 14:06:59 -07:00
e81979dc84 fix(src/utils): remove unused sentenceEncoderModule for cleanup
Removed the unused `sentenceEncoderModule` object from `workerUtils.ts` to simplify the code and improve maintainability.
2025-06-26 19:08:09 -07:00
6a8d044970 feat(src/utils): add GPU acceleration and improve threading for embeddings and distance calculations
- Integrated GPU acceleration via WebGL in `embedding.ts` and `distance.ts` for optimized performance.
- Enhanced fallback mechanisms for CPU processing when GPU is unavailable or fails to initialize.
- Added threading support for embedding and distance calculations in `embedding.ts` and `distance.ts` to improve performance and avoid blocking the main thread.
- Refactored TensorFlow.js imports to dynamically load modules (`@tensorflow/tfjs-core`, `@tensorflow/tfjs-backend-webgl`, `@tensorflow/tfjs-backend-cpu`) for modular dependency usage.
- Introduced GPU-accelerated batch distance calculations in `distance.ts` with appropriate error handling.
- Applied consistent formatting to improve code readability and maintainability while adhering to project style guidelines.
2025-06-26 19:04:37 -07:00
bd123c4bb9 fix(src/utils): enforce consistent formatting and enhance worker script initialization
Refactored worker script initialization in `src/utils/workerUtils.ts` by introducing global variables for safer script execution. Applied consistent formatting adjustments, including removal of redundant semicolons, to improve code readability and maintainability without altering functionality.
2025-06-26 10:57:24 -07:00
a2ad5fabdf feat(src/hnsw): add GPU acceleration for distance calculations and improve fallback handling
Integrated `calculateDistancesWithGPU` for GPU-accelerated distance calculations, optimizing performance for compute-intensive tasks. Introduced robust error handling for GPU failures with automatic fallback to threaded or sequential CPU calculations. Enhanced code structure and readability with consistent formatting adjustments.
2025-06-26 10:56:48 -07:00
e884c58310 fix(src/brainyData): enforce consistent formatting and improve code readability
Applied consistent formatting adjustments across `src/brainyData.ts`, including line breaks, parentheses, and object destructuring. These changes enhance code readability, maintainability, and alignment with the project's style guidelines without altering functionality.
2025-06-26 10:56:29 -07:00
95be23362a fix(src/index): enforce consistent formatting and adjust code structure
Applied consistent formatting adjustments throughout `src/index.ts`, including line breaks, object destructuring, and type exports. Improved code readability and alignment with project style guidelines. These changes maintain existing functionality without introducing behavioral changes.
2025-06-26 10:56:14 -07:00
cbf025dffb fix(src/storage): enforce consistent formatting and improve code readability
Applied consistent formatting adjustments, including line breaks, parentheses, and object destructuring. These changes enhance code readability and maintainability while preserving existing functionality.
2025-06-26 10:49:07 -07:00
cacd1790dc fix(src/augmentations): enforce consistent formatting and improve code readability
Applied consistent formatting to align with the project's style guidelines, including adjustments to line breaks, parentheses, and object destructuring. These changes enhance code readability and maintainability without altering functionality.
2025-06-26 10:48:49 -07:00
47ba4f4093 fix(src/augmentationPipeline): remove redundant semicolons and enforce consistent formatting
Made code more concise by removing unnecessary semicolons and adjusting the code formatting to align with the project's style. Improved readability and maintainability.
2025-06-26 10:48:10 -07:00
5a8a6c1ba3 Initial commit 2025-06-24 11:41:30 -07:00