-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, the update-electron-app package checks for updates automatically. While this approach is convenient for many scenarios, it may not suit applications requiring explicit user control over the update process. Developers may prefer to disable automatic checks and instead have:
- Manual control for checking updates: A method to initiate update checks programmatically.
- Manual installation of updates: A method to trigger the update installation process on demand.
Proposed Changes
-
Add a
disableAutoCheckOption:- Introduce a configuration option in the package to disable automatic update checks when the application starts.
- Example:
require('update-electron-app')({ disableAutoCheck: true, });
-
Expose a
checkForUpdatesMethod:- Provide a method developers can call to manually check for updates. This method would work like the internal automatic check but only when explicitly invoked.
- Example:
const { checkForUpdates } = require('update-electron-app'); checkForUpdates().then((updateAvailable) => { if (updateAvailable) { console.log('Update found!'); } else { console.log('No updates available.'); } });
-
Expose a
installUpdateMethod:- Allow developers to manually trigger the installation of a downloaded update. This would be useful for scenarios where the user needs to approve updates or when updates are installed at specific times.
- Example:
const { installUpdate } = require('update-electron-app'); installUpdate();
Benefits
- Improved Flexibility: Developers gain greater control over when and how updates are managed in their applications.
- Enhanced UX: End-users can be explicitly informed about updates and prompted for consent before downloading or installing.
- Broader Adoption: These changes may attract developers with stricter requirements around update control.
Implementation Notes
- Leverage Electron’s
autoUpdatermodule to support the new methods. - Ensure compatibility with existing configurations to prevent breaking changes.
Compatibility
This change would be backward-compatible since the current default behavior (automatic update checks) would remain unchanged unless the disableAutoCheck flag is set.
bennyqp, dariuszjastrzebski, igmcdowell, GaoBlues2, curtisgray and 1 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request