feat: Modernize library, add comprehensive tests, and improve code qu… - #1
Open
AshutoshBuilds wants to merge 1 commit into
Open
AshutoshBuilds wants to merge 1 commit into
AshutoshBuilds wants to merge 1 commit into
Conversation
Author
|
Hey @AjitNambiar @nagapavandev check this out! |
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.
Hello Symphony Fintech Team,
This pull request introduces a series of significant improvements and modernizations to the
xts-interactive-apiNode.js library. The goal of these changes was to enhance its robustness, maintainability, and developer experience.Key Changes and Improvements:
Dependency Modernization:
requestandrequest-promisewithaxiosfor HTTP requests.socket.io-clientfrom v2.x to v4.8.1 (latest LTS) and updatedlib/interactiveSocket.jsfor compatibility, including improved reconnection logic and event handling.linqdependency, replacing its functionality with nativeURLSearchParams.chalkfor improved console output in the logger.Comprehensive Test Suite:
lib/customError.jslib/logger.jslib/request.js(HTTP client wrapper)lib/interactiveSocket.js(WebSocket handling)lib/interactiveRestAPI.js(all API methods)Code Quality & Refinements:
lib/customError.jsinto a proper ES6 class.lib/interactiveRestAPI.jsto consistently useCustomError.Date.prototypeextensions fromlib/logger.js, replacing them with internal utility functions and adding timestamping to log messages.lib/interactiveSocket.jsevent handlers.lib/interactiveRestAPI.jsfor clarity (URL construction,populateEnumsvariable scoping).lib/config/app/settings.json.Documentation & Setup:
README.mdwith current dependencies, new method documentation (getOrderHistory,loginWithToken), corrected examples, and testing instructions..gitignorefile for Node.js projects.changelog.md(included in this PR) and aPRD.md(also included) that guided these enhancements.Benefits:
All changes are based on the version of the library in my fork (
AshutoshBuilds/xts-interactive-api) where this work was performed.Please let me know if you have any questions or require further changes.
Thank you for considering these improvements!