Skip to content

Commit c6d4d0a

Browse files
chore(deps-v7): update Javascript SDK to v9.22.0 (#4860)
* bump JS SDK / new lint fixes * update changelog * ignored rule import/first for tests, rolled back tests affected by mock order
1 parent c27dafb commit c6d4d0a

138 files changed

Lines changed: 161 additions & 269 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: 3 additions & 0 deletions

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.12.0",
16+
"@sentry/core": "9.22.0",
1717
"@sentry/react-native": "7.0.0-alpha.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",

packages/core/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
'@typescript-eslint/no-empty-function': 'off',
3939
'@typescript-eslint/no-explicit-any': 'off',
4040
'@typescript-eslint/unbound-method': 'off',
41+
'import/first': 'off',
4142
},
4243
},
4344
{

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": "3.4.0",
69-
"@sentry/browser": "9.12.0",
69+
"@sentry/browser": "9.22.0",
7070
"@sentry/cli": "2.43.0",
71-
"@sentry/core": "9.12.0",
72-
"@sentry/react": "9.12.0",
73-
"@sentry/types": "9.12.0"
71+
"@sentry/core": "9.22.0",
72+
"@sentry/react": "9.22.0",
73+
"@sentry/types": "9.22.0"
7474
},
7575
"devDependencies": {
7676
"@babel/core": "^7.25.2",
7777
"@expo/metro-config": "0.19.5",
7878
"@mswjs/interceptors": "^0.25.15",
7979
"@react-native/babel-preset": "0.77.1",
80-
"@sentry-internal/eslint-config-sdk": "9.12.0",
81-
"@sentry-internal/eslint-plugin-sdk": "9.12.0",
82-
"@sentry-internal/typescript": "9.12.0",
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",
8383
"@sentry/wizard": "4.9.0",
8484
"@testing-library/react-native": "^12.7.2",
8585
"@types/jest": "^29.5.13",

packages/core/plugin/src/withSentry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { ConfigPlugin } from 'expo/config-plugins';
22
import { createRunOncePlugin } from 'expo/config-plugins';
3-
43
import { bold, sdkPackage, warnOnce } from './utils';
54
import { withSentryAndroid } from './withSentryAndroid';
65
import type { SentryAndroidGradlePluginOptions } from './withSentryAndroidGradlePlugin';
@@ -50,8 +49,9 @@ const withSentryPlugin: ConfigPlugin<PluginProps | void> = (config, props) => {
5049

5150
const missingProjectMessage = '# no project found, falling back to SENTRY_PROJECT environment variable';
5251
const missingOrgMessage = '# no org found, falling back to SENTRY_ORG environment variable';
53-
const existingAuthTokenMessage = `# DO NOT COMMIT the auth token, use SENTRY_AUTH_TOKEN instead, see https://docs.sentry.io/platforms/react-native/manual-setup/`;
54-
const missingAuthTokenMessage = `# Using SENTRY_AUTH_TOKEN environment variable`;
52+
const existingAuthTokenMessage =
53+
'# DO NOT COMMIT the auth token, use SENTRY_AUTH_TOKEN instead, see https://docs.sentry.io/platforms/react-native/manual-setup/';
54+
const missingAuthTokenMessage = '# Using SENTRY_AUTH_TOKEN environment variable';
5555

5656
export function getSentryProperties(props: PluginProps | void): string | null {
5757
const { organization, project, authToken, url = 'https://sentry.io/' } = props ?? {};

packages/core/plugin/src/withSentryAndroid.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { ConfigPlugin } from 'expo/config-plugins';
22
import { withAppBuildGradle, withDangerousMod } from 'expo/config-plugins';
33
import * as path from 'path';
4-
54
import { warnOnce, writeSentryPropertiesTo } from './utils';
65

76
export const withSentryAndroid: ConfigPlugin<string> = (config, sentryProperties: string) => {

packages/core/plugin/src/withSentryAndroidGradlePlugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { withAppBuildGradle, withProjectBuildGradle } from '@expo/config-plugins';
2-
32
import { warnOnce } from './utils';
43

54
export interface SentryAndroidGradlePluginOptions {
@@ -67,7 +66,7 @@ export function withSentryAndroidGradlePlugin(
6766
projectBuildGradle.modResults.contents = updatedContents;
6867
}
6968
} catch (error) {
70-
warnOnce(`An error occurred while trying to modify build.gradle`);
69+
warnOnce('An error occurred while trying to modify build.gradle');
7170
}
7271
return projectBuildGradle;
7372
});
@@ -81,7 +80,7 @@ export function withSentryAndroidGradlePlugin(
8180
warnOnce('Cannot configure Sentry in android/app/build.gradle because it is not in Groovy.');
8281
return config;
8382
}
84-
const sentryPlugin = `apply plugin: "io.sentry.android.gradle"`;
83+
const sentryPlugin = 'apply plugin: "io.sentry.android.gradle"';
8584
const sentryConfig = `
8685
sentry {
8786
autoUploadProguardMapping = ${autoUploadProguardMapping ? 'shouldSentryAutoUpload()' : 'false'}

packages/core/plugin/src/withSentryIOS.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import type { ConfigPlugin, XcodeProject } from 'expo/config-plugins';
33
import { withDangerousMod, withXcodeProject } from 'expo/config-plugins';
44
import * as path from 'path';
5-
65
import { warnOnce, writeSentryPropertiesTo } from './utils';
76

87
type BuildPhase = { shellScript: string };

packages/core/scripts/expo-upload-sourcemaps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ if (!sentryOrg || !sentryProject || !sentryUrl) {
174174
console.log(`${SENTRY_URL} resolved to ${sentryUrl} from expo config.`);
175175
}
176176
else {
177-
sentryUrl = `https://sentry.io/`;
177+
sentryUrl = 'https://sentry.io/';
178178
console.log(
179179
`Since it wasn't specified in the Expo config or environment variable, ${SENTRY_URL} now points to ${sentryUrl}.`
180180
);
@@ -214,7 +214,7 @@ for (const [assetGroupName, assets] of Object.entries(groupedAssets)) {
214214
}
215215

216216
const isHermes = assets.find(asset => asset.endsWith('.hbc'));
217-
const windowsCallback = process.platform === "win32" ? 'node ' : '';
217+
const windowsCallback = process.platform === 'win32' ? 'node ' : '';
218218
execSync(`${windowsCallback}${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')}`, {
219219
env: {
220220
...process.env,

packages/core/src/js/NativeRNSentry.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Package } from '@sentry/core';
22
import type { TurboModule } from 'react-native';
33
import { TurboModuleRegistry } from 'react-native';
4-
54
import type { UnsafeObject } from './utils/rnlibrariesinterface';
65

76
// There has to be only one interface and it has to be named `Spec`

0 commit comments

Comments
 (0)