feat(worker): offload browser search to web worker#88
feat(worker): offload browser search to web worker#88adelpro merged 81 commits intoadelpro:developfrom
Conversation
docs: Create Structured Documentation (adelpro#70)
feat(search): add optional regex query support (adelpro#71)
… architecture documentation
- Replace pnpm with yarn for package management and workspace setup - Update CI workflows, documentation, and example scripts accordingly - Add new GitHub workflows for security scanning and package manager detection - Reorganize project files and update workspace configuration
- Set splitting to false in tsup config to reduce bundle complexity - Remove size-limit check for CommonJS bundle while keeping ES module check
…nal Quran database
…arabic-mapping-dataset-nlp English-Arabic Dataset and NLP Processing
- Add dedicated search worker and client wrapper. - Update React, Angular, and vanilla TS examples to use the worker with a main-thread fallback.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
- Update worker support check to use globalThis for better compatibility. - Refactor worker instantiation to handle unsupported environments gracefully.
- Declare worker globals (postMessage, self) in searchWorker.ts - Use globalThis.Worker in searchWorkerClient.ts to fix no-undef - Remove unused imports and fix types in english-to-arabic-builder.ts - Remove unused parse import and type quranRows in word-level-transliteration.ts - Add normalized_text to ayahData type in word-level-transliteration.ts
- validateLengths: use Record<string, unknown> for parsed - main: use Record<string, unknown> for sourceData from JSON
- Import LRUCache from utils/lru-cache in searchWorker and searchWorkerClient - Fix TS2322 by typing pending resolve as PendingResolve and asserting in initData/runSearch
|
Salam @Vexxo-Dev, this is the most complete solution to the issue. Baraka Allahu fik. I need a bit more time to explore and analyze your implementation. |
|
و عليكم السلام ي هندسة @adelpro مفيش اي مشكله خد وقتك و بارك الله ف وقتك ❤️ |
- Fix ESLint no-undef in worker files and switch LRUCache imports to utils/lru-cache - Tighten types and remove remaining any in english-to-arabic-builder and word-level-transliteration - Configure ESLint tsconfigRootDir in eslint.config.mjs to avoid multi-TSConfig parsing errors
Closes #12
Summary
Test plan