feat: add support for Capacitor 6 and 7 - #5
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR widens the supported Capacitor range for @capawesome/capacitor-electron to include Capacitor 6 and 7, aligns package metadata accordingly, and adds CI coverage to ensure the packaged-app e2e suite stays green across those supported majors.
Changes:
- Document compatibility as
>=6.x.xand add a README note about Capacitor 6/7 CLI hook exit-code behavior. - Declare
@capacitor/core >=6.0.0as a peer dependency (and widen the e2e echo-plugin fixture peer range similarly). - Expand CI E2E to run additional Ubuntu jobs pinning Capacitor 6 and 7 (Node 20, Electron latest).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Updates compatibility table and adds note about Capacitor 6/7 hook exit-code handling. |
| package.json | Adds @capacitor/core >=6.0.0 peer dependency to reflect supported range. |
| example/local-plugins/echo/package.json | Widens fixture peer dependency range to match supported Capacitor majors. |
| .github/workflows/ci.yml | Adds E2E matrix include entries to run packaged-app tests against Capacitor 6 and 7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Widens the supported Capacitor range from
>=8.x.xto>=6.x.x.@capacitor/core >=6.0.0as a peer dependency (previously no Capacitor peer was declared at all).npx cap synconly surface in the log output (Capacitor 8 fails the command properly).echo-plugine2e fixture's peer dependency range accordingly.Why
The platform never imports
@capacitor/coreat runtime — it couples only to Capacitor's contracts: the CLI platform-hook mechanism (capacitor:*scripts +CAPACITOR_*env vars) and the client bridge protocol (CapacitorCustomPlatform,PluginHeaders,nativePromise/nativeCallback). Both are unchanged between Capacitor 6.0, 7.0, and 8.0 (verified against the upgrade guides and diffs of theionic-team/capacitortags; the v7 breaking removals only affect legacy APIs this platform does not use).Validated empirically: the packaged-app e2e suite (platform injection, plugin method round-trip via
registerPlugin, events, error-code fidelity,appUrlOpendeep link) passes against Capacitor 6.2.1 and 7.6.7. The new CI jobs keep it that way.Notes