Skip to content

Commit da9a100

Browse files
author
getsentry-bot
committed
Merge branch 'release/7.0.0'
2 parents c1573b3 + cf40b19 commit da9a100

220 files changed

Lines changed: 4479 additions & 1536 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 401 additions & 1 deletion
Large diffs are not rendered by default.

dev-packages/e2e-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-e2e-tests",
3-
"version": "6.21.0",
3+
"version": "7.0.0",
44
"private": true,
55
"description": "Sentry React Native End to End Tests Library",
66
"main": "dist/index.js",
@@ -13,8 +13,8 @@
1313
"devDependencies": {
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
16-
"@sentry/core": "8.55.0",
17-
"@sentry/react-native": "6.21.0",
16+
"@sentry/core": "10.8.0",
17+
"@sentry/react-native": "7.0.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",
2020
"appium": "2.4.1",

dev-packages/e2e-tests/patch-scripts/rn.patch.app.build.gradle.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/core');
8-
logger.enable();
7+
const { debug } = require('@sentry/core');
8+
debug.enable();
99

1010
const args = parseArgs(argv.slice(2));
1111
if (!args['app-build-gradle']) {
1212
throw new Error('Missing --app-build-gradle');
1313
}
1414

15-
logger.info('Patching app/build.gradle', args['app-build-gradle']);
15+
debug.log('Patching app/build.gradle', args['app-build-gradle']);
1616

1717
const sentryGradlePatch = `
1818
apply from: new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute().text.trim(), "../sentry.gradle")
@@ -26,7 +26,7 @@ if (!isPatched) {
2626
const patched = buildGradle.replace(reactNativeGradleRex, m => sentryGradlePatch + m);
2727

2828
fs.writeFileSync(args['app-build-gradle'], patched);
29-
logger.info('Patched app/build.gradle successfully!');
29+
debug.log('Patched app/build.gradle successfully!');
3030
} else {
31-
logger.info('app/build.gradle is already patched!');
31+
debug.log('app/build.gradle is already patched!');
3232
}

dev-packages/e2e-tests/patch-scripts/rn.patch.app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const path = require('path');
55
const { argv, env } = require('process');
66

77
const parseArgs = require('minimist');
8-
const { logger } = require('@sentry/core');
9-
logger.enable();
8+
const { debug } = require('@sentry/core');
9+
debug.enable();
1010

1111
const SENTRY_RELEASE = env.SENTRY_RELEASE;
1212
const SENTRY_DIST = env.SENTRY_DIST;
@@ -16,7 +16,7 @@ if (!args.app) {
1616
throw new Error('Missing --app');
1717
}
1818

19-
logger.info('Patching RN App.(js|tsx)', args.app);
19+
debug.log('Patching RN App.(js|tsx)', args.app);
2020

2121
const initPatch = `
2222
import * as Sentry from '@sentry/react-native';
@@ -59,7 +59,7 @@ if (!isPatched) {
5959
.replace(exportDefaultRex, 'export default Sentry.wrap(App);');
6060

6161
fs.writeFileSync(appPath, patched);
62-
logger.info('Patched RN App.(js|tsx) successfully!');
62+
debug.log('Patched RN App.(js|tsx) successfully!');
6363
} else {
64-
logger.info('App.(js|tsx) already patched!');
64+
debug.log('App.(js|tsx) already patched!');
6565
}

dev-packages/e2e-tests/patch-scripts/rn.patch.gradle.properties.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/core');
8-
logger.enable();
7+
const { debug } = require('@sentry/core');
8+
debug.enable();
99

1010
const args = parseArgs(argv.slice(2));
1111
if (!args['gradle-properties']) {
@@ -21,7 +21,7 @@ if (enableHermes === null) {
2121
throw new Error('Invalid engine');
2222
}
2323

24-
logger.info('Patching gradle.properties', args['gradle-properties']);
24+
debug.log('Patching gradle.properties', args['gradle-properties']);
2525
let content = fs.readFileSync(args['gradle-properties'], 'utf8');
2626

2727
const isHermesEnabled = content.includes('hermesEnabled=true');
@@ -31,9 +31,9 @@ if (enableHermes !== isHermesEnabled) {
3131
? content.replace(/hermesEnabled=.*/g, patch)
3232
: content.concat(`\n${patch}`);
3333
if (enableHermes) {
34-
logger.info('Patching gradle.properties for Hermes');
34+
debug.log('Patching gradle.properties for Hermes');
3535
} else {
36-
logger.info('Patching gradle.properties for JSC');
36+
debug.log('Patching gradle.properties for JSC');
3737
}
3838
}
3939

dev-packages/e2e-tests/patch-scripts/rn.patch.metro.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/core');
8-
logger.enable();
7+
const { debug } = require('@sentry/core');
8+
debug.enable();
99

1010
const args = parseArgs(argv.slice(2));
1111
if (!args.path) {
1212
throw new Error('Missing --path');
1313
}
1414

15-
logger.info('Patching Metro config: ', args.path);
15+
debug.log('Patching Metro config: ', args.path);
1616

1717
const configFilePath = args.path;
1818

@@ -52,7 +52,7 @@ if (!isPatched) {
5252
}
5353

5454
fs.writeFileSync(configFilePath, config.join('\n'), 'utf8');
55-
logger.info('Patched Metro config successfully!');
55+
debug.log('Patched Metro config successfully!');
5656
} else {
57-
logger.info('Metro config already patched!');
57+
debug.log('Metro config already patched!');
5858
}

dev-packages/e2e-tests/patch-scripts/rn.patch.podfile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/core');
8-
logger.enable();
7+
const { debug } = require('@sentry/core');
8+
debug.enable();
99

1010
const args = parseArgs(argv.slice(2));
1111
if (!args['pod-file']) {
@@ -21,7 +21,7 @@ if (enableHermes === null) {
2121
throw new Error('Invalid engine');
2222
}
2323

24-
logger.info('Patching Podfile', args['pod-file']);
24+
debug.log('Patching Podfile', args['pod-file']);
2525
const content = fs.readFileSync(args['pod-file'], 'utf8');
2626

2727
const isHermesEnabled = content.includes(':hermes_enabled => true,');
@@ -32,11 +32,11 @@ if (shouldPatch) {
3232
enableHermes ? ':hermes_enabled => true,' : ':hermes_enabled => false,',
3333
);
3434
if (enableHermes) {
35-
logger.info('Patching Podfile for Hermes');
35+
debug.log('Patching Podfile for Hermes');
3636
} else {
37-
logger.info('Patching Podfile for JSC');
37+
debug.log('Patching Podfile for JSC');
3838
}
3939
fs.writeFileSync(args['pod-file'], patched);
4040
} else {
41-
logger.info('Podfile is already patched!');
41+
debug.log('Podfile is already patched!');
4242
}

dev-packages/e2e-tests/patch-scripts/rn.patch.xcode.js

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const { argv } = require('process');
66
const xcode = require('xcode');
77
const parseArgs = require('minimist');
88
const semver = require('semver');
9-
const { logger } = require('@sentry/core');
10-
logger.enable();
9+
const { debug } = require('@sentry/core');
10+
debug.enable();
1111

1212
const args = parseArgs(argv.slice(2));
1313
if (!args.project) {
@@ -17,7 +17,7 @@ if (!args['rn-version']) {
1717
throw new Error('Missing --rn-version');
1818
}
1919

20-
logger.info('Patching Xcode project', args.project, 'for RN version', args['rn-version']);
20+
debug.log('Patching Xcode project', args.project, 'for RN version', args['rn-version']);
2121

2222
const newBundleScriptRNVersion = '0.69.0-rc.0';
2323

@@ -29,15 +29,15 @@ const symbolsScript = `
2929
`;
3030
const symbolsPatchRegex = /sentry-cli\s+(upload-dsym|debug-files upload)/;
3131
if (semver.satisfies(args['rn-version'], `< ${newBundleScriptRNVersion}`, { includePrerelease: true })) {
32-
logger.info('Applying old bundle script patch');
32+
debug.log('Applying old bundle script patch');
3333
bundleScript = `
3434
export NODE_BINARY=node
3535
../node_modules/@sentry/react-native/scripts/sentry-xcode.sh ../node_modules/react-native/scripts/react-native-xcode.sh
3636
`;
3737
bundleScriptRegex = /(packager|scripts)\/react-native-xcode\.sh\b/;
3838
bundlePatchRegex = /sentry-cli\s+react-native[\s-]xcode/;
3939
} else if (semver.satisfies(args['rn-version'], `>= ${newBundleScriptRNVersion}`, { includePrerelease: true })) {
40-
logger.info('Applying new bundle script patch');
40+
debug.log('Applying new bundle script patch');
4141
bundleScript = `
4242
WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
4343
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
@@ -62,38 +62,32 @@ for (const key in buildPhasesRaw) {
6262
}
6363
}
6464

65-
buildPhases.forEach((phase) => {
65+
buildPhases.forEach(phase => {
6666
const isBundleReactNative = phase.shellScript.match(bundleScriptRegex);
6767
const isPatched = phase.shellScript.match(bundlePatchRegex);
6868
if (!isBundleReactNative) {
6969
return;
7070
}
7171
if (isPatched) {
72-
logger.warn('Xcode project Bundle RN Build phase already patched');
72+
debug.warn('Xcode project Bundle RN Build phase already patched');
7373
return;
7474
}
7575
phase.shellScript = JSON.stringify(bundleScript);
76-
logger.info('Patched Xcode project Bundle RN Build phase');
76+
debug.log('Patched Xcode project Bundle RN Build phase');
7777
});
7878

79-
const isSymbolsPhase = (phase) => phase.shellScript.match(symbolsPatchRegex);
79+
const isSymbolsPhase = phase => phase.shellScript.match(symbolsPatchRegex);
8080
const areSymbolsPatched = buildPhases.some(isSymbolsPhase);
8181

8282
if (!areSymbolsPatched) {
83-
project.addBuildPhase(
84-
[],
85-
'PBXShellScriptBuildPhase',
86-
'Upload Debug Symbols to Sentry',
87-
null,
88-
{
89-
shellPath: '/bin/sh',
90-
shellScript: symbolsScript,
91-
},
92-
);
93-
logger.info('Added Xcode project Upload Debug Symbols Build phase');
83+
project.addBuildPhase([], 'PBXShellScriptBuildPhase', 'Upload Debug Symbols to Sentry', null, {
84+
shellPath: '/bin/sh',
85+
shellScript: symbolsScript,
86+
});
87+
debug.log('Added Xcode project Upload Debug Symbols Build phase');
9488
} else {
95-
logger.warn('Xcode project Upload Debug Symbols Build phase already patched');
89+
debug.warn('Xcode project Upload Debug Symbols Build phase already patched');
9690
}
9791

9892
fs.writeFileSync(args.project, project.writeSync());
99-
logger.info('Patched Xcode project successfully!');
93+
debug.log('Patched Xcode project successfully!');

dev-packages/type-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sentry-react-native-type-check",
33
"private": true,
4-
"version": "6.21.0",
4+
"version": "7.0.0",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/type-check/ts3.8-test/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ declare global {
33
interface IDBObjectStore {}
44
interface Window {
55
fetch: any;
6+
setTimeout: any;
7+
document: any;
68
}
79
interface ShadowRoot {}
810
interface BufferSource {}
@@ -19,6 +21,8 @@ declare global {
1921
redirectCount: number;
2022
}
2123
interface PerformanceEntry {}
24+
interface Performance {}
25+
interface PerformanceNavigationTiming {}
2226
}
2327

2428
declare module 'react-native' {

0 commit comments

Comments
 (0)