Skip to content

Commit 688d3f4

Browse files
crisbetommalerba
authored andcommitted
build: update to 8.2.0 and TypeScript 3.5.3 (#16678)
Bumps all of the Angular dependencies to 8.2.0 so that we can update to TypeScript 3.5+ and take advantage of the build speed improvements. (cherry picked from commit 1f0ab1b)
1 parent 796ff18 commit 688d3f4

File tree

10 files changed

+150
-144
lines changed

10 files changed

+150
-144
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ jobs:
420420
# we use ngcc to apply the ivy switches because ngcc currently does not handle the
421421
# UMD format which is used by Bazel when running tests. UMD processing is in
422422
# progress and tracked with FW-85.
423-
- run: node ./scripts/circleci/setup-angular-snapshots.js --tag 8.2.0-next.0-ivy-aot+c69e552a8
423+
- run: node ./scripts/circleci/setup-angular-snapshots.js --tag 9.0.0-next.0-ivy-aot+3122f3415
424424
# Disable type checking when building with Ivy. This is necessary because
425425
# type checking is not complete yet and can incorrectly break compilation.
426426
# Issue is tracked with FW-1004.

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
"requiredAngularVersion": "^8.0.0 || ^9.0.0-0",
4040
"requiredMDCVersion": "^4.0.0-alpha.0",
4141
"dependencies": {
42-
"@angular/animations": "^8.1.0",
43-
"@angular/common": "^8.1.0",
44-
"@angular/compiler": "^8.1.0",
45-
"@angular/core": "^8.1.0",
46-
"@angular/elements": "^8.1.0",
47-
"@angular/forms": "^8.1.0",
48-
"@angular/platform-browser": "^8.1.0",
42+
"@angular/animations": "^8.2.0",
43+
"@angular/common": "^8.2.0",
44+
"@angular/compiler": "^8.2.0",
45+
"@angular/core": "^8.2.0",
46+
"@angular/elements": "^8.2.0",
47+
"@angular/forms": "^8.2.0",
48+
"@angular/platform-browser": "^8.2.0",
4949
"@webcomponents/custom-elements": "^1.1.0",
5050
"core-js": "^2.6.1",
5151
"material-components-web": "^4.0.0-alpha.0",
@@ -56,24 +56,24 @@
5656
"zone.js": "~0.9.1"
5757
},
5858
"devDependencies": {
59-
"@angular-devkit/core": "^8.0.3",
60-
"@angular-devkit/schematics": "^8.0.3",
59+
"@angular-devkit/core": "^8.2.0",
60+
"@angular-devkit/schematics": "^8.2.0",
6161
"@angular/bazel": "^8.1.0",
62-
"@angular/compiler-cli": "^8.1.0",
63-
"@angular/platform-browser-dynamic": "^8.1.0",
64-
"@angular/platform-server": "^8.1.0",
65-
"@angular/router": "^8.1.0",
66-
"@angular/upgrade": "^8.1.0",
62+
"@angular/compiler-cli": "^8.2.0",
63+
"@angular/platform-browser-dynamic": "^8.2.0",
64+
"@angular/platform-server": "^8.2.0",
65+
"@angular/router": "^8.2.0",
66+
"@angular/upgrade": "^8.2.0",
6767
"@bazel/bazel": "^0.27.0",
6868
"@bazel/buildifier": "^0.25.1",
69-
"@bazel/hide-bazel-files": "0.32.2",
69+
"@bazel/hide-bazel-files": "0.34.0",
7070
"@bazel/ibazel": "^0.10.3",
71-
"@bazel/jasmine": "0.32.2",
72-
"@bazel/karma": "0.32.2",
73-
"@bazel/typescript": "0.32.2",
71+
"@bazel/jasmine": "0.34.0",
72+
"@bazel/karma": "0.34.0",
73+
"@bazel/typescript": "0.34.0",
7474
"@firebase/app-types": "^0.3.2",
7575
"@octokit/rest": "^16.28.7",
76-
"@schematics/angular": "^8.0.3",
76+
"@schematics/angular": "^8.2.0",
7777
"@types/browser-sync": "^0.0.42",
7878
"@types/chalk": "^0.4.31",
7979
"@types/fs-extra": "^4.0.3",
@@ -150,10 +150,10 @@
150150
"tsconfig-paths": "^2.3.0",
151151
"tslint": "^5.18.0",
152152
"tsutils": "^3.0.0",
153-
"typescript": "~3.4",
153+
"typescript": "3.5.3",
154154
"uglify-js": "^2.8.14"
155155
},
156156
"resolutions": {
157-
"dgeni-packages/typescript": "~3.4"
157+
"dgeni-packages/typescript": "3.5.3"
158158
}
159159
}

