Skip to content

Commit 64f0b09

Browse files
antonisclaude
andcommitted
refactor(core): Remove yarn patches in favor of version bumps and dep removal
- Remove react-native-build-config dependency entirely. It was unmaintained (uses jcenter, Gradle 1.3) and only used to read one Android BuildConfig field. Use react-native-launch-arguments for both platforms instead. - Bump react-native-launch-arguments to 4.1.1 which has the Gradle 9 fix (destinationDirectory) built-in. - Remove both yarn patch files and resolutions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4280fa9 commit 64f0b09

File tree

6 files changed

+11
-92
lines changed

6 files changed

+11
-92
lines changed

.yarn/patches/react-native-build-config-npm-0.3.2-0e671629bd.patch

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

.yarn/patches/react-native-launch-arguments-npm-4.1.0-b58782de29.patch

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

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@
115115
"minimatch@npm:10.2.4/brace-expansion": "^5.0.5",
116116
"@appium/base-driver@npm:10.2.2/path-to-regexp": "^8.4.0",
117117
"router@npm:2.2.0/path-to-regexp": "^8.4.0",
118-
"yaml": "^2.8.3",
119-
"react-native-build-config@^0.3.2": "patch:react-native-build-config@npm%3A0.3.2#./.yarn/patches/react-native-build-config-npm-0.3.2-0e671629bd.patch",
120-
"react-native-launch-arguments@^4.0.2": "patch:react-native-launch-arguments@npm%3A4.1.0#./.yarn/patches/react-native-launch-arguments-npm-4.1.0-b58782de29.patch",
121-
"react-native-launch-arguments@^4.1.0": "patch:react-native-launch-arguments@npm%3A4.1.0#./.yarn/patches/react-native-launch-arguments-npm-4.1.0-b58782de29.patch"
118+
"yaml": "^2.8.3"
122119
},
123120
"version": "0.0.0",
124121
"name": "sentry-react-native",

samples/react-native/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@
5454
"delay": "^6.0.0",
5555
"react": "19.2.3",
5656
"react-native": "0.84.1",
57-
"react-native-build-config": "^0.3.2",
5857
"react-native-gesture-handler": "^2.28.0",
5958
"react-native-image-picker": "^8.2.1",
60-
"react-native-launch-arguments": "^4.1.0",
59+
"react-native-launch-arguments": "^4.1.1",
6160
"react-native-reanimated": "4.3.0",
6261
"react-native-safe-area-context": "^5.5.2",
6362
"react-native-screens": "^4.13.1",

samples/react-native/src/utils.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { Platform } from 'react-native';
21
import { LaunchArguments } from 'react-native-launch-arguments';
3-
import BuildConfig from 'react-native-build-config';
42
import * as Sentry from '@sentry/react-native';
53
import { useFocusEffect } from '@react-navigation/native';
64

@@ -13,20 +11,10 @@ export function logWithoutTracing(...args: unknown[]) {
1311
}
1412

1513
export function shouldUseAutoStart(): boolean {
16-
if (Platform.OS === 'android') {
17-
return !!(
18-
BuildConfig as {
19-
SENTRY_DISABLE_NATIVE_START?: boolean;
20-
}
21-
).SENTRY_DISABLE_NATIVE_START;
22-
} else if (Platform.OS === 'ios') {
23-
const args = LaunchArguments.value<{
24-
sentryDisableNativeStart?: boolean;
25-
}>();
26-
return !!args.sentryDisableNativeStart;
27-
} else {
28-
return false;
29-
}
14+
const args = LaunchArguments.value<{
15+
sentryDisableNativeStart?: boolean;
16+
}>();
17+
return !!args.sentryDisableNativeStart;
3018
}
3119

