Skip to content

Commit 8610fc8

Browse files
authored
Bump core to RN 0.80.1 (#5181)
* Bump core to 0.80 * Updated performance-tests * Disabling JSC tests * Attempt to use ids instead * Unify happy & captureFlows * Updated lockfile * Fix * Fix * Update to running CI tests
1 parent 8e653ac commit 8610fc8

File tree

129 files changed

+1662
-4884
lines changed

Some content is hidden

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

129 files changed

+1662
-4884
lines changed

.github/workflows/e2e-v2.yml

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
auth_token_check:
2525
uses: ./.github/workflows/skip-ci-noauth.yml
2626
secrets: inherit
27-
2827
metrics:
2928
runs-on: ${{ matrix.runs-on }}
3029
needs: [diff_check, auth_token_check]
@@ -39,7 +38,7 @@ jobs:
3938
platform: ["ios", "android"]
4039
include:
4140
- platform: ios
42-
runs-on: macos-13
41+
runs-on: macos-14
4342
name: iOS
4443
appPlain: performance-tests/test-app-plain.ipa
4544
- platform: android
@@ -53,7 +52,7 @@ jobs:
5352
- uses: ./.github/actions/disk-cleanup
5453
if: ${{ matrix.platform == 'android' }}
5554

56-
- run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
55+
- run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
5756
if: ${{ matrix.platform == 'ios' }}
5857

5958
- run: npm i -g corepack
@@ -67,13 +66,17 @@ jobs:
6766
- uses: actions/setup-java@v5
6867
with:
6968
java-version: '17'
70-
distribution: "adopt"
69+
distribution: 'adopt'
70+
7171
- name: Gradle cache
7272
uses: gradle/gradle-build-action@v3
73+
7374
- name: Install Global Dependencies
7475
run: npm i -g react-native-cli @sentry/cli
76+
7577
- name: Install Dependencies
7678
run: yarn install
79+
7780
- name: Build SDK
7881
run: yarn build
7982

@@ -87,6 +90,7 @@ jobs:
8790
# we removed the lock file of the app due to monorepo changes, we use the package.json instead
8891
# to avoid frequent rebuilds of the app
8992
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{ hashFiles('performance-tests/TestAppSentry/package.json') }}
93+
9094
- name: Build app plain
9195
if: steps.app-plain-cache.outputs['cache-hit'] != 'true'
9296
working-directory: ./performance-tests/TestAppPlain
@@ -114,13 +118,15 @@ jobs:
114118
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
115119
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
116120
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
121+
117122
- name: Build app with Sentry
118123
working-directory: ./performance-tests/TestAppSentry
119124
run: |
120125
cd ${{ matrix.platform }}
121126
if [[ "${{ matrix.platform }}" == "android" ]]; then
122127
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
123128
perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties
129+
./gradlew generateCodegenArtifactsFromSchema
124130
fi
125131
./gradlew assembleRelease
126132
else
@@ -142,7 +148,7 @@ jobs:
142148
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
143149
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
144150
- name: Collect apps metrics
145-
uses: getsentry/action-app-sdk-overhead-metrics@c9eca50e02d180ee07a02952c062b2f3f545f735
151+
uses: getsentry/action-app-sdk-overhead-metrics@5f2d99b8e5a7b833386524924d24320501099a44
146152
with:
147153
name: ${{ matrix.name }} (${{ matrix.rn-architecture }})
148154
config: ./performance-tests/metrics-${{ matrix.platform }}.yml
@@ -164,7 +170,7 @@ jobs:
164170
strategy:
165171
fail-fast: false # keeps matrix running if one fails
166172
matrix:
167-
rn-version: ['0.65.3', '0.81.0']
173+
rn-version: ['0.71.11', '0.81.0']
168174
rn-architecture: ['legacy', 'new']
169175
platform: ['android', 'ios']
170176
build-type: ['production']
@@ -176,7 +182,7 @@ jobs:
176182
xcode-version: '16.2'
177183
runs-on: macos-14
178184
- platform: ios
179-
rn-version: '0.65.3'
185+
rn-version: '0.71.11'
180186
xcode-version: '14.2'
181187
runs-on: macos-13
182188
- platform: android
@@ -185,14 +191,14 @@ jobs:
185191
# exclude JSC for new RN versions (keeping the matrix manageable)
186192
- rn-version: '0.81.0'
187193
engine: 'jsc'
188-
# exclude all rn versions lower than 0.70.0 for new architecture
189-
- rn-version: '0.65.3'
194+
# exclude all rn versions lower than 0.80.0 for new architecture
195+
- rn-version: '0.71.11'
190196
rn-architecture: 'new'
191197
# exlude old rn version for use frameworks builds (to minimalize the matrix)
192-
- rn-version: '0.65.3'
198+
- rn-version: '0.71.11'
193199
platform: 'ios'
194200
ios-use-frameworks: 'static'
195-
- rn-version: '0.65.3'
201+
- rn-version: '0.71.11'
196202
platform: 'ios'
197203
ios-use-frameworks: 'dynamic'
198204
# use frameworks is ios only feature
@@ -238,7 +244,7 @@ jobs:
238244

239245
- uses: actions/setup-java@v5
240246
with:
241-
java-version: ${{ matrix.rn-version == '0.65.3' && '11' || '17' }}
247+
java-version: '17'
242248
distribution: 'adopt'
243249

244250
- name: Gradle cache
@@ -258,15 +264,6 @@ jobs:
258264
- name: Setup Plain RN ${{ matrix.rn-version }} App
259265
run: ./dev-packages/e2e-tests/cli.mjs ${{ matrix.platform }} --create
260266

261-
# The old node has to be enabled after creating the test app
262-
# to avoid issues with the old node version
263-
- run: corepack disable
264-
- uses: actions/setup-node@v6
265-
if: ${{ matrix.rn-version == '0.65.3' }}
266-
with:
267-
package-manager-cache: false
268-
node-version: 16
269-
270267
- uses: ruby/setup-ruby@v1
271268
if: ${{ matrix.platform == 'ios' }}
272269
with:
@@ -304,30 +301,18 @@ jobs:
304301
strategy:
305302
fail-fast: false # keeps matrix running if one fails
306303
matrix:
307-
rn-version: ['0.65.3', '0.81.0']
304+
rn-version: ['0.81.0']
308305
rn-architecture: ['legacy', 'new']
309306
platform: ['android', 'ios']
310307
build-type: ['production']
311-
ios-use-frameworks: ['no'] # test only no framworks
312-
engine: ['hermes', 'jsc']
308+
ios-use-frameworks: ['no'] # test only no frameworks
309+
engine: ['hermes']
313310
include:
314311
- platform: ios
315312
rn-version: '0.81.0'
316313
runs-on: macos-14
317-
- platform: ios
318-
rn-version: '0.65.3'
319-
runs-on: macos-14
320314
- platform: android
321315
runs-on: ubuntu-latest
322-
exclude:
323-
# exclude all rn versions lower than 0.70.0 for new architecture
324-
- rn-version: '0.65.3'
325-
rn-architecture: 'new'
326-
# e2e test only the default combinations
327-
- rn-version: '0.65.3'
328-
engine: 'hermes'
329-
- rn-version: '0.81.0'
330-
engine: 'jsc'
331316

332317
steps:
333318
- uses: actions/checkout@v5

dev-packages/e2e-tests/cli.mjs

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const appSourceRepo = 'https://github.com/react-native-community/rn-diff-purge.g
6363
const appRepoDir = `${e2eDir}/react-native-versions/${RNVersion}`;
6464
const appName = 'RnDiffApp';
6565
const appDir = `${appRepoDir}/${appName}`;
66-
const testAppName = `${appName}.${platform == 'ios' ? 'app' : 'apk'}`;
66+
const testAppName = `${appName}.${platform === 'ios' ? 'app' : 'apk'}`;
6767
const testApp = `${e2eDir}/${testAppName}`;
6868
const appId = platform === 'ios' ? 'org.reactjs.native.example.RnDiffApp' : 'com.rndiffapp';
6969
const sentryAuthToken = env.SENTRY_AUTH_TOKEN;
@@ -84,9 +84,26 @@ function runCodegenIfNeeded(rnVersion, platform, appDir) {
8484
} catch (error) {
8585
console.error('Codegen failed:', error.message);
8686
}
87+
} else {
88+
console.log(`Skipping codegen for React Native ${rnVersion}`);
8789
}
8890
}
8991

92+
function patchBoostIfNeeded(rnVersion, patchScriptsDir) {
93+
const versionNumber = parseFloat(rnVersion.replace(/[^\d.]/g, ''));
94+
const shouldPatchBoost = platform === 'ios' && versionNumber <= 0.80;
95+
96+
if (!shouldPatchBoost) {
97+
console.log(`Skipping boost patch for React Native ${rnVersion}`);
98+
return;
99+
}
100+
execSync(`${patchScriptsDir}/rn.patch.boost.js --podspec node_modules/react-native/third-party-podspecs/boost.podspec`, {
101+
stdio: 'inherit',
102+
cwd: appDir,
103+
env: env,
104+
});
105+
}
106+
90107
// Build and publish the SDK - we only need to do this once in CI.
91108
// Locally, we may want to get updates from the latest build so do it on every app build.
92109
if (actions.includes('create') || (env.CI === undefined && actions.includes('build'))) {
@@ -152,8 +169,11 @@ if (actions.includes('create')) {
152169
env: env,
153170
});
154171

172+
// Patch boost
173+
patchBoostIfNeeded(RNVersion, patchScriptsDir);
174+
155175
// Set up platform-specific app configuration
156-
if (platform == 'ios') {
176+
if (platform === 'ios') {
157177
execSync('ruby --version', { stdio: 'inherit', cwd: `${appDir}`, env: env });
158178

159179
execSync(`${patchScriptsDir}/rn.patch.podfile.js --pod-file Podfile --engine ${RNEngine}`, {
@@ -174,7 +194,7 @@ if (actions.includes('create')) {
174194
`${patchScriptsDir}/rn.patch.xcode.js --project ios/${appName}.xcodeproj/project.pbxproj --rn-version ${RNVersion}`,
175195
{ stdio: 'inherit', cwd: appDir, env: env },
176196
);
177-
} else if (platform == 'android') {
197+
} else if (platform === 'android') {
178198
execSync(
179199
`${patchScriptsDir}//rn.patch.gradle.properties.js --gradle-properties android/gradle.properties --engine ${RNEngine}`,
180200
{ stdio: 'inherit', cwd: appDir, env: env },
@@ -200,7 +220,7 @@ if (actions.includes('build')) {
200220
console.log(`Building ${platform}: ${buildType}`);
201221
var appProduct;
202222

203-
if (platform == 'ios') {
223+
if (platform === 'ios') {
204224
// Build iOS test app
205225
execSync(
206226
`set -o pipefail && xcodebuild \
@@ -216,7 +236,7 @@ if (actions.includes('build')) {
216236
);
217237

218238
appProduct = `${appDir}/ios/DerivedData/Build/Products/${buildType}-iphonesimulator/${appName}.app`;
219-
} else if (platform == 'android') {
239+
} else if (platform === 'android') {
220240
runCodegenIfNeeded(RNVersion, platform, appDir);
221241

222242
execSync(`./gradlew assemble${buildType} -PreactNativeArchitectures=x86 --no-daemon`, {
@@ -234,15 +254,15 @@ if (actions.includes('build')) {
234254

235255
if (actions.includes('test')) {
236256
// Run e2e tests
237-
if (platform == 'ios') {
257+
if (platform === 'ios') {
238258
try {
239259
execSync('xcrun simctl list devices | grep -q "(Booted)"');
240260
} catch (error) {
241261
throw new Error('No simulator is currently booted. Please boot a simulator before running this script.');
242262
}
243263

244264
execFileSync('xcrun', ['simctl', 'install', 'booted', testApp]);
245-
} else if (platform == 'android') {
265+
} else if (platform === 'android') {
246266
try {
247267
execSync('adb devices | grep -q "emulator"');
248268
} catch (error) {

dev-packages/e2e-tests/maestro/feedback.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jsEngine: graaljs
1414
platform: iOS
1515

1616
- runFlow:
17-
file: feedback/happyFlow-android.yml
17+
file: feedback/happyFlow-ios.yml
1818
when:
1919
platform: Android
2020

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env node
2+
3+
const fs = require('fs');
4+
const { argv } = require('process');
5+
6+
const parseArgs = require('minimist');
7+
const { debug } = require('@sentry/core');
8+
debug.enable();
9+
10+
const args = parseArgs(argv.slice(2));
11+
if (!args.podspec) {
12+
throw new Error('Missing --podspec');
13+
}
14+
15+
// The reason behind this patch is that the boost podspec is pointing to an archive with the wrong hashsum.
16+
// The official workaround is to patch the URL as described here:
17+
// https://github.com/facebook/react-native/issues/42180
18+
19+
debug.log('Patching Boost podspec: ', args.podspec);
20+
21+
let content = fs.readFileSync(args.podspec, 'utf8');
22+
content = content.replace(
23+
"https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2",
24+
"https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2"
25+
);
26+
fs.writeFileSync(args.podspec, content);
27+
28+
debug.log('Patched Boost podspec successfully!');

packages/core/RNSentry.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
3434
s.homepage = "https://github.com/getsentry/sentry-react-native"
3535
s.source = { :git => 'https://github.com/getsentry/sentry-react-native.git', :tag => "#{s.version}"}
3636

37-
s.ios.deployment_target = "11.0"
37+
s.ios.deployment_target = "12.0"
3838
s.osx.deployment_target = "10.13"
3939
s.tvos.deployment_target = "11.0"
4040
s.visionos.deployment_target = "1.0" if s.respond_to?(:visionos)

packages/core/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,19 @@
7676
"@sentry/types": "10.22.0"
7777
},
7878
"devDependencies": {
79-
"@babel/core": "^7.25.2",
79+
"@babel/core": "^7.26.7",
8080
"@expo/metro-config": "~0.20.0",
8181
"@mswjs/interceptors": "^0.25.15",
82-
"@react-native/babel-preset": "0.77.1",
82+
"@react-native/babel-preset": "0.80.0",
8383
"@sentry-internal/eslint-config-sdk": "10.22.0",
8484
"@sentry-internal/eslint-plugin-sdk": "10.22.0",
8585
"@sentry-internal/typescript": "10.22.0",
8686
"@sentry/wizard": "6.6.0",
87-
"@testing-library/react-native": "^12.7.2",
87+
"@testing-library/react-native": "^13.2.2",
8888
"@types/jest": "^29.5.13",
8989
"@types/node": "^20.9.3",
90-
"@types/react": "^18.2.64",
90+
"@types/react": "^19.1.0",
91+
"@types/react-test-renderer": "^19.1.0",
9192
"@types/uglify-js": "^3.17.2",
9293
"@types/uuid": "^9.0.4",
9394
"@types/xmlhttprequest": "^1.8.2",
@@ -102,14 +103,15 @@
102103
"eslint-plugin-react-native": "^3.8.1",
103104
"expo": "^53.0.0",
104105
"expo-module-scripts": "3.1.0",
105-
"jest": "^29.6.2",
106+
"jest": "^29.6.3",
106107
"jest-environment-jsdom": "^29.6.2",
107108
"jest-extended": "^4.0.2",
108109
"madge": "^6.1.0",
109110
"metro": "0.83.1",
110111
"prettier": "^2.0.5",
111-
"react": "18.3.1",
112-
"react-native": "0.77.1",
112+
"react": "19.1.0",
113+
"react-native": "0.80.1",
114+
"react-test-renderer": "19.1.0",
113115
"rimraf": "^4.1.1",
114116
"ts-jest": "^29.3.1",
115117
"typescript": "4.9.5",

packages/core/src/js/RNSentryReplayMaskNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HostComponent, ViewProps } from 'react-native';
22
// The default export exists in the file but eslint doesn't see it
33
// eslint-disable-next-line import/default
4-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4+
import { codegenNativeComponent } from 'react-native';
55

66
// If changed to type NativeProps = ViewProps, react native codegen will fail finding the NativeProps type
77
// eslint-disable-next-line @typescript-eslint/no-empty-interface

packages/core/src/js/RNSentryReplayUnmaskNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HostComponent, ViewProps } from 'react-native';
22
// The default export exists in the file but eslint doesn't see it
33
// eslint-disable-next-line import/default
4-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4+
import { codegenNativeComponent } from 'react-native';
55

66
// If changed to type NativeProps = ViewProps, react native codegen will fail finding the NativeProps type
77
// eslint-disable-next-line @typescript-eslint/no-empty-interface

0 commit comments

Comments
 (0)