src/cdk/schematics/ng-update/upgrade-data.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,7 @@ export interface RuleUpgradeData {
6868
export function
6969
getVersionUpgradeData<T extends keyof RuleUpgradeData, U = ValueOfChanges<RuleUpgradeData[T]>>(
7070
r: MigrationRule<RuleUpgradeData>, dataName: T): U[] {
71-
return getChangesForTarget<U>(r.targetVersion, r.upgradeData[dataName] as VersionChanges<U>);
71+
// Note that below we need to cast to `unknown` first TS doesn't infer the type of T correctly.
72+
return getChangesForTarget<U>(r.targetVersion,
73+
r.upgradeData[dataName] as unknown as VersionChanges<U>);
7274
}

src/cdk/schematics/utils/ast.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ export function addModuleImportToModule(host: Tree, modulePath: string, moduleNa
5050
throw new SchematicsException(`Module not found: ${modulePath}`);
5151
}
5252

53-
// TODO: TypeScript version mismatch due to @schematics/angular using a different version
54-
// than Material. Cast to any to avoid the type assignment failure.
55-
const changes = addImportToModule(moduleSource as any, modulePath, moduleName, src);
53+
const changes = addImportToModule(moduleSource, modulePath, moduleName, src);
5654
const recorder = host.beginUpdate(modulePath);
5755

5856
changes.forEach((change) => {

src/cdk/schematics/utils/build-component.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {
7272
const classifiedName = strings.classify(`${options.name}Component`);
7373

7474
const declarationChanges = addDeclarationToModule(
75-
// TODO: TypeScript version mismatch due to @schematics/angular using a different version
76-
// than Material. Cast to any to avoid the type assignment failure.
77-
source as any,
75+
source,
7876
modulePath,
7977
classifiedName,
8078
relativePath);
@@ -93,9 +91,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {
9391

9492
const exportRecorder = host.beginUpdate(modulePath);
9593
const exportChanges = addExportToModule(
96-
// TODO: TypeScript version mismatch due to @schematics/angular using a different version
97-
// than Material. Cast to any to avoid the type assignment failure.
98-
source as any,
94+
source,
9995
modulePath,
10096
strings.classify(`${options.name}Component`),
10197
relativePath);
@@ -114,9 +110,7 @@ function addDeclarationToNgModule(options: ComponentOptions): Rule {
114110

115111
const entryComponentRecorder = host.beginUpdate(modulePath);
116112
const entryComponentChanges = addEntryComponentToModule(
117-
// TODO: TypeScript version mismatch due to @schematics/angular using a different version
118-
// than Material. Cast to any to avoid the type assignment failure.
119-
source as any,
113+
source,
120114
modulePath,
121115
strings.classify(`${options.name}Component`),
122116
relativePath);

src/material/sidenav/drawer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestr
232232
* An observable that emits when the drawer mode changes. This is used by the drawer container to
233233
* to know when to when the mode changes so it can adapt the margins on the content.
234234
*/
235-
readonly _modeChanged = new Subject();
235+
readonly _modeChanged = new Subject<void>();
236236

237237
get _isFocusTrapEnabled(): boolean {
238238
// The focus trap is only enabled when the drawer is open in any mode other than side.

src/material/tabs/tab-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface MatTabsConfig {
6262
}
6363

6464
/** Injection token that can be used to provide the default options the tabs module. */
65-
export const MAT_TABS_CONFIG = new InjectionToken('MAT_TABS_CONFIG');
65+
export const MAT_TABS_CONFIG = new InjectionToken<MatTabsConfig>('MAT_TABS_CONFIG');
6666

6767
// Boilerplate for applying mixins to MatTabGroup.
6868
/** @docs-private */

tools/public_api_guard/material/sidenav.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export declare class MatDrawer implements AfterContentInit, AfterContentChecked,
88
_animationState: 'open-instant' | 'open' | 'void';
99
readonly _closedStream: Observable<void>;
1010
readonly _isFocusTrapEnabled: boolean;
11-
readonly _modeChanged: Subject<{}>;
11+
readonly _modeChanged: Subject<void>;
1212
readonly _openedStream: Observable<void>;
1313
readonly _width: number;
1414
autoFocus: boolean;

tools/public_api_guard/material/tabs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface _MatInkBarPositioner {
77
};
88
}
99

10-
export declare const MAT_TABS_CONFIG: InjectionToken<{}>;
10+
export declare const MAT_TABS_CONFIG: InjectionToken<MatTabsConfig>;
1111

1212
export declare class MatInkBar {
1313
_animationMode?: string | undefined;

0 commit comments

Comments
 (0)