From fbd281c26e3225403df7aa8abf30eddba1c6172b Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 5 May 2020 12:13:29 -0700 Subject: [PATCH] build: remove typescript 3.6 and 3.7 support (#36329) Remove TypeScript 3.6 and 3.7 support from Angular along with tests that ensure those TS versions work. BREAKING CHANGE: typescript 3.6 and 3.7 are no longer supported, please update to typescript 3.8 PR Close #36329 --- .circleci/config.yml | 12 +-- .circleci/env.sh | 2 +- integration/BUILD.bazel | 12 --- integration/typings_test_ts36/include-all.ts | 77 ------------------- integration/typings_test_ts36/package.json | 30 -------- integration/typings_test_ts36/tsconfig.json | 25 ------ integration/typings_test_ts37/include-all.ts | 77 ------------------- integration/typings_test_ts37/package.json | 30 -------- integration/typings_test_ts37/tsconfig.json | 25 ------ packages/bazel/package.json | 2 +- packages/compiler-cli/package.json | 4 +- .../compiler-cli/src/typescript_support.ts | 2 +- tools/ts-api-guardian/package.json | 4 +- 13 files changed, 13 insertions(+), 289 deletions(-) delete mode 100644 integration/typings_test_ts36/include-all.ts delete mode 100644 integration/typings_test_ts36/package.json delete mode 100644 integration/typings_test_ts36/tsconfig.json delete mode 100644 integration/typings_test_ts37/include-all.ts delete mode 100644 integration/typings_test_ts37/package.json delete mode 100644 integration/typings_test_ts37/tsconfig.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 4647feeb61..99d9670215 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,18 +22,18 @@ version: 2.1 # **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match. # **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks. # See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI. -var_3: &cache_key v6-angular-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} +var_3: &cache_key v7-angular-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} # We invalidate the cache if the Bazel version changes because otherwise the `bazelisk` cache # folder will contain all previously used versions and ultimately cause the cache restoring to # be slower due to its growing size. -var_4: &cache_key_fallback v6-angular-node-12-{{ checksum ".bazelversion" }} -var_3_win: &cache_key_win v6-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} -var_4_win: &cache_key_win_fallback v6-angular-win-node-12-{{ checksum ".bazelversion" }} +var_4: &cache_key_fallback v7-angular-node-12-{{ checksum ".bazelversion" }} +var_3_win: &cache_key_win v7-angular-win-node-12-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }} +var_4_win: &cache_key_win_fallback v7-angular-win-node-12-{{ checksum ".bazelversion" }} # Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the # cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable. -var_5: &components_repo_unit_tests_cache_key v6-angular-components-598db096e668aa7e9debd56eedfd127b7a55e371 -var_6: &components_repo_unit_tests_cache_key_fallback v6-angular-components- +var_5: &components_repo_unit_tests_cache_key v7-angular-components-15efb677a751f41cc7ca109e734b58abdee8d8a3 +var_6: &components_repo_unit_tests_cache_key_fallback v7-angular-components- # Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and # `build-ivy-npm-packages`. diff --git a/.circleci/env.sh b/.circleci/env.sh index d2503ed4db..152d859233 100755 --- a/.circleci/env.sh +++ b/.circleci/env.sh @@ -74,7 +74,7 @@ setPublicVar COMPONENTS_REPO_TMP_DIR "/tmp/angular-components-repo" setPublicVar COMPONENTS_REPO_URL "https://github.com/angular/components.git" setPublicVar COMPONENTS_REPO_BRANCH "master" # **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI `config.yml`. -setPublicVar COMPONENTS_REPO_COMMIT "598db096e668aa7e9debd56eedfd127b7a55e371" +setPublicVar COMPONENTS_REPO_COMMIT "15efb677a751f41cc7ca109e734b58abdee8d8a3" #################################################################################################### diff --git a/integration/BUILD.bazel b/integration/BUILD.bazel index 13201362f9..e019404df6 100644 --- a/integration/BUILD.bazel +++ b/integration/BUILD.bazel @@ -80,18 +80,6 @@ INTEGRATION_TESTS = { "service-worker-schema": {}, "side-effects": {"tags": ["no-ivy-aot"]}, "terser": {}, - "typings_test_ts36": { - # Special case for `typings_test_ts36` test as we want to pin - # `typescript` at version 3.6.x for that test and not link to the - # root @npm//typescript package. - "pinned_npm_packages": ["typescript"], - }, - "typings_test_ts37": { - # Special case for `typings_test_ts37` test as we want to pin - # `typescript` at version 3.7.x for that test and not link to the - # root @npm//typescript package. - "pinned_npm_packages": ["typescript"], - }, } [ diff --git a/integration/typings_test_ts36/include-all.ts b/integration/typings_test_ts36/include-all.ts deleted file mode 100644 index 116ba30903..0000000000 --- a/integration/typings_test_ts36/include-all.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - - - -import * as animations from '@angular/animations'; -import * as animationsBrowser from '@angular/animations/browser'; -import * as animationsBrowserTesting from '@angular/animations/browser/testing'; -import * as common from '@angular/common'; -import * as commonHttp from '@angular/common/http'; -import * as commonTesting from '@angular/common/testing'; -import * as commonHttpTesting from '@angular/common/testing'; -import * as compiler from '@angular/compiler'; -import * as compilerTesting from '@angular/compiler/testing'; -import * as core from '@angular/core'; -import * as coreTesting from '@angular/core/testing'; -import * as elements from '@angular/elements'; -import * as forms from '@angular/forms'; -// Current plan for Angular 8 is to stop building the @angular/http package -// import * as http from '@angular/http'; -// import * as httpTesting from '@angular/http/testing'; -import * as platformBrowser from '@angular/platform-browser'; -import * as platformBrowserDynamic from '@angular/platform-browser-dynamic'; -import * as platformBrowserDynamicTesting from '@angular/platform-browser-dynamic/testing'; -import * as platformBrowserAnimations from '@angular/platform-browser/animations'; -import * as platformBrowserTesting from '@angular/platform-browser/testing'; -import * as platformServer from '@angular/platform-server'; -import * as platformServerTesting from '@angular/platform-server/testing'; -import * as platformWebworker from '@angular/platform-webworker'; -import * as platformWebworkerDynamic from '@angular/platform-webworker-dynamic'; -import * as router from '@angular/router'; -import * as routerTesting from '@angular/router/testing'; -import * as routerUpgrade from '@angular/router/upgrade'; -import * as serviceWorker from '@angular/service-worker'; -import * as upgrade from '@angular/upgrade'; -import * as upgradeStatic from '@angular/upgrade/static'; -import * as upgradeTesting from '@angular/upgrade/static/testing'; - -export default { - animations, - animationsBrowser, - animationsBrowserTesting, - common, - commonTesting, - commonHttp, - commonHttpTesting, - compiler, - compilerTesting, - core, - coreTesting, - elements, - forms, - // See above - // http, - // httpTesting, - platformBrowser, - platformBrowserTesting, - platformBrowserDynamic, - platformBrowserDynamicTesting, - platformBrowserAnimations, - platformServer, - platformServerTesting, - platformWebworker, - platformWebworkerDynamic, - router, - routerTesting, - routerUpgrade, - serviceWorker, - upgrade, - upgradeStatic, - upgradeTesting, -}; diff --git a/integration/typings_test_ts36/package.json b/integration/typings_test_ts36/package.json deleted file mode 100644 index 4f5f64ed01..0000000000 --- a/integration/typings_test_ts36/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "angular-integration", - "description": "Assert that users with TypeScript 3.6 can type-check an Angular application", - "version": "0.0.0", - "license": "MIT", - "dependencies": { - "@angular/animations": "file:../../dist/packages-dist/animations", - "@angular/common": "file:../../dist/packages-dist/common", - "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", - "@angular/core": "file:../../dist/packages-dist/core", - "@angular/elements": "file:../../dist/packages-dist/elements", - "@angular/forms": "file:../../dist/packages-dist/forms", - "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", - "@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", - "@angular/platform-server": "file:../../dist/packages-dist/platform-server", - "@angular/platform-webworker": "file:../../dist/packages-dist/platform-webworker", - "@angular/platform-webworker-dynamic": "file:../../dist/packages-dist/platform-webworker-dynamic", - "@angular/router": "file:../../dist/packages-dist/router", - "@angular/service-worker": "file:../../dist/packages-dist/service-worker", - "@angular/upgrade": "file:../../dist/packages-dist/upgrade", - "@types/jasmine": "file:../../node_modules/@types/jasmine", - "rxjs": "file:../../node_modules/rxjs", - "typescript": "3.6.4", - "zone.js": "file:../../dist/zone.js-dist/zone.js" - }, - "scripts": { - "test": "tsc" - } -} diff --git a/integration/typings_test_ts36/tsconfig.json b/integration/typings_test_ts36/tsconfig.json deleted file mode 100644 index ee0f548617..0000000000 --- a/integration/typings_test_ts36/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "skipLibCheck": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "module": "commonjs", - "moduleResolution": "node", - "outDir": "./dist/out-tsc", - "rootDir": ".", - "target": "es5", - "lib": [ - "es5", - "dom", - "es2015.collection", - "es2015.iterable", - "es2015.promise" - ], - "types": [], - }, - "files": [ - "include-all.ts", - "node_modules/@types/jasmine/index.d.ts" - ] -} diff --git a/integration/typings_test_ts37/include-all.ts b/integration/typings_test_ts37/include-all.ts deleted file mode 100644 index 116ba30903..0000000000 --- a/integration/typings_test_ts37/include-all.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - - - -import * as animations from '@angular/animations'; -import * as animationsBrowser from '@angular/animations/browser'; -import * as animationsBrowserTesting from '@angular/animations/browser/testing'; -import * as common from '@angular/common'; -import * as commonHttp from '@angular/common/http'; -import * as commonTesting from '@angular/common/testing'; -import * as commonHttpTesting from '@angular/common/testing'; -import * as compiler from '@angular/compiler'; -import * as compilerTesting from '@angular/compiler/testing'; -import * as core from '@angular/core'; -import * as coreTesting from '@angular/core/testing'; -import * as elements from '@angular/elements'; -import * as forms from '@angular/forms'; -// Current plan for Angular 8 is to stop building the @angular/http package -// import * as http from '@angular/http'; -// import * as httpTesting from '@angular/http/testing'; -import * as platformBrowser from '@angular/platform-browser'; -import * as platformBrowserDynamic from '@angular/platform-browser-dynamic'; -import * as platformBrowserDynamicTesting from '@angular/platform-browser-dynamic/testing'; -import * as platformBrowserAnimations from '@angular/platform-browser/animations'; -import * as platformBrowserTesting from '@angular/platform-browser/testing'; -import * as platformServer from '@angular/platform-server'; -import * as platformServerTesting from '@angular/platform-server/testing'; -import * as platformWebworker from '@angular/platform-webworker'; -import * as platformWebworkerDynamic from '@angular/platform-webworker-dynamic'; -import * as router from '@angular/router'; -import * as routerTesting from '@angular/router/testing'; -import * as routerUpgrade from '@angular/router/upgrade'; -import * as serviceWorker from '@angular/service-worker'; -import * as upgrade from '@angular/upgrade'; -import * as upgradeStatic from '@angular/upgrade/static'; -import * as upgradeTesting from '@angular/upgrade/static/testing'; - -export default { - animations, - animationsBrowser, - animationsBrowserTesting, - common, - commonTesting, - commonHttp, - commonHttpTesting, - compiler, - compilerTesting, - core, - coreTesting, - elements, - forms, - // See above - // http, - // httpTesting, - platformBrowser, - platformBrowserTesting, - platformBrowserDynamic, - platformBrowserDynamicTesting, - platformBrowserAnimations, - platformServer, - platformServerTesting, - platformWebworker, - platformWebworkerDynamic, - router, - routerTesting, - routerUpgrade, - serviceWorker, - upgrade, - upgradeStatic, - upgradeTesting, -}; diff --git a/integration/typings_test_ts37/package.json b/integration/typings_test_ts37/package.json deleted file mode 100644 index 7e9fee12c9..0000000000 --- a/integration/typings_test_ts37/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "angular-integration", - "description": "Assert that users with TypeScript 3.7 can type-check an Angular application", - "version": "0.0.0", - "license": "MIT", - "dependencies": { - "@angular/animations": "file:../../dist/packages-dist/animations", - "@angular/common": "file:../../dist/packages-dist/common", - "@angular/compiler": "file:../../dist/packages-dist/compiler", - "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", - "@angular/core": "file:../../dist/packages-dist/core", - "@angular/elements": "file:../../dist/packages-dist/elements", - "@angular/forms": "file:../../dist/packages-dist/forms", - "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", - "@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", - "@angular/platform-server": "file:../../dist/packages-dist/platform-server", - "@angular/platform-webworker": "file:../../dist/packages-dist/platform-webworker", - "@angular/platform-webworker-dynamic": "file:../../dist/packages-dist/platform-webworker-dynamic", - "@angular/router": "file:../../dist/packages-dist/router", - "@angular/service-worker": "file:../../dist/packages-dist/service-worker", - "@angular/upgrade": "file:../../dist/packages-dist/upgrade", - "@types/jasmine": "file:../../node_modules/@types/jasmine", - "rxjs": "file:../../node_modules/rxjs", - "typescript": "3.7.4", - "zone.js": "file:../../dist/zone.js-dist/zone.js" - }, - "scripts": { - "test": "tsc" - } -} diff --git a/integration/typings_test_ts37/tsconfig.json b/integration/typings_test_ts37/tsconfig.json deleted file mode 100644 index ee0f548617..0000000000 --- a/integration/typings_test_ts37/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "skipLibCheck": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "module": "commonjs", - "moduleResolution": "node", - "outDir": "./dist/out-tsc", - "rootDir": ".", - "target": "es5", - "lib": [ - "es5", - "dom", - "es2015.collection", - "es2015.iterable", - "es2015.promise" - ], - "types": [], - }, - "files": [ - "include-all.ts", - "node_modules/@types/jasmine/index.d.ts" - ] -} diff --git a/packages/bazel/package.json b/packages/bazel/package.json index 9d7f0ee9d3..f0cf6eeca8 100644 --- a/packages/bazel/package.json +++ b/packages/bazel/package.json @@ -34,7 +34,7 @@ "@angular/compiler-cli": "0.0.0-PLACEHOLDER", "@bazel/typescript": ">=1.0.0", "terser": "^4.3.1", - "typescript": ">=3.6 <3.9", + "typescript": ">=3.8 <3.9", "rollup": ">=1.20.0", "rollup-plugin-commonjs": ">=9.0.0", "rollup-plugin-node-resolve": ">=4.2.0", diff --git a/packages/compiler-cli/package.json b/packages/compiler-cli/package.json index 25601bb7fe..930f075a4e 100644 --- a/packages/compiler-cli/package.json +++ b/packages/compiler-cli/package.json @@ -27,7 +27,7 @@ "peerDependencies": { "@angular/compiler": "0.0.0-PLACEHOLDER", "tslib": "^1.10.0", - "typescript": ">=3.6 <3.9" + "typescript": ">=3.8 <3.9" }, "engines": { "node": ">=10.0" @@ -52,4 +52,4 @@ "publishConfig": { "registry": "https://wombat-dressing-room.appspot.com" } -} \ No newline at end of file +} diff --git a/packages/compiler-cli/src/typescript_support.ts b/packages/compiler-cli/src/typescript_support.ts index 98945def78..4d78794efd 100644 --- a/packages/compiler-cli/src/typescript_support.ts +++ b/packages/compiler-cli/src/typescript_support.ts @@ -12,7 +12,7 @@ import {compareVersions} from './diagnostics/typescript_version'; * Minimum supported TypeScript version * ∀ supported typescript version v, v >= MIN_TS_VERSION */ -const MIN_TS_VERSION = '3.6.4'; +const MIN_TS_VERSION = '3.8.3'; /** * Supremum of supported TypeScript versions diff --git a/tools/ts-api-guardian/package.json b/tools/ts-api-guardian/package.json index 8f1c9c8778..a1b6859ddf 100644 --- a/tools/ts-api-guardian/package.json +++ b/tools/ts-api-guardian/package.json @@ -17,7 +17,7 @@ "test": "test" }, "peerDependencies": { - "typescript": "~3.7.4" + "typescript": "~3.8.3" }, "dependencies": { "chalk": "^2.3.1", @@ -33,7 +33,7 @@ "chai": "^4.1.2", "jasmine": "^3.1.0", "source-map-support": "^0.5.9", - "typescript": "~3.7.4" + "typescript": "~3.8.3" }, "repository": {}, "keywords": [