Skip to content

Commit a86064a

Browse files
authored
build: ensure build uses typescript 3.9 (#19336)
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 a86064a

File tree

27 files changed

+209
-220
lines changed

27 files changed

+209
-220
lines changed

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,32 @@
4848
},
4949
"version": "10.0.0-next.0",
5050
"dependencies": {
51-
"@angular/animations": "^10.0.0-next.6",
52-
"@angular/common": "^10.0.0-next.6",
53-
"@angular/compiler": "^10.0.0-next.6",
54-
"@angular/core": "^10.0.0-next.6",
55-
"@angular/elements": "^10.0.0-next.6",
56-
"@angular/forms": "^10.0.0-next.6",
57-
"@angular/platform-browser": "^10.0.0-next.6",
51+
"@angular/animations": "^10.0.0-next.8",
52+
"@angular/common": "^10.0.0-next.8",
53+
"@angular/compiler": "^10.0.0-next.8",
54+
"@angular/core": "^10.0.0-next.8",
55+
"@angular/elements": "^10.0.0-next.8",
56+
"@angular/forms": "^10.0.0-next.8",
57+
"@angular/platform-browser": "^10.0.0-next.8",
5858
"@types/googlemaps": "^3.39.3",
5959
"@types/youtube": "^0.0.38",
6060
"@webcomponents/custom-elements": "^1.1.0",
6161
"core-js": "^2.6.9",
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": {
69-
"@angular-devkit/core": "^10.0.0-next.3",
70-
"@angular-devkit/schematics": "^10.0.0-next.3",
71-
"@angular/bazel": "^10.0.0-next.6",
72-
"@angular/compiler-cli": "^10.0.0-next.6",
69+
"@angular-devkit/core": "^10.0.0-next.5",
70+
"@angular-devkit/schematics": "^10.0.0-next.5",
71+
"@angular/bazel": "^10.0.0-next.8",
72+
"@angular/compiler-cli": "^10.0.0-next.8",
7373
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#414d7dd979092cb52d60b58596927abbc26d40b9",
74-
"@angular/platform-browser-dynamic": "^10.0.0-next.6",
75-
"@angular/platform-server": "^10.0.0-next.6",
76-
"@angular/router": "^10.0.0-next.6",
74+
"@angular/platform-browser-dynamic": "^10.0.0-next.8",
75+
"@angular/platform-server": "^10.0.0-next.8",
76+
"@angular/router": "^10.0.0-next.8",
7777
"@bazel/bazelisk": "^1.4.0",
7878
"@bazel/buildifier": "^2.2.1",
7979
"@bazel/ibazel": "^0.13.0",
@@ -83,7 +83,7 @@
8383
"@bazel/typescript": "^1.6.0",
8484
"@firebase/app-types": "^0.3.2",
8585
"@octokit/rest": "16.28.7",
86-
"@schematics/angular": "^10.0.0-next.3",
86+
"@schematics/angular": "^10.0.0-next.5",
8787
"@types/autoprefixer": "^9.7.2",
8888
"@types/browser-sync": "^2.26.1",
8989
"@types/fs-extra": "^4.0.3",
@@ -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)