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

refactor: improved Typedoc generation with async file handling and better error management #1112

Closed

Conversation

Ultimecia1463
Copy link

Refactored the Typedoc generation script to enhance error handling, improve asynchronous file operations, and optimize JSON parsing for output.

  • Implemented fs.promises for asynchronous file reading and writing, improving performance and responsiveness.
  • Added error handling with try/catch blocks to gracefully manage failures during Typedoc generation and file operations.
  • Reduced redundant calls to process.cwd() for better efficiency and readability.
  • Streamlined JSON parsing to avoid unnecessary operations when creating the minified output.

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2024

CLA assistant check
All committers have signed the CLA.

@Ultimecia1463 Ultimecia1463 changed the title Refactor: improve Typedoc generation with async file handling and better error management refactor: improve Typedoc generation with async file handling and better error management Oct 5, 2024
@Ultimecia1463 Ultimecia1463 changed the title refactor: improve Typedoc generation with async file handling and better error management refactor: improve Typedoc generation with async file handling and better error management Oct 5, 2024
@Ultimecia1463 Ultimecia1463 changed the title refactor: improve Typedoc generation with async file handling and better error management refactor: improved Typedoc generation with async file handling and better error management Oct 5, 2024
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! thanks - our docs are in flux right now and have been unpublished for quite some time so I don't have a great way to review this via actually looking at the result but the code changes seem reasonable.

I'm working on getting the docs publishing again and I'll give this a final review then once we can make sure things are still generating fine (they should be - but verifying is vital...)

Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.08%. Comparing base (ca4572a) to head (a93dc30).
Report is 43 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1112   +/-   ##
=======================================
  Coverage   77.08%   77.08%           
=======================================
  Files          32       32           
  Lines        1727     1727           
  Branches      579      556   -23     
=======================================
  Hits         1331     1331           
- Misses        343      395   +52     
+ Partials       53        1   -52     

@mikehardy mikehardy mentioned this pull request Oct 5, 2024
@Ultimecia1463
Copy link
Author

thanks for you time @mikehardy

Copy link

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Nov 13, 2024
@Ultimecia1463
Copy link
Author

@mikehardy

@github-actions github-actions bot removed the Stale label Nov 13, 2024
Copy link

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Dec 11, 2024
@mikehardy
Copy link
Collaborator

I'm changing all of the docs generation now and hope to do typedocs without javascript, rather just with a config file in the future - this won't remain relevant, sorry

@mikehardy mikehardy closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants