feat(updater): electron-updater wiring + IPC bridge

electron-updater integration so users get fixes automatically:
  - new dependency electron-updater@^6.6.2 in package.json
  - electron-builder.config.js publishes to GitHub releases
    (owner: concreteinfo, repo: markdownconverter)
  - new src/main/auto-updater.js wraps autoUpdater: wires the six
    lifecycle events to a 'updates:status' IPC channel, exposes
    check() and install() helpers, dev-gates via isDev(), and
    swallows the 'missing app-update.yml' error that dev runs hit
  - main.js: ensureAutoUpdater() forwards status to the renderer
    via mainWindow.webContents.send; ipcMain handlers for
    'updates:check' (invoke) and 'updates:install' (invoke)
  - preload.js: 'updates:check' / 'updates:install' added to
    ALLOWED_SEND_CHANNELS; 'updates:status' added to receive
    channels; electronAPI.updates.{check, install, onStatus}
    exposed

7 new tests cover event registration, dev-gate behaviour,
'not-available' fallback for missing app-update.yml, typed event
payloads, error forwarding, and install() quitAndInstall.

Amit Haridas
This commit is contained in:
Amit Haridas
2026-09-30 20:30:19 +05:30
parent 0d3df32140
commit 47315add80
6 changed files with 240 additions and 0 deletions
+1
View File
@@ -77,6 +77,7 @@
"docx": "^9.6.0",
"dompurify": "^3.3.1",
"electron-store": "^10.1.0",
"electron-updater": "^6.6.2",
"ffmpeg-static": "^5.3.0",
"figlet": "^1.8.0",
"highlight.js": "^11.11.1",