Skip to content

Commit 99d85ec

Browse files
antonisclaude
andauthored
chore(core): Upgrade TypeScript from 4.9.5 to 5.9.3 (#5886)
* chore(core): Upgrade TypeScript from 4.9.5 to 5.9.3 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9bc38ae commit 99d85ec

File tree

6 files changed

+13
-18
lines changed

6 files changed

+13
-18
lines changed

package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@
6666
"front-matter@npm:4.0.2/js-yaml": "^3.14.2",
6767
"js-yaml": "^4.1.1",
6868
"detox@npm:20.46.0/ajv": "^8.18.0",
69-
"@eslint/eslintrc@npm:2.1.4/ajv": "^6.14.0",
7069
"@eslint/eslintrc@npm:3.3.3/ajv": "^6.14.0",
7170
"eslint@npm:9.39.4/ajv": "^6.14.0",
72-
"express@npm:4.19.2/path-to-regexp": "0.1.12",
7371
"@eslint/config-array@npm:0.21.1/minimatch": "^3.1.3",
74-
"@eslint/eslintrc@npm:2.1.4/minimatch": "^3.1.3",
7572
"@eslint/eslintrc@npm:3.3.3/minimatch": "^3.1.3",
7673
"@expo/fingerprint@npm:0.6.1/minimatch": "^3.1.3",
77-
"@humanwhocodes/config-array@npm:0.11.14/minimatch": "^3.1.3",
78-
"@humanwhocodes/config-array@npm:0.13.0/minimatch": "^3.1.3",
7974
"@lerna/create@npm:8.1.8/minimatch": "^3.1.3",
8075
"eslint-plugin-import@npm:2.31.0/minimatch": "^3.1.3",
8176
"eslint-plugin-import@npm:2.32.0/minimatch": "^3.1.3",
@@ -109,7 +104,6 @@
109104
"@typescript-eslint/typescript-estree@npm:8.56.1/minimatch": "^9.0.7",
110105
"@typescript-eslint/typescript-estree@npm:8.57.0/minimatch": "^9.0.7",
111106
"editorconfig@npm:1.0.4/minimatch": "^9.0.7",
112-
"glob@npm:10.4.1/minimatch": "^9.0.7",
113107
"glob@npm:10.4.5/minimatch": "^9.0.7",
114108
"ignore-walk@npm:6.0.5/minimatch": "^9.0.7",
115109
"npm-run-all2@npm:6.2.2/minimatch": "^9.0.7",
@@ -128,8 +122,7 @@
128122
"on-headers": "^1.1.0",
129123
"diff": "^5.2.2",
130124
"tar": "^7.5.11",
131-
"tmp": "^0.2.4",
132-
"@appium/support@npm:6.1.1/yauzl": "^3.2.1"
125+
"tmp": "^0.2.4"
133126
},
134127
"version": "0.0.0",
135128
"name": "sentry-react-native",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"react-test-renderer": "19.1.0",
118118
"rimraf": "^4.1.1",
119119
"ts-jest": "^29.3.1",
120-
"typescript": "4.9.5",
120+
"typescript": "~5.9.3",
121121
"uglify-js": "^3.17.4",
122122
"uuid": "^9.0.1",
123123
"xmlhttprequest": "^1.8.0"

packages/core/src/js/integrations/nativelinkederrors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function walkErrorTree(
101101
} else if (isInstanceOf(linkedError, Error)) {
102102
exception = exceptionFromError(parser, error[key]);
103103
} else if (isPlainObject(linkedError)) {
104+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
104105
const plainError = linkedError as Record<string, unknown>;
105106
exception = {
106107
type: typeof plainError.name === 'string' ? plainError.name : undefined,

packages/core/src/js/touchevents.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ function getLabelValue(props: Record<string, unknown>, labelKey: string | undefi
316316
? props[SENTRY_LABEL_PROP_KEY]
317317
// For some reason type narrowing doesn't work as expected with indexing when checking it all in one go in
318318
// the "check-label" if sentence, so we have to assign it to a variable here first
319+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
319320
: typeof labelKey === 'string' && typeof props[labelKey] == 'string' && (props[labelKey] as string).length > 0
320-
? props[labelKey] as string
321+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
322+
? (props[labelKey] as string)
321323
: undefined;
322324
}
323325

packages/core/src/js/wrapper.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { base64StringFromByteArray } from './vendor';
3838
*/
3939
export function getRNSentryModule(): Spec | undefined {
4040
return isTurboModuleEnabled()
41-
? ReactNativeLibraries.TurboModuleRegistry?.get<Spec>('RNSentry')
41+
? ReactNativeLibraries.TurboModuleRegistry?.get<Spec>('RNSentry') ?? undefined
4242
: NativeModules.RNSentry;
4343
}
4444

@@ -268,11 +268,10 @@ export const NATIVE: SentryNativeWrapper = {
268268
if (!this._isModuleLoaded(RNSentry)) {
269269
throw this._NativeClientError;
270270
}
271-
const ignoreErrorsStr = options.ignoreErrors?.filter(item => typeof item === 'string') as string[] | undefined;
272-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
271+
const ignoreErrorsStr = options.ignoreErrors?.filter((item): item is string => typeof item === 'string');
273272
const ignoreErrorsRegex = options.ignoreErrors
274-
?.filter(item => item instanceof RegExp)
275-
.map(item => (item as RegExp).source) as string[] | undefined;
273+
?.filter((item): item is RegExp => item instanceof RegExp)
274+
.map(item => item.source);
276275

277276
if (ignoreErrorsStr && ignoreErrorsStr.length > 0) {
278277
options.ignoreErrorsStr = ignoreErrorsStr;

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11096,7 +11096,7 @@ __metadata:
1109611096
react-test-renderer: 19.1.0
1109711097
rimraf: ^4.1.1
1109811098
ts-jest: ^29.3.1
11099-
typescript: 4.9.5
11099+
typescript: ~5.9.3
1110011100
uglify-js: ^3.17.4
1110111101
uuid: ^9.0.1
1110211102
xmlhttprequest: ^1.8.0
@@ -33437,7 +33437,7 @@ __metadata:
3343733437
languageName: node
3343833438
linkType: hard
3343933439

33440-
"typescript@npm:^5.8.3, typescript@npm:~5.9.2":
33440+
"typescript@npm:^5.8.3, typescript@npm:~5.9.2, typescript@npm:~5.9.3":
3344133441
version: 5.9.3
3344233442
resolution: "typescript@npm:5.9.3"
3344333443
bin:
@@ -33487,7 +33487,7 @@ __metadata:
3348733487
languageName: node
3348833488
linkType: hard
3348933489

33490-
"typescript@patch:typescript@^5.8.3#~builtin<compat/typescript>, typescript@patch:typescript@~5.9.2#~builtin<compat/typescript>":
33490+
"typescript@patch:typescript@^5.8.3#~builtin<compat/typescript>, typescript@patch:typescript@~5.9.2#~builtin<compat/typescript>, typescript@patch:typescript@~5.9.3#~builtin<compat/typescript>":
3349133491
version: 5.9.3
3349233492
resolution: "typescript@patch:typescript@npm%3A5.9.3#~builtin<compat/typescript>::version=5.9.3&hash=29ae49"
3349333493
bin:

0 commit comments

Comments
 (0)