3220
export const TimeToFullDisplay = Sentry.createTimeToFullDisplay({

yarn.lock

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27759,20 +27759,6 @@ __metadata:
2775927759
languageName: node
2776027760
linkType: hard
2776127761

27762-
"react-native-build-config@npm:0.3.2":
27763-
version: 0.3.2
27764-
resolution: "react-native-build-config@npm:0.3.2"
27765-
checksum: d2095580be7e6662c968bce5d64cc6524b7f34380999756fb9d4ad24a34e3566b203f93e9bc63bd1e0213d28e1e76dae0c0f39b0b65c55528a876e96dd6c5810
27766-
languageName: node
27767-
linkType: hard
27768-
27769-
"react-native-build-config@patch:react-native-build-config@npm%3A0.3.2#./.yarn/patches/react-native-build-config-npm-0.3.2-0e671629bd.patch::locator=sentry-react-native%40workspace%3A.":
27770-
version: 0.3.2
27771-
resolution: "react-native-build-config@patch:react-native-build-config@npm%3A0.3.2#./.yarn/patches/react-native-build-config-npm-0.3.2-0e671629bd.patch::version=0.3.2&hash=919c89&locator=sentry-react-native%40workspace%3A."
27772-
checksum: 4a486a9d2088a90e079529305abd118b13b9b53e6b782af4a917aa6ebf6413fd2b211bb7d809e50e5b5f5c5d671a78fb5b9c14b54ec07cc8548f6538afeb278f
27773-
languageName: node
27774-
linkType: hard
27775-
2777627762
"react-native-edge-to-edge@npm:1.6.0":
2777727763
version: 1.6.0
2777827764
resolution: "react-native-edge-to-edge@npm:1.6.0"
@@ -27857,23 +27843,13 @@ __metadata:
2785727843
languageName: node
2785827844
linkType: hard
2785927845

27860-
"react-native-launch-arguments@npm:4.1.0":
27861-
version: 4.1.0
27862-
resolution: "react-native-launch-arguments@npm:4.1.0"
27863-
peerDependencies:
27864-
react: ">=16.8.1"
27865-
react-native: ">=0.60.0-rc.0 <1.0.x"
27866-
checksum: 719b6cbfb0bb77152b94f0f96c30a90847b9ade4908936435d2c2024e81d2538968a9225457d443f84513e72487565c7b31472307db37292640ffb2a77315e3e
27867-
languageName: node
27868-
linkType: hard
27869-
27870-
"react-native-launch-arguments@patch:react-native-launch-arguments@npm%3A4.1.0#./.yarn/patches/react-native-launch-arguments-npm-4.1.0-b58782de29.patch::locator=sentry-react-native%40workspace%3A.":
27871-
version: 4.1.0
27872-
resolution: "react-native-launch-arguments@patch:react-native-launch-arguments@npm%3A4.1.0#./.yarn/patches/react-native-launch-arguments-npm-4.1.0-b58782de29.patch::version=4.1.0&hash=6171f1&locator=sentry-react-native%40workspace%3A."
27846+
"react-native-launch-arguments@npm:^4.0.2, react-native-launch-arguments@npm:^4.1.1":
27847+
version: 4.1.1
27848+
resolution: "react-native-launch-arguments@npm:4.1.1"
2787327849
peerDependencies:
2787427850
react: ">=16.8.1"
2787527851
react-native: ">=0.60.0-rc.0 <1.0.x"
27876-
checksum: 3338bc9ad014a59759a69d4cd29aedccda701c54952bb487ab9468947ab7e615c205698e425a068635e0abcd8e5fce04b90aade7bb3e4030571267cadb6f14f5
27852+
checksum: 24dd1a283a11cac415efc4b55220bfd11dc3e487d272d12e6dad54a76eec75ab6716874383034ee1267b6a956fae7865c9d602550a1a5a063c61ed037c7ef518
2787727853
languageName: node
2787827854
linkType: hard
2787927855

@@ -29994,10 +29970,9 @@ __metadata:
2999429970
patch-package: ^8.0.0
2999529971
react: 19.2.3
2999629972
react-native: 0.84.1
29997-
react-native-build-config: ^0.3.2
2999829973
react-native-gesture-handler: ^2.28.0
2999929974
react-native-image-picker: ^8.2.1
30000-
react-native-launch-arguments: ^4.1.0
29975+
react-native-launch-arguments: ^4.1.1
3000129976
react-native-reanimated: 4.3.0
3000229977
react-native-safe-area-context: ^5.5.2
3000329978
react-native-screens: ^4.13.1

0 commit comments

Comments
 (0)