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: AutoUpdater for Windows using async/await #40289

Merged
merged 4 commits into from Nov 7, 2023

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Oct 20, 2023

Simplify the code using async/await

Also this line of code has three conditional operators, let's just use optional chaining to make it more readable

update = (ref = JSON.parse(json!)) != null ? (ref1 = ref.releasesToApply) != null ? typeof ref1.pop === 'function' ? ref1.pop() : undefined : undefined : undefined;

Notes: none

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 20, 2023
@miniak miniak marked this pull request as ready for review October 20, 2023 10:58
@miniak miniak self-assigned this Oct 20, 2023
@miniak miniak added semver/patch backwards-compatible bug fixes no-backport labels Oct 20, 2023
Cat-Raphael-scrib

This comment was marked as spam.

@miniak miniak changed the title refactor: hard to read JSON parsing in checkForUpdate refactor: AutoUpdater implementation for Windows using async/await Oct 20, 2023
@miniak miniak changed the title refactor: AutoUpdater implementation for Windows using async/await refactor: AutoUpdater for Windows using async/await Oct 20, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 21, 2023
@codebytere codebytere merged commit 0f68d84 into main Nov 7, 2023
14 checks passed
@codebytere codebytere deleted the miniak/squirrel-update branch November 7, 2023 22:55
Copy link

release-clerk bot commented Nov 7, 2023

No Release Notes

MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants