ci: Cap 9 deprecated native API guard
Merged
RI
2mo ago+260+260+012345678901234567890123456789-0-0-0123456789
What
- Add
scripts/check-cap9-deprecated.mjsandcheck:cap9-deprecatedscript. - Run the guard in CI alongside
check:wiring(Android, iOS, web jobs).
Why
- Catch Capacitor 9–removed native APIs before the Cap 9 toolchain migration.
- Cordova SwiftPM product lines in
Package.swiftare intentionally allowed (Cap 8 still needs them).
How
- Mirror
check-capacitor-plugin-wiring.mjs: scan pluginandroid/src/main,ios/Sources, and rootPackage.swift. - Fail on
hasOption,getConfigValue,@NativePlugin, saved-call helpers, legacy permission helpers,CAPBridge.*, andCAPNotifications.
Testing
node scripts/check-cap9-deprecated.mjsbun run check:wiring
Not Tested
- Full
bun run verifylocally (CI runs platform jobs).


Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by CodeRabbit
-
Tests
- Added automated checks for deprecated Capacitor 9 APIs in Android, iOS, and web build workflows.
- Build validation now reports detected deprecated API usage with file and line details.
-
Chores
- Added a reusable command for running the Capacitor 9 compatibility check locally or in CI.
- Checks support projects with Android and/or iOS capabilities and complete successfully when no applicable platforms are configured.