feat(live-update): add Electron platform support - #921
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds Electron platform support to @capawesome/capacitor-live-update by introducing a new Electron adapter implementation, wiring up build tooling, and updating public docs/API annotations to reflect Electron availability.
Changes:
- Add an Electron main-process adapter (
LiveUpdateElectron) backed by@capawesome/electron-live-update/engine. - Add Electron build pipeline (TS + Rollup), plugin version syncing, and package metadata updates.
- Update docs and API JSDoc to mark methods/options as available on Electron and document Electron-specific behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/live-update/src/definitions.ts | Updates platform availability/docs for Electron across config/methods/types. |
| packages/live-update/scripts/sync-plugin-version.mjs | Extends version sync script to update the Electron version constant. |
| packages/live-update/README.md | Documents Electron support and updates generated doc sections for Electron availability. |
| packages/live-update/package.json | Adds Electron packaging/scripts and introduces the Electron engine dependency. |
| packages/live-update/electron/tsconfig.json | Adds Electron-specific TypeScript config for building the adapter. |
| packages/live-update/electron/src/version.ts | New version constant consumed by the Electron adapter/engine config. |
| packages/live-update/electron/src/index.ts | New Electron adapter implementation mapping plugin API to the engine. |
| packages/live-update/electron/src/definitions.ts | Defines the minimal Electron platform context contract used by the adapter. |
| packages/live-update/electron/rollup.config.mjs | Builds the Electron adapter into an ESM bundle for the platform loader. |
| .changeset/live-update-electron-platform.md | Declares a minor release for introducing Electron support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…heckout Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sion at runtime Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
CI status note: the |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
Adds the Electron platform implementation to
@capawesome/capacitor-live-update, targeting the@capawesome/capacitor-electronplatform. The adapter is a thin mapping layer: all download/verify/store/rollback logic lives in the@capawesome/electron-live-updateengine (./enginesubpath, main-process only — zero runtime impact for mobile/web consumers).electron/src/index.ts:LiveUpdateElectronimplementing all 26LiveUpdatePluginmethods with the platform's static marker metadata.initialize()lifecycle hook runsengine.initialize()(kill-safe boot rollback) and repoints viaservices.bundles.setActiveBundle(..., { bootWatchdog: false })before the first window load — the engine owns rollback, the platform watchdog stays disarmed.autoUpdateStrategy: 'background'(throttled sync on ready/window-focus/power resume).setConfig/resetConfigreject as unimplemented on Electron.runtime=capacitor+platform=2+ the plugin package version aspluginVersion— same cloud app andappIdas the mobile targets.electron/dist/plugin.mjs(rollup),capacitor.electron.src,build:electron/verify:electronscripts, version constant synced by the existing release script.definitions.ts+ docgen, README Electron installation section. Changeset:minor.Verification
verify:web,build:electron/verify:electron, eslint, prettier — all green (swiftlint failures are pre-existing in untouched iOS files).verify:electrontype-resolves the engine from the sibling repo checkout until@capawesome/electron-live-update@0.1.0is published (release-order gate).Related PRs
🤖 Generated with Claude Code