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

fully swap over to async/await in JavaScript #1604

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

srabraham
Copy link
Member

also use the standard Fetch API rather than jquery ajax

This was a pretty big change, but it makes the code a lot simpler. The callbacks within callbacks within callbacks were a nightmare when trying to reason through the code. async/await lets you pretty much just read top to bottom.

I opted against throwing errors (/using Promise.reject) in favor of returning errors instead. It's prettier than having try-catches all over the place, or maybe that's just my opinion as a Gopher.

#1602

@srabraham srabraham enabled auto-merge (squash) February 15, 2025 21:05
also use the standard Fetch API rather than jquery ajax

This was a pretty big change, but it makes the code a lot simpler.
The callbacks within callbacks within callbacks were a nightmare
when trying to reason through the code. async/await lets you
pretty much just read top to bottom.

I opted against throwing errors (/using Promise.reject) in favor
of returning errors instead. It's prettier than having try-catches
all over the place, or maybe that's just my opinion as a Gopher.

#1602
@srabraham srabraham force-pushed the srabraham-2025-02-14-async branch from ece4d1a to c56e232 Compare February 15, 2025 21:32
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.09%. Comparing base (94b0eab) to head (c56e232).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1604      +/-   ##
==========================================
- Coverage   70.11%   70.09%   -0.03%     
==========================================
  Files         188      188              
  Lines        9334     9334              
  Branches     1516     1516              
==========================================
- Hits         6545     6543       -2     
- Misses       2675     2676       +1     
- Partials      114      115       +1     

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

@srabraham srabraham merged commit 7d05593 into master Feb 15, 2025
12 checks passed
@srabraham srabraham deleted the srabraham-2025-02-14-async branch February 15, 2025 21:39
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.

1 participant