Skip to content

Commit 3b2e69a

Browse files
chore(deps): v7: update JavaScript SDK to v10 (#5111)
* chore(ci): v7: Handle GH runner image deprecations * chore(deps): v7: update Android SDK to v8.20.0 * Adds changelog * Set specific xcode version for expo (see expo/expo#36830) * Bump Javascript SDK to 9.44.2 * Bump Javascript SDK to 10.4.0 and rename deprecated base client getsentry/sentry-javascript#17071 * Renames logger getsentry/sentry-javascript#16901 * Bump Javascript SDK to 10.7.0 * Adds changelog * Sets skipLibCheck to true in ts3.8 typecheck * Fixes fake timers jest issue after getsentry/sentry-javascript#16890 * Fixes lint issue * Apply suggestions from code review Co-authored-by: LucasZF <[email protected]> * Update yarn.lock --------- Co-authored-by: LucasZF <[email protected]>
1 parent ad7a627 commit 3b2e69a

File tree

79 files changed

+560
-518
lines changed

Some content is hidden

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

79 files changed

+560
-518
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
- Bump Android SDK from v8.17.0 to v8.20.0 ([#5034](https://github.com/getsentry/sentry-react-native/pull/5034), [#5063](https://github.com/getsentry/sentry-react-native/pull/5063), [#5106](https://github.com/getsentry/sentry-react-native/pull/5106))
1818
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8200)
1919
- [diff](https://github.com/getsentry/sentry-java/compare/8.17.0...8.20.0)
20+
- Bump JavaScript SDK from v9.22.0 to v10.7.0 ([#5111](https://github.com/getsentry/sentry-react-native/pull/5111))
21+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#1070)
22+
- [diff](https://github.com/getsentry/sentry-javascript/compare/9.22.0...10.7.0)
23+
2024

2125
## 7.0.0-rc.1
2226

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
16-
"@sentry/core": "9.22.0",
16+
"@sentry/core": "10.7.0",
1717
"@sentry/react-native": "7.0.0-rc.1",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",

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/ts3.8-test/tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"index.ts",
44
],
55
"compilerOptions": {
6-
"skipLibCheck": false,
6+
"skipLibCheck": true,
77
"noEmit": true,
88
"importHelpers": true,
99
"types": [],

packages/core/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,20 @@
6666
},
6767
"dependencies": {
6868
"@sentry/babel-plugin-component-annotate": "4.0.2",
69-
"@sentry/browser": "9.22.0",
69+
"@sentry/browser": "10.7.0",
7070
"@sentry/cli": "2.50.2",
71-
"@sentry/core": "9.22.0",
72-
"@sentry/react": "9.22.0",
73-
"@sentry/types": "9.22.0"
71+
"@sentry/core": "10.7.0",
72+
"@sentry/react": "10.7.0",
73+
"@sentry/types": "10.7.0"
7474
},
7575
"devDependencies": {
7676
"@babel/core": "^7.25.2",
7777
"@expo/metro-config": "~0.20.0",
7878
"@mswjs/interceptors": "^0.25.15",
7979
"@react-native/babel-preset": "0.77.1",
80-
"@sentry-internal/eslint-config-sdk": "9.22.0",
81-
"@sentry-internal/eslint-plugin-sdk": "9.22.0",
82-
"@sentry-internal/typescript": "9.22.0",
80+
"@sentry-internal/eslint-config-sdk": "10.7.0",
81+
"@sentry-internal/eslint-plugin-sdk": "10.7.0",
82+
"@sentry-internal/typescript": "10.7.0",
8383
"@sentry/wizard": "6.1.0",
8484
"@testing-library/react-native": "^12.7.2",
8585
"@types/jest": "^29.5.13",

0 commit comments

Comments
 (0)