@@ -211,6 +211,30 @@ export class MigrateController
211
211
} ,
212
212
migrateAction : this . migrateNativeScriptAngular . bind ( this ) ,
213
213
} ,
214
+ {
215
+ packageName : "svelte-native" ,
216
+ verifiedVersion : "0.9.4" ,
217
+ shouldMigrateAction : async (
218
+ projectData : IProjectData ,
219
+ allowInvalidVersions : boolean
220
+ ) => {
221
+ const dependency = {
222
+ packageName : "svelte-native" ,
223
+ verifiedVersion : "0.9.0" , // minimum version required - anything less will need a migration
224
+ isDev : false ,
225
+ } ;
226
+ const result =
227
+ this . hasDependency ( dependency , projectData ) &&
228
+ ( await this . shouldMigrateDependencyVersion (
229
+ dependency ,
230
+ projectData ,
231
+ allowInvalidVersions
232
+ ) ) ;
233
+
234
+ return result ;
235
+ } ,
236
+ migrateAction : this . migrateNativeScriptSvelte . bind ( this ) ,
237
+ } ,
214
238
{
215
239
packageName : "@nativescript/unit-test-runner" ,
216
240
verifiedVersion : "1.0.0" ,
@@ -1336,6 +1360,48 @@ export class MigrateController
1336
1360
return dependencies ;
1337
1361
}
1338
1362
1363
+ private async migrateNativeScriptSvelte ( ) : Promise < IMigrationDependency [ ] > {
1364
+ const dependencies : IMigrationDependency [ ] = [
1365
+ {
1366
+ packageName : "svelte-native-nativescript-ui" ,
1367
+ verifiedVersion : "0.9.0" ,
1368
+ shouldUseExactVersion : true ,
1369
+ isDev : true ,
1370
+ shouldAddIfMissing : true ,
1371
+ } ,
1372
+ {
1373
+ packageName : "svelte-native-preprocessor" ,
1374
+ verifiedVersion : "0.2.0" ,
1375
+ shouldUseExactVersion : true ,
1376
+ isDev : true ,
1377
+ shouldAddIfMissing : true ,
1378
+ } ,
1379
+ {
1380
+ packageName : "svelte-loader" ,
1381
+ shouldRemove : true ,
1382
+ } ,
1383
+ {
1384
+ packageName : "svelte-loader-hot" ,
1385
+ verifiedVersion : "0.3.1" ,
1386
+ shouldUseExactVersion : true ,
1387
+ isDev : true ,
1388
+ shouldAddIfMissing : true ,
1389
+ } ,
1390
+ {
1391
+ packageName : "svelte" ,
1392
+ shouldRemove : true ,
1393
+ } ,
1394
+ {
1395
+ packageName : "svelte" ,
1396
+ verifiedVersion : "3.24.1" ,
1397
+ shouldUseExactVersion : true ,
1398
+ isDev : true ,
1399
+ } ,
1400
+ ] ;
1401
+
1402
+ return dependencies ;
1403
+ }
1404
+
1339
1405
private async migrateWebpack ( ) : Promise < IMigrationDependency [ ] > {
1340
1406
const scopedWebpackDeps = [
1341
1407
"@angular-devkit/core" ,
0 commit comments