-
Notifications
You must be signed in to change notification settings - Fork 138
feat: support not to auto check update & manual check update #179
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
base: main
Are you sure you want to change the base?
Conversation
Friendly ping! Any feedback on this? |
@rhy3h Hey! Haven't gotten around to reviewing it yet, thanks for the ping. Hopefully can get that done for you in the next week or two? |
@erickzhao Hey! No worries at all, I really appreciate you taking the time. I just started contributing to PRs recently, so I’d love to know if I’m doing things correctly. No rush at all! |
Just checking in again—no rush at all, and really appreciate your time. Would love any feedback whenever you get a chance! |
@erickzhao have you had chance to check this PR? This changes gain greater control over when and how updates are managed in the application. I would be grateful for your feedback |
FYI |
/** | ||
* @param {Boolean} autoCheck Decides whether to automatically check for updates | ||
* Defaults to `true`. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @param {Boolean} autoCheck Decides whether to automatically check for updates | |
* Defaults to `true`. | |
*/ | |
/** | |
* @param {Boolean} autoCheck Decides whether to automatically check for updates | |
* @default true | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other comments
update-electron-app/src/index.ts
Lines 98 to 107 in c5f1d43
/** | |
* @param {Object} logger A custom logger object that defines a `log` function. | |
* Defaults to `console`. See electron-log, a module | |
* that aggregates logs from main and renderer processes into a single file. | |
*/ | |
readonly logger?: L; | |
/** | |
* @param {Boolean} notifyUser Defaults to `true`. When enabled the user will be | |
* prompted to apply the update immediately after download. | |
*/ |
those writing style uses indentation
so I do that too
which one should I follow
// check for updates right away and keep checking later | ||
autoUpdater.checkForUpdates(); | ||
setInterval(() => { | ||
if (autoCheck) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (autoCheck) { | |
if (autoCheck === true) { |
I wonder if we want to be stricter about actually passing true
rather than something truthy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update-electron-app/src/index.ts
Line 216 in c5f1d43
if (opts.notifyUser) { |
I follow this, so I didn't do strict equal
I agree with you, it might need stricter
src/index.ts
Outdated
} | ||
} | ||
|
||
export function checkForUpdates() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a JSDoc comment for the new manual checkForUpdates function as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rhy3h@7019793
please see this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking comment on IMO bad api surface
Implemented the issue #164
autoCheck
- which defaults totrue
. It can be set to false to disable automatic update checks.checkForUpdates()
- manually check for updates.However, I did not implement the final
installUpdate
functionBecause the correct installation process should be executed after the file has been downloaded