Skip to content

Commit f537fba

Browse files
devversionjelbourn
authored andcommitted
build: update to angular v9.0.0-next.7 (#17147)
Ensures the postinstall fails if some replacements could not be made. This ensures that we don't update Angular and invalidate some of the workarounds. This would result in broken release output then.
1 parent f00ae8d commit f537fba

File tree

20 files changed

+267
-193
lines changed

20 files changed

+267
-193
lines changed

WORKSPACE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
55
# Add NodeJS rules (explicitly used for sass bundle rules)
66
http_archive(
77
name = "build_bazel_rules_nodejs",
8-
sha256 = "3356c6b767403392bab018ce91625f6d15ff8f11c6d772dc84bc9cada01c669a",
9-
# Note that we cannot update to rules_nodejs#0.36.2 as it contains a bug where
10-
# node output binaries cannot be launched on windows. We can update once the
11-
# fix is released: https://github.com/bazelbuild/rules_nodejs/pull/1104.
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.1/rules_nodejs-0.36.1.tar.gz"],
8+
sha256 = "da217044d24abd16667324626a33581f3eaccabf80985b2688d6a08ed2f864be",
9+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.37.1/rules_nodejs-0.37.1.tar.gz"],
1310
)
1411

1512
# Add sass rules
@@ -76,9 +73,12 @@ load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories"
7673

7774
web_test_repositories()
7875

79-
load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories")
76+
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
8077

81-
browser_repositories()
78+
browser_repositories(
79+
chromium = True,
80+
firefox = True,
81+
)
8282

8383
# Fetch transitive dependencies which are needed to use the Sass rules.
8484
load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
"requiredAngularVersion": "^8.0.0 || ^9.0.0-0",
4141
"requiredMDCVersion": "^4.0.0-alpha.0",
4242
"dependencies": {
43-
"@angular/animations": "^8.2.2",
44-
"@angular/common": "^8.2.2",
45-
"@angular/compiler": "^8.2.2",
46-
"@angular/core": "^8.2.2",
47-
"@angular/elements": "^8.2.2",
48-
"@angular/forms": "^8.2.2",
49-
"@angular/platform-browser": "^8.2.2",
43+
"@angular/animations": "^9.0.0-next.7",
44+
"@angular/common": "^9.0.0-next.7",
45+
"@angular/compiler": "^9.0.0-next.7",
46+
"@angular/core": "^9.0.0-next.7",
47+
"@angular/elements": "^9.0.0-next.7",
48+
"@angular/forms": "^9.0.0-next.7",
49+
"@angular/platform-browser": "^9.0.0-next.7",
5050
"@types/googlemaps": "^3.37.0",
5151
"@types/youtube": "^0.0.38",
5252
"@webcomponents/custom-elements": "^1.1.0",
@@ -56,27 +56,27 @@
5656
"systemjs": "0.19.43",
5757
"tsickle": "^0.35.0",
5858
"tslib": "^1.9.3",
59-
"zone.js": "~0.9.1"
59+
"zone.js": "~0.10.2"
6060
},
6161
"devDependencies": {
62-
"@angular-devkit/core": "^8.2.1",
63-
"@angular-devkit/schematics": "^8.2.1",
64-
"@angular/bazel": "^8.2.2",
65-
"@angular/compiler-cli": "^8.2.2",
66-
"@angular/platform-browser-dynamic": "^8.2.2",
67-
"@angular/platform-server": "^8.2.2",
68-
"@angular/router": "^8.2.2",
69-
"@angular/upgrade": "^8.2.2",
62+
"@angular-devkit/core": "^9.0.0-next.5",
63+
"@angular-devkit/schematics": "^9.0.0-next.5",
64+
"@angular/bazel": "^9.0.0-next.7",
65+
"@angular/compiler-cli": "^9.0.0-next.7",
66+
"@angular/platform-browser-dynamic": "^9.0.0-next.7",
67+
"@angular/platform-server": "^9.0.0-next.7",
68+
"@angular/router": "^9.0.0-next.7",
69+
"@angular/upgrade": "^9.0.0-next.7",
7070
"@bazel/bazel": "^0.29.0",
7171
"@bazel/buildifier": "^0.28.0",
7272
"@bazel/ibazel": "^0.10.3",
73-
"@bazel/jasmine": "0.36.1",
74-
"@bazel/karma": "0.36.1",
75-
"@bazel/typescript": "0.36.1",
76-
"@bazel/protractor": "0.36.1",
73+
"@bazel/jasmine": "^0.37.1",
74+
"@bazel/karma": "^0.37.1",
75+
"@bazel/typescript": "^0.37.1",
76+
"@bazel/protractor": "^0.37.1",
7777
"@firebase/app-types": "^0.3.2",
7878
"@octokit/rest": "^16.28.7",
79-
"@schematics/angular": "^8.2.1",
79+
"@schematics/angular": "^9.0.0-next.5",
8080
"@types/browser-sync": "^2.26.1",
8181
"@types/chalk": "^0.4.31",
8282
"@types/fs-extra": "^4.0.3",
@@ -99,7 +99,7 @@
9999
"browser-sync": "^2.26.7",
100100
"chalk": "^1.1.3",
101101
"clang-format": "^1.2.4",
102-
"codelyzer": "^5.1.0",
102+
"codelyzer": "^5.1.1",
103103
"conventional-changelog": "^3.0.5",
104104
"dgeni": "^0.4.11",
105105
"dgeni-packages": "^0.27.1",

src/cdk-experimental/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"typings.d.ts"
2323
],
2424
"angularCompilerOptions": {
25+
"enableIvy": false,
2526
"annotateForClosureCompiler": true,
2627
"strictMetadataEmit": true,
2728
"flatModuleOutFile": "index.js",

src/cdk/schematics/testing/test-case-setup.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ export async function createTestCaseSetup(migrationName: string, collectionPath:
8181
writeFile(relativePath, inputContent);
8282
});
8383

84+
const testAppTsconfigPath = 'projects/cdk-testing/tsconfig.app.json';
85+
const testAppTsconfig = JSON.parse(appTree.readContent(testAppTsconfigPath));
86+
87+
// include all TypeScript files in the project. Otherwise all test input
88+
// files won't be part of the program and cannot be migrated.
89+
testAppTsconfig.include.push('src/**/*.ts');
90+
91+
writeFile(testAppTsconfigPath, JSON.stringify(testAppTsconfig, null, 2));
92+
8493
const runFixers = async function() {
8594
// Switch to the new temporary directory to simulate that "ng update" is ran
8695
// from within the project.

src/cdk/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"typings.d.ts"
2222
],
2323
"angularCompilerOptions": {
24+
"enableIvy": false,
2425
"annotateForClosureCompiler": true,
2526
"strictMetadataEmit": true,
2627
"flatModuleOutFile": "index.js",

src/google-maps/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"typings.d.ts"
2222
],
2323
"angularCompilerOptions": {
24+
"enableIvy": false,
2425
"annotateForClosureCompiler": true,
2526
"strictMetadataEmit": true,
2627
"flatModuleOutFile": "index.js",

src/material-examples/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"public-api.ts"
3939
],
4040
"angularCompilerOptions": {
41+
"enableIvy": false,
4142
"annotateForClosureCompiler": true,
4243
"strictMetadataEmit": true,
4344
"flatModuleOutFile": "index.js",

src/material-experimental/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"typings.d.ts"
2525
],
2626
"angularCompilerOptions": {
27+
"enableIvy": false,
2728
"annotateForClosureCompiler": true,
2829
"strictMetadataEmit": true,
2930
"flatModuleOutFile": "index.js",

src/material-moment-adapter/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"public-api.ts"
3737
],
3838
"angularCompilerOptions": {
39+
"enableIvy": false,
3940
"annotateForClosureCompiler": true,
4041
"strictMetadataEmit": true,
4142
"flatModuleOutFile": "index.js",

src/material/button/testing/shared.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ export function runHarnessTests(
8383

8484
it('should not click a disabled button', async () => {
8585
// Older versions of Edge have a bug where `disabled` buttons are still clickable if
86-
// they contain child elements. We skip this check on Edge.
87-
// See https://stackoverflow.com/questions/32377026/disabled-button-is-clickable-on-edge-browser
88-
if (platform.EDGE) {
86+
// they contain child elements. Also new versions of Firefox (starting v65) do not
87+
// cancel dispatched click events on disabled buttons. We skip this check on Edge and Firefox.
88+
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1582570 and:
89+
// https://stackoverflow.com/questions/32377026/disabled-button-is-clickable-on-edge-browser
90+
if (platform.EDGE || platform.FIREFOX) {
8991
return;
9092
}
9193

src/material/checkbox/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ng_test_library(
2020
srcs = ["shared.spec.ts"],
2121
deps = [
2222
":testing",
23+
"//src/cdk/platform",
2324
"//src/cdk/testing",
2425
"//src/cdk/testing/testbed",
2526
"//src/material/checkbox",

src/material/checkbox/testing/shared.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {Platform} from '@angular/cdk/platform';
12
import {HarnessLoader} from '@angular/cdk/testing';
23
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
34
import {Component} from '@angular/core';
@@ -12,6 +13,7 @@ import {MatCheckboxHarness} from '@angular/material/checkbox/testing/checkbox-ha
1213
*/
1314
export function runHarnessTests(
1415
checkboxModule: typeof MatCheckboxModule, checkboxHarness: typeof MatCheckboxHarness) {
16+
const platform = new Platform();
1517
let fixture: ComponentFixture<CheckboxHarnessTest>;
1618
let loader: HarnessLoader;
1719

@@ -152,6 +154,11 @@ export function runHarnessTests(
152154
});
153155

154156
it('should not toggle disabled checkbox', async () => {
157+
if (platform.FIREFOX) {
158+
// do run this test on firefox as click events on the label of a disabled checkbox
159+
// cause the value to be changed. https://bugzilla.mozilla.org/show_bug.cgi?id=1540995
160+
return;
161+
}
155162
const disabledCheckbox = await loader.getHarness(checkboxHarness.with({label: 'Second'}));
156163
expect(await disabledCheckbox.isChecked()).toBe(false);
157164
await disabledCheckbox.toggle();

src/material/radio/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ng_test_library(
2020
srcs = ["shared.spec.ts"],
2121
deps = [
2222
":testing",
23+
"//src/cdk/platform",
2324
"//src/cdk/testing",
2425
"//src/cdk/testing/testbed",
2526
"//src/material/radio",

src/material/radio/testing/shared.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {Platform} from '@angular/cdk/platform';
12
import {HarnessLoader} from '@angular/cdk/testing';
23
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
34
import {Component} from '@angular/core';
@@ -10,6 +11,7 @@ import {MatRadioButtonHarness, MatRadioGroupHarness} from './radio-harness';
1011
export function runHarnessTests(radioModule: typeof MatRadioModule,
1112
radioGroupHarness: typeof MatRadioGroupHarness,
1213
radioButtonHarness: typeof MatRadioButtonHarness) {
14+
const platform = new Platform();
1315
let fixture: ComponentFixture<MultipleRadioButtonsHarnessTest>;
1416
let loader: HarnessLoader;
1517

@@ -225,6 +227,13 @@ export function runHarnessTests(radioModule: typeof MatRadioModule,
225227
});
226228

227229
it('should not be able to check disabled radio-button', async () => {
230+
if (platform.FIREFOX) {
231+
// do run this test on firefox as click events on the label of the underlying
232+
// input checkbox cause the value to be changed. Read more in the bug report:
233+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1540995
234+
return;
235+
}
236+
228237
fixture.componentInstance.disableAll = true;
229238
fixture.detectChanges();
230239

src/material/slide-toggle/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ng_test_library(
2020
srcs = ["shared.spec.ts"],
2121
deps = [
2222
":testing",
23+
"//src/cdk/platform",
2324
"//src/cdk/testing",
2425
"//src/cdk/testing/testbed",
2526
"//src/material/slide-toggle",

src/material/slide-toggle/testing/shared.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {Platform} from '@angular/cdk/platform';
12
import {HarnessLoader} from '@angular/cdk/testing';
23
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
34
import {Component} from '@angular/core';
@@ -10,6 +11,7 @@ import {MatSlideToggleHarness} from '@angular/material/slide-toggle/testing/slid
1011
export function runHarnessTests(
1112
slideToggleModule: typeof MatSlideToggleModule,
1213
slideToggleHarness: typeof MatSlideToggleHarness) {
14+
const platform = new Platform();
1315
let fixture: ComponentFixture<SlideToggleHarnessTest>;
1416
let loader: HarnessLoader;
1517

@@ -133,6 +135,13 @@ export function runHarnessTests(
133135
});
134136

135137
it('should not toggle disabled slide-toggle', async () => {
138+
if (platform.FIREFOX) {
139+
// do run this test on firefox as click events on the label of the underlying
140+
// input checkbox cause the value to be changed. Read more in the bug report:
141+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1540995
142+
return;
143+
}
144+
136145
const disabledToggle = await loader.getHarness(slideToggleHarness.with({label: 'Second'}));
137146
expect(await disabledToggle.isChecked()).toBe(false);
138147
await disabledToggle.toggle();

src/material/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"typings.d.ts"
2424
],
2525
"angularCompilerOptions": {
26+
"enableIvy": false,
2627
"annotateForClosureCompiler": true,
2728
"strictMetadataEmit": true,
2829
"flatModuleOutFile": "index.js",

src/youtube-player/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"typings.d.ts"
2020
],
2121
"angularCompilerOptions": {
22+
"enableIvy": false,
2223
"annotateForClosureCompiler": true,
2324
"strictMetadataEmit": true,
2425
"flatModuleOutFile": "index.js",

0 commit comments

Comments
 (0)