diff --git a/package.json b/package.json index 7aab59d6ac..5943099188 100644 --- a/package.json +++ b/package.json @@ -66,16 +66,11 @@ "front-matter@npm:4.0.2/js-yaml": "^3.14.2", "js-yaml": "^4.1.1", "detox@npm:20.46.0/ajv": "^8.18.0", - "@eslint/eslintrc@npm:2.1.4/ajv": "^6.14.0", "@eslint/eslintrc@npm:3.3.3/ajv": "^6.14.0", "eslint@npm:9.39.4/ajv": "^6.14.0", - "express@npm:4.19.2/path-to-regexp": "0.1.12", "@eslint/config-array@npm:0.21.1/minimatch": "^3.1.3", - "@eslint/eslintrc@npm:2.1.4/minimatch": "^3.1.3", "@eslint/eslintrc@npm:3.3.3/minimatch": "^3.1.3", "@expo/fingerprint@npm:0.6.1/minimatch": "^3.1.3", - "@humanwhocodes/config-array@npm:0.11.14/minimatch": "^3.1.3", - "@humanwhocodes/config-array@npm:0.13.0/minimatch": "^3.1.3", "@lerna/create@npm:8.1.8/minimatch": "^3.1.3", "eslint-plugin-import@npm:2.31.0/minimatch": "^3.1.3", "eslint-plugin-import@npm:2.32.0/minimatch": "^3.1.3", @@ -109,7 +104,6 @@ "@typescript-eslint/typescript-estree@npm:8.56.1/minimatch": "^9.0.7", "@typescript-eslint/typescript-estree@npm:8.57.0/minimatch": "^9.0.7", "editorconfig@npm:1.0.4/minimatch": "^9.0.7", - "glob@npm:10.4.1/minimatch": "^9.0.7", "glob@npm:10.4.5/minimatch": "^9.0.7", "ignore-walk@npm:6.0.5/minimatch": "^9.0.7", "npm-run-all2@npm:6.2.2/minimatch": "^9.0.7", @@ -128,8 +122,7 @@ "on-headers": "^1.1.0", "diff": "^5.2.2", "tar": "^7.5.11", - "tmp": "^0.2.4", - "@appium/support@npm:6.1.1/yauzl": "^3.2.1" + "tmp": "^0.2.4" }, "version": "0.0.0", "name": "sentry-react-native", diff --git a/packages/core/package.json b/packages/core/package.json index 7971629be8..754a6fe2b1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -117,7 +117,7 @@ "react-test-renderer": "19.1.0", "rimraf": "^4.1.1", "ts-jest": "^29.3.1", - "typescript": "4.9.5", + "typescript": "~5.9.3", "uglify-js": "^3.17.4", "uuid": "^9.0.1", "xmlhttprequest": "^1.8.0" diff --git a/packages/core/src/js/integrations/nativelinkederrors.ts b/packages/core/src/js/integrations/nativelinkederrors.ts index bfaba41246..48db860ab0 100644 --- a/packages/core/src/js/integrations/nativelinkederrors.ts +++ b/packages/core/src/js/integrations/nativelinkederrors.ts @@ -101,6 +101,7 @@ function walkErrorTree( } else if (isInstanceOf(linkedError, Error)) { exception = exceptionFromError(parser, error[key]); } else if (isPlainObject(linkedError)) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion const plainError = linkedError as Record; exception = { type: typeof plainError.name === 'string' ? plainError.name : undefined, diff --git a/packages/core/src/js/touchevents.tsx b/packages/core/src/js/touchevents.tsx index 907790e262..f713c7e7fb 100644 --- a/packages/core/src/js/touchevents.tsx +++ b/packages/core/src/js/touchevents.tsx @@ -316,8 +316,10 @@ function getLabelValue(props: Record, labelKey: string | undefi ? props[SENTRY_LABEL_PROP_KEY] // For some reason type narrowing doesn't work as expected with indexing when checking it all in one go in // the "check-label" if sentence, so we have to assign it to a variable here first + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion : typeof labelKey === 'string' && typeof props[labelKey] == 'string' && (props[labelKey] as string).length > 0 - ? props[labelKey] as string + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + ? (props[labelKey] as string) : undefined; } diff --git a/packages/core/src/js/wrapper.ts b/packages/core/src/js/wrapper.ts index def9e48960..f47ddcabd4 100644 --- a/packages/core/src/js/wrapper.ts +++ b/packages/core/src/js/wrapper.ts @@ -38,7 +38,7 @@ import { base64StringFromByteArray } from './vendor'; */ export function getRNSentryModule(): Spec | undefined { return isTurboModuleEnabled() - ? ReactNativeLibraries.TurboModuleRegistry?.get('RNSentry') + ? ReactNativeLibraries.TurboModuleRegistry?.get('RNSentry') ?? undefined : NativeModules.RNSentry; } @@ -268,11 +268,10 @@ export const NATIVE: SentryNativeWrapper = { if (!this._isModuleLoaded(RNSentry)) { throw this._NativeClientError; } - const ignoreErrorsStr = options.ignoreErrors?.filter(item => typeof item === 'string') as string[] | undefined; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + const ignoreErrorsStr = options.ignoreErrors?.filter((item): item is string => typeof item === 'string'); const ignoreErrorsRegex = options.ignoreErrors - ?.filter(item => item instanceof RegExp) - .map(item => (item as RegExp).source) as string[] | undefined; + ?.filter((item): item is RegExp => item instanceof RegExp) + .map(item => item.source); if (ignoreErrorsStr && ignoreErrorsStr.length > 0) { options.ignoreErrorsStr = ignoreErrorsStr; diff --git a/yarn.lock b/yarn.lock index 1052eda5b4..06f122e6f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11096,7 +11096,7 @@ __metadata: react-test-renderer: 19.1.0 rimraf: ^4.1.1 ts-jest: ^29.3.1 - typescript: 4.9.5 + typescript: ~5.9.3 uglify-js: ^3.17.4 uuid: ^9.0.1 xmlhttprequest: ^1.8.0 @@ -33437,7 +33437,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.8.3, typescript@npm:~5.9.2": +"typescript@npm:^5.8.3, typescript@npm:~5.9.2, typescript@npm:~5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" bin: @@ -33487,7 +33487,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^5.8.3#~builtin, typescript@patch:typescript@~5.9.2#~builtin": +"typescript@patch:typescript@^5.8.3#~builtin, typescript@patch:typescript@~5.9.2#~builtin, typescript@patch:typescript@~5.9.3#~builtin": version: 5.9.3 resolution: "typescript@patch:typescript@npm%3A5.9.3#~builtin::version=5.9.3&hash=29ae49" bin: