Skip to content

Commit

Permalink
fix(@schematics/angular): ensure valid SemVer range for new project A…
Browse files Browse the repository at this point in the history
…ngular 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.
  • Loading branch information
clydin committed Jul 27, 2021
1 parent b3736a3 commit cfc2674
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/schematics/angular/utility/latest-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export const latestVersions = {
TsLib: '^2.2.0',

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

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

0 comments on commit cfc2674

Please sign in to comment.