Skip to content

Commit 460e81e

Browse files
chore: rn 0.77 upgrade (#2973)
* chore: upgrade SampleApp and do necessary changes for 0.77 * chore: update more libs * chore: upgrade reanimated and rngh * chore: upgrade react-navigation * chore: bump other deps * chore: bump eslint and all other dev deps * chore: migrate AppDelegate to Swift * chore: upgrade typescript app to RN 0.77 * chore: upgrade eslint & friends on typescript app * chore: migrate AppDelegate to Swift in typescript app * fix: add tslint rules and fix some * chore: upgrade plugins decl a bit and fix all broken eslint issues * fix: some more prettier errors * chore: improve typescript app config too * fix: upload file/image and respect app settings (#2976) * fix: file upload preview state refresh when state changes * fix: upload file/image and respect app settings * fix: upload file/image and respect app settings * fix: upload file/image and respect app settings * fix: update expo dependencies in expo sample app to latest (#2975) * fix: file upload preview state refresh when state changes * fix: update expo dependencies in expo sample app to latest * chore: bump expo app to latest versions too * chore: remove console.log --------- Co-authored-by: Khushal Agarwal <[email protected]>
1 parent 765e15b commit 460e81e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6188
-6067
lines changed

examples/ExpoMessaging/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"eject": "expo eject"
1111
},
1212
"dependencies": {
13-
"@op-engineering/op-sqlite": "^11.4.2",
13+
"@op-engineering/op-sqlite": "^11.4.7",
1414
"@react-native-community/netinfo": "11.4.1",
1515
"@react-navigation/elements": "^1.3.30",
1616
"expo": "~52.0.36",
@@ -30,21 +30,21 @@
3030
"expo-status-bar": "~2.0.1",
3131
"react": "18.3.1",
3232
"react-dom": "18.3.1",
33-
"react-native": "0.76.7",
34-
"react-native-gesture-handler": "~2.20.2",
35-
"react-native-reanimated": "~3.16.1",
36-
"react-native-safe-area-context": "4.12.0",
37-
"react-native-screens": "~4.4.0",
38-
"react-native-svg": "15.8.0",
33+
"react-native": "0.77.1",
34+
"react-native-gesture-handler": "~2.24.0",
35+
"react-native-reanimated": "~3.16.7",
36+
"react-native-safe-area-context": "5.2.0",
37+
"react-native-screens": "~4.8.0",
38+
"react-native-svg": "15.11.1",
3939
"react-native-web": "~0.19.13",
4040
"stream-chat-expo": "link:../../package/expo-package",
4141
"stream-chat-react-native-core": "link:../../package",
42-
"typescript": "~5.3.3"
42+
"typescript": "~5.7.3"
4343
},
4444
"devDependencies": {
4545
"@babel/core": "^7.25.2",
46-
"@rnx-kit/metro-config": "^1.3.15",
47-
"@rnx-kit/metro-resolver-symlinks": "^0.1.35"
46+
"@rnx-kit/metro-config": "^2.0.1",
47+
"@rnx-kit/metro-resolver-symlinks": "^0.2.1"
4848
},
4949
"private": true
5050
}

examples/ExpoMessaging/yarn.lock

Lines changed: 465 additions & 189 deletions
Large diffs are not rendered by default.

examples/SampleApp/.eslintrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/SampleApp/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#
@@ -71,4 +72,4 @@ yarn-error.log
7172
!.yarn/plugins
7273
!.yarn/releases
7374
!.yarn/sdks
74-
!.yarn/versions
75+
!.yarn/versions

examples/SampleApp/App.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ThemeProvider,
1313
useOverlayContext,
1414
} from 'stream-chat-react-native';
15-
import messaging from '@react-native-firebase/messaging';
15+
import { getMessaging } from '@react-native-firebase/messaging';
1616
import notifee, { EventType } from '@notifee/react-native';
1717
import { AppContext } from './src/context/AppContext';
1818
import { AppOverlayProvider } from './src/context/AppOverlayProvider';
@@ -80,7 +80,8 @@ const App = () => {
8080
const streamChatTheme = useStreamChatTheme();
8181

8282
useEffect(() => {
83-
const unsubscribeOnNotificationOpen = messaging().onNotificationOpenedApp((remoteMessage) => {
83+
const messaging = getMessaging();
84+
const unsubscribeOnNotificationOpen = messaging.onNotificationOpenedApp((remoteMessage) => {
8485
// Notification caused app to open from background state on iOS
8586
const channelId = remoteMessage.data?.channel_id as string;
8687
if (channelId) {
@@ -106,7 +107,7 @@ const App = () => {
106107
}
107108
}
108109
});
109-
messaging()
110+
messaging
110111
.getInitialNotification()
111112
.then((remoteMessage) => {
112113
if (remoteMessage) {
@@ -138,6 +139,7 @@ const App = () => {
138139
...(colorScheme === 'dark' ? DarkTheme : DefaultTheme).colors,
139140
background: streamChatTheme.colors?.white_snow || '#FCFCFC',
140141
},
142+
fonts: (colorScheme === 'dark' ? DarkTheme : DefaultTheme).fonts,
141143
dark: colorScheme === 'dark',
142144
}}
143145
>
@@ -181,7 +183,7 @@ const DrawerNavigatorWrapper: React.FC<{
181183
<Chat<StreamChatGenerics>
182184
client={chatClient}
183185
enableOfflineSupport
184-
// @ts-expect-error
186+
// @ts-expect-error - the `ImageComponent` prop is generic, meaning we can expect an error
185187
ImageComponent={FastImage}
186188
isMessageAIGenerated={(message: MessageType) => !!message.ai_generated}
187189
>

examples/SampleApp/Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ GEM
7878
colored2 (3.1.2)
7979
commander (4.6.0)
8080
highline (~> 2.0.0)
81-
concurrent-ruby (1.3.4)
81+
concurrent-ruby (1.2.3)
8282
declarative (0.0.20)
8383
digest-crc (0.6.5)
8484
rake (>= 12.0.0, < 14.0.0)
@@ -317,6 +317,7 @@ PLATFORMS
317317
DEPENDENCIES
318318
activesupport (>= 6.1.7.5, != 7.1.0)
319319
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
320+
concurrent-ruby (< 1.3.4)
320321
fastlane
321322
fastlane-plugin-firebase_app_distribution
322323
fastlane-plugin-load_json

examples/SampleApp/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ def enableProguardInReleaseBuilds = false
6565
* The preferred build flavor of JavaScriptCore (JSC)
6666
*
6767
* For example, to use the international variant, you can use:
68-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
68+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
6969
*
7070
* The international variant includes ICU i18n library and necessary data
7171
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
7272
* give correct results when using with locales other than en-US. Note that
7373
* this variant is about 6MiB larger per architecture than default.
7474
*/
75-
def jscFlavor = 'org.webkit:android-jsc:+'
75+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
7676

7777
android {
7878
ndkVersion rootProject.ext.ndkVersion

examples/SampleApp/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ buildscript {
66
buildToolsVersion = "35.0.0"
77
minSdkVersion = 24
88
compileSdkVersion = 35
9-
targetSdkVersion = 34
10-
ndkVersion = "26.1.10909125"
11-
kotlinVersion = "1.9.25"
9+
targetSdkVersion = 35
10+
ndkVersion = "27.1.12297006"
11+
kotlinVersion = "2.0.21"
1212
androidXCore = "1.0.2"
1313
}
1414
repositories {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
7-
zipStorePath=wrapper/dists
7+
zipStorePath=wrapper/dists

examples/SampleApp/android/gradlew

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -249,4 +248,4 @@ eval "set -- $(
249248
tr '\n' ' '
250249
)" '"$@"'
251250

252-
exec "$JAVACMD" "$@"
251+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)