Skip to content

Commit 7a15b00

Browse files
Merge remote-tracking branch 'origin/main' into v7
2 parents 51f9b96 + b3e6131 commit 7a15b00

30 files changed

+1152
-559
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,14 @@ body:
5151
label: 'How does your development environment look like?'
5252
description:
5353
'Output of the command `npx react-native@latest info` or manully describe your development environment?'
54-
placeholder: |-
55-
info Fetching system and libraries information...
56-
OS: OS version
57-
Node: Your version
58-
Yarn: Yarn version
59-
Expo SDK: Expo SDK version
60-
react: React version
61-
react-native: React Native version
62-
hermesEnabled: bool
63-
newArchEnabled: bool
54+
value: |-
55+
````
56+
⬇ Place the `npx react-native@latest info` output here. ⬇
57+
58+
59+
60+
61+
````
6462
6563
- type: textarea
6664
id: init
@@ -69,11 +67,13 @@ body:
6967
attributes:
7068
label: 'Sentry.init()'
7169
description: 'Code snipped of Sentry initialization from your application.'
72-
placeholder: |-
70+
value: |-
71+
````js
7372
Sentry.init({
7473
dsn: 'https://[email protected]/...'
7574
// other options
7675
});
76+
````
7777
7878
- type: textarea
7979
id: repro

.github/workflows/buildandtest.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
2424
steps:
2525
- uses: actions/checkout@v4
26-
- run: corepack enable
26+
- run: npm i -g corepack
2727
- uses: actions/setup-node@v4
2828
with:
2929
node-version: 18
@@ -41,7 +41,7 @@ jobs:
4141
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
4242
steps:
4343
- uses: actions/checkout@v4
44-
- run: corepack enable
44+
- run: npm i -g corepack
4545
- uses: actions/setup-node@v4
4646
with:
4747
node-version: 18
@@ -59,7 +59,7 @@ jobs:
5959
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
6060
steps:
6161
- uses: actions/checkout@v4
62-
- run: corepack enable
62+
- run: npm i -g corepack
6363
- uses: actions/setup-node@v4
6464
with:
6565
node-version: 18
@@ -82,7 +82,7 @@ jobs:
8282
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
8383
steps:
8484
- uses: actions/checkout@v4
85-
- run: corepack enable
85+
- run: npm i -g corepack
8686
- uses: actions/setup-node@v4
8787
with:
8888
node-version: 18
@@ -125,7 +125,7 @@ jobs:
125125
YARN_ENABLE_IMMUTABLE_INSTALLS: false
126126
steps:
127127
- uses: actions/checkout@v4
128-
- run: corepack enable
128+
- run: npm i -g corepack
129129
- uses: actions/setup-node@v4
130130
with:
131131
node-version: 18
@@ -155,7 +155,7 @@ jobs:
155155
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
156156
steps:
157157
- uses: actions/checkout@v4
158-
- run: corepack enable
158+
- run: npm i -g corepack
159159
- uses: actions/setup-node@v4
160160
with:
161161
node-version: 18
@@ -189,7 +189,7 @@ jobs:
189189
dev: [true, false]
190190
steps:
191191
- uses: actions/checkout@v4
192-
- run: corepack enable
192+
- run: npm i -g corepack
193193
- uses: actions/setup-node@v4
194194
with:
195195
node-version: 18

.github/workflows/codegen.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
--targetPlatform ios
3838
steps:
3939
- uses: actions/checkout@v4
40-
- run: corepack enable
40+
- run: npm i -g corepack
4141
- uses: actions/setup-node@v4
4242
with:
4343
node-version: 18

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@5f8171a638ada777af81d42b55959a643bb29017 # [email protected].12
47+
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # [email protected].15
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@5f8171a638ada777af81d42b55959a643bb29017 # [email protected].12
58+
uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # [email protected].15
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -66,4 +66,4 @@ jobs:
6666
# make bootstrap
6767
# make release
6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@5f8171a638ada777af81d42b55959a643bb29017 # [email protected].12
69+
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # [email protected].15

.github/workflows/e2e.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
5757
if: ${{ matrix.platform == 'ios' }}
5858

59-
- run: corepack enable
59+
- run: npm i -g corepack
6060
- uses: actions/setup-node@v4
6161
with:
6262
node-version: 18
@@ -151,8 +151,8 @@ jobs:
151151
react-native-build:
152152
name: Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
153153
runs-on: ${{ matrix.runs-on }}
154-
needs: [diff_check]
155-
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
154+
needs: [diff_check, auth_token_check]
155+
if: ${{ needs.diff_check.outputs.skip_ci != 'true' && needs.auth_token_check.outputs.skip_ci != 'true' && !startsWith(github.ref, 'refs/heads/release/') }}
156156
env:
157157
RN_VERSION: ${{ matrix.rn-version }}
158158
RN_ENGINE: ${{ matrix.engine }}
@@ -227,7 +227,7 @@ jobs:
227227
- run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer
228228
if: ${{ matrix.platform == 'ios' }}
229229

230-
- run: corepack enable
230+
- run: npm i -g corepack
231231
- uses: actions/setup-node@v4
232232
with:
233233
node-version: 18
@@ -353,9 +353,7 @@ jobs:
353353
path: dev-packages/e2e-tests
354354

355355
- name: Enable Corepack
356-
run: |
357-
npm install -g [email protected]
358-
corepack enable
356+
run: npm i -g corepack
359357
- uses: actions/setup-node@v4
360358
with:
361359
node-version: 20
@@ -387,7 +385,7 @@ jobs:
387385

388386
- name: Run tests on Android
389387
if: ${{ matrix.platform == 'android' }}
390-
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2.33.0
388+
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2.34.0
391389
with:
392390
api-level: 30
393391
force-avd-creation: false

.github/workflows/native-tests.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626

2727
- name: Enable Corepack
28-
run: |
29-
npm install -g [email protected]
30-
corepack enable
28+
run: npm i -g corepack
3129
- uses: actions/setup-node@v4
3230
with:
3331
node-version: 18
@@ -88,7 +86,7 @@ jobs:
8886
sudo udevadm trigger --name-match=kvm
8987
9088
- name: Run connected tests
91-
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #pin@v2.33.0
89+
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed #pin@v2.34.0
9290
with:
9391
working-directory: packages/core/RNSentryAndroidTester
9492
api-level: 30

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Get auth token
2121
id: token
22-
uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7
22+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
2323
with:
2424
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2525
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
token: ${{ steps.token.outputs.token }}
3030
fetch-depth: 0
31-
- run: corepack enable
31+
- run: npm i -g corepack
3232
- uses: actions/setup-node@v4
3333
with:
3434
node-version: 18

.github/workflows/sample-application-expo.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ jobs:
4747
- uses: actions/checkout@v4
4848

4949
- name: Enable Corepack
50-
run: |
51-
npm install -g [email protected]
52-
corepack enable
50+
run: npm i -g corepack
5351
- uses: actions/setup-node@v4
5452
with:
5553
node-version: 18

.github/workflows/sample-application.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ jobs:
6161
- uses: actions/checkout@v4
6262

6363
- name: Enable Corepack
64-
run: |
65-
npm install -g [email protected]
66-
corepack enable
64+
run: npm i -g corepack
6765
- uses: actions/setup-node@v4
6866
with:
6967
node-version: 18
@@ -263,9 +261,7 @@ jobs:
263261
run: unzip ${{ env.ANDROID_APP_ARCHIVE_PATH }}
264262

265263
- name: Enable Corepack
266-
run: |
267-
npm install -g [email protected]
268-
corepack enable
264+
run: npm i -g corepack
269265
- uses: actions/setup-node@v4
270266
with:
271267
node-version: 18
@@ -301,7 +297,7 @@ jobs:
301297

302298
- name: Run Android Tests on API ${{ env.ANDROID_API_LEVEL }}
303299
if: ${{ matrix.platform == 'android' }}
304-
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2.33.0
300+
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2.34.0
305301
with:
306302
api-level: ${{ env.ANDROID_API_LEVEL }}
307303
force-avd-creation: false

.github/workflows/testflight.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
ruby-version: '3.3.0' # based on what is used in the sample
2727
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2828
cache-version: 1 # cache the installed gems
29-
- run: corepack enable
29+
- run: npm i -g corepack
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 18

CHANGELOG.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ Version 7 of the Sentry React Native SDK primarily introduces API cleanup and ve
1414

1515
Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v6). Lower versions may continue to work, but may not support all features.
1616

17+
### Fixes
18+
19+
- Avoid silent failure when JS bundle was not created due to Sentry Xcode scripts failure ([#4690](https://github.com/getsentry/sentry-react-native/pull/4690))
20+
- Prevent crash on iOS during profiling stop when debug images are missing ([#4738](https://github.com/getsentry/sentry-react-native/pull/4738))
21+
- Attach only App Starts within the 60s threshold (fixed comparison units, use ms) ([#4746](https://github.com/getsentry/sentry-react-native/pull/4746))
22+
1723
### Dependencies
1824

19-
- Bump Bundler Plugins from v3.2.2 to v3.2.4 ([#4693](https://github.com/getsentry/sentry-react-native/pull/4693), [#4707](https://github.com/getsentry/sentry-react-native/pull/4707))
20-
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#324)
21-
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.2.2...3.2.4)
25+
- Bump Bundler Plugins from v3.2.2 to v3.3.1 ([#4693](https://github.com/getsentry/sentry-react-native/pull/4693), [#4707](https://github.com/getsentry/sentry-react-native/pull/4707), [#4720](https://github.com/getsentry/sentry-react-native/pull/4720), [#4721](https://github.com/getsentry/sentry-react-native/pull/4721))
26+
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#331)
27+
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.2.2...3.3.1)
2228
- Bump CLI from v2.42.4 to v2.43.0 ([#4692](https://github.com/getsentry/sentry-react-native/pull/4692))
2329
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2430)
2430
- [diff](https://github.com/getsentry/sentry-cli/compare/2.42.4...2.43.0)
31+
- Bump Cocoa SDK from v8.48.0 to v8.49.0 ([#4742](https://github.com/getsentry/sentry-react-native/pull/4742))
32+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8490)
33+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.48.0...8.49.0)
2534

2635
### Major Changes
2736

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository contains mono repository structure with multiple React Native an
1212

1313
# Requirements
1414

15-
- nodejs 18 (with corepack enabled)
15+
- nodejs 18 (with corepack globally installed)
1616
- yarn version specified in `package.json` (at the moment version 3.6)
1717

1818
## Building

packages/core/RNSentry.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
3737

3838
s.compiler_flags = other_cflags
3939

40-
s.dependency 'Sentry/HybridSDK', '8.48.0'
40+
s.dependency 'Sentry/HybridSDK', '8.49.0'
4141

4242
if defined? install_modules_dependencies
4343
# Default React Native dependencies for 0.71 and above (new and legacy architecture)

packages/core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"react-native": ">=0.65.0"
6666
},
6767
"dependencies": {
68-
"@sentry/babel-plugin-component-annotate": "3.1.2",
68+
"@sentry/babel-plugin-component-annotate": "3.3.1",
6969
"@sentry/browser": "9.1.0",
7070
"@sentry/cli": "2.43.0",
7171
"@sentry/core": "9.1.0",
@@ -80,7 +80,7 @@
8080
"@sentry-internal/eslint-config-sdk": "9.1.0",
8181
"@sentry-internal/eslint-plugin-sdk": "9.1.0",
8282
"@sentry-internal/typescript": "9.1.0",
83-
"@sentry/wizard": "4.6.0",
83+
"@sentry/wizard": "4.7.0",
8484
"@testing-library/react-native": "^12.7.2",
8585
"@types/jest": "^29.5.13",
8686
"@types/node": "^20.9.3",

packages/core/scripts/sentry-xcode.sh

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ ARGS="$NO_AUTO_RELEASE $SENTRY_CLI_EXTRA_ARGS $SENTRY_CLI_RN_XCODE_EXTRA_ARGS"
2626

2727
REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\""
2828

29+
exitCode=0
30+
2931
if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
3032
# 'warning:' triggers a warning in Xcode, 'error:' triggers an error
3133
set +x +e # disable printing commands otherwise we might print `error:` by accident and allow continuing on error
@@ -35,6 +37,7 @@ if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
3537
else
3638
echo "error: sentry-cli - To disable source maps auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true"
3739
echo "error: sentry-cli - $SENTRY_XCODE_COMMAND_OUTPUT"
40+
exitCode=1
3841
fi
3942
set -x -e # re-enable
4043
else
@@ -48,3 +51,5 @@ fi
4851
if [ -f "$SENTRY_COLLECT_MODULES" ]; then
4952
/bin/sh "$SENTRY_COLLECT_MODULES"
5053
fi
54+
55+
exit $exitCode

packages/core/src/js/profiling/integration.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ export function addNativeProfileToHermesProfile(
315315
return {
316316
...hermes,
317317
profile: addNativeThreadCpuProfileToHermes(hermes.profile, native.profile, hermes.transaction.active_thread_id),
318-
debug_meta: {
319-
images: native.debug_meta.images,
320-
},
318+
...(native.debug_meta?.images ? { debug_meta: { images: native.debug_meta.images } } : {}),
321319
measurements: native.measurements,
322320
};
323321
}

packages/core/src/js/profiling/nativeTypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface NativeProfileEvent {
3939
unit: string;
4040
}
4141
>;
42-
debug_meta: {
42+
debug_meta?: {
4343
images: {
4444
type: 'macho';
4545
debug_id: string;

packages/core/src/js/tracing/integrations/appStart.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export const appStartIntegration = ({
297297
}
298298

299299
const isAppStartWithinBounds =
300-
!!event.start_timestamp && appStartTimestampMs >= event.start_timestamp - MAX_APP_START_AGE_MS;
300+
!!event.start_timestamp && appStartTimestampMs >= event.start_timestamp * 1_000 - MAX_APP_START_AGE_MS;
301301
if (!__DEV__ && !isAppStartWithinBounds) {
302302
logger.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');
303303
return;

0 commit comments

Comments
 (0)