Skip to content

Commit 269dd99

Browse files
committed
chore: add compatibility for RN 0.79
1 parent 69bbbe6 commit 269dd99

File tree

10 files changed

+1605
-1099
lines changed

10 files changed

+1605
-1099
lines changed

package/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (api) => {
1010
},
1111
],
1212
plugins: ['module-resolver', 'react-native-reanimated/plugin'],
13-
presets: ['@babel/env', 'module:@react-native/babel-preset', '@babel/preset-typescript'],
13+
presets: ['module:@react-native/babel-preset'],
1414
};
1515
}
1616

@@ -33,6 +33,6 @@ module.exports = (api) => {
3333
},
3434
],
3535
plugins: ['module-resolver'],
36-
presets: ['@babel/env', 'module:@react-native/babel-preset', '@babel/preset-typescript'],
36+
presets: ['module:@react-native/babel-preset'],
3737
};
3838
};

package/package.json

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@
6666
]
6767
},
6868
"dependencies": {
69-
"@gorhom/bottom-sheet": "^5.1.1",
70-
"dayjs": "1.10.5",
71-
"emoji-regex": "^10.3.0",
72-
"i18next": "^21.6.14",
69+
"@gorhom/bottom-sheet": "^5.1.6",
70+
"dayjs": "1.11.13",
71+
"emoji-regex": "^10.4.0",
72+
"i18next": "^21.10.0",
7373
"intl-pluralrules": "^2.0.1",
74-
"linkifyjs": "^4.1.1",
74+
"linkifyjs": "^4.3.1",
7575
"lodash-es": "4.17.21",
76-
"mime-types": "^2.1.34",
76+
"mime-types": "^2.1.35",
7777
"path": "0.12.7",
7878
"react-native-markdown-package": "1.8.2",
79-
"react-native-url-polyfill": "^1.3.0",
80-
"stream-chat": "^9.3.0",
81-
"use-sync-external-store": "^1.4.0"
79+
"react-native-url-polyfill": "^2.0.0",
80+
"stream-chat": "^9.5.1",
81+
"use-sync-external-store": "^1.5.0"
8282
},
8383
"peerDependencies": {
8484
"@op-engineering/op-sqlite": ">=9.3.0",
@@ -94,66 +94,57 @@
9494
}
9595
},
9696
"devDependencies": {
97-
"@babel/cli": "^7.26.4",
98-
"@babel/core": "^7.26.9",
99-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
100-
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
101-
"@babel/plugin-transform-arrow-functions": "^7.25.9",
102-
"@babel/plugin-transform-shorthand-properties": "^7.25.9",
103-
"@babel/plugin-transform-template-literals": "^7.26.8",
104-
"@babel/preset-env": "7.26.9",
105-
"@babel/preset-typescript": "7.26.0",
106-
"@babel/runtime": "^7.26.9",
107-
"@op-engineering/op-sqlite": "^11.4.8",
97+
"@babel/core": "^7.27.4",
98+
"@babel/runtime": "^7.27.6",
99+
"@op-engineering/op-sqlite": "^14.0.3",
108100
"@react-native-community/eslint-config": "3.2.0",
109101
"@react-native-community/eslint-plugin": "1.3.0",
110102
"@react-native-community/netinfo": "^11.4.1",
111-
"@react-native/babel-preset": "0.78.0",
103+
"@react-native/babel-preset": "0.79.3",
112104
"@testing-library/jest-native": "^5.4.3",
113-
"@testing-library/react-native": "13.1.0",
114-
"@types/better-sqlite3": "^7.6.12",
105+
"@testing-library/react-native": "13.2.0",
106+
"@types/better-sqlite3": "^7.6.13",
115107
"@types/eslint": "9.6.1",
116108
"@types/jest": "^29.5.14",
117109
"@types/linkify-it": "5.0.0",
118110
"@types/lodash": "4.17.16",
119111
"@types/mime-types": "2.1.4",
120112
"@types/react": "^19.0.0",
121113
"@types/react-test-renderer": "19.0.0",
122-
"@types/use-sync-external-store": "^0.0.6",
114+
"@types/use-sync-external-store": "^1.5.0",
123115
"@types/uuid": "^10.0.0",
124116
"babel-eslint": "10.1.0",
125117
"babel-jest": "29.7.0",
126118
"babel-loader": "10.0.0",
127119
"babel-plugin-module-resolver": "5.0.2",
128-
"better-sqlite3": "11.8.1",
129-
"eslint": "^9.20.1",
130-
"eslint-config-prettier": "10.0.2",
120+
"better-sqlite3": "11.10.0",
121+
"eslint": "^9.28.0",
122+
"eslint-config-prettier": "10.1.5",
131123
"eslint-plugin-eslint-comments": "^3.2.0",
132124
"eslint-plugin-import": "^2.31.0",
133-
"eslint-plugin-jest": "^28.11.0",
125+
"eslint-plugin-jest": "^28.13.3",
134126
"eslint-plugin-markdown": "5.1.0",
135-
"eslint-plugin-prettier": "5.2.3",
136-
"eslint-plugin-react": "^7.37.4",
127+
"eslint-plugin-prettier": "5.4.1",
128+
"eslint-plugin-react": "^7.37.5",
137129
"eslint-plugin-react-hooks": "^5.2.0",
138130
"eslint-plugin-react-native": "^5.0.0",
139131
"i18next-parser": "^9.3.0",
140-
"jest": "^29.7.0",
141-
"moment-timezone": "^0.5.47",
132+
"jest": "^30.0.0",
133+
"moment-timezone": "^0.6.0",
142134
"prettier": "^3.5.3",
143135
"react": "19.0.0",
144-
"react-native": "0.78.0",
145-
"react-native-builder-bob": "0.37.0",
146-
"react-native-gesture-handler": "~2.24.0",
147-
"react-native-reanimated": "~3.17.1",
148-
"react-native-svg": "15.11.2",
136+
"react-native": "0.79.3",
137+
"react-native-builder-bob": "0.40.11",
138+
"react-native-gesture-handler": "^2.25.0",
139+
"react-native-reanimated": "3.18.0",
140+
"react-native-svg": "15.12.0",
149141
"react-test-renderer": "19.0.0",
150142
"rimraf": "^6.0.1",
151-
"typescript": "5.8.2",
152-
"typescript-eslint": "^8.29.0",
143+
"typescript": "5.8.3",
144+
"typescript-eslint": "^8.34.0",
153145
"uuid": "^11.1.0"
154146
},
155147
"resolutions": {
156-
"@types/react": "^19.0.0",
157-
"@babel/runtime": "^7.26.9"
148+
"@types/react": "^19.0.0"
158149
}
159150
}

package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { generateMessage } from '../../../mock-builders/generator/message';
2323
import { ImageGallery } from '../ImageGallery';
2424

2525
jest.mock('../../../native.ts', () => {
26-
const View = require('react-native/Libraries/Components/View/View');
26+
const { View } = require('react-native');
2727
return {
2828
isFileSystemAvailable: jest.fn(() => true),
2929
isImageMediaLibraryAvailable: jest.fn(() => true),

package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { NativeHandlers } from '../../../native';
2525
import { ImageGallery, ImageGalleryCustomComponents } from '../ImageGallery';
2626

2727
jest.mock('../../../native.ts', () => {
28-
const View = require('react-native/Libraries/Components/View/View');
28+
const { View } = require('react-native');
2929
return {
3030
isFileSystemAvailable: jest.fn(() => true),
3131
isImageMediaLibraryAvailable: jest.fn(() => true),

package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { getTestClientWithUser } from '../../../mock-builders/mock';
2929
import { ImageGallery, ImageGalleryCustomComponents } from '../ImageGallery';
3030

3131
jest.mock('../../../native.ts', () => {
32-
const View = require('react-native/Libraries/Components/View/View');
32+
const { View } = require('react-native');
3333
return {
3434
isFileSystemAvailable: jest.fn(() => true),
3535
isImageMediaLibraryAvailable: jest.fn(() => true),

package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ import { AudioAttachment, AudioAttachmentProps } from '../../Attachment/AudioAtt
1717

1818
jest.mock('../../../native.ts', () => ({
1919
isSoundPackageAvailable: jest.fn(() => true),
20-
Sound: {
21-
initializeSound: jest.fn(),
22-
Player: null,
20+
NativeHandlers: {
21+
SDK: 'stream-chat-expo',
22+
Sound: {
23+
initializeSound: jest.fn(),
24+
Player: null,
25+
},
2326
},
2427
}));
2528

26-
jest.mock('react-native/Libraries/ReactNative/I18nManager', () => ({
27-
isRTL: true,
28-
}));
29-
3029
const getComponent = (
3130
props: Partial<AudioAttachmentProps & Pick<MessageInputContextValue, 'fileUploads'>>,
3231
) => (

package/src/components/MessageInput/__tests__/FileUploadPreview.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function MockedFlatList(props) {
2626
}
2727

2828
jest.mock('../../../native.ts', () => {
29-
const View = require('react-native/Libraries/Components/View/View');
29+
const { View } = require('react-native');
3030

3131
return {
3232
isAudioRecorderAvailable: jest.fn(() => true),

package/src/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const AudioRecordingLockIndicator = ({
3131
style,
3232
}: AudioRecordingLockIndicatorProps) => {
3333
const [visible, setVisible] = useState(true);
34-
const timeoutRef = useRef<NodeJS.Timeout>(undefined);
34+
const timeoutRef = useRef<number>(undefined);
3535

3636
useEffect(() => {
3737
timeoutRef.current = setTimeout(() => {

package/src/components/Poll/CreatePollContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export const CreatePoll = ({
250250
const createAndSendPoll = useCallback(
251251
async (pollData: CreatePollData) => {
252252
const poll = await client.polls.createPoll(pollData);
253-
await sendMessage({ customMessageData: { poll_id: poll.id } });
253+
await sendMessage({ customMessageData: { poll_id: poll?.id } });
254254
closePollCreationDialog?.();
255255
},
256256
[client, sendMessage, closePollCreationDialog],

0 commit comments

Comments
 (0)