capacitor-plugin-upgrade-v4-to-v5
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Capacitor Plugin Upgrade v4 to v5
Move a plugin library to Capacitor 5. Source of truth: https://capacitorjs.com/docs/updating/plugins/5-0
When to Use
- Snapshot shows
@capacitor/core4.x in peer/dev deps and the plugin must work in Capacitor 5 apps. - A Capacitor 5 app fails building this plugin with
Namespace not specifiedor Java 17 errors. - The plugin manually conforms to
CAPBridgedPluginor callsgetObject()/getArray().
Do not use:
- Upgrading an app ->
capacitor-app-upgrade-v4-to-v5. - Plugin already on 5 ->
capacitor-plugin-upgrade-v5-to-v6. Multi-hop ->capacitor-plugin-upgrades.
Live Project Snapshot
Plugin and Capacitor package snapshot:
!node -e "const fs=require('fs');if(!fs.existsSync('package.json'))process.exit(0);const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const out=['package.name='+(pkg.name||''),'package.version='+(pkg.version||'')];for(const section of ['peerDependencies','dependencies','devDependencies']){for(const [name,version] of Object.entries(pkg[section]||{})){if(name.startsWith('@capacitor/'))out.push(section+'.'+name+'='+version)}}console.log(out.join('\n'))"