Skip to content

Commit 1e2efbc

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular/cli): run stable migrations when package version is prerelease
With this change we fix an issue were migrations are not run when the version specified in migration collection is specified as stable example `13.0.0`, but the version specified in the `package.json` is still a prerelease example `13.0.0-rc.0`. Closes: #21969 (cherry picked from commit ebf2d62)
1 parent 5feb8ab commit 1e2efbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/cli/commands/update-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
194194
): Promise<boolean> {
195195
const collection = this.workflow.engine.createCollection(collectionPath);
196196
const migrationRange = new semver.Range(
197-
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to,
197+
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to.split('-')[0],
198198
);
199199
const migrations = [];
200200

0 commit comments

Comments
 (0)