Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initSettings() to NodeRay #269

Merged
merged 2 commits into from
Mar 29, 2024
Merged

Add initSettings() to NodeRay #269

merged 2 commits into from
Mar 29, 2024

Conversation

patinthehat
Copy link
Member

This PR adds NodeRay.initSettings() and removes async from the NodeRay.create() method.

Copy link

what-the-diff bot commented Mar 29, 2024

PR Summary

  • Improvement in User Guide
    We've updated the README.md file to include a hint about initializing settings before using the application. This will offer better usability to anyone trying to implement our solution in a NodeJS environment.

  • Functionality Enhancement in Application Initialization
    We made some changes to the RayNode.ts file. We introduced a new method initSettings which enables the application settings to be set up before creating an instance of Ray. That method is now also integrated into the create method to ensure the settings are always initialized when a new Ray instance is created.

  • Code Simplification in Settings Retrieval
    We simplified our code in the SettingsFactory.ts file. Previously, some methods used a programming feature called await unnecessarily. Removing these from the getSettingsFromConfigFile, searchConfigFiles, and searchConfigFilesOnDisk methods has made our code more efficient and easier to maintain.

  • Code Clean Up in File Searching Function
    In the findUp.ts file, we refined the findUp function by removing the superfluous await keyword. The simplification leads to easier understanding and less complexity during code maintenance.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 87.22%. Comparing base (f10a743) to head (cc8bbfb).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
- Coverage   87.34%   87.22%   -0.12%     
==========================================
  Files          67       67              
  Lines        3404     3418      +14     
  Branches      529      528       -1     
==========================================
+ Hits         2973     2981       +8     
- Misses        431      437       +6     
Files Coverage Δ
src/Settings/SettingsFactory.ts 92.43% <100.00%> (-6.06%) ⬇️
src/lib/findUp.ts 86.42% <100.00%> (ø)
src/RayNode.ts 80.19% <82.36%> (+0.85%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f10a743...cc8bbfb. Read the comment docs.

@patinthehat patinthehat merged commit 411c54f into main Mar 29, 2024
5 checks passed
@patinthehat patinthehat deleted the nodejs-sync branch March 29, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant