Skip to content

Commit 5c14d1b

Browse files
committed
chore: upgrade to tshy 4 and TypeScript 6
Hoist tshy to a single root devDependency (4.1.2) instead of one per public package, and move the repo from TypeScript 5.5.4 to 6.0.3. Most of the TS6 work was absorbed by bumping @types/node to 20.19.19, which brings the generic Buffer typings TS6 expects and clears the Buffer/Uint8Array assignability errors at the source. The rest: drop the deprecated downlevelIteration, modernize moduleResolution on the database/emails/tsql configs (plus an explicit rootDir for database), and patch tsup so it only passes the deprecated baseUrl when configured so redis-worker's declaration build runs under TS6. Also a few genuine type fixes (clickhouse row typing, OTLP response bodies, realtime stream ingest types) and one real bug: the dev CLI read error.status off an eventsource error that only exposes code, so the HTTP status never showed.
1 parent dee6f1d commit 5c14d1b

26 files changed

Lines changed: 588 additions & 442 deletions

File tree

.configs/tsconfig.base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"esModuleInterop": true,
2727
"emitDecoratorMetadata": false,
2828
"experimentalDecorators": false,
29-
"downlevelIteration": true,
3029
"isolatedModules": true,
3130
"noUncheckedIndexedAccess": true,
3231

apps/webapp/app/routes/otel.v1.logs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function action({ request }: ActionFunctionArgs) {
1919

2020
const exportResponse = await otlpExporter.exportLogs(exportRequest);
2121

22-
return new Response(ExportLogsServiceResponse.encode(exportResponse).finish(), {
22+
return new Response(ExportLogsServiceResponse.encode(exportResponse).finish().slice(), {
2323
status: 200,
2424
});
2525
} else {

apps/webapp/app/routes/otel.v1.metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function action({ request }: ActionFunctionArgs) {
2424

2525
const exportResponse = await otlpExporter.exportMetrics(exportRequest);
2626

27-
return new Response(ExportMetricsServiceResponse.encode(exportResponse).finish(), {
27+
return new Response(ExportMetricsServiceResponse.encode(exportResponse).finish().slice(), {
2828
status: 200,
2929
});
3030
} else {

apps/webapp/app/routes/otel.v1.traces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function action({ request }: ActionFunctionArgs) {
1919

2020
const exportResponse = await otlpExporter.exportTraces(exportRequest);
2121

22-
return new Response(ExportTraceServiceResponse.encode(exportResponse).finish(), {
22+
return new Response(ExportTraceServiceResponse.encode(exportResponse).finish().slice(), {
2323
status: 200,
2424
});
2525
} else {

apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export class RedisRealtimeStreams implements StreamIngestor, StreamResponder {
284284
}
285285

286286
async ingestData(
287-
stream: ReadableStream<Uint8Array>,
287+
stream: ReadableStream<Uint8Array<ArrayBuffer>>,
288288
runId: string,
289289
streamId: string,
290290
clientId: string,

apps/webapp/app/services/realtime/s2realtimeStreams.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class S2RealtimeStreams implements StreamResponder, StreamIngestor {
111111
}
112112

113113
ingestData(
114-
stream: ReadableStream<Uint8Array>,
114+
stream: ReadableStream<Uint8Array<ArrayBuffer>>,
115115
runId: string,
116116
streamId: string,
117117
clientId: string,

apps/webapp/app/services/realtime/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface StreamIngestor {
1212
): Promise<{ responseHeaders?: Record<string, string> }>;
1313

1414
ingestData(
15-
stream: ReadableStream<Uint8Array>,
15+
stream: ReadableStream<Uint8Array<ArrayBuffer>>,
1616
runId: string,
1717
streamId: string,
1818
clientId: string,

apps/webapp/test/setup-test-env.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/webapp/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"skipLibCheck": true,
1818
"experimentalDecorators": true,
1919
"emitDecoratorMetadata": true,
20-
"baseUrl": ".",
2120
"paths": {
2221
"~/*": ["./app/*"],
2322
"@/*": ["./*"]

internal-packages/clickhouse/src/client/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ export class ClickhouseClient implements ClickhouseReader, ClickhouseWriter {
492492
}
493493

494494
for (const row of rows) {
495-
const rowData = row.json();
495+
const rowData = row.json<unknown[]>();
496496

497497
const hydratedRow: Record<string, any> = {};
498498
for (let i = 0; i < req.columns.length; i++) {

0 commit comments

Comments
 (0)