Skip to content

Conversation

@Ashp116
Copy link
Contributor

@Ashp116 Ashp116 commented Oct 11, 2025

Description

This PR introduces more options checkForUpdatesAndNotify method in electron-updater to provide more flexible download notification.

Changes

  • The downloadNotification parameter now accepts:
    • Notification - A custom Electron Notification instance
    • DownloadNotification - The existing notification configuration object
    • false - Explicitly disables notifications
  • Improved type safety: Added proper TypeScript typing and import for Electron's Notification class

Use Cases

Disable notifications

autoUpdater.checkForUpdatesAndNotify(false)

Custom Electron Notification

const customNotification = new Notification({
  title: 'New Update',
  body: 'Click to install {version}',
  icon: '/path/to/custom-icon.png'
})
autoUpdater.checkForUpdatesAndNotify(customNotification)

Default DownloadNotification

autoUpdater.checkForUpdatesAndNotify({
  title: 'Update Available',
  body: 'Version {version} is ready to install'
})

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2025

🦋 Changeset detected

Latest commit: d8d4eb4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-updater Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Ashp116 Ashp116 changed the title FEATURE(electron-updater): Enhance download notification settings feat(electron-updater): Enhance download notification settings Oct 11, 2025
@mmaietta
Copy link
Collaborator

Love this! Can you please add a changeset via pnpm generate-changeset?

@Ashp116
Copy link
Contributor Author

Ashp116 commented Oct 11, 2025

Hello @mmaietta,

Great! I added a changeset for this PR.

@Ashp116
Copy link
Contributor Author

Ashp116 commented Oct 12, 2025

Hello @mmaietta,

I am failing some of these checks, and I am not sure how to fix them. Could you assist me in resolving them?

@mmaietta
Copy link
Collaborator

mmaietta commented Nov 2, 2025

Getting back from vacation and revisiting this now.

@Ashp116
Copy link
Contributor Author

Ashp116 commented Nov 12, 2025

Hello @mmaietta,

I changed the import for electron, but I'm not sure if it passes the failed workflows. The current workflows that are passing are fewer than the ones I had previously.

@Ashp116
Copy link
Contributor Author

Ashp116 commented Nov 17, 2025

Hello @mmaietta,

I have updated the code to reflect the feedback. Actually I do agree that the boolean was redundant.

@Ashp116 Ashp116 requested a review from mmaietta November 17, 2025 03:59
@mmaietta
Copy link
Collaborator

Closing and reopening in #9472 so that I can make edits

@mmaietta mmaietta closed this Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants