Skip to content

Commit f669ecf

Browse files
authored
Merge 3a6e177 into befcc51
2 parents befcc51 + 3a6e177 commit f669ecf

File tree

287 files changed

+34860
-1213
lines changed

Some content is hidden

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

287 files changed

+34860
-1213
lines changed

.eslintignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Ignore build generated dir
22
dist
33

4-
# Ignore sample folder
4+
# Ignore standalone apps
55
sample
6+
sample-new-architecture
7+
test/perf/TestApp*
68

79
# Ignore dangerfile
8-
dangerfile.js
10+
dangerfile.js

.github/workflows/buildandtest.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-node@v3
17-
17+
with:
18+
node-version: 14
1819
- uses: actions/cache@v3
1920
id: cache
2021
with:
@@ -42,12 +43,32 @@ jobs:
4243
- name: Lint
4344
run: yarn lint
4445

46+
job_lint_sample_new_arch:
47+
name: Lint Sample
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
- uses: actions/cache@v3
52+
id: cache
53+
with:
54+
path: sample-new-architecture/node_modules
55+
key: ${{ runner.os }}-${{ github.sha }}
56+
- name: Install Dependencies
57+
if: steps.cache.outputs['cache-hit'] != 'true'
58+
run: yarn install
59+
working-directory: sample-new-architecture
60+
- name: Lint Sample
61+
run: yarn lint
62+
working-directory: sample-new-architecture
63+
4564
job_build:
4665
name: Build
4766
runs-on: ubuntu-latest
4867
steps:
4968
- uses: actions/checkout@v3
5069
- uses: actions/setup-node@v3
70+
with:
71+
node-version: 14
5172
- uses: actions/cache@v3
5273
id: cache
5374
with:

.github/workflows/codegen.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Codegen
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/**
8+
pull_request:
9+
10+
jobs:
11+
codegen:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
platform: ["android"] # "ios" will be added after codegen is fixed
16+
include:
17+
- platform: android
18+
command: |
19+
cd sample-new-architecture/android
20+
./gradlew generateCodegenArtifactsFromSchema
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 14
26+
- uses: actions/cache@v3
27+
id: cache
28+
with:
29+
path: sample-new-architecture/node_modules
30+
key: ${{ runner.os }}-${{ github.sha }}
31+
- name: Install Dependencies
32+
if: steps.cache.outputs['cache-hit'] != 'true'
33+
run: |
34+
cd sample-new-architecture
35+
yarn install
36+
- name: Codegen
37+
run: ${{ matrix.command }}

.github/workflows/e2e.yml

+100
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,103 @@ jobs:
140140
path: |
141141
./sample/*.log
142142
./sample/*.png
143+
144+
metrics:
145+
runs-on: macos-latest
146+
strategy:
147+
# we want that the matrix keeps running, default is to cancel them if it fails.
148+
fail-fast: false
149+
matrix:
150+
platform: ["ios", "android"]
151+
include:
152+
- platform: ios
153+
name: iOS
154+
appPlain: test/perf/test-app-plain.ipa
155+
- platform: android
156+
name: Android
157+
appPlain: test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk
158+
steps:
159+
- uses: actions/checkout@v3
160+
- uses: actions/setup-node@v3
161+
with:
162+
node-version: "14"
163+
- uses: actions/setup-java@v3
164+
with:
165+
java-version: "11"
166+
distribution: "adopt"
167+
- name: Install Global Dependencies
168+
run: yarn global add react-native-cli @sentry/cli yalc
169+
- uses: actions/cache@v3
170+
id: deps-cache
171+
with:
172+
path: |
173+
node_modules
174+
test/perf/TestAppSentry/node_modules
175+
key: ${{ github.workflow }}-${{ github.job }}-${{ hashFiles('yarn.lock', 'test/perf/TestAppSentry/yarn.lock') }}
176+
- name: Install Dependencies
177+
if: steps.deps-cache.outputs['cache-hit'] != 'true'
178+
run: yarn install
179+
- name: Build SDK
180+
run: yarn build
181+
- name: Package SDK
182+
run: yalc publish
183+
- uses: actions/setup-node@v3
184+
with:
185+
node-version: "16"
186+
- uses: actions/cache@v3
187+
id: app-plain-cache
188+
with:
189+
path: ${{ matrix.appPlain }}
190+
key: ${{ github.workflow }}-${{ github.job }}-appplain-${{ hashFiles('test/perf/TestAppPlain/**') }}
191+
- name: Build app plain
192+
if: steps.app-plain-cache.outputs['cache-hit'] != 'true'
193+
working-directory: ./test/perf/TestAppPlain
194+
run: |
195+
yarn install
196+
cd ${{ matrix.platform }}
197+
if [[ "${{ matrix.platform }}" == "android" ]]; then
198+
./gradlew assembleRelease
199+
else
200+
pod install
201+
cd ../..
202+
fastlane build_perf_test_app_plain
203+
fi
204+
env:
205+
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
206+
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
207+
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
208+
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
209+
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
210+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
211+
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
212+
- name: Build app with Sentry
213+
working-directory: ./test/perf/TestAppSentry
214+
run: |
215+
yalc add @sentry/react-native
216+
yarn install
217+
cd ${{ matrix.platform }}
218+
if [[ "${{ matrix.platform }}" == "android" ]]; then
219+
./gradlew assembleRelease
220+
else
221+
pod install
222+
cd ../..
223+
fastlane build_perf_test_app_sentry
224+
cd TestAppSentry
225+
fi
226+
# Remove after build so that the cache isn't invaldiated due to the changes in yarn.lock.
227+
yarn remove @sentry/react-native
228+
env:
229+
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
230+
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
231+
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
232+
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
233+
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
234+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
235+
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
236+
- name: Collect apps metrics
237+
uses: getsentry/action-app-sdk-overhead-metrics@v1
238+
with:
239+
name: ${{ matrix.name }}
240+
config: ./test/perf/metrics-${{ matrix.platform }}.yml
241+
sauce-user: ${{ secrets.SAUCE_USERNAME }}
242+
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}

.github/workflows/release.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ on:
88
force:
99
description: Force a release even when there are release-blockers (optional)
1010
required: false
11+
merge_target:
12+
description: Target branch to merge into. Uses the default branch as a fallback (optional)
13+
required: false
1114

1215
jobs:
1316
job_release:
1417
runs-on: ubuntu-latest
15-
name: 'Release a new version'
18+
name: "Release a new version"
1619
steps:
1720
- name: Check out current commit (${{ github.sha }})
1821
uses: actions/checkout@v3
@@ -28,3 +31,4 @@ jobs:
2831
with:
2932
version: ${{ github.event.inputs.version }}
3033
force: ${{ github.event.inputs.force }}
34+
merge_target: ${{ github.event.inputs.merge_target }}

CHANGELOG.md

+73
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- Remove hardcoded Folly version ([#2558](https://github.com/getsentry/sentry-react-native/pull/2558))
8+
9+
### Features
10+
11+
- Send react native js engine, turbo module, fabric flags and component stack in Event contexts ([#2552](https://github.com/getsentry/sentry-react-native/pull/2552))
12+
13+
### Dependencies
14+
15+
- Bump CLI from v1.74.4 to v2.7.0 ([#2457](https://github.com/getsentry/sentry-react-native/pull/2457))
16+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#270)
17+
- [diff](https://github.com/getsentry/sentry-cli/compare/1.74.4...2.7.0)
18+
19+
## 5.0.0-alpha.6
20+
21+
- Latest changes from 4.6.1
22+
23+
### Features
24+
25+
- Add initial support for the RN New Architecture, backwards compatible RNSentry Turbo Module ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522))
26+
27+
### Breaking changes
28+
29+
- New ReactNativeTracingOptions idleTimeoutMs and finalTimeoutMs replacing idleTimeout and maxTransactionDuration respectively ([#2481](https://github.com/getsentry/sentry-react-native/pull/2481))
30+
- iOS min target 12.4, Android API min 21, min React Native version 0.70 ([#2522](https://github.com/getsentry/sentry-react-native/pull/2522))
31+
532
### Dependencies
633

734
- Bump Android SDK from v6.4.3 to v6.5.0 ([#2535](https://github.com/getsentry/sentry-react-native/pull/2535))
@@ -34,6 +61,24 @@
3461
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#643)
3562
- [diff](https://github.com/getsentry/sentry-java/compare/6.4.2...6.4.3)
3663

64+
## 5.0.0-alpha.5
65+
66+
### Fixes
67+
68+
- Make `configureScope` callback safe [#2510](https://github.com/getsentry/sentry-react-native/pull/2510)
69+
70+
### Dependencies
71+
72+
- Bump JavaScript SDK from v7.14.0 to v7.14.1 ([#2511](https://github.com/getsentry/sentry-react-native/pull/2511))
73+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7141)
74+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.0...7.14.1)
75+
- Bump Cocoa SDK from v7.27.0 to v7.27.1 ([#2521](https://github.com/getsentry/sentry-react-native/pull/2521))
76+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7271)
77+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.0...7.27.1)
78+
- Bump Android SDK from v6.4.2 to v6.4.3 ([#2520](https://github.com/getsentry/sentry-react-native/pull/2520))
79+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#643)
80+
- [diff](https://github.com/getsentry/sentry-java/compare/6.4.2...6.4.3)
81+
3782
## 4.6.0
3883

3984
### Fixes
@@ -58,6 +103,14 @@
58103
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7140)
59104
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.13.0...7.14.0)
60105

106+
## 5.0.0-alpha.4
107+
108+
- Latest changes from 4.5.0
109+
110+
### Breaking changes
111+
112+
- New ReactNativeTracingOptions idleTimeoutMs and finalTimeoutMs replacing idleTimeout and maxTransactionDuration respectively ([#2481](https://github.com/getsentry/sentry-react-native/pull/2481))
113+
61114
## 4.5.0
62115

63116
### Features
@@ -98,6 +151,16 @@
98151
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7251)
99152
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.24.1...7.25.1)
100153

154+
## 5.0.0-alpha.3
155+
156+
- Latest changes from 4.3.x
157+
158+
### Dependencies
159+
160+
- Bump Wizard from v2.0.0 to v2.2.0 ([#2460](https://github.com/getsentry/sentry-react-native/pull/2460))
161+
- [changelog](https://github.com/getsentry/sentry-wizard/blob/master/CHANGELOG.md#v220)
162+
- [diff](https://github.com/getsentry/sentry-wizard/compare/v2.0.0...v2.2.0)
163+
101164
## 4.3.0
102165

103166
### Features
@@ -122,6 +185,16 @@
122185

123186
- ReactNativeTracing wrongly marks transactions as deadline_exceeded when it reaches the idleTimeout ([#2427](https://github.com/getsentry/sentry-react-native/pull/2427))
124187

188+
## 5.0.0-alpha.2
189+
190+
- Latest changes from 4.2.x
191+
192+
## 5.0.0-alpha.1
193+
194+
### Fixes
195+
196+
- Auto linking for RN >= 0.69 ([#2332](https://github.com/getsentry/sentry-react-native/pull/2332))
197+
125198
## 4.2.3
126199

127200
### Fixes

CONTRIBUTING.md

+31-11
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,44 @@ yarn test:watch
4242
Now we can go into the sample project, install and build it:
4343

4444
```sh
45-
cd sample/
45+
cd sample-new-architecture/
4646
yarn
47-
48-
# Build iOS
49-
cd ios
50-
pod install
51-
cd ..
5247
```
5348

54-
You can optionally start the Metro bundler if you want to control where it runs:
49+
### Run the emulators (legacy-architecture):
50+
51+
For android switch `newArchEnabled` to `false` in [android/gradle.properties](https://github.com/getsentry/sentry-react-native/blob/c95aa21497ca93aaaaf0b44d170dc39dc7bcf660/sample-new-architecture/android/gradle.properties#L40). For iOS explicitly disable fabric in `sample-new-architecture/ios/Podfile` by setting `:fabric_enabled => false` before `pod install`.
5552

5653
```sh
57-
yarn start --reset-cache
54+
yarn pod-install-legacy
55+
yarn run-ios
56+
57+
yarn run-android
58+
59+
# Release builds
60+
yarn pod-install-legacy-production
61+
yarn run-ios --configuration Release
62+
63+
yarn run-android --variant=release
5864
```
5965

60-
Run the emulators:
66+
### Run the emulators (new-architecture):
67+
```sh
68+
yarn pod-install
69+
yarn run-ios
70+
71+
yarn run-android
72+
73+
# Release builds
74+
yarn pod-install-production
75+
yarn run-ios --configuration Release
76+
77+
yarn run-android --variant=release
78+
```
79+
80+
### Optional
81+
You can optionally start the Metro bundler if you want to control where it runs:
6182

6283
```sh
63-
yarn react-native run-ios
64-
yarn react-native run-android
84+
yarn start --reset-cache
6585
```

0 commit comments

Comments
 (0)