refactor(compiler): remove support for TypeScript 3.9 (#39313)
This commit removes TypeScript 3.9 support. BREAKING CHANGE: TypeScript 3.9 is no longer supported, please upgrade to TypeScript 4.0. PR Close #39313
This commit is contained in:
parent
41c2228d49
commit
f5a3e44e9d
|
@ -28,7 +28,7 @@
|
||||||
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
||||||
"@bazel/typescript": ">=1.0.0",
|
"@bazel/typescript": ">=1.0.0",
|
||||||
"terser": "^4.3.1",
|
"terser": "^4.3.1",
|
||||||
"typescript": ">=3.9 <4.1",
|
"typescript": ">=4.0 <4.1",
|
||||||
"rollup": ">=1.20.0",
|
"rollup": ">=1.20.0",
|
||||||
"rollup-plugin-commonjs": ">=9.0.0",
|
"rollup-plugin-commonjs": ">=9.0.0",
|
||||||
"rollup-plugin-node-resolve": ">=4.2.0",
|
"rollup-plugin-node-resolve": ">=4.2.0",
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
||||||
"typescript": ">=3.9 <4.1"
|
"typescript": ">=4.0 <4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0"
|
"node": ">=10.0"
|
||||||
|
|
|
@ -11,13 +11,19 @@ import {compareVersions} from './diagnostics/typescript_version';
|
||||||
/**
|
/**
|
||||||
* Minimum supported TypeScript version
|
* Minimum supported TypeScript version
|
||||||
* ∀ supported typescript version v, v >= MIN_TS_VERSION
|
* ∀ supported typescript version v, v >= MIN_TS_VERSION
|
||||||
|
*
|
||||||
|
* Note: this check is disabled in g3, search for
|
||||||
|
* `angularCompilerOptions.disableTypeScriptVersionCheck` config param value in g3.
|
||||||
*/
|
*/
|
||||||
const MIN_TS_VERSION = '3.9.2';
|
const MIN_TS_VERSION = '4.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supremum of supported TypeScript versions
|
* Supremum of supported TypeScript versions
|
||||||
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
||||||
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
||||||
|
*
|
||||||
|
* Note: this check is disabled in g3, search for
|
||||||
|
* `angularCompilerOptions.disableTypeScriptVersionCheck` config param value in g3.
|
||||||
*/
|
*/
|
||||||
const MAX_TS_VERSION = '4.1.0';
|
const MAX_TS_VERSION = '4.1.0';
|
||||||
|
|
||||||
|
@ -36,9 +42,8 @@ export function restoreTypeScriptVersionForTesting(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether a given version ∈ [minVersion, maxVersion[
|
* Checks whether a given version ∈ [minVersion, maxVersion[.
|
||||||
* An error will be thrown if the following statements are simultaneously true:
|
* An error will be thrown when the given version ∉ [minVersion, maxVersion[.
|
||||||
* - the given version ∉ [minVersion, maxVersion[,
|
|
||||||
*
|
*
|
||||||
* @param version The version on which the check will be performed
|
* @param version The version on which the check will be performed
|
||||||
* @param minVersion The lower bound version. A valid version needs to be greater than minVersion
|
* @param minVersion The lower bound version. A valid version needs to be greater than minVersion
|
||||||
|
|
Loading…
Reference in New Issue