Skip to content

Commit

Permalink
fix(@angular/cli): run stable migrations when package version is prer…
Browse files Browse the repository at this point in the history
…elease

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)
  • Loading branch information
alan-agius4 authored and clydin committed Oct 18, 2021
1 parent 8d52d9b commit 008094b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular/cli/commands/update-impl.ts
Expand Up @@ -199,7 +199,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
): Promise<boolean> {
const collection = this.workflow.engine.createCollection(collectionPath);
const migrationRange = new semver.Range(
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to,
'>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to.split('-')[0],
);
const migrations = [];

Expand Down

0 comments on commit 008094b

Please sign in to comment.