Skip to content

Commit 5eb7235

Browse files
committed
build: update to TypeScript 5.9 beta
Updates the repo to the TypeScript 5.9 beta and widens the peer dependency ranges.
1 parent 7595e1f commit 5eb7235

File tree

18 files changed

+9740
-8449
lines changed

18 files changed

+9740
-8449
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ http_archive(
204204
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
205205

206206
rules_ts_dependencies(
207-
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.8.3 | jq -r '.dist.integrity'
208-
ts_integrity = "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
207+
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.0-beta | jq -r '.dist.integrity'
208+
ts_integrity = "sha512-p91qoTdwWKj9YEBYavmGiBn0DF4OBElzw4pW4oPbK4HeCfr/SDz9+yviVWshZXGvGvFCJ3AVQ+J7F1UZXc23QQ==",
209209
ts_version_from = "//:package.json",
210210
)
211211

@@ -273,7 +273,7 @@ esbuild_register_toolchains(
273273

274274
git_repository(
275275
name = "rules_angular",
276-
commit = "88ddcf8cccbfef57f8cc3dda4881f18ec739428e",
276+
commit = "8bf9ae3fa3017ec12877908533001daed9c6ce83",
277277
remote = "https://github.com/devversion/rules_angular.git",
278278
)
279279

goldens/public-api/angular_devkit/schematics/index.api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export interface DirEntry {
274274
// @public (undocumented)
275275
export interface DryRunCreateEvent {
276276
// (undocumented)
277-
content: Buffer;
277+
content: ArrayBufferLike;
278278
// (undocumented)
279279
kind: 'create';
280280
// (undocumented)
@@ -334,7 +334,7 @@ export class DryRunSink extends HostSink {
334334
// @public (undocumented)
335335
export interface DryRunUpdateEvent {
336336
// (undocumented)
337-
content: Buffer;
337+
content: ArrayBufferLike;
338338
// (undocumented)
339339
kind: 'update';
340340
// (undocumented)
@@ -495,13 +495,13 @@ export class HostSink extends SimpleSinkBase {
495495
// (undocumented)
496496
_done(): Observable<void>;
497497
// (undocumented)
498-
protected _filesToCreate: Map<Path, Buffer<ArrayBufferLike>>;
498+
protected _filesToCreate: Map<Path, ArrayBufferLike>;
499499
// (undocumented)
500500
protected _filesToDelete: Set<Path>;
501501
// (undocumented)
502502
protected _filesToRename: Set<[Path, Path]>;
503503
// (undocumented)
504-
protected _filesToUpdate: Map<Path, Buffer<ArrayBufferLike>>;
504+
protected _filesToUpdate: Map<Path, ArrayBufferLike>;
505505
// (undocumented)
506506
protected _force: boolean;
507507
// (undocumented)

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@
4646
},
4747
"homepage": "https://github.com/angular/angular-cli",
4848
"devDependencies": {
49-
"@angular/animations": "20.2.0-next.0",
49+
"@angular/animations": "20.2.0-next.1",
5050
"@angular/cdk": "20.1.0-rc.0",
51-
"@angular/common": "20.2.0-next.0",
52-
"@angular/compiler": "20.2.0-next.0",
53-
"@angular/compiler-cli": "20.2.0-next.0",
54-
"@angular/core": "20.2.0-next.0",
55-
"@angular/forms": "20.2.0-next.0",
56-
"@angular/localize": "20.2.0-next.0",
51+
"@angular/common": "20.2.0-next.1",
52+
"@angular/compiler": "20.2.0-next.1",
53+
"@angular/compiler-cli": "20.2.0-next.1",
54+
"@angular/core": "20.2.0-next.1",
55+
"@angular/forms": "20.2.0-next.1",
56+
"@angular/localize": "20.2.0-next.1",
5757
"@angular/material": "20.1.0-rc.0",
5858
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#7cdb4cce7349f791492eee3ac1f84e2a0e243287",
59-
"@angular/platform-browser": "20.2.0-next.0",
60-
"@angular/platform-server": "20.2.0-next.0",
61-
"@angular/router": "20.2.0-next.0",
62-
"@angular/service-worker": "20.2.0-next.0",
59+
"@angular/platform-browser": "20.2.0-next.1",
60+
"@angular/platform-server": "20.2.0-next.1",
61+
"@angular/router": "20.2.0-next.1",
62+
"@angular/service-worker": "20.2.0-next.1",
6363
"@bazel/bazelisk": "1.26.0",
6464
"@bazel/buildifier": "8.2.1",
6565
"@eslint/compat": "1.3.1",
@@ -140,7 +140,7 @@
140140
"tar": "^7.0.0",
141141
"ts-node": "^10.9.1",
142142
"tslib": "2.8.1",
143-
"typescript": "5.8.3",
143+
"typescript": "5.9.0-beta",
144144
"undici": "7.11.0",
145145
"unenv": "^1.10.0",
146146
"verdaccio": "6.1.5",
@@ -173,6 +173,6 @@
173173
}
174174
},
175175
"resolutions": {
176-
"typescript": "5.8.3"
176+
"typescript": "5.9.0-beta"
177177
}
178178
}

packages/angular/build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"postcss": "^8.4.0",
7474
"tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
7575
"tslib": "^2.3.0",
76-
"typescript": ">=5.8 <5.9",
76+
"typescript": ">=5.8 <6.0",
7777
"vitest": "^3.1.1"
7878
},
7979
"peerDependenciesMeta": {

packages/angular/build/src/builders/application/tests/behavior/rebuild-errors_spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
149149
[
150150
async () => {
151151
// Add invalid block syntax
152-
await harness.appendToFile('src/app/app.component.html', '@one');
152+
await harness.appendToFile('src/app/app.component.html', '@if-one');
153153
},
154154
async ({ logs }) => {
155155
expect(logs).toContain(
156156
jasmine.objectContaining<logging.LogEntry>({
157-
message: jasmine.stringContaining('@one'),
157+
message: jasmine.stringContaining('@if-one'),
158158
}),
159159
);
160160

@@ -165,42 +165,42 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
165165
async ({ logs }) => {
166166
expect(logs).toContain(
167167
jasmine.objectContaining<logging.LogEntry>({
168-
message: jasmine.stringContaining('@one'),
168+
message: jasmine.stringContaining('@if-one'),
169169
}),
170170
);
171171

172172
// Add more invalid block syntax
173-
await harness.appendToFile('src/app/app.component.html', '@two');
173+
await harness.appendToFile('src/app/app.component.html', '@if-two');
174174
},
175175
async ({ logs }) => {
176176
expect(logs).toContain(
177177
jasmine.objectContaining<logging.LogEntry>({
178-
message: jasmine.stringContaining('@one'),
178+
message: jasmine.stringContaining('@if-one'),
179179
}),
180180
);
181181
expect(logs).toContain(
182182
jasmine.objectContaining<logging.LogEntry>({
183-
message: jasmine.stringContaining('@two'),
183+
message: jasmine.stringContaining('@if-two'),
184184
}),
185185
);
186186

187187
// Add more invalid block syntax
188-
await harness.appendToFile('src/app/app.component.html', '@three');
188+
await harness.appendToFile('src/app/app.component.html', '@if-three');
189189
},
190190
async ({ logs }) => {
191191
expect(logs).toContain(
192192
jasmine.objectContaining<logging.LogEntry>({
193-
message: jasmine.stringContaining('@one'),
193+
message: jasmine.stringContaining('@if-one'),
194194
}),
195195
);
196196
expect(logs).toContain(
197197
jasmine.objectContaining<logging.LogEntry>({
198-
message: jasmine.stringContaining('@two'),
198+
message: jasmine.stringContaining('@if-two'),
199199
}),
200200
);
201201
expect(logs).toContain(
202202
jasmine.objectContaining<logging.LogEntry>({
203-
message: jasmine.stringContaining('@three'),
203+
message: jasmine.stringContaining('@if-three'),
204204
}),
205205
);
206206

@@ -211,17 +211,17 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
211211
({ logs }) => {
212212
expect(logs).not.toContain(
213213
jasmine.objectContaining<logging.LogEntry>({
214-
message: jasmine.stringContaining('@one'),
214+
message: jasmine.stringContaining('@if-one'),
215215
}),
216216
);
217217
expect(logs).not.toContain(
218218
jasmine.objectContaining<logging.LogEntry>({
219-
message: jasmine.stringContaining('@two'),
219+
message: jasmine.stringContaining('@if-two'),
220220
}),
221221
);
222222
expect(logs).not.toContain(
223223
jasmine.objectContaining<logging.LogEntry>({
224-
message: jasmine.stringContaining('@three'),
224+
message: jasmine.stringContaining('@if-three'),
225225
}),
226226
);
227227
},

packages/angular/build/src/tools/esbuild/javascript-transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class JavaScriptTransformer {
125125
{
126126
// The below is disable as with Yarn PNP this causes build failures with the below message
127127
// `Unable to deserialize cloned data`.
128-
transferList: process.versions.pnp ? undefined : [data.buffer],
128+
transferList: process.versions.pnp ? undefined : [data.buffer as ArrayBuffer],
129129
},
130130
)) as Uint8Array;
131131

packages/angular/cli/src/command-builder/utilities/schematic-workflow.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ export function subscribeToWorkflow(
3838
);
3939
break;
4040
case 'update':
41-
logs.push(`${colors.cyan('UPDATE')} ${eventPath} (${event.content.length} bytes)`);
41+
logs.push(
42+
// TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution.
43+
`${colors.cyan('UPDATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`,
44+
);
4245
files.add(eventPath);
4346
break;
4447
case 'create':
45-
logs.push(`${colors.green('CREATE')} ${eventPath} (${event.content.length} bytes)`);
48+
logs.push(
49+
// TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution.
50+
`${colors.green('CREATE')} ${eventPath} (${(event.content as unknown as Buffer).length} bytes)`,
51+
);
4652
files.add(eventPath);
4753
break;
4854
case 'delete':

packages/angular_devkit/architect/testing/test-project-host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class TestProjectHost extends NodeJsSyncHost {
122122
content = content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength);
123123
}
124124

125-
this.scopedSync().write(normalize(fileName), content);
125+
this.scopedSync().write(normalize(fileName), content as ArrayBufferLike);
126126
});
127127
}
128128

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"ng-packagr": "0.0.0-NG-PACKAGR-PEER-DEP",
8888
"protractor": "^7.0.0",
8989
"tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
90-
"typescript": ">=5.8 <5.9"
90+
"typescript": ">=5.8 <6.0"
9191
},
9292
"peerDependenciesMeta": {
9393
"@angular/core": {

packages/angular_devkit/core/src/virtual-fs/host/buffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { TextDecoder, TextEncoder } from 'node:util';
1010
import { FileBuffer } from './interface';
1111

1212
export function stringToFileBuffer(str: string): FileBuffer {
13-
return new TextEncoder().encode(str).buffer;
13+
return new TextEncoder().encode(str).buffer as FileBuffer;
1414
}
1515

1616
export function fileBufferToString(fileBuffer: FileBuffer): string {

0 commit comments

Comments
 (0)