Skip to content

Commit 008094b

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 8d52d9b commit 008094b

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
@@ -199,7 +199,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
199199
): Promise<boolean> {
200200
const collection = this.workflow.engine.createCollection(collectionPath);
201201
const migrationRange = new semver.Range(
202-
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to,
202+
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to.split('-')[0],
203203
);
204204
const migrations = [];
205205

0 commit comments

Comments
 (0)