Skip to content

Commit e54841e

Browse files
committed
chore: Upgrade to TypeScript 7.0
Bump typescript to ~7.0.2 and apply the changes TS 7 requires: - remove downlevelIteration and baseUrl (both removed in TS 7) - set explicit rootDir on all emitting tsconfigs (now required) - add DOM lib and node types to the shared base config - scope DOM out of cloudflare (conflicts with workers-types) - source fixes: BodyInit casts on transports, readonly web-vitals globals, WebAssembly.Exception ts-expect-error removal, elysia trace handler generic, replay paint entry ts-expect-error
1 parent 21ebf07 commit e54841e

70 files changed

Lines changed: 249 additions & 64 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev-packages/bundler-plugin-integration-tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"devDependencies": {
1818
"premove": "^4.0.0",
19+
"typescript": "~6.0.3",
1920
"vitest": "^3.2.6"
2021
},
2122
"volta": {

dev-packages/node-core-integration-tests/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"declaration": true,
66
"declarationMap": true,
77
"emitDeclarationOnly": true,
8-
"outDir": "build/types"
8+
"outDir": "build/types",
9+
"rootDir": "."
910
}
1011
}

dev-packages/node-integration-tests/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"declaration": true,
66
"declarationMap": true,
77
"emitDeclarationOnly": true,
8-
"outDir": "build/types"
8+
"outDir": "build/types",
9+
"rootDir": "."
910
}
1011
}

dev-packages/test-utils/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"declaration": true,
66
"declarationMap": true,
77
"emitDeclarationOnly": true,
8-
"outDir": "build/types"
8+
"outDir": "build/types",
9+
"rootDir": "./src"
910
}
1011
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"rollup-plugin-license": "^3.7.1",
146146
"size-limit": "~12.1.0",
147147
"tsx": "^4.23.0",
148-
"typescript": "~5.8.0",
148+
"typescript": "~7.0.2",
149149
"vitest": "^3.2.6",
150150
"yalc": "^1.0.0-pre.53",
151151
"yarn-deduplicate": "6.0.2"

packages/astro/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"declaration": true,
66
"declarationMap": true,
77
"emitDeclarationOnly": true,
8-
"outDir": "build/types"
8+
"outDir": "build/types",
9+
"rootDir": "./src"
910
}
1011
}

packages/aws-serverless/src/lambda-extension/aws-lambda-extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class AwsLambdaExtension {
153153

154154
fetch(upstreamSentryUrl, {
155155
method: 'POST',
156-
body: envelopeBytes,
156+
body: envelopeBytes as BodyInit,
157157
}).catch(err => {
158158
DEBUG_BUILD && debug.error('Error sending envelope to Sentry', err);
159159
});

packages/aws-serverless/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"declaration": true,
1212
"declarationMap": true,
1313
"emitDeclarationOnly": true,
14-
"outDir": "build/npm/types"
14+
"outDir": "build/npm/types",
15+
"rootDir": "./src"
1516
}
1617
}

packages/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { observe } from '../observe';
1818

1919
declare global {
2020
interface Performance {
21-
interactionCount: number;
21+
readonly interactionCount: number;
2222
}
2323
}
2424

packages/browser-utils/src/metrics/web-vitals/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ declare global {
5858
// https://wicg.github.io/event-timing/#sec-performance-event-timing
5959
interface PerformanceEventTiming extends PerformanceEntry {
6060
duration: DOMHighResTimeStamp;
61-
interactionId: number;
61+
readonly interactionId: number;
6262
}
6363

6464
// https://wicg.github.io/layout-instability/#sec-layout-shift-attribution

0 commit comments

Comments
 (0)