Commit graph

9 commits

Author SHA1 Message Date
f87e13b8bc 0.9.13 2025-07-01 10:40:37 -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
e2d9e48edb **chore(scripts): add dry-run script to package.json**
- Introduced a `dry-run` script to simulate `npm pack` actions without creating a package archive.
- Updated the `postinstall` script to adhere to consistent formatting.

These changes improve developer workflows by enabling validation of package contents before publishing and ensuring consistency.
2025-06-30 13:21:15 -07:00
bbd9062e16 0.9.12 2025-06-30 11:29:37 -07:00
5052bbc0b7 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
b879844411 0.9.11 2025-06-27 14:07:07 -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
e00066119e fix(package.json): update TensorFlow dependencies for optimized backend usage
Replaced `@tensorflow/tfjs` and `@tensorflow/tfjs-layers` with `@tensorflow/tfjs-backend-webgl` to optimize backend performance and reduce unused package imports.
2025-06-26 10:48:25 -07:00
5a8a6c1ba3 Initial commit 2025-06-24 11:41:30 -07:00