Skip to content

Commit cfc2674

Browse files
committed
fix(@schematics/angular): ensure valid SemVer range for new project Angular packages
While npm supports a package specifier with a trailing dash, the trailing dash is technically not SemVer compliant and fails with Yarn 2+. The 12.1.x branch will not have another prerelease which allows the prelease specifiers to be ignored in this case.
1 parent b3736a3 commit cfc2674

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/schematics/angular/utility/latest-versions.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ export const latestVersions = {
2626
TsLib: '^2.2.0',
2727

2828
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
29-
// Angular CLI minor version with earliest prerelease (appended with `-`) will match the latest
30-
// Angular Framework minor.
31-
Angular: `~${getEarliestMinorVersion(require('../package.json')['version'])}-`,
29+
// Angular CLI minor version will match the latest Angular Framework minor.
30+
Angular: `~${getEarliestMinorVersion(require('../package.json')['version'])}`,
3231

3332
// Since @angular-devkit/build-angular and @schematics/angular are always
3433
// published together from the same monorepo, and they are both

0 commit comments

Comments
 (0)