Skip to content

Commit f96e178

Browse files
committed
build: ensure build uses typescript 3.9
We recently updated TS 3.9 in the `package.json` with #19286, but the build did not pick up the new version. This is because peer dependency ranges did not accept TS 3.9, so yarn hoisted sufficient TS versions.
1 parent 948dfa9 commit f96e178

File tree

27 files changed

+74
-70
lines changed

27 files changed

+74
-70
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"material-components-web": "7.0.0-canary.058cfd23c.0",
6363
"rxjs": "^6.5.3",
6464
"systemjs": "0.19.43",
65-
"tslib": "^1.10.0",
65+
"tslib": "^1.12.0",
6666
"zone.js": "~0.10.2"
6767
},
6868
"devDependencies": {
@@ -161,7 +161,7 @@
161161
"tsickle": "0.38.1",
162162
"tslint": "^6.1.0",
163163
"tsutils": "^3.17.1",
164-
"typescript": "3.9.1-rc",
164+
"typescript": "3.9.2",
165165
"typescript-3.6": "npm:typescript@~3.6.4",
166166
"typescript-3.7": "npm:typescript@~3.7.0",
167167
"typescript-3.8": "npm:typescript@~3.8.0",
@@ -170,7 +170,7 @@
170170
"yargs": "15.3.0"
171171
},
172172
"resolutions": {
173-
"dgeni-packages/typescript": "3.8.3",
173+
"dgeni-packages/typescript": "3.9.2",
174174
"**/graceful-fs": "4.2.2"
175175
}
176176
}

src/bazel-tsconfig-test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"extends": "./bazel-tsconfig-build.json",
66
"compilerOptions": {
7-
"importHelpers": false,
7+
"importHelpers": true,
88
"types": ["jasmine"]
99
},
1010
"bazelOptions": {

src/cdk/schematics/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ ts_library(
2323
"testing/**/*.ts",
2424
],
2525
),
26+
# Schematics do not need to run in browsers and can use `commonjs`
27+
# as format instead the default `umd` format.
28+
devmode_module = "commonjs",
2629
module_name = "@angular/cdk/schematics",
30+
prodmode_module = "commonjs",
2731
tsconfig = ":tsconfig.json",
2832
deps = [
2933
"//src/cdk/schematics/update-tool",

src/cdk/schematics/testing/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ package(default_visibility = ["//visibility:public"])
55
ts_library(
66
name = "testing",
77
srcs = glob(["**/*.ts"]),
8+
# Schematics do not need to run in browsers and can use `commonjs`
9+
# as format instead the default `umd` format.
10+
devmode_module = "commonjs",
811
module_name = "@angular/cdk/schematics/testing",
12+
prodmode_module = "commonjs",
913
tsconfig = "tsconfig.json",
1014
deps = [
1115
"@npm//@angular-devkit/core",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export function _patchTypeScriptDefaultLib(tree: Tree) {
232232
if (filePath.match(/node_modules[/\\]typescript/)) {
233233
return readFileSync(getSystemPath(filePath));
234234
} else {
235-
return _originalRead.apply(this, arguments);
235+
return _originalRead.call(this, filePath);
236236
}
237237
};
238238
}

src/cdk/schematics/testing/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"strict": true,
34
"lib": ["es2015"],
45
"types": ["node", "jasmine", "glob"]
56
}

src/cdk/schematics/update-tool/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ package(default_visibility = ["//visibility:public"])
55
ts_library(
66
name = "update-tool",
77
srcs = glob(["**/*.ts"]),
8+
# Schematics do not need to run in browsers and can use `commonjs`
9+
# as format instead the default `umd` format.
10+
devmode_module = "commonjs",
811
module_name = "@angular/cdk/schematics/update-tool",
12+
prodmode_module = "commonjs",
913
tsconfig = ":tsconfig.json",
1014
deps = [
1115
"@npm//@types/node",

src/google-maps/google-map/google-map.spec.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,8 @@ import {async, TestBed} from '@angular/core/testing';
33
import {By} from '@angular/platform-browser';
44

55
import {GoogleMapsModule} from '../google-maps-module';
6-
import {
7-
createMapConstructorSpy,
8-
createMapSpy,
9-
TestingWindow
10-
} from '../testing/fake-google-map-utils';
11-
import {
12-
DEFAULT_HEIGHT,
13-
DEFAULT_OPTIONS,
14-
DEFAULT_WIDTH,
15-
GoogleMap,
16-
} from './google-map';
6+
import {createMapConstructorSpy, createMapSpy} from '../testing/fake-google-map-utils';
7+
import {DEFAULT_HEIGHT, DEFAULT_OPTIONS, DEFAULT_WIDTH, GoogleMap} from './google-map';
178

189
/** Represents boundaries of a map to be used in tests. */
1910
const testBounds: google.maps.LatLngBoundsLiteral = {
@@ -47,8 +38,7 @@ describe('GoogleMap', () => {
4738
});
4839

4940
afterEach(() => {
50-
const testingWindow: TestingWindow = window;
51-
delete testingWindow.google;
41+
delete window.google;
5242
});
5343

5444
it('throws an error is the Google Maps JavaScript API was not loaded', () => {

src/google-maps/map-circle/map-circle.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
createCircleSpy,
1010
createMapConstructorSpy,
1111
createMapSpy,
12-
TestingWindow,
1312
} from '../testing/fake-google-map-utils';
1413

1514
import {MapCircle} from './map-circle';
@@ -43,8 +42,7 @@ describe('MapCircle', () => {
4342
});
4443

4544
afterEach(() => {
46-
const testingWindow: TestingWindow = window;
47-
delete testingWindow.google;
45+
delete window.google;
4846
});
4947

5048
it('initializes a Google Map Circle', () => {

src/google-maps/map-ground-overlay/map-ground-overlay.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
createGroundOverlaySpy,
1010
createMapConstructorSpy,
1111
createMapSpy,
12-
TestingWindow,
1312
} from '../testing/fake-google-map-utils';
1413

1514
import {MapGroundOverlay} from './map-ground-overlay';
@@ -37,8 +36,7 @@ describe('MapGroundOverlay', () => {
3736
});
3837

3938
afterEach(() => {
40-
const testingWindow: TestingWindow = window;
41-
delete testingWindow.google;
39+
delete window.google;
4240
});
4341

4442
it('initializes a Google Map Ground Overlay', () => {

0 commit comments

Comments
 (0)