Skip to content

Commit 30307a0

Browse files
Merge branch 'main' into 5.0.0
2 parents cd7054e + c35c86b commit 30307a0

21 files changed

+565
-134
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ module.exports = {
1212
settings: {
1313
version: 'detect', // React version. "detect" automatically picks the version you have installed.
1414
},
15+
ignorePatterns: [
16+
'test/react-native/versions/*',
17+
],
1518
overrides: [
1619
{
1720
// Typescript Files
@@ -44,6 +47,13 @@ module.exports = {
4447
'no-console': 'off',
4548
},
4649
},
50+
{
51+
// RN Versions Test Tools
52+
files: ['test/react-native/*'],
53+
parserOptions: {
54+
ecmaVersion: 2017,
55+
},
56+
}
4757
],
4858
rules: {
4959
// Bundle size isn't too much of an issue for React Native.

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # pin@v2
42+
uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # pin@v2
4343
with:
4444
languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -50,7 +50,7 @@ jobs:
5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # pin@v2
53+
uses: github/codeql-action/autobuild@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # pin@v2
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -61,4 +61,4 @@ jobs:
6161
# make bootstrap
6262
# make release
6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # pin@v2
64+
uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # pin@v2

.github/workflows/e2e.yml

Lines changed: 140 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ env:
1313
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1414

1515
jobs:
16+
cancel-previous-workflow:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Cancel Previous Runs
20+
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0
21+
with:
22+
access_token: ${{ github.token }}
23+
1624
device-test:
1725
# Android emulator said to perform best with macos HAXM
1826
runs-on: macos-latest
@@ -99,10 +107,26 @@ jobs:
99107
else
100108
mkdir -p DerivedData
101109
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
102-
buildArgs=('-destination' 'platform=iOS Simulator,name=${{ matrix.device }}' 'ONLY_ACTIVE_ARCH=yes' '-sdk' 'iphonesimulator${{ matrix.runtime }}' '-derivedDataPath' $(cd "DerivedData" ; pwd -P))
110+
buildArgs=(
111+
'-destination' 'platform=iOS Simulator,name=${{ matrix.device }}'
112+
'ONLY_ACTIVE_ARCH=yes'
113+
'-sdk' 'iphonesimulator${{ matrix.runtime }}'
114+
'-derivedDataPath' $(cd "DerivedData" ; pwd -P)
115+
)
103116
echo "buildArgs = ${buildArgs[@]}"
104-
xcodebuild -workspace sample.xcworkspace -configuration Release -scheme sample "${buildArgs[@]}" build
105-
xcodebuild -project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO "${buildArgs[@]}" build
117+
xcodebuild \
118+
-workspace sample.xcworkspace \
119+
-configuration Release \
120+
-scheme sample \
121+
"${buildArgs[@]}" \
122+
build
123+
xcodebuild \
124+
-project ../node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj \
125+
-scheme WebDriverAgentRunner \
126+
GCC_TREAT_WARNINGS_AS_ERRORS=0 \
127+
COMPILER_INDEX_STORE_ENABLE=NO \
128+
"${buildArgs[@]}" \
129+
build
106130
fi
107131
108132
- name: Start Appium Server
@@ -111,7 +135,7 @@ jobs:
111135

112136
# Wait until the Appium server starts.
113137
- name: Check Appium Server
114-
uses: nick-fields/retry@3e91a01664abd3c5cd539100d10d33b9c5b68482 # pin@v2
138+
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # pin@v2
115139
with:
116140
timeout_seconds: 60
117141
max_attempts: 10
@@ -262,3 +286,115 @@ jobs:
262286
config: ./test/perf/metrics-${{ matrix.platform }}.yml
263287
sauce-user: ${{ secrets.SAUCE_USERNAME }}
264288
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}
289+
290+
react-native-build:
291+
name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }}
292+
runs-on: macos-latest
293+
env:
294+
RN_DIFF_REPOSITORY: https://github.com/react-native-community/rn-diff-purge.git
295+
strategy:
296+
fail-fast: false # keeps matrix running if one fails
297+
matrix:
298+
rn-version: ['0.64.4', '0.70.6']
299+
rn-architecture: ['legacy']
300+
platform: ['android', 'ios']
301+
build-type: ['dev', 'production']
302+
include:
303+
- platform: ios
304+
runtime: '16.0'
305+
device: 'iPhone 14'
306+
# exclude all rn versions lower than 0.70.0 for new architecture
307+
exclude:
308+
- rn-version: '0.64.4'
309+
rn-architecture: 'new'
310+
steps:
311+
- uses: actions/checkout@v3
312+
313+
- uses: actions/setup-java@v3
314+
with:
315+
java-version: '11'
316+
distribution: 'adopt'
317+
318+
- name: Setup JS Tools
319+
run: yarn global add yalc semver
320+
321+
- name: NPM cache SDK
322+
uses: actions/cache@v3
323+
id: deps-cache
324+
with:
325+
path: node_modules
326+
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock') }}
327+
328+
- name: Install SDK JS Dependencies
329+
if: steps.deps-cache.outputs['cache-hit'] != 'true'
330+
run: yarn install
331+
332+
- name: Build SDK
333+
run: yarn build
334+
335+
- name: Package SDK
336+
run: yalc publish
337+
338+
- name: Download Plain RN ${{ matrix.rn-version }} App
339+
working-directory: test/react-native/versions
340+
run: git clone $RN_DIFF_REPOSITORY --branch release/${{ matrix.rn-version }} --single-branch ${{ matrix.rn-version }}
341+
342+
- name: Add SDK to App
343+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
344+
run: yalc add @sentry/react-native
345+
346+
- name: Install App JS Dependencies
347+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
348+
run: yarn install
349+
350+
- name: Install App Pods
351+
if: matrix.platform == 'ios'
352+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios
353+
run: |
354+
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
355+
[[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
356+
echo "ENABLE_PROD=$ENABLE_PROD"
357+
echo "ENABLE_NEW_ARCH=$ENABLE_NEW_ARCH"
358+
PRODUCTION=$ENABLE_PROD RCT_NEW_ARCH_ENABLED=$ENABLE_NEW_ARCH pod install
359+
360+
- name: Patch App RN
361+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp
362+
run: patch --verbose --strip=0 --force --ignore-whitespace --fuzz 4 < ../../../rn.patch
363+
364+
- name: Patch iOS App RN
365+
if: matrix.platform == 'ios'
366+
working-directory: test/react-native
367+
run: |
368+
./rn.patch.xcode.js \
369+
--project 'versions/${{ matrix.rn-version }}/RnDiffApp/ios/RnDiffApp.xcodeproj/project.pbxproj' \
370+
--rn-version '${{ matrix.rn-version }}'
371+
372+
- name: Build Android App
373+
if: matrix.platform == 'android'
374+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/android
375+
run: |
376+
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
377+
perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties
378+
echo 'New Architecture enabled'
379+
fi
380+
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
381+
echo "Building $CONFIG"
382+
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
383+
384+
- name: Build iOS App
385+
if: matrix.platform == 'ios'
386+
working-directory: test/react-native/versions/${{ matrix.rn-version }}/RnDiffApp/ios
387+
run: |
388+
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
389+
echo "Building $CONFIG"
390+
derivedData="$(cd "DerivedData" ; pwd -P)"
391+
mkdir -p "$derivedData"
392+
xcodebuild \
393+
-workspace RnDiffApp.xcworkspace \
394+
-configuration "$CONFIG" \
395+
-scheme RnDiffApp \
396+
-destination 'platform=iOS Simulator,name=${{ matrix.device }}' \
397+
ONLY_ACTIVE_ARCH=yes \
398+
-sdk 'iphonesimulator${{ matrix.runtime }}' \
399+
-derivedDataPath "$derivedData" \
400+
build

.github/workflows/stale.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8
10+
- uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b
1111
with:
1212
repo-token: ${{ github.token }}
1313
days-before-stale: 21
@@ -28,7 +28,6 @@ jobs:
2828
----
2929
3030
"A weed is but an unloved flower." ― _Ella Wheeler Wilcox_ 🥀
31-
skip-stale-issue-message: false
3231
close-issue-label: ""
3332
close-issue-message: ""
3433

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ sample/.vscode/.react/debuggerWorker.js
7878

7979
# E2E tests
8080
sample/*.png
81+
test/react-native/versions

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
### Fixes
1212

1313
- Unreachable fallback to fetch transport if native is not available ([#2695](https://github.com/getsentry/sentry-react-native/pull/2695))
14+
- Missing `originalException` in `beforeSend` for events from react native error handler ([#2706](https://github.com/getsentry/sentry-react-native/pull/2706))
15+
- ModulesLoader integration returns original event if native is not available and event modules overwrite native modules ([#2730](https://github.com/getsentry/sentry-react-native/pull/2730))
16+
17+
### Dependencies
18+
19+
- Bump Cocoa SDK from v7.31.3 to v7.31.5 ([#2699](https://github.com/getsentry/sentry-react-native/pull/2699), [#2714](https://github.com/getsentry/sentry-react-native/pull/2714))
20+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/8.0.0/CHANGELOG.md#7315)
21+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.31.3...7.31.5)
22+
- Bump JavaScript SDK from v7.26.0 to v7.28.1 ([#2705](https://github.com/getsentry/sentry-react-native/pull/2705), [#2709](https://github.com/getsentry/sentry-react-native/pull/2709), [#2715](https://github.com/getsentry/sentry-react-native/pull/2715))
23+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7281)
24+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.26.0...7.28.1)
25+
- Bump Android SDK from v6.9.2 to v6.11.0 ([#2704](https://github.com/getsentry/sentry-react-native/pull/2704), [#2724](https://github.com/getsentry/sentry-react-native/pull/2724))
26+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6110)
27+
- [diff](https://github.com/getsentry/sentry-java/compare/6.9.2...6.11.0)
1428

1529
## 4.12.0
1630

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ target 'sample' do
124124
# ... react native config
125125

126126
+ pod 'Sentry/HybridSDK', :path => '../../../sentry-cocoa'
127+
+ pod 'SentryPrivate', :path => '../../../sentry-cocoa/SentryPrivate.podspec'
127128

128129
# ... rest of the configuration
129130

RNSentry.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
1919
s.preserve_paths = '*.js'
2020

2121
s.dependency 'React-Core'
22-
s.dependency 'Sentry/HybridSDK', '7.31.3'
22+
s.dependency 'Sentry/HybridSDK', '7.31.5'
2323

2424
s.source_files = 'ios/RNSentry.{h,mm}'
2525
s.public_header_files = 'ios/RNSentry.h'

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ android {
4242

4343
dependencies {
4444
implementation 'com.facebook.react:react-native:+'
45-
api 'io.sentry:sentry-android:6.9.2'
45+
api 'io.sentry:sentry-android:6.11.0'
4646
}

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build:tools": "tsc -p tsconfig.build.tools.json",
1818
"clean": "rimraf dist coverage",
1919
"test": "jest",
20-
"lint": "eslint .",
20+
"lint": "eslint --config .eslintrc.js .",
2121
"test:watch": "jest --watch",
2222
"run-ios": "cd sample && yarn react-native run-ios",
2323
"run-android": "cd sample && yarn react-native run-android"
@@ -42,19 +42,19 @@
4242
"react-native": ">=0.70.0"
4343
},
4444
"dependencies": {
45-
"@sentry/browser": "7.26.0",
45+
"@sentry/browser": "7.28.1",
4646
"@sentry/cli": "2.10.0",
47-
"@sentry/core": "7.26.0",
48-
"@sentry/hub": "7.26.0",
49-
"@sentry/integrations": "7.26.0",
50-
"@sentry/react": "7.26.0",
51-
"@sentry/tracing": "7.26.0",
52-
"@sentry/types": "7.26.0",
53-
"@sentry/utils": "7.26.0"
47+
"@sentry/core": "7.28.1",
48+
"@sentry/hub": "7.28.1",
49+
"@sentry/integrations": "7.28.1",
50+
"@sentry/react": "7.28.1",
51+
"@sentry/tracing": "7.28.1",
52+
"@sentry/types": "7.28.1",
53+
"@sentry/utils": "7.28.1"
5454
},
5555
"devDependencies": {
56-
"@sentry-internal/eslint-config-sdk": "7.26.0",
57-
"@sentry-internal/eslint-plugin-sdk": "7.26.0",
56+
"@sentry-internal/eslint-config-sdk": "7.28.1",
57+
"@sentry-internal/eslint-plugin-sdk": "7.28.1",
5858
"@sentry/typescript": "^5.20.1",
5959
"@sentry/wizard": "2.2.0",
6060
"@types/jest": "^26.0.15",

0 commit comments

Comments
 (0)