Skip to content
Permalink
Browse files

fix(bazel): fix major/minor semver check between @angular/bazel npm p…

…ackager version and angular bazel repo version (#27635)

PR Close #27635
  • Loading branch information...
gregmagolan authored and mhevery committed Dec 12, 2018
1 parent e318081 commit 1cc08b4a4aca69e98f209ca7e3530001940be4af
Showing with 2 additions and 1 deletion.
  1. +2 −1 packages/bazel/check_version.js
@@ -57,7 +57,8 @@ if (isBazelManagedDeps()) {
}
// Be tolerant of versions such as "0.17.0-7-g76dc057"
const angularPackageVersion = contents.version.split('-')[0];
const range = `~${angularPackageVersion}`; // should match patch version
// Should match only the major and minor versions
const range = `${semver.major(angularPackageVersion)}.${semver.minor(angularPackageVersion)}.x`;
if (!semver.satisfies(npmPackageVersion, range)) {
throw new Error(
`Expected angular npm version ${npmPackageVersion} to satisfy ${range}. ` +

0 comments on commit 1cc08b4

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.