Skip to content

Commit 983ed41

Browse files
committed
build: Update to typescript 5.8.0
1 parent 9e24a70 commit 983ed41

File tree

17 files changed

+29
-26
lines changed

17 files changed

+29
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"size-limit": "~11.1.6",
137137
"sucrase": "^3.35.0",
138138
"ts-node": "10.9.1",
139-
"typescript": "~5.0.0",
139+
"typescript": "~5.8.0",
140140
"vitest": "^3.2.4",
141141
"yalc": "^1.0.0-pre.53",
142142
"yarn-deduplicate": "6.0.2"

packages/browser/src/profiling/utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,9 @@ export function addProfileToGlobalCache(profile_id: string, profile: JSSelfProfi
564564
PROFILE_MAP.set(profile_id, profile);
565565

566566
if (PROFILE_MAP.size > 30) {
567-
const last: string = PROFILE_MAP.keys().next().value;
568-
PROFILE_MAP.delete(last);
567+
const last = PROFILE_MAP.keys().next().value;
568+
if (last) {
569+
PROFILE_MAP.delete(last);
570+
}
569571
}
570572
}

packages/core/src/utils/lru.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ export class LRUMap<K, V> {
2727
public set(key: K, value: V): void {
2828
if (this._cache.size >= this._maxSize) {
2929
// keys() returns an iterator in insertion order so keys().next() gives us the oldest key
30-
this._cache.delete(this._cache.keys().next().value);
30+
const nextKey = this._cache.keys().next().value;
31+
if (nextKey) {
32+
this._cache.delete(nextKey);
33+
}
3134
}
3235
this._cache.set(key, value);
3336
}

packages/nextjs/tsconfig.test.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// require for top-level await
1111
"module": "Node16",
12+
"moduleResolution": "Node16",
1213
"target": "es2017",
1314

1415
// other package-specific, test-specific options

packages/node-core/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
"compilerOptions": {
77
"lib": ["es2018", "es2020.string"],
8-
"module": "Node16"
8+
"module": "Node16",
9+
"moduleResolution": "Node16"
910
}
1011
}

packages/node/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
"compilerOptions": {
77
"lib": ["es2018", "es2020.string"],
8-
"module": "Node16"
8+
"module": "Node16",
9+
"moduleResolution": "Node16"
910
}
1011
}

packages/nuxt/src/runtime/plugins/sentry-cloudflare.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { IncomingRequestCfProperties } from '@cloudflare/workers-types';
21
import type { CloudflareOptions } from '@sentry/cloudflare';
32
import { setAsyncLocalStorageAsyncContextStrategy, wrapRequestHandler } from '@sentry/cloudflare';
43
import { debug, getDefaultIsolationScope, getIsolationScope, getTraceData } from '@sentry/core';
@@ -64,8 +63,9 @@ export const sentryCloudflareNitroPlugin =
6463
const request = new Request(url, {
6564
method: event.method,
6665
headers: event.headers,
66+
// @ts-expect-error - 'cf' is a valid property in the RequestInit type for Cloudflare
6767
cf: getCfProperties(event),
68-
}) as Request<unknown, IncomingRequestCfProperties<unknown>>;
68+
});
6969

7070
const requestHandlerOptions = {
7171
options: cloudflareOptions,

packages/pino-transport/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
"compilerOptions": {
77
"lib": ["es2018", "es2020.string"],
8-
"module": "Node16"
8+
"module": "Node16",
9+
"moduleResolution": "Node16"
910
}
1011
}

packages/remix/src/vendor/instrumentation.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,7 @@ export class RemixInstrumentation extends InstrumentationBase {
310310
const { actionFormDataAttributes: actionFormAttributes } = plugin.getConfig();
311311

312312
formData.forEach((value: unknown, key: string) => {
313-
if (
314-
actionFormAttributes?.[key] &&
315-
actionFormAttributes[key] !== false &&
316-
typeof value === 'string'
317-
) {
313+
if (actionFormAttributes?.[key] && typeof value === 'string') {
318314
const keyName = actionFormAttributes[key] === true ? key : actionFormAttributes[key];
319315
span.setAttribute(`formData.${keyName}`, value.toString());
320316
}

packages/remix/test/integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/react": "^18",
2222
"@types/react-dom": "^18",
2323
"nock": "^13.5.5",
24-
"typescript": "~5.0.0"
24+
"typescript": "~5.8.0"
2525
},
2626
"resolutions": {
2727
"@sentry/browser": "file:../../../browser",

0 commit comments

Comments
 (0)