Skip to content

Commit 1cc08b4

Browse files
gregmagolanmhevery
authored andcommitted
fix(bazel): fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version (#27635)
PR Close #27635
1 parent e318081 commit 1cc08b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/bazel/check_version.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ if (isBazelManagedDeps()) {
5757
}
5858
// Be tolerant of versions such as "0.17.0-7-g76dc057"
5959
const angularPackageVersion = contents.version.split('-')[0];
60-
const range = `~${angularPackageVersion}`; // should match patch version
60+
// Should match only the major and minor versions
61+
const range = `${semver.major(angularPackageVersion)}.${semver.minor(angularPackageVersion)}.x`;
6162
if (!semver.satisfies(npmPackageVersion, range)) {
6263
throw new Error(
6364
`Expected angular npm version ${npmPackageVersion} to satisfy ${range}. ` +

0 commit comments

Comments
 (0)