feat(updater): add in-app auto-update with electron-updater #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
electron-updater, enabling automatic version detection, background download, and restart-to-install workflowUpdateCheckercomponent in the About page with full status UI (checking, downloading with progress bar, ready to install, error with retry)electron-builderpublish to GitHub Releases and update CI workflow to uploadlatest*.ymland*.blockmapfilesChanges
New files
src/shared/types/UpdateStatus.tsUpdateStatusenum andUpdateStatusDatainterfacesrc/main/services/UpdateService.tselectron-updaterwith lazy initsrc/main/ipc/handlers/updater.handler.tssrc/renderer/components/UpdateChecker.tsxModified files
package.json— Addelectron-updaterdep,publishconfig, macOSziptargetsrc/shared/ipc/channels.ts— AddUPDATERchannels andUPDATER_STATUSeventsrc/main/ipc/handlers/index.ts— Register updater handlerssrc/main/index.ts— Fire-and-forget update check on startup (packaged only)src/preload/index.ts— ExposeupdaterAPI andonUpdaterStatuseventsrc/preload/electron.d.ts/src/renderer/electron.d.ts— Type declarationssrc/renderer/components/About.tsx— EmbedUpdateCheckercomponentupdate.*translation keys (en, zh, ja, ru, fa, ar).github/workflows/release.yml— Upload*.ymland*.blockmaprelease assetselectron-updaterandWindowManagermocksTest plan
npm run build— TypeScript compilation passesnpm run test— All 947 tests pass (unit + renderer)npm run dev— Verify UpdateChecker renders in Settings > About, "Check for Updates" button visiblenpm run build:win— Verifyrelease/containslatest.ymland.blockmapfiles🤖 Generated with Claude Code