Skip to content

Commit 73b8063

Browse files
github-actions[bot]web-flowantonis
authored
chore(deps): update JavaScript SDK to v10.17.0 (#5195)
* chore: update scripts/update-javascript.sh to 10.17.0 * chore(lint): fix @typescript-eslint/no-unnecessary-type-assertion (#5228) --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Antonis Lilis <[email protected]>
1 parent bfe454a commit 73b8063

File tree

18 files changed

+136
-132
lines changed

18 files changed

+136
-132
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
- Bump CLI from v2.55.0 to v2.56.0 ([#5223](https://github.com/getsentry/sentry-react-native/pull/5223))
2424
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2560)
2525
- [diff](https://github.com/getsentry/sentry-cli/compare/2.55.0...2.56.0)
26+
- Bump JavaScript SDK from v10.12.0 to v10.17.0 ([#5195](https://github.com/getsentry/sentry-react-native/pull/5195))
27+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#10170)
28+
- [diff](https://github.com/getsentry/sentry-javascript/compare/10.12.0...10.17.0)
2629

2730
## 7.2.0
2831

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": "10.12.0",
16+
"@sentry/core": "10.17.0",
1717
"@sentry/react-native": "7.2.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",

packages/core/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@
6969
},
7070
"dependencies": {
7171
"@sentry/babel-plugin-component-annotate": "4.3.0",
72-
"@sentry/browser": "10.12.0",
72+
"@sentry/browser": "10.17.0",
7373
"@sentry/cli": "2.56.0",
74-
"@sentry/core": "10.12.0",
75-
"@sentry/react": "10.12.0",
76-
"@sentry/types": "10.12.0"
74+
"@sentry/core": "10.17.0",
75+
"@sentry/react": "10.17.0",
76+
"@sentry/types": "10.17.0"
7777
},
7878
"devDependencies": {
7979
"@babel/core": "^7.25.2",
8080
"@expo/metro-config": "~0.20.0",
8181
"@mswjs/interceptors": "^0.25.15",
8282
"@react-native/babel-preset": "0.77.1",
83-
"@sentry-internal/eslint-config-sdk": "10.12.0",
84-
"@sentry-internal/eslint-plugin-sdk": "10.12.0",
85-
"@sentry-internal/typescript": "10.12.0",
83+
"@sentry-internal/eslint-config-sdk": "10.17.0",
84+
"@sentry-internal/eslint-plugin-sdk": "10.17.0",
85+
"@sentry-internal/typescript": "10.17.0",
8686
"@sentry/wizard": "6.5.0",
8787
"@testing-library/react-native": "^12.7.2",
8888
"@types/jest": "^29.5.13",

packages/core/src/js/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class ReactNativeClient extends Client<ReactNativeClientOptions> {
116116
public close(): PromiseLike<boolean> {
117117
// As super.close() flushes queued events, we wait for that to finish before closing the native SDK.
118118
return super.close().then((result: boolean) => {
119-
return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;
119+
return NATIVE.closeNativeSdk().then(() => result);
120120
});
121121
}
122122

packages/core/src/js/touchevents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function getFileName(props: Record<string, unknown>): string | undefined {
283283

284284
function getLabelValue(props: Record<string, unknown>, labelKey: string | undefined): string | undefined {
285285
return typeof props[SENTRY_LABEL_PROP_KEY] === 'string' && props[SENTRY_LABEL_PROP_KEY].length > 0
286-
? props[SENTRY_LABEL_PROP_KEY] as string
286+
? props[SENTRY_LABEL_PROP_KEY]
287287
// For some reason type narrowing doesn't work as expected with indexing when checking it all in one go in
288288
// the "check-label" if sentence, so we have to assign it to a variable here first
289289
: typeof labelKey === 'string' && typeof props[labelKey] == 'string' && (props[labelKey] as string).length > 0

packages/core/src/js/tracing/reactnativetracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,5 @@ export function getCurrentReactNativeTracingIntegration(): ReactNativeTracingInt
172172
* Returns React Native Tracing integration of given client.
173173
*/
174174
export function getReactNativeTracingIntegration(client: Client): ReactNativeTracingIntegration | undefined {
175-
return client.getIntegrationByName(INTEGRATION_NAME) as ReactNativeTracingIntegration | undefined;
175+
return client.getIntegrationByName(INTEGRATION_NAME);
176176
}

packages/core/src/js/tracing/reactnavigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const reactNavigationIntegration = ({
177177
debug.log(`${INTEGRATION_NAME} Navigation container ref is the same as the one already registered.`);
178178
return;
179179
}
180-
navigationContainer = newNavigationContainer as NavigationContainer;
180+
navigationContainer = newNavigationContainer;
181181

182182
if (!navigationContainer) {
183183
debug.warn(`${INTEGRATION_NAME} Received invalid navigation container ref!`);

packages/core/src/js/wrapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export const NATIVE: SentryNativeWrapper = {
259259
throw this._NativeClientError;
260260
}
261261
const ignoreErrorsStr = options.ignoreErrors?.filter(item => typeof item === 'string') as string[] | undefined;
262+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
262263
const ignoreErrorsRegex = options.ignoreErrors
263264
?.filter(item => item instanceof RegExp)
264265
.map(item => (item as RegExp).source) as string[] | undefined;

packages/core/test/integrations/logEnricherIntegration.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('LogEnricher Integration', () => {
161161
// Extract the log handler
162162
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
163163
expect(beforeCaptureLogCall).toBeDefined();
164-
logHandler = beforeCaptureLogCall![1] as (log: Log) => void;
164+
logHandler = beforeCaptureLogCall[1];
165165

166166
mockLog = {
167167
message: 'Test log message',
@@ -245,7 +245,7 @@ describe('LogEnricher Integration', () => {
245245

246246
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
247247
expect(beforeCaptureLogCall).toBeDefined();
248-
const newLogHandler = beforeCaptureLogCall![1] as (log: Log) => void;
248+
const newLogHandler = beforeCaptureLogCall[1];
249249

250250
newLogHandler(mockLog);
251251

@@ -291,7 +291,7 @@ describe('LogEnricher Integration', () => {
291291

292292
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
293293
expect(beforeCaptureLogCall).toBeDefined();
294-
const emptyLogHandler = beforeCaptureLogCall![1] as (log: Log) => void;
294+
const emptyLogHandler = beforeCaptureLogCall[1];
295295

296296
emptyLogHandler(mockLog);
297297

@@ -323,7 +323,7 @@ describe('LogEnricher Integration', () => {
323323

324324
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
325325
expect(beforeCaptureLogCall).toBeDefined();
326-
const partialLogHandler = beforeCaptureLogCall![1] as (log: Log) => void;
326+
const partialLogHandler = beforeCaptureLogCall[1];
327327

328328
partialLogHandler(mockLog);
329329

@@ -357,7 +357,7 @@ describe('LogEnricher Integration', () => {
357357

358358
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
359359
expect(beforeCaptureLogCall).toBeDefined();
360-
const partialLogHandler = beforeCaptureLogCall![1] as (log: Log) => void;
360+
const partialLogHandler = beforeCaptureLogCall[1];
361361

362362
partialLogHandler(mockLog);
363363

@@ -447,7 +447,7 @@ describe('LogEnricher Integration', () => {
447447

448448
const beforeCaptureLogCall = mockOn.mock.calls.find(call => call[0] === 'beforeCaptureLog');
449449
expect(beforeCaptureLogCall).toBeDefined();
450-
logHandler = beforeCaptureLogCall![1] as (log: Log) => void;
450+
logHandler = beforeCaptureLogCall[1];
451451

452452
mockLog = {
453453
message: 'Test log message',

packages/core/test/tracing/addTracingExtensions.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Tracing extensions', () => {
1515
test('transaction has default op', async () => {
1616
const transaction = startSpanManual({ name: 'parent' }, span => span);
1717

18-
expect(spanToJSON(transaction!)).toEqual(
18+
expect(spanToJSON(transaction)).toEqual(
1919
expect.objectContaining({
2020
op: 'default',
2121
}),
@@ -25,7 +25,7 @@ describe('Tracing extensions', () => {
2525
test('transaction does not overwrite custom op', async () => {
2626
const transaction = startSpanManual({ name: 'parent', op: 'custom' }, span => span);
2727

28-
expect(spanToJSON(transaction!)).toEqual(
28+
expect(spanToJSON(transaction)).toEqual(
2929
expect.objectContaining({
3030
op: 'custom',
3131
}),
@@ -36,7 +36,7 @@ describe('Tracing extensions', () => {
3636
startSpanManual({ name: 'parent', scope: getCurrentScope() }, () => {});
3737
const span = startSpanManual({ name: 'child', scope: getCurrentScope() }, span => span);
3838

39-
expect(spanToJSON(span!)).toEqual(
39+
expect(spanToJSON(span)).toEqual(
4040
expect.objectContaining({
4141
op: 'default',
4242
}),
@@ -47,7 +47,7 @@ describe('Tracing extensions', () => {
4747
startSpanManual({ name: 'parent', op: 'custom', scope: getCurrentScope() }, () => {});
4848
const span = startSpanManual({ name: 'child', op: 'custom', scope: getCurrentScope() }, span => span);
4949

50-
expect(spanToJSON(span!)).toEqual(
50+
expect(spanToJSON(span)).toEqual(
5151
expect.objectContaining({
5252
op: 'custom',
5353
}),
@@ -60,22 +60,22 @@ describe('Tracing extensions', () => {
6060
childSpan = startSpanManual({ name: 'child', scope: getCurrentScope() }, __span => __span);
6161
return _span;
6262
});
63-
childSpan!.end();
64-
transaction!.end();
63+
childSpan.end();
64+
transaction.end();
6565

6666
await client.flush();
6767
expect(client.event).toEqual(
6868
expect.objectContaining({
6969
contexts: expect.objectContaining({
7070
trace: expect.objectContaining({
71-
trace_id: transaction!.spanContext().traceId,
71+
trace_id: transaction.spanContext().traceId,
7272
}),
7373
}),
7474
}),
7575
);
76-
expect(spanToJSON(childSpan!)).toEqual(
76+
expect(spanToJSON(childSpan)).toEqual(
7777
expect.objectContaining({
78-
parent_span_id: spanToJSON(transaction!).span_id,
78+
parent_span_id: spanToJSON(transaction).span_id,
7979
}),
8080
);
8181
});

0 commit comments

Comments
 (0)