@@ -16,7 +16,16 @@ import { extractTemplate } from '../util/template';
1616
1717// eslint-disable-next-line prefer-const
1818let allDependencies : { [ key : string ] : any } = { } ;
19- const libs = [ '@capacitor-plus/core' , '@capacitor-plus/cli' , '@capacitor-plus/ios' , '@capacitor-plus/android' ] ;
19+ const libs = [
20+ '@capacitor-plus/core' ,
21+ '@capacitor-plus/cli' ,
22+ '@capacitor-plus/ios' ,
23+ '@capacitor-plus/android' ,
24+ '@capacitor/core' ,
25+ '@capacitor/cli' ,
26+ '@capacitor/ios' ,
27+ '@capacitor/android' ,
28+ ] ;
2029const plugins = [
2130 '@capacitor-plus/action-sheet' ,
2231 '@capacitor-plus/app' ,
@@ -43,6 +52,31 @@ const plugins = [
4352 '@capacitor-plus/status-bar' ,
4453 '@capacitor-plus/text-zoom' ,
4554 '@capacitor-plus/toast' ,
55+ '@capacitor/action-sheet' ,
56+ '@capacitor/app' ,
57+ '@capacitor/app-launcher' ,
58+ '@capacitor/browser' ,
59+ '@capacitor/camera' ,
60+ '@capacitor/clipboard' ,
61+ '@capacitor/device' ,
62+ '@capacitor/dialog' ,
63+ '@capacitor/filesystem' ,
64+ '@capacitor/geolocation' ,
65+ '@capacitor/google-maps' ,
66+ '@capacitor/haptics' ,
67+ '@capacitor/keyboard' ,
68+ '@capacitor/local-notifications' ,
69+ '@capacitor/motion' ,
70+ '@capacitor/network' ,
71+ '@capacitor/preferences' ,
72+ '@capacitor/push-notifications' ,
73+ '@capacitor/screen-orientation' ,
74+ '@capacitor/screen-reader' ,
75+ '@capacitor/share' ,
76+ '@capacitor/splash-screen' ,
77+ '@capacitor/status-bar' ,
78+ '@capacitor/text-zoom' ,
79+ '@capacitor/toast' ,
4680] ;
4781const coreVersion = '^8.0.0' ;
4882const pluginVersion = '^8.0.0' ;
@@ -147,7 +181,10 @@ export async function migrateCommand(config: Config, noprompt: boolean, packagem
147181 }
148182
149183 // Update iOS Projects
150- if ( allDependencies [ '@capacitor-plus/ios' ] && existsSync ( config . ios . platformDirAbs ) ) {
184+ if (
185+ ( allDependencies [ '@capacitor-plus/ios' ] || allDependencies [ '@capacitor/ios' ] ) &&
186+ existsSync ( config . ios . platformDirAbs )
187+ ) {
151188 const currentiOSVersion = getMajoriOSVersion ( config ) ;
152189 if ( parseInt ( currentiOSVersion ) < parseInt ( iOSVersion ) ) {
153190 // ios template changes
@@ -186,7 +223,10 @@ export async function migrateCommand(config: Config, noprompt: boolean, packagem
186223 logger . warn ( 'Skipped Running cap sync.' ) ;
187224 }
188225
189- if ( allDependencies [ '@capacitor-plus/android' ] && existsSync ( config . android . platformDirAbs ) ) {
226+ if (
227+ ( allDependencies [ '@capacitor-plus/android' ] || allDependencies [ '@capacitor/android' ] ) &&
228+ existsSync ( config . android . platformDirAbs )
229+ ) {
190230 // AndroidManifest.xml add "density"
191231 await runTask ( `Migrating AndroidManifest.xml by adding density to Activity configChanges.` , ( ) => {
192232 return updateAndroidManifest ( join ( config . android . srcMainDirAbs , 'AndroidManifest.xml' ) ) ;
@@ -355,6 +395,7 @@ async function installLatestLibs(dependencyManager: string, runInstall: boolean,
355395
356396 if ( runInstall ) {
357397 rimraf . sync ( join ( config . app . rootDir , 'node_modules/@capacitor-plus/!(cli)' ) ) ;
398+ rimraf . sync ( join ( config . app . rootDir , 'node_modules/@capacitor/!(cli)' ) ) ;
358399 await runCommand ( dependencyManager , [ 'install' ] ) ;
359400 if ( dependencyManager == 'yarn' ) {
360401 await runCommand ( dependencyManager , [ 'upgrade' ] ) ;
@@ -378,6 +419,16 @@ async function writeBreakingChanges() {
378419 '@capacitor-plus/screen-orientation' ,
379420 '@capacitor-plus/splash-screen' ,
380421 '@capacitor-plus/status-bar' ,
422+ '@capacitor/action-sheet' ,
423+ '@capacitor/barcode-scanner' ,
424+ '@capacitor/browser' ,
425+ '@capacitor/camera' ,
426+ '@capacitor/geolocation' ,
427+ '@capacitor/google-maps' ,
428+ '@capacitor/push-notifications' ,
429+ '@capacitor/screen-orientation' ,
430+ '@capacitor/splash-screen' ,
431+ '@capacitor/status-bar' ,
381432 ] ;
382433 const broken = [ ] ;
383434 for ( const lib of breaking ) {
0 commit comments