@@ -191,10 +191,14 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
191
191
private async executeMigrations (
192
192
packageName : string ,
193
193
collectionPath : string ,
194
- range : semver . Range ,
194
+ from : string ,
195
+ to : string ,
195
196
commit ?: boolean ,
196
197
) : Promise < boolean > {
197
198
const collection = this . workflow . engine . createCollection ( collectionPath ) ;
199
+ const migrationRange = new semver . Range (
200
+ '>' + ( semver . prerelease ( from ) ? from . split ( '-' ) [ 0 ] + '-0' : from ) + ' <=' + to ,
201
+ ) ;
198
202
const migrations = [ ] ;
199
203
200
204
for ( const name of collection . listSchematicNames ( ) ) {
@@ -207,7 +211,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
207
211
continue ;
208
212
}
209
213
210
- if ( semver . satisfies ( description . version , range , { includePrerelease : true } ) ) {
214
+ if ( semver . satisfies ( description . version , migrationRange , { includePrerelease : true } ) ) {
211
215
migrations . push ( description as typeof schematic . description & { version : string } ) ;
212
216
}
213
217
}
@@ -492,14 +496,11 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
492
496
return 1 ;
493
497
}
494
498
495
- const migrationRange = new semver . Range (
496
- '>' + from + ' <=' + ( options . to || packageNode . version ) ,
497
- ) ;
498
-
499
499
success = await this . executeMigrations (
500
500
packageName ,
501
501
migrations ,
502
- migrationRange ,
502
+ from ,
503
+ options . to || packageNode . version ,
503
504
options . createCommits ,
504
505
) ;
505
506
}
@@ -647,7 +648,6 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
647
648
next : ! ! options . next ,
648
649
packageManager : this . packageManager ,
649
650
packages : packagesToUpdate ,
650
- migrateExternal : true ,
651
651
} ) ;
652
652
653
653
if ( success && options . createCommits ) {
@@ -733,7 +733,8 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
733
733
const result = await this . executeMigrations (
734
734
migration . package ,
735
735
migrations ,
736
- new semver . Range ( '>' + migration . from + ' <=' + migration . to ) ,
736
+ migration . from ,
737
+ migration . to ,
737
738
options . createCommits ,
738
739
) ;
739
740
0 commit comments