Skip to content

Commit 0ba845c

Browse files
crisbetodgp1130
authored andcommitted
build: update to TypeScript 5.2
Updates the repo to TypeScript 5.2.
1 parent 0811f64 commit 0ba845c

File tree

13 files changed

+12026
-9541
lines changed

13 files changed

+12026
-9541
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"magic-string": "0.30.3",
174174
"mini-css-extract-plugin": "2.7.6",
175175
"mrmime": "1.0.1",
176-
"ng-packagr": "17.0.0-next.0",
176+
"ng-packagr": "17.0.0-next.1",
177177
"node-fetch": "^2.2.0",
178178
"npm": "^8.11.0",
179179
"npm-package-arg": "11.0.1",
@@ -211,7 +211,7 @@
211211
"tree-kill": "1.2.2",
212212
"ts-node": "^10.9.1",
213213
"tslib": "2.6.2",
214-
"typescript": "5.1.6",
214+
"typescript": "5.2.2",
215215
"verdaccio": "5.26.2",
216216
"verdaccio-auth-memory": "^10.0.0",
217217
"vite": "4.4.9",

packages/angular_devkit/build_angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@
8484
"jest": "^29.5.0",
8585
"jest-environment-jsdom": "^29.5.0",
8686
"karma": "^6.3.0",
87-
"ng-packagr": "^17.0.0 || ^17.0.0-next.0",
87+
"ng-packagr": "^17.0.0 || ^17.0.0-next.1",
8888
"protractor": "^7.0.0",
8989
"tailwindcss": "^2.0.0 || ^3.0.0",
90-
"typescript": ">=4.9.3 <5.2"
90+
"typescript": ">=4.9.3 <5.3"
9191
},
9292
"peerDependenciesMeta": {
9393
"@angular/localize": {

packages/ngtools/webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
3131
"@angular/compiler": "17.0.0-next.2",
3232
"@angular/compiler-cli": "17.0.0-next.2",
33-
"typescript": "5.1.6",
33+
"typescript": "5.2.2",
3434
"webpack": "5.88.2"
3535
}
3636
}

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,9 @@ describe('@ngtools/webpack transformers', () => {
366366
import { __decorate } from "tslib";
367367
import { Decorator } from './decorator';
368368
369-
export let Foo = class Foo { constructor(param) { } };
369+
let Foo = class Foo { constructor(param) { } };
370370
Foo = __decorate([ Decorator() ], Foo);
371+
export { Foo };
371372
`;
372373

373374
const { program, compilerHost } = createTypescriptContext(
@@ -404,8 +405,9 @@ describe('@ngtools/webpack transformers', () => {
404405
import { __decorate } from "tslib";
405406
import { Decorator } from './decorator';
406407
407-
export let Foo = class Foo { constructor(param) { } };
408+
let Foo = class Foo { constructor(param) { } };
408409
Foo = __decorate([ Decorator() ], Foo);
410+
export { Foo };
409411
`;
410412

411413
const { program, compilerHost } = createTypescriptContext(
@@ -455,8 +457,9 @@ describe('@ngtools/webpack transformers', () => {
455457
456458
const test = createElement("p", null, "123");
457459
458-
export let Foo = class Foo { constructor(param) { } };
460+
let Foo = class Foo { constructor(param) { } };
459461
Foo = __decorate([ Decorator() ], Foo);
462+
export { Foo };
460463
`;
461464

462465
const { program, compilerHost } = createTypescriptContext(
@@ -494,8 +497,9 @@ describe('@ngtools/webpack transformers', () => {
494497
import { __decorate } from "tslib";
495498
import { Decorator } from './decorator';
496499
497-
export let Foo = class Foo { ngOnChanges(changes) { } };
500+
let Foo = class Foo { ngOnChanges(changes) { } };
498501
Foo = __decorate([ Decorator() ], Foo);
502+
export { Foo };
499503
`;
500504

501505
const { program, compilerHost } = createTypescriptContext(
@@ -533,8 +537,9 @@ describe('@ngtools/webpack transformers', () => {
533537
import { Decorator } from './decorator';
534538
import { Service } from './service';
535539
536-
export let Foo = class Foo { constructor(param) { } };
540+
let Foo = class Foo { constructor(param) { } };
537541
Foo = __decorate([ Decorator(), __metadata("design:paramtypes", [Service]) ], Foo);
542+
export { Foo };
538543
`;
539544

540545
const { program, compilerHost } = createTypescriptContext(

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('@ngtools/webpack transformers', () => {
5050
import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
5151
import { Component } from '@angular/core';
5252
53-
export let AppComponent = class AppComponent {
53+
let AppComponent = class AppComponent {
5454
constructor() {
5555
this.title = 'app';
5656
}
@@ -62,6 +62,7 @@ describe('@ngtools/webpack transformers', () => {
6262
styles: [__NG_CLI_RESOURCE__1, __NG_CLI_RESOURCE__2]
6363
})
6464
], AppComponent);
65+
export { AppComponent };
6566
`;
6667

6768
const result = transform(input);
@@ -89,9 +90,10 @@ describe('@ngtools/webpack transformers', () => {
8990
9091
const tslib_1 = require("tslib");
9192
const core_1 = require("@angular/core");
92-
let AppComponent = exports.AppComponent = class AppComponent {
93+
let AppComponent = class AppComponent {
9394
constructor() { this.title = 'app'; }
9495
};
96+
exports.AppComponent = AppComponent;
9597
exports.AppComponent = AppComponent = tslib_1.__decorate([
9698
(0, core_1.Component)({
9799
selector: 'app-root',
@@ -119,7 +121,7 @@ describe('@ngtools/webpack transformers', () => {
119121
import { __decorate } from "tslib";
120122
import __NG_CLI_RESOURCE__0 from "./app.component.svg?ngResource";
121123
import { Component } from '@angular/core';
122-
export let AppComponent = class AppComponent {
124+
let AppComponent = class AppComponent {
123125
constructor() {
124126
this.title = 'app';
125127
}
@@ -130,6 +132,7 @@ describe('@ngtools/webpack transformers', () => {
130132
template: __NG_CLI_RESOURCE__0
131133
})
132134
], AppComponent);
135+
export { AppComponent };
133136
`;
134137

135138
const result = transform(input);
@@ -156,7 +159,7 @@ describe('@ngtools/webpack transformers', () => {
156159
import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
157160
import { Component } from '@angular/core';
158161
159-
export let AppComponent = class AppComponent {
162+
let AppComponent = class AppComponent {
160163
constructor() {
161164
this.title = 'app';
162165
}
@@ -168,6 +171,7 @@ describe('@ngtools/webpack transformers', () => {
168171
styles: ["a { color: red }", __NG_CLI_RESOURCE__1]
169172
})
170173
], AppComponent);
174+
export { AppComponent };
171175
`;
172176

173177
const result = transform(input);
@@ -194,7 +198,7 @@ describe('@ngtools/webpack transformers', () => {
194198
import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
195199
196200
import { Component } from '@angular/core';
197-
export let AppComponent = class AppComponent {
201+
let AppComponent = class AppComponent {
198202
constructor() {
199203
this.title = 'app';
200204
}
@@ -206,6 +210,7 @@ describe('@ngtools/webpack transformers', () => {
206210
styles: [__NG_CLI_RESOURCE__1, __NG_CLI_RESOURCE__2]
207211
})
208212
], AppComponent);
213+
export { AppComponent };
209214
`;
210215

211216
const result = transform(input);
@@ -232,7 +237,7 @@ describe('@ngtools/webpack transformers', () => {
232237
import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
233238
import { Component as NgComponent } from '@angular/core';
234239
235-
export let AppComponent = class AppComponent {
240+
let AppComponent = class AppComponent {
236241
constructor() {
237242
this.title = 'app';
238243
}
@@ -244,6 +249,7 @@ describe('@ngtools/webpack transformers', () => {
244249
styles: [__NG_CLI_RESOURCE__1, __NG_CLI_RESOURCE__2]
245250
})
246251
], AppComponent);
252+
export { AppComponent };
247253
`;
248254

249255
const { program } = createTypescriptContext(input);
@@ -274,7 +280,7 @@ describe('@ngtools/webpack transformers', () => {
274280
import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
275281
276282
import * as ng from '@angular/core';
277-
export let AppComponent = class AppComponent {
283+
let AppComponent = class AppComponent {
278284
constructor() {
279285
this.title = 'app';
280286
}
@@ -286,6 +292,7 @@ describe('@ngtools/webpack transformers', () => {
286292
styles: [__NG_CLI_RESOURCE__1, __NG_CLI_RESOURCE__2]
287293
})
288294
], AppComponent);
295+
export { AppComponent };
289296
`;
290297

291298
const result = transform(input);
@@ -318,7 +325,7 @@ describe('@ngtools/webpack transformers', () => {
318325
319326
import { Component } from '@angular/core';
320327
321-
export let AppComponent = class AppComponent {
328+
let AppComponent = class AppComponent {
322329
constructor() {
323330
this.obj = [
324331
{
@@ -336,6 +343,7 @@ describe('@ngtools/webpack transformers', () => {
336343
styles: [__NG_CLI_RESOURCE__1]
337344
})
338345
], AppComponent);
346+
export { AppComponent };
339347
`;
340348

341349
const result = transform(input);
@@ -365,7 +373,7 @@ describe('@ngtools/webpack transformers', () => {
365373
import { __decorate } from "tslib";
366374
import { Component } from 'foo';
367375
368-
export let AppComponent = class AppComponent {
376+
let AppComponent = class AppComponent {
369377
constructor() {
370378
this.obj = [
371379
{
@@ -383,6 +391,7 @@ describe('@ngtools/webpack transformers', () => {
383391
styleUrls: ['./app.component.css']
384392
})
385393
], AppComponent);
394+
export { AppComponent };
386395
`;
387396

388397
const result = transform(input);
@@ -405,7 +414,7 @@ describe('@ngtools/webpack transformers', () => {
405414
const output = `
406415
import { __decorate } from "tslib";
407416
import { Component } from '@angular/core';
408-
export let AppComponent = class AppComponent {
417+
let AppComponent = class AppComponent {
409418
constructor() {
410419
this.title = 'app';
411420
}
@@ -417,6 +426,7 @@ describe('@ngtools/webpack transformers', () => {
417426
styleUrls: ['./app.component.css', './app.component.2.css']
418427
})
419428
], AppComponent);
429+
export { AppComponent };
420430
`;
421431

422432
const result = transform(input, false);

packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
load("//tools:defaults.bzl", "ts_library")
22

33
# files fetched on 2023-06-02 from
4-
# https://github.com/microsoft/TypeScript/releases/tag/v5.1.3
4+
# https://github.com/microsoft/TypeScript/releases/tag/v5.2.2
55

66
# Commands to download:
7-
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v5.1.3/lib/typescript.d.ts -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts
8-
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v5.1.3/lib/typescript.js -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js
7+
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v5.2.2/lib/typescript.d.ts -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts
8+
# curl https://raw.githubusercontent.com/microsoft/TypeScript/v5.2.2/lib/typescript.js -o packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js
99

1010
licenses(["notice"]) # Apache 2.0
1111

0 commit comments

Comments
 (0)