Skip to content

Commit 2a55086

Browse files
peachbitsclaude
andcommitted
Upgrade to React Native 0.85.3 and Expo SDK 56
Move the app to React Native 0.85.3 / Expo SDK 56, with both platforms on reanimated v4 and the new architecture. Bumps the RN-ecosystem dependencies together and updates the jest preset, worklets resolver, and test snapshots. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4278437 commit 2a55086

60 files changed

Lines changed: 109554 additions & 4405 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.

app.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"name": "edge",
3-
"displayName": "edge"
3+
"displayName": "edge",
4+
"plugins": [
5+
"@react-native-community/datetimepicker",
6+
"@sentry/react-native"
7+
]
48
}

eslint.config.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default [
170170
'src/components/charts/SwipeChart.tsx',
171171

172172
'src/components/common/AnimatedNumber.tsx',
173-
'src/components/common/BlurBackground.tsx',
173+
174174
'src/components/common/CrossFade.tsx',
175175
'src/components/common/DotsBackground.tsx',
176176

@@ -184,7 +184,7 @@ export default [
184184
'src/components/FioAddress/FioActionSubmit.tsx',
185185
'src/components/FioAddress/FioName.tsx',
186186
'src/components/hoc/maybeComponent.tsx',
187-
'src/components/hoc/styled.tsx',
187+
188188
'src/components/hoc/withExtendedTouchable.tsx',
189189

190190
'src/components/icons/FiatIcon.tsx',
@@ -238,7 +238,7 @@ export default [
238238
'src/components/navigation/EdgeLogoHeader.tsx',
239239
'src/components/navigation/FlashNotification.tsx',
240240
'src/components/navigation/GuiPluginBackButton.tsx',
241-
'src/components/navigation/HeaderBackground.tsx',
241+
242242
'src/components/navigation/HeaderTextButton.tsx',
243243
'src/components/navigation/HeaderTitle.tsx',
244244
'src/components/navigation/NavigationButton.tsx',
@@ -361,12 +361,10 @@ export default [
361361
'src/components/themed/ExplorerCard.tsx',
362362
'src/components/themed/Fade.tsx',
363363

364-
'src/components/themed/FioRequestRow.tsx',
365-
366364
'src/components/themed/LineTextDivider.tsx',
367365
'src/components/themed/MainButton.tsx',
368366
'src/components/themed/ManageTokensRow.tsx',
369-
'src/components/themed/MenuTabs.tsx',
367+
370368
'src/components/themed/ModalParts.tsx',
371369
'src/components/themed/PinDots.tsx',
372370

@@ -494,7 +492,7 @@ export default [
494492
'src/styles/common/textStyles.tsx',
495493
'src/styles/common/textStylesThemed.ts',
496494
'src/types/reactRedux.ts',
497-
'src/util/borrowUtils.ts',
495+
498496
'src/util/cleaners.ts',
499497

500498
'src/util/crypto.ts',

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ module.exports = {
88
// We want the Node.js version of edge-core-js, not the RN one:
99
'edge-core-js': require.resolve('edge-core-js')
1010
},
11-
preset: 'react-native',
11+
preset: '@react-native/jest-preset',
12+
// Custom resolver: worklets -> non-native build (reanimated 4 jest crash), and
13+
// msw -> node export conditions (the RN preset's react-native condition nulls them).
14+
resolver: './scripts/jestResolver.js',
1215
setupFilesAfterEnv: ['./jestSetup.js'],
1316
transformIgnorePatterns: [
1417
'<rootDir>/node_modules/(?!(@react-native|react-native|@react-navigation|zcashname-sdk|@noble/ed25519))'

jestSetup.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ import mockSafeAreaContext from 'react-native-safe-area-context/jest/mock'
1212
jest.mock('@react-native-clipboard/clipboard', () => mockClipboard)
1313
jest.mock('react-native-permissions', () => mockPermissions)
1414
jest.mock('react-native-safe-area-context', () => mockSafeAreaContext)
15+
// Firebase 25 instantiates a native event emitter on import, which crashes in
16+
// jest. Mock messaging (the only firebase module the app imports) to the methods
17+
// the app uses.
18+
jest.mock('@react-native-firebase/messaging', () => {
19+
const messaging = () => ({
20+
getToken: jest.fn(async () => 'mock-device-token'),
21+
getInitialNotification: jest.fn(async () => null),
22+
onMessage: jest.fn(() => () => {}),
23+
onNotificationOpenedApp: jest.fn(() => () => {})
24+
})
25+
return { __esModule: true, default: messaging }
26+
})
1527
require('react-native-reanimated').setUpTests()
1628

1729
// --------------------------------------------------------------------
@@ -20,6 +32,10 @@ require('react-native-reanimated').setUpTests()
2032

2133
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter')
2234

35+
// The RN 0.85 jest preset returns undefined from Keyboard.addListener; return a
36+
// removable subscription so effect cleanups (showListener.remove()) don't throw.
37+
require('react-native').Keyboard.addListener = () => ({ remove: () => {} })
38+
2339
for (const log in global.console) {
2440
global.console[log] = jest.fn()
2541
}

0 commit comments

Comments
 (0)