Skip to content

feat: add support for Capacitor 6 and 7 - #5

Merged
robingenz merged 1 commit into
mainfrom
feat/capacitor-6-support
Jul 13, 2026
Merged

feat: add support for Capacitor 6 and 7#5
robingenz merged 1 commit into
mainfrom
feat/capacitor-6-support

Conversation

@robingenz

@robingenz robingenz commented Jul 13, 2026

Copy link
Copy Markdown
Member

What

Widens the supported Capacitor range from >=8.x.x to >=6.x.x.

  • Declare @capacitor/core >=6.0.0 as a peer dependency (previously no Capacitor peer was declared at all).
  • Update the compatibility table in the README and document that on Capacitor 6 and 7 the Capacitor CLI ignores the exit code of platform hooks, so errors during npx cap sync only surface in the log output (Capacitor 8 fails the command properly).
  • Add CI e2e matrix jobs that run the full packaged-app test against Capacitor 6 and 7 (Ubuntu, Electron latest, Node 20 — the minimum version the example toolchain still supports).
  • Widen the echo-plugin e2e fixture's peer dependency range accordingly.

Why

The platform never imports @capacitor/core at 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 the ionic-team/capacitor tags; 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, appUrlOpen deep link) passes against Capacitor 6.2.1 and 7.6.7. The new CI jobs keep it that way.

Notes

  • The vendor step is unaffected by the new peer dependency: it never traverses the platform package's own dependency closure, so packaged apps do not grow.
  • The peer range is not capped at the top; the compatibility table remains the source of truth for tested majors.

Copilot AI review requested due to automatic review settings July 13, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.x and add a README note about Capacitor 6/7 CLI hook exit-code behavior.
  • Declare @capacitor/core >=6.0.0 as 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.

@robingenz
robingenz merged commit dfec0b5 into main Jul 13, 2026
11 checks passed
@robingenz
robingenz deleted the feat/capacitor-6-support branch July 13, 2026 07:45
@robingenz robingenz self-assigned this Jul 13, 2026
@robingenz robingenz added the feature Feature label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants