Skip to content

Commit 1018b14

Browse files
committed
Bump core to 0.80
1 parent 0b64753 commit 1018b14

File tree

10 files changed

+171
-123
lines changed

10 files changed

+171
-123
lines changed

packages/core/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,19 @@
7676
"@sentry/types": "10.17.0"
7777
},
7878
"devDependencies": {
79-
"@babel/core": "^7.25.2",
79+
"@babel/core": "^7.26.7",
8080
"@expo/metro-config": "~0.20.0",
8181
"@mswjs/interceptors": "^0.25.15",
82-
"@react-native/babel-preset": "0.77.1",
82+
"@react-native/babel-preset": "0.80.0",
8383
"@sentry-internal/eslint-config-sdk": "10.17.0",
8484
"@sentry-internal/eslint-plugin-sdk": "10.17.0",
8585
"@sentry-internal/typescript": "10.17.0",
8686
"@sentry/wizard": "6.5.0",
87-
"@testing-library/react-native": "^12.7.2",
87+
"@testing-library/react-native": "^13.2.2",
8888
"@types/jest": "^29.5.13",
8989
"@types/node": "^20.9.3",
90-
"@types/react": "^18.2.64",
90+
"@types/react": "^19.1.0",
91+
"@types/react-test-renderer": "^19.1.0",
9192
"@types/uglify-js": "^3.17.2",
9293
"@types/uuid": "^9.0.4",
9394
"@types/xmlhttprequest": "^1.8.2",
@@ -102,14 +103,15 @@
102103
"eslint-plugin-react-native": "^3.8.1",
103104
"expo": "^53.0.0",
104105
"expo-module-scripts": "3.1.0",
105-
"jest": "^29.6.2",
106+
"jest": "^29.6.3",
106107
"jest-environment-jsdom": "^29.6.2",
107108
"jest-extended": "^4.0.2",
108109
"madge": "^6.1.0",
109110
"metro": "0.83.1",
110111
"prettier": "^2.0.5",
111-
"react": "18.3.1",
112-
"react-native": "0.77.1",
112+
"react": "19.1.0",
113+
"react-native": "0.80.1",
114+
"react-test-renderer": "19.1.0",
113115
"rimraf": "^4.1.1",
114116
"ts-jest": "^29.3.1",
115117
"typescript": "4.9.5",

packages/core/src/js/RNSentryReplayMaskNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HostComponent, ViewProps } from 'react-native';
22
// The default export exists in the file but eslint doesn't see it
33
// eslint-disable-next-line import/default
4-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4+
import { codegenNativeComponent } from 'react-native';
55

66
// If changed to type NativeProps = ViewProps, react native codegen will fail finding the NativeProps type
77
// eslint-disable-next-line @typescript-eslint/no-empty-interface

packages/core/src/js/RNSentryReplayUnmaskNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HostComponent, ViewProps } from 'react-native';
22
// The default export exists in the file but eslint doesn't see it
33
// eslint-disable-next-line import/default
4-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4+
import { codegenNativeComponent } from 'react-native';
55

66
// If changed to type NativeProps = ViewProps, react native codegen will fail finding the NativeProps type
77
// eslint-disable-next-line @typescript-eslint/no-empty-interface

packages/core/test/feedback/FeedbackWidgetManager.test.tsx

Lines changed: 80 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { debug, getClient, setCurrentClient } from '@sentry/core';
2-
import { render } from '@testing-library/react-native';
2+
import { act, render, waitFor } from '@testing-library/react-native';
33
import * as React from 'react';
44
import { Appearance, Text } from 'react-native';
55
import { defaultConfiguration } from '../../src/js/feedback/defaults';
@@ -33,7 +33,7 @@ describe('FeedbackWidgetManager', () => {
3333
resetFeedbackWidgetManager();
3434
});
3535

36-
it('showFeedbackWidget displays the form when FeedbackWidgetProvider is used', () => {
36+
it('showFeedbackWidget displays the form when FeedbackWidgetProvider is used', async () => {
3737
mockedIsModalSupported.mockReturnValue(true);
3838
const { getByText, getByTestId } = render(
3939
<FeedbackWidgetProvider>
@@ -43,7 +43,9 @@ describe('FeedbackWidgetManager', () => {
4343

4444
showFeedbackWidget();
4545

46-
expect(getByTestId('feedback-form-modal')).toBeTruthy();
46+
await waitFor(() => {
47+
expect(getByTestId('feedback-form-modal')).toBeTruthy();
48+
});
4749
expect(getByText('App Components')).toBeTruthy();
4850
});
4951

@@ -70,7 +72,7 @@ describe('FeedbackWidgetManager', () => {
7072
}).not.toThrow();
7173
});
7274

73-
it('showFeedbackWidget displays the form with the feedbackIntegration options', () => {
75+
it('showFeedbackWidget displays the form with the feedbackIntegration options', async () => {
7476
mockedIsModalSupported.mockReturnValue(true);
7577
const { getByPlaceholderText, getByText } = render(
7678
<FeedbackWidgetProvider>
@@ -86,11 +88,13 @@ describe('FeedbackWidgetManager', () => {
8688

8789
showFeedbackWidget();
8890

89-
expect(getByPlaceholderText('Custom Message Placeholder')).toBeTruthy();
91+
await waitFor(() => {
92+
expect(getByPlaceholderText('Custom Message Placeholder')).toBeTruthy();
93+
});
9094
expect(getByText('Custom Submit Button')).toBeTruthy();
9195
});
9296

93-
it('showFeedbackWidget displays the form with the feedbackIntegration options merged with the defaults', () => {
97+
it('showFeedbackWidget displays the form with the feedbackIntegration options merged with the defaults', async () => {
9498
mockedIsModalSupported.mockReturnValue(true);
9599
const { getByPlaceholderText, getByText, queryByText } = render(
96100
<FeedbackWidgetProvider>
@@ -105,8 +109,10 @@ describe('FeedbackWidgetManager', () => {
105109

106110
showFeedbackWidget();
107111

108-
expect(queryByText(defaultConfiguration.submitButtonLabel)).toBeFalsy(); // overridden value
109-
expect(getByText('Custom Submit Button')).toBeTruthy(); // overridden value
112+
await waitFor(() => {
113+
expect(queryByText(defaultConfiguration.submitButtonLabel)).toBeFalsy(); // overridden value
114+
expect(getByText('Custom Submit Button')).toBeTruthy(); // overridden value
115+
});
110116
expect(getByPlaceholderText(defaultConfiguration.messagePlaceholder)).toBeTruthy(); // default configuration value
111117
});
112118

@@ -161,7 +167,7 @@ describe('FeedbackButtonManager', () => {
161167
});
162168
});
163169

164-
it('showFeedbackButton displays the button when FeedbackWidgetProvider is used', () => {
170+
it('showFeedbackButton displays the button when FeedbackWidgetProvider is used', async () => {
165171
const { getByText } = render(
166172
<FeedbackWidgetProvider>
167173
<Text>App Components</Text>
@@ -170,7 +176,9 @@ describe('FeedbackButtonManager', () => {
170176

171177
showFeedbackButton();
172178

173-
expect(getByText('Report a Bug')).toBeTruthy();
179+
await waitFor(() => {
180+
expect(getByText('Report a Bug')).toBeTruthy();
181+
})
174182
});
175183

176184
it('hideFeedbackButton hides the button', () => {
@@ -216,7 +224,7 @@ describe('FeedbackButtonManager', () => {
216224
expect(getClient().getIntegrationByName(AUTO_INJECT_FEEDBACK_BUTTON_INTEGRATION_NAME)).toBeDefined();
217225
});
218226

219-
it('the Feedback Widget matches the snapshot with default configuration and system light theme', () => {
227+
it('the Feedback Widget matches the snapshot with default configuration and system light theme', async () => {
220228
mockedIsModalSupported.mockReturnValue(true);
221229
const { toJSON } = render(
222230
<FeedbackWidgetProvider>
@@ -226,12 +234,14 @@ describe('FeedbackButtonManager', () => {
226234

227235
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
228236

229-
showFeedbackWidget();
237+
await act(async () => {
238+
showFeedbackWidget();
239+
});
230240

231241
expect(toJSON()).toMatchSnapshot();
232242
});
233243

234-
it('the Feedback Widget matches the snapshot with default configuration and system dark theme', () => {
244+
it('the Feedback Widget matches the snapshot with default configuration and system dark theme', async () => {
235245
mockedIsModalSupported.mockReturnValue(true);
236246
const { toJSON } = render(
237247
<FeedbackWidgetProvider>
@@ -241,12 +251,14 @@ describe('FeedbackButtonManager', () => {
241251

242252
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
243253

244-
showFeedbackWidget();
254+
await act(async () => {
255+
showFeedbackWidget();
256+
});
245257

246258
expect(toJSON()).toMatchSnapshot();
247259
});
248260

249-
it('the Feedback Widget matches the snapshot with default configuration and dynamically changed theme', () => {
261+
it('the Feedback Widget matches the snapshot with default configuration and dynamically changed theme', async () => {
250262
const component = (
251263
<FeedbackWidgetProvider>
252264
<Text>App Components</Text>
@@ -258,15 +270,19 @@ describe('FeedbackButtonManager', () => {
258270

259271
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
260272

261-
showFeedbackWidget();
273+
await act(async () => {
274+
showFeedbackWidget();
275+
});
262276

263277
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
264-
listener({ colorScheme: 'dark' });
278+
await act(async () => {
279+
listener({ colorScheme: 'dark' });
280+
})
265281

266282
expect(toJSON()).toMatchSnapshot();
267283
});
268284

269-
it('the Feedback Widget matches the snapshot with custom light theme', () => {
285+
it('the Feedback Widget matches the snapshot with custom light theme', async () => {
270286
mockedIsModalSupported.mockReturnValue(true);
271287
const { toJSON } = render(
272288
<FeedbackWidgetProvider>
@@ -283,12 +299,14 @@ describe('FeedbackButtonManager', () => {
283299
});
284300
getClient()?.addIntegration(integration);
285301

286-
showFeedbackWidget();
302+
await act(async () => {
303+
showFeedbackWidget();
304+
});
287305

288306
expect(toJSON()).toMatchSnapshot();
289307
});
290308

291-
it('the Feedback Widget matches the snapshot with custom dark theme', () => {
309+
it('the Feedback Widget matches the snapshot with custom dark theme', async () => {
292310
mockedIsModalSupported.mockReturnValue(true);
293311
const { toJSON } = render(
294312
<FeedbackWidgetProvider>
@@ -305,12 +323,14 @@ describe('FeedbackButtonManager', () => {
305323
});
306324
getClient()?.addIntegration(integration);
307325

308-
showFeedbackWidget();
326+
await act(async () => {
327+
showFeedbackWidget();
328+
});
309329

310330
expect(toJSON()).toMatchSnapshot();
311331
});
312332

313-
it('the Feedback Widget matches the snapshot with system light custom theme', () => {
333+
it('the Feedback Widget matches the snapshot with system light custom theme', async () => {
314334
mockedIsModalSupported.mockReturnValue(true);
315335
const { toJSON } = render(
316336
<FeedbackWidgetProvider>
@@ -329,12 +349,14 @@ describe('FeedbackButtonManager', () => {
329349

330350
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
331351

332-
showFeedbackWidget();
352+
await act(async () => {
353+
showFeedbackWidget();
354+
});
333355

334356
expect(toJSON()).toMatchSnapshot();
335357
});
336358

337-
it('the Feedback Widget matches the snapshot with system dark custom theme', () => {
359+
it('the Feedback Widget matches the snapshot with system dark custom theme', async () => {
338360
mockedIsModalSupported.mockReturnValue(true);
339361
const { toJSON } = render(
340362
<FeedbackWidgetProvider>
@@ -353,12 +375,14 @@ describe('FeedbackButtonManager', () => {
353375

354376
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
355377

356-
showFeedbackWidget();
378+
await act(async () => {
379+
showFeedbackWidget();
380+
});
357381

358382
expect(toJSON()).toMatchSnapshot();
359383
});
360384

361-
it('the Feedback Button matches the snapshot with default configuration and system light theme', () => {
385+
it('the Feedback Button matches the snapshot with default configuration and system light theme', async () => {
362386
mockedIsModalSupported.mockReturnValue(true);
363387
const { toJSON } = render(
364388
<FeedbackWidgetProvider>
@@ -368,12 +392,14 @@ describe('FeedbackButtonManager', () => {
368392

369393
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
370394

371-
showFeedbackButton();
395+
await act(async () => {
396+
showFeedbackButton();
397+
})
372398

373399
expect(toJSON()).toMatchSnapshot();
374400
});
375401

376-
it('the Feedback Button matches the snapshot with default configuration and system dark theme', () => {
402+
it('the Feedback Button matches the snapshot with default configuration and system dark theme', async () => {
377403
mockedIsModalSupported.mockReturnValue(true);
378404
const { toJSON } = render(
379405
<FeedbackWidgetProvider>
@@ -383,12 +409,14 @@ describe('FeedbackButtonManager', () => {
383409

384410
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
385411

386-
showFeedbackButton();
412+
await act(async () => {
413+
showFeedbackButton();
414+
});
387415

388416
expect(toJSON()).toMatchSnapshot();
389417
});
390418

391-
it('the Feedback Button matches the snapshot with default configuration and dynamically changed theme', () => {
419+
it('the Feedback Button matches the snapshot with default configuration and dynamically changed theme', async () => {
392420
const component = (
393421
<FeedbackWidgetProvider>
394422
<Text>App Components</Text>
@@ -400,15 +428,19 @@ describe('FeedbackButtonManager', () => {
400428

401429
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
402430

403-
showFeedbackButton();
431+
await act(async () => {
432+
showFeedbackButton();
433+
});
404434

405435
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
406-
listener({ colorScheme: 'dark' });
436+
await act(async () => {
437+
listener({ colorScheme: 'dark' });
438+
});
407439

408440
expect(toJSON()).toMatchSnapshot();
409441
});
410442

411-
it('the Feedback Button matches the snapshot with custom light theme', () => {
443+
it('the Feedback Button matches the snapshot with custom light theme', async () => {
412444
mockedIsModalSupported.mockReturnValue(true);
413445
const { toJSON } = render(
414446
<FeedbackWidgetProvider>
@@ -425,12 +457,14 @@ describe('FeedbackButtonManager', () => {
425457
});
426458
getClient()?.addIntegration(integration);
427459

428-
showFeedbackButton();
460+
await act(async () => {
461+
showFeedbackButton();
462+
});
429463

430464
expect(toJSON()).toMatchSnapshot();
431465
});
432466

433-
it('the Feedback Button matches the snapshot with custom dark theme', () => {
467+
it('the Feedback Button matches the snapshot with custom dark theme', async () => {
434468
mockedIsModalSupported.mockReturnValue(true);
435469
const { toJSON } = render(
436470
<FeedbackWidgetProvider>
@@ -447,12 +481,14 @@ describe('FeedbackButtonManager', () => {
447481
});
448482
getClient()?.addIntegration(integration);
449483

450-
showFeedbackButton();
484+
await act(async () => {
485+
showFeedbackButton();
486+
});
451487

452488
expect(toJSON()).toMatchSnapshot();
453489
});
454490

455-
it('the Feedback Button matches the snapshot with system light custom theme', () => {
491+
it('the Feedback Button matches the snapshot with system light custom theme', async () => {
456492
mockedIsModalSupported.mockReturnValue(true);
457493
const { toJSON } = render(
458494
<FeedbackWidgetProvider>
@@ -471,12 +507,14 @@ describe('FeedbackButtonManager', () => {
471507

472508
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('light');
473509

474-
showFeedbackButton();
510+
await act(async () => {
511+
showFeedbackButton();
512+
});
475513

476514
expect(toJSON()).toMatchSnapshot();
477515
});
478516

479-
it('the Feedback Button matches the snapshot with system dark custom theme', () => {
517+
it('the Feedback Button matches the snapshot with system dark custom theme', async () => {
480518
mockedIsModalSupported.mockReturnValue(true);
481519
const { toJSON } = render(
482520
<FeedbackWidgetProvider>
@@ -495,7 +533,9 @@ describe('FeedbackButtonManager', () => {
495533

496534
jest.spyOn(Appearance, 'getColorScheme').mockReturnValue('dark');
497535

498-
showFeedbackButton();
536+
await act(async () => {
537+
showFeedbackButton();
538+
});
499539

500540
expect(toJSON()).toMatchSnapshot();
501541
});

0 commit comments

Comments
 (0)