Skip to content

Commit a06eebb

Browse files
committed
chore: update React Native and related packages to versions 0.80.3
1 parent f831156 commit a06eebb

11 files changed

Lines changed: 295 additions & 470 deletions

File tree

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RNIterable_kotlinVersion=2.0.21
1+
RNIterable_kotlinVersion=2.1.20
22
RNIterable_minSdkVersion=24
33
RNIterable_targetSdkVersion=35
44
RNIterable_compileSdkVersion=35

example/android/app/src/main/java/iterable/reactnativesdk/example/MainApplication.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import android.app.Application
44
import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
78
import com.facebook.react.ReactNativeHost
89
import com.facebook.react.ReactPackage
9-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
13-
import com.facebook.soloader.SoLoader
1412

1513
class MainApplication : Application(), ReactApplication {
1614

@@ -36,10 +34,6 @@ class MainApplication : Application(), ReactApplication {
3634

3735
override fun onCreate() {
3836
super.onCreate()
39-
SoLoader.init(this, OpenSourceMergedSoMapping)
40-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
41-
// If you opted-in for the New Architecture, we load the native entry point for this app.
42-
load()
43-
}
37+
loadReactNative(this)
4438
}
4539
}

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
compileSdkVersion = 35
66
targetSdkVersion = 35
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.0.21"
8+
kotlinVersion = "2.1.20"
99
}
1010
repositories {
1111
google()
252 Bytes
Binary file not shown.

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/gradlew.bat

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"@react-navigation/native": "^7.1.14",
1515
"@react-navigation/native-stack": "^7.0.0",
1616
"@react-navigation/stack": "^7.4.2",
17-
"react": "19.0.0",
18-
"react-native": "0.79.7",
17+
"react": "19.1.0",
18+
"react-native": "0.80.3",
1919
"react-native-gesture-handler": "^2.26.0",
2020
"react-native-safe-area-context": "^5.4.0",
2121
"react-native-screens": "^4.10.0",
@@ -25,19 +25,19 @@
2525
"@babel/core": "^7.25.2",
2626
"@babel/preset-env": "^7.25.3",
2727
"@babel/runtime": "^7.25.0",
28-
"@react-native-community/cli": "18.0.1",
29-
"@react-native-community/cli-platform-android": "18.0.0",
30-
"@react-native-community/cli-platform-ios": "18.0.0",
31-
"@react-native/babel-preset": "0.79.7",
32-
"@react-native/eslint-config": "0.79.7",
33-
"@react-native/metro-config": "0.79.7",
34-
"@react-native/typescript-config": "0.79.7",
28+
"@react-native-community/cli": "19.1.2",
29+
"@react-native-community/cli-platform-android": "19.1.2",
30+
"@react-native-community/cli-platform-ios": "19.1.2",
31+
"@react-native/babel-preset": "0.80.3",
32+
"@react-native/eslint-config": "0.80.3",
33+
"@react-native/metro-config": "0.80.3",
34+
"@react-native/typescript-config": "0.80.3",
3535
"@types/jest": "^29.5.13",
36-
"@types/react": "^19.0.0",
37-
"@types/react-test-renderer": "^19.0.0",
36+
"@types/react": "^19.1.0",
37+
"@types/react-test-renderer": "^19.1.0",
3838
"react-native-builder-bob": "^0.30.2",
3939
"react-native-dotenv": "^3.4.11",
40-
"react-test-renderer": "19.0.0"
40+
"react-test-renderer": "19.1.0"
4141
},
4242
"engines": {
4343
"node": ">=18"

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@
6969
"devDependencies": {
7070
"@commitlint/config-conventional": "^19.6.0",
7171
"@evilmartians/lefthook": "^1.5.0",
72-
"@react-native-community/cli": "18.0.0",
73-
"@react-native/babel-preset": "0.79.7",
74-
"@react-native/eslint-config": "0.79.7",
75-
"@react-native/metro-config": "0.79.7",
76-
"@react-native/typescript-config": "0.79.7",
72+
"@react-native-community/cli": "19.1.2",
73+
"@react-native/babel-preset": "0.80.3",
74+
"@react-native/eslint-config": "0.80.3",
75+
"@react-native/metro-config": "0.80.3",
76+
"@react-native/typescript-config": "0.80.3",
7777
"@react-navigation/native": "^7.1.14",
7878
"@release-it/conventional-changelog": "^9.0.4",
7979
"@testing-library/jest-native": "^5.4.3",
8080
"@testing-library/react-native": "^13.3.3",
8181
"@types/jest": "^29.5.5",
82-
"@types/react": "^19.0.0",
82+
"@types/react": "^19.1.0",
8383
"@typescript-eslint/eslint-plugin": "^8.13.0",
8484
"@typescript-eslint/parser": "^8.13.0",
8585
"baseline-browser-mapping": "latest",
@@ -93,14 +93,14 @@
9393
"jest": "^29.7.0",
9494
"prettier": "^3.0.3",
9595
"prettier-eslint": "^16.4.2",
96-
"react": "19.0.0",
97-
"react-native": "0.79.7",
96+
"react": "19.1.0",
97+
"react-native": "0.80.3",
9898
"react-native-builder-bob": "^0.40.4",
9999
"react-native-gesture-handler": "^2.26.0",
100100
"react-native-safe-area-context": "^5.4.0",
101101
"react-native-screens": "^4.10.0",
102102
"react-native-webview": "^13.14.1",
103-
"react-test-renderer": "19.0.0",
103+
"react-test-renderer": "19.1.0",
104104
"release-it": "^17.10.0",
105105
"turbo": "^1.10.7",
106106
"typedoc": "^0.28.13",
@@ -109,7 +109,7 @@
109109
"typescript": "^5.2.2"
110110
},
111111
"resolutions": {
112-
"@types/react": "^19.0.0"
112+
"@types/react": "^19.1.0"
113113
},
114114
"peerDependencies": {
115115
"@react-navigation/native": "*",

src/__mocks__/jest.setup.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,36 @@ import * as ReactNative from 'react-native';
33
import { MockRNIterableAPI } from './MockRNIterableAPI';
44
import { MockLinking } from './MockLinking';
55

6-
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter.js');
6+
const mockNativeEventEmitter =
7+
new (require('events').EventEmitter)() as import('events').EventEmitter;
8+
9+
const mockNativeEventEmitterConstructor = jest.fn().mockImplementation(() => ({
10+
addListener: (
11+
eventType: string,
12+
listener: (...args: unknown[]) => void
13+
) => {
14+
mockNativeEventEmitter.addListener(eventType, listener);
15+
16+
return {
17+
remove: () => mockNativeEventEmitter.removeListener(eventType, listener),
18+
};
19+
},
20+
emit: (eventType: string, ...args: unknown[]) =>
21+
mockNativeEventEmitter.emit(eventType, ...args),
22+
removeAllListeners: (eventType?: string) =>
23+
eventType
24+
? mockNativeEventEmitter.removeAllListeners(eventType)
25+
: mockNativeEventEmitter.removeAllListeners(),
26+
removeListener: (
27+
eventType: string,
28+
listener: (...args: unknown[]) => void
29+
) => mockNativeEventEmitter.removeListener(eventType, listener),
30+
}));
31+
32+
jest.mock(
33+
'react-native/Libraries/EventEmitter/NativeEventEmitter',
34+
() => mockNativeEventEmitterConstructor
35+
);
736

837
jest.mock('react-native-webview', () => {
938
const { View } = require('react-native');
@@ -22,6 +51,7 @@ jest.doMock('react-native', () => {
2251
RNIterableAPI: MockRNIterableAPI,
2352
},
2453
Linking: MockLinking,
54+
NativeEventEmitter: mockNativeEventEmitterConstructor,
2555
},
2656
ReactNative
2757
);

0 commit comments

Comments
 (0)