Skip to content

Commit 76308fe

Browse files
clydinalan-agius4
authored andcommitted
feat(@ngtools/webpack): support using TypeScript 4.3
With the support of TypeScript 4.3 within the Angular framework, the CLI now supports using TypeScript 4.3 as well. TypeScript 4.2 also continues to be supported for existing projects.
1 parent 1dd3bda commit 76308fe

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/ngtools/webpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
},
2626
"peerDependencies": {
2727
"@angular/compiler-cli": "^12.0.0 || ^12.1.0-next",
28-
"typescript": "~4.2.3",
28+
"typescript": "~4.2.3 || ~4.3.2",
2929
"webpack": "^5.30.0"
3030
},
3131
"devDependencies": {
3232
"@angular-devkit/core": "0.0.0",
3333
"@angular/compiler": "12.0.4",
3434
"@angular/compiler-cli": "12.0.4",
35-
"typescript": "4.2.4",
35+
"typescript": "4.3.2",
3636
"webpack": "5.38.1"
3737
}
3838
}

packages/ngtools/webpack/src/transformers/replace_resources_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function transform(
1616
shouldTransform = true,
1717
directTemplateLoading = true,
1818
importHelpers = true,
19-
module: ts.ModuleKind = ts.ModuleKind.ESNext,
19+
module: ts.ModuleKind = ts.ModuleKind.ES2020,
2020
inlineStyleMimeType?: string,
2121
) {
2222
const { program, compilerHost } = createTypescriptContext(input, undefined, undefined, {

packages/ngtools/webpack/src/transformers/spec_helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export function createTypescriptContext(
2626
allowJs: true,
2727
newLine: ts.NewLineKind.LineFeed,
2828
moduleResolution: ts.ModuleResolutionKind.NodeJs,
29-
module: ts.ModuleKind.ESNext,
30-
target: ts.ScriptTarget.ESNext,
29+
module: ts.ModuleKind.ES2020,
30+
target: ts.ScriptTarget.ES2020,
3131
skipLibCheck: true,
3232
sourceMap: false,
3333
importHelpers: true,

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#941d67490391ab1a385796fd34e588f7416e3ebb":
8888
version "0.0.0"
89-
resolved "https://github.com/angular/dev-infra-private-builds.git#b945d698497fe2d412f209641cf69fde54276f5d"
89+
resolved "https://github.com/angular/dev-infra-private-builds.git#7308e71916da94b51a9b558693c49a04bfc98beb"
9090
dependencies:
9191
"@angular/benchpress" "0.2.1"
9292
"@bazel/buildifier" "^4.0.1"
@@ -11781,7 +11781,7 @@ [email protected]:
1178111781
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
1178211782
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
1178311783

11784-
typescript@~4.3.2:
11784+
typescript@4.3.2, typescript@~4.3.2:
1178511785
version "4.3.2"
1178611786
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
1178711787
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==

0 commit comments

Comments
 (0)