Skip to content

Commit db91108

Browse files
alan-agius4wagnermaciel
authored andcommitted
tests: remove unsupported TS integration tests (#20359)
* test: remove unsupported TS integration tests With this change we remove TS integration tests for unsupported TS versions. Angular version 10 doesn't TS versions older than TS 3.9. * build: update to TypeScript 3.9.7 * build: update tests to use UMD module format The current version of system.js used doesn't seem to handle the `exports` correctly for TypeScript 3.9 output and causes `Cannot find variable: exports` during runtime. With this change we change the tests module to use UMD. * build: point to typescript node_modules folder instead of `.bin` Since we are installing multiple TS versions https://github.com/angular/components/blob/1f6b90c0a515397526d7c6b35f047827bfaa8652/package.json#L170-L173 yarn will link the last tsc binary which may not be the TSC version we want to use to build/test this reproduction. Currently with the following package.json packages ``` "typescript": "3.9.5", "typescript-3.6": "npm:typescript@~3.6.4", "typescript-3.7": "npm:typescript@~3.7.0", "typescript-3.8": "npm:typescript@~3.8.0", ``` If we run `npx tsc --v` the output will be `Version 3.8.3` as opposed to `3.9.5` (cherry picked from commit bbf75f3)
1 parent 0e9f359 commit db91108

File tree

10 files changed

+18
-34
lines changed

10 files changed

+18
-34
lines changed

integration/ts-compat/BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ write_file(
1313
# List of TypeScript packages that we want to run the compatibility test against.
1414
# The list contains NPM module names that resolve to the desired TypeScript version.
1515
typescript_version_packages = [
16-
"typescript-3.6",
17-
"typescript-3.7",
18-
"typescript-3.8",
1916
"typescript",
2017
]
2118

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,12 @@
167167
"tsickle": "0.38.1",
168168
"tslint": "^6.1.0",
169169
"tsutils": "^3.17.1",
170-
"typescript": "3.9.5",
171-
"typescript-3.6": "npm:typescript@~3.6.4",
172-
"typescript-3.7": "npm:typescript@~3.7.0",
173-
"typescript-3.8": "npm:typescript@~3.8.0",
170+
"typescript": "3.9.7",
174171
"vrsource-tslint-rules": "5.1.1",
175172
"yaml": "^1.10.0"
176173
},
177174
"resolutions": {
178-
"dgeni-packages/typescript": "3.9.5",
175+
"dgeni-packages/typescript": "3.9.7",
179176
"**/graceful-fs": "4.2.2"
180177
}
181178
}

src/cdk-experimental/tsconfig-tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"../../dist/packages/cdk-experimental"
1010
],
1111
"importHelpers": false,
12-
"module": "commonjs",
12+
"module": "umd",
1313
"target": "es5",
1414
"types": ["jasmine"],
1515
"experimentalDecorators": true,

src/cdk/tsconfig-tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"../../dist/packages/cdk"
1010
],
1111
"importHelpers": false,
12-
"module": "commonjs",
12+
"module": "umd",
1313
"target": "es5",
1414
"types": ["jasmine"],
1515
"experimentalDecorators": true,

src/google-maps/tsconfig-tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"../../dist/packages/google-maps"
1010
],
1111
"importHelpers": false,
12-
"module": "commonjs",
12+
"module": "umd",
1313
"target": "es5",
1414
"types": ["jasmine"],
1515
"experimentalDecorators": true,

src/material-experimental/tsconfig-tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"../../dist/packages/material-experimental"
1010
],
1111
"importHelpers": false,
12-
"module": "commonjs",
12+
"module": "umd",
1313
"target": "es5",
1414
"types": ["jasmine"],
1515
"experimentalDecorators": true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"../../dist/packages/material-moment-adapter"
1212
],
1313
"importHelpers": false,
14-
"module": "commonjs",
14+
"module": "umd",
1515
"target": "es5",
1616
"types": ["jasmine"],
1717
"experimentalDecorators": true,

src/material/tsconfig-tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"../../dist/packages/material"
1010
],
1111
"importHelpers": false,
12-
"module": "commonjs",
12+
"module": "umd",
1313
"target": "es5",
1414
"types": ["jasmine"],
1515
"experimentalDecorators": true,

tools/package-tools/ts-compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import chalk from 'chalk';
1010
*/
1111
export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) {
1212
return new Promise((resolve, reject) => {
13-
const binaryPath = resolvePath(`./node_modules/.bin/${binary}`);
13+
const binaryPath = resolvePath(`./node_modules/typescript/bin/${binary}`);
1414
const childProcess = spawn(binaryPath, flags, {shell: true});
1515

1616
// Pipe stdout and stderr from the child process.

yarn.lock

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12092,31 +12092,21 @@ typedarray@^0.0.6:
1209212092
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1209312093
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
1209412094

12095-
"typescript-3.6@npm:typescript@~3.6.4":
12096-
version "3.6.5"
12097-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.5.tgz#dae20114a7b4ff4bd642db9c8c699f2953e8bbdb"
12098-
integrity sha512-BEjlc0Z06ORZKbtcxGrIvvwYs5hAnuo6TKdNFL55frVDlB+na3z5bsLhFaIxmT+dPWgBIjMo6aNnTOgHHmHgiQ==
12099-
12100-
"typescript-3.7@npm:typescript@~3.7.0", typescript@~3.7.2:
12101-
version "3.7.5"
12102-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
12103-
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
12104-
12105-
"typescript-3.8@npm:typescript@~3.8.0":
12106-
version "3.8.3"
12107-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
12108-
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
12109-
12110-
typescript@3.9.5, typescript@^3.2.2:
12111-
version "3.9.5"
12112-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36"
12113-
integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==
12095+
typescript@3.9.7, typescript@^3.2.2:
12096+
version "3.9.7"
12097+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
12098+
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
1211412099

1211512100
typescript@^3.0.3, typescript@^3.4.5:
1211612101
version "3.5.3"
1211712102
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
1211812103
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
1211912104

12105+
typescript@~3.7.2:
12106+
version "3.7.5"
12107+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
12108+
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
12109+
1212012110
ua-parser-js@0.7.17:
1212112111
version "0.7.17"
1212212112
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"

0 commit comments

Comments
 (0)