Skip to content

Commit 5be2e18

Browse files
committed
Bump core to 0.80
1 parent 4167e15 commit 5be2e18

File tree

15 files changed

+265
-163
lines changed

15 files changed

+265
-163
lines changed

.github/workflows/e2e-v2.yml

Lines changed: 14 additions & 24 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
@@ -164,7 +163,7 @@ jobs:
164163
strategy:
165164
fail-fast: false # keeps matrix running if one fails
166165
matrix:
167-
rn-version: ['0.65.3', '0.81.0']
166+
rn-version: ['0.71.11', '0.81.0']
168167
rn-architecture: ['legacy', 'new']
169168
platform: ['android', 'ios']
170169
build-type: ['production']
@@ -176,7 +175,7 @@ jobs:
176175
xcode-version: '16.2'
177176
runs-on: macos-14
178177
- platform: ios
179-
rn-version: '0.65.3'
178+
rn-version: '0.71.11'
180179
xcode-version: '14.2'
181180
runs-on: macos-13
182181
- platform: android
@@ -185,14 +184,14 @@ jobs:
185184
# exclude JSC for new RN versions (keeping the matrix manageable)
186185
- rn-version: '0.81.0'
187186
engine: 'jsc'
188-
# exclude all rn versions lower than 0.70.0 for new architecture
189-
- rn-version: '0.65.3'
187+
# exclude all rn versions lower than 0.80.0 for new architecture
188+
- rn-version: '0.71.11'
190189
rn-architecture: 'new'
191190
# exlude old rn version for use frameworks builds (to minimalize the matrix)
192-
- rn-version: '0.65.3'
191+
- rn-version: '0.71.11'
193192
platform: 'ios'
194193
ios-use-frameworks: 'static'
195-
- rn-version: '0.65.3'
194+
- rn-version: '0.71.11'
196195
platform: 'ios'
197196
ios-use-frameworks: 'dynamic'
198197
# use frameworks is ios only feature
@@ -238,7 +237,7 @@ jobs:
238237

239238
- uses: actions/setup-java@v5
240239
with:
241-
java-version: ${{ matrix.rn-version == '0.65.3' && '11' || '17' }}
240+
java-version: '17'
242241
distribution: 'adopt'
243242

244243
- name: Gradle cache
@@ -258,15 +257,6 @@ jobs:
258257
- name: Setup Plain RN ${{ matrix.rn-version }} App
259258
run: ./dev-packages/e2e-tests/cli.mjs ${{ matrix.platform }} --create
260259

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-
270260
- uses: ruby/setup-ruby@v1
271261
if: ${{ matrix.platform == 'ios' }}
272262
with:
@@ -304,7 +294,7 @@ jobs:
304294
strategy:
305295
fail-fast: false # keeps matrix running if one fails
306296
matrix:
307-
rn-version: ['0.65.3', '0.81.0']
297+
rn-version: ['0.71.11', '0.81.0']
308298
rn-architecture: ['legacy', 'new']
309299
platform: ['android', 'ios']
310300
build-type: ['production']
@@ -315,16 +305,16 @@ jobs:
315305
rn-version: '0.81.0'
316306
runs-on: macos-14
317307
- platform: ios
318-
rn-version: '0.65.3'
308+
rn-version: '0.71.11'
319309
runs-on: macos-14
320310
- platform: android
321311
runs-on: ubuntu-latest
322312
exclude:
323-
# exclude all rn versions lower than 0.70.0 for new architecture
324-
- rn-version: '0.65.3'
313+
# exclude all rn versions lower than 0.80.0 for new architecture
314+
- rn-version: '0.71.11'
325315
rn-architecture: 'new'
326316
# e2e test only the default combinations
327-
- rn-version: '0.65.3'
317+
- rn-version: '0.71.11'
328318
engine: 'hermes'
329319
- rn-version: '0.81.0'
330320
engine: 'jsc'

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) {
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.21.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.21.0",
8484
"@sentry-internal/eslint-plugin-sdk": "10.21.0",
8585
"@sentry-internal/typescript": "10.21.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)