Skip to content

Make node-main init() wait for the startup promise to resolve#1309

Merged
dpvc merged 1 commit into
developfrom
update/node-init
Jul 18, 2025
Merged

Make node-main init() wait for the startup promise to resolve#1309
dpvc merged 1 commit into
developfrom
update/node-init

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Jul 16, 2025

This PR modifies the node-main file's init() method to wait for the MathJax startup promise to resolve rather than completing while MathJax may be doing more startup tasks. This means node applications that use require('mathjax').init() (or the equivalent for import) don't have to wait on MathJax.startup.promise themselves.

This simplifies some of the node examples I'm working on.

@dpvc dpvc requested a review from zorkow July 16, 2025 12:40
@dpvc dpvc added this to the v4.0 milestone Jul 16, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.71%. Comparing base (4d1e195) to head (515f1d1).

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1309     +/-   ##
==========================================
  Coverage    86.71%   86.71%             
==========================================
  Files          337      337             
  Lines        83979    83980      +1     
  Branches      4750     3125   -1625     
==========================================
+ Hits         72826    72827      +1     
- Misses       11130    11153     +23     
+ Partials        23        0     -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

@dpvc dpvc merged commit 8769f75 into develop Jul 18, 2025
3 checks passed
@dpvc dpvc deleted the update/node-init branch July 18, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants