Title: Refactor: Complete Typescript Migration, Translations to English and Project Modernization#2
Open
SemAiSoft wants to merge 1 commit into
Open
Conversation
…les to English, and 'Typescriptify' the project structure
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
This PR migrates the core library, CLI, and Explorer from legacy JavaScript to a modern TypeScript (ESM) architecture. The goal is to improve developer experience (DX), ensure type safety across database operations, and standardize the project structure for easier maintenance.
🚀 Key Changes
/src,following established TypeScript practices, to separate source code from build artifacts(/dist).🔀 Main Deviations
ops.jsandquery-ops.jswere refactored intobase.tsandquery-base.tsrespectively. Both now serve as base classes for the mainCollection.tsclass.updateManyfunction appeared in both legacy files with different signatures. I merged these into a single overloaded function to maintain both functionalities while reducing codebase complexity.initPromisewas given a more expressive nameisReady. So instead ofawait col.initPromise, it would beawait col.isReady.🛠 Modernized Tooling
🧪 How to Verify
npm installnpm test(Executes integration tests for the Core and API Server).npm run build(Verifies clean ESM output in the /dist folder).🔭 The Future
💭 Motivation?
Short Answer: The original author inspired me with this rare, thorough, and solid implementation. Thanks man!
Long Answer: As the library grows, maintaining consistency will become more challenging. This migration provides a solid foundation for standardization and ensures that breaking changes are caught at compile-time rather than in production.