ci: add Cap 9 deprecated-API guard

Closed
RI
2mo ago
+331-0

Summary

Adds the Cap-go reference Cap 9 deprecated native API CI guard (scripts/check-cap9-deprecated.mjs), matching the pattern from capacitor-admob#47.

Changes

  • scripts/check-cap9-deprecated.mjs — scans android/ios native sources (and packages/* when present) for Cap 9 removed APIs; strips comments; supports --dir; skips Cordova SPM product lines in Package.swift; allows Cap 9 replacements (Bridge.saveCall, Bridge.getSavedCall, Bridge.releaseCall, savedCall(withID:)); exits 0 when package.json has no capacitor.android / capacitor.ios (hook-only packages like this repo).
  • package.json — check:cap9-deprecated script.
  • .github/workflows/test.yml — runs the check after bun i in the web job.

Local verify

bun run check:cap9-deprecated
bun run verify
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.