Skip to content

build: update to Angular 15.1.0 and expand peer dependency range #26308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
},
"version": "15.1.0-next.2",
"dependencies": {
"@angular/animations": "^15.0.0",
"@angular/common": "^15.0.0",
"@angular/compiler": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/forms": "^15.0.0",
"@angular/platform-browser": "^15.0.0",
"@angular/animations": "^15.1.0-next.3",
"@angular/common": "^15.1.0-next.3",
"@angular/compiler": "^15.1.0-next.3",
"@angular/core": "^15.1.0-next.3",
"@angular/forms": "^15.1.0-next.3",
"@angular/platform-browser": "^15.1.0-next.3",
"@types/google.maps": "^3.47.3",
"@types/youtube": "^0.0.46",
"rxjs": "^6.6.7",
Expand All @@ -69,18 +69,18 @@
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0",
"@angular-devkit/core": "^15.0.0",
"@angular-devkit/schematics": "^15.0.0",
"@angular/bazel": "^15.0.0",
"@angular-devkit/build-angular": "^15.1.0-next.3",
"@angular-devkit/core": "^15.1.0-next.3",
"@angular-devkit/schematics": "^15.1.0-next.3",
"@angular/bazel": "^15.1.0-next.3",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#1fd144d9f9db6a6cfe3e2617c4fc70e119a400cb",
"@angular/cli": "^15.0.0",
"@angular/compiler-cli": "^15.0.0",
"@angular/localize": "^15.0.0",
"@angular/cli": "^15.1.0-next.3",
"@angular/compiler-cli": "^15.1.0-next.3",
"@angular/localize": "^15.1.0-next.3",
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#20d1bd232100d278c53820226427039f51881d3f",
"@angular/platform-browser-dynamic": "^15.0.0",
"@angular/platform-server": "^15.0.0",
"@angular/router": "^15.0.0",
"@angular/platform-browser-dynamic": "^15.1.0-next.3",
"@angular/platform-server": "^15.1.0-next.3",
"@angular/router": "^15.1.0-next.3",
"@axe-core/webdriverjs": "^4.3.2",
"@babel/core": "^7.16.12",
"@bazel/bazelisk": "1.12.1",
Expand Down Expand Up @@ -145,7 +145,7 @@
"@octokit/rest": "18.3.5",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@schematics/angular": "^15.0.0",
"@schematics/angular": "^15.1.0-next.3",
"@types/babel__core": "^7.1.18",
"@types/browser-sync": "^2.26.3",
"@types/fs-extra": "^9.0.13",
Expand Down
2 changes: 1 addition & 1 deletion packages.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Each individual package uses a placeholder for the version of Angular to ensure they're
# all in-sync. This map is passed to each ng_package rule to stamp out the appropriate
# version for the placeholders.
ANGULAR_PACKAGE_VERSION = "^15.0.0 || ^16.0.0"
ANGULAR_PACKAGE_VERSION = "^15.0.0 || ^15.1.0-0 || ^16.0.0"
MDC_PACKAGE_VERSION = "15.0.0-canary.7971d6ad5.0"
TSLIB_PACKAGE_VERSION = "^2.3.0"
RXJS_PACKAGE_VERSION = "^6.5.3 || ^7.4.0"
Expand Down
19 changes: 14 additions & 5 deletions tools/release-checks/check-framework-peer-dependency.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ const bzlConfigPath = join(currentDir, '../../packages.bzl');
*
* `N.x.x` requires Angular `^N.0.0 || (N+1).0.0`
* `N.0.0-x` requires Angular `^N.0.0-0 || (N+1).0.0`
* `N.x.0-x` requires Angular `^N.0.0 || ^N.x.0-x || (N+1).0.0`
*
* The rationale is that we want to satisfy peer dependencies if we are publishing
* pre-releases for a major while Angular framework cuts pre-releases as well. e.g.
* Angular CDK v14.0.0-rc.1 should also work with `@angular/[email protected]`.
*/
export async function assertValidFrameworkPeerDependency(newVersion: semver.SemVer) {
const currentVersionRange = _extractAngularVersionPlaceholderOrThrow();
const isMajorWithPrerelease =
newVersion.minor === 0 && newVersion.patch === 0 && !!newVersion.prerelease[0];
const requiredRange = isMajorWithPrerelease
? `^${newVersion.major}.0.0-0 || ^${newVersion.major + 1}.0.0`
: `^${newVersion.major}.0.0 || ^${newVersion.major + 1}.0.0`;
const isMinor = newVersion.minor !== 0;
const isPrerelease = !!newVersion.prerelease[0];
let requiredRange: string;

if (isPrerelease) {
requiredRange = isMinor
? `^${newVersion.major}.0.0 || ^${newVersion.major}.${newVersion.minor}.0-0 || ^${
newVersion.major + 1
}.0.0`
: `^${newVersion.major}.0.0-0 || ^${newVersion.major + 1}.0.0`;
} else {
requiredRange = `^${newVersion.major}.0.0 || ^${newVersion.major + 1}.0.0`;
}

if (requiredRange !== currentVersionRange) {
Log.error(
Expand Down
Loading