Skip to content

feat(electron-updater): allow overriding AppUpdater.isStagingMatch#9021

Merged
mmaietta merged 1 commit intoelectron-userland:masterfrom
Lemonexe:allow-override-isStagingMatch
Apr 11, 2025
Merged

feat(electron-updater): allow overriding AppUpdater.isStagingMatch#9021
mmaietta merged 1 commit intoelectron-userland:masterfrom
Lemonexe:allow-override-isStagingMatch

Conversation

@Lemonexe
Copy link
Copy Markdown
Contributor

Alternative implementation for #9016

Add get/set/protected isUserWithinRollout interface to AppUpdater class, similarly to how it is implemented for isUpdateSupported so that you can override the default calculation of staging percentage.
The user will be offerred an update if the other necessary conditions are met, but they would otherwise be below the rollout threshold.

Usecase

staging rollout is observed when automatically querying for updates in background, but we also have a manual "Check for updates" button in Settings. This will allow the manual check to always offer you the latest version.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: f704bf6

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 Patch

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

Comment thread packages/electron-updater/src/AppUpdater.ts
Comment thread packages/electron-updater/src/AppUpdater.ts Outdated
@mmaietta
Copy link
Copy Markdown
Collaborator

This is clean! Thank you for the contribution

Quick request, can you generate a changeset file for this using pnpm generate-changeset so that it's picked up by the CD pipeline? Might want to run pnpm generate-all as well to verify prettier.

@mmaietta mmaietta mentioned this pull request Apr 10, 2025
@Lemonexe Lemonexe force-pushed the allow-override-isStagingMatch branch from a08d213 to f704bf6 Compare April 11, 2025 06:46
@Lemonexe
Copy link
Copy Markdown
Contributor Author

@mmaietta Done. I ran lint, lint-deps, generate-changeset and generate-all ✔️

The last one generated a diff in app-build-lib/scheme.json (differs only in text). Though I did not commit that, to avoid mixing multiple packages in one commit..

@mmaietta mmaietta merged commit cf43f05 into electron-userland:master Apr 11, 2025
18 checks passed
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