Skip to content

Commit db6d74c

Browse files
authored
Merge pull request #2360 from wmathurin/rn0701
Move to React Native 0.70.1
2 parents 9a14e7a + deae350 commit db6d74c

File tree

3 files changed

+10
-29
lines changed

3 files changed

+10
-29
lines changed

libs/SalesforceReact/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ apply plugin: 'com.android.library'
2020

2121
dependencies {
2222
api project(':libs:MobileSync')
23-
api 'com.facebook.react:react-native:0.67.1'
23+
api 'com.facebook.react:react-native:0.70.1'
2424
androidTestImplementation 'androidx.test:runner:1.4.0'
2525
androidTestImplementation 'androidx.test:rules:1.4.0'
2626
androidTestImplementation 'androidx.test.ext:junit:1.1.3'

libs/SalesforceReact/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@
77
},
88
"dependencies": {
99
"create-react-class": "^15.7.0",
10-
"react": "17.0.2",
11-
"react-native": "0.67.1",
10+
"react": "18.1.0",
11+
"react-native": "0.70.1",
1212
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#dev"
1313
},
1414
"devDependencies": {
1515
"@babel/core": "^7.12.9",
16-
"@babel/preset-env": "^7.1.6",
1716
"@babel/runtime": "^7.12.5",
17+
"@babel/preset-env": "^7.1.6",
1818
"@react-native-community/cli": "^6.0.0",
1919
"@react-native-community/eslint-config": "^2.0.0",
2020
"@types/jest": "^26.0.18",
21-
"@types/react": "^17.0.19",
22-
"@types/react-native": "^0.66.12",
21+
"@types/react": "^18.0.20",
22+
"@types/react-native": "^0.70.1",
2323
"@types/react-test-renderer": "^17.0.1",
2424
"babel-jest": "^26.6.3",
2525
"chai": "4.2.0",
2626
"eslint": "^7.15.0",
2727
"jest": "^26.6.3",
28-
"metro-react-native-babel-preset": "^0.66.2",
28+
"metro-react-native-babel-preset": "^0.72.1",
2929
"react-native-codegen": "^0.0.7",
30-
"react-test-renderer": "17.0.2",
31-
"typescript": "^4.1.2"
30+
"react-test-renderer": "18.1.0",
31+
"typescript": "^4.8.3"
3232
}
3333
}

libs/test/SalesforceReactTest/src/com/salesforce/androidsdk/reactnative/util/ReactNativeTestHost.java

+1-20
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,10 @@
2929

3030
import android.app.Application;
3131

32-
import com.facebook.infer.annotation.Assertions;
3332
import com.facebook.react.ReactInstanceManager;
3433
import com.facebook.react.ReactInstanceManagerBuilder;
3534
import com.facebook.react.ReactNativeHost;
3635
import com.facebook.react.ReactPackage;
37-
import com.facebook.react.bridge.NativeModuleCallExceptionHandler;
38-
import com.facebook.react.bridge.ReactMarker;
39-
import com.facebook.react.bridge.ReactMarkerConstants;
4036
import com.facebook.react.common.LifecycleState;
4137
import com.facebook.react.shell.MainReactPackage;
4238
import com.salesforce.androidsdk.reactnative.app.SalesforceReactSDKManager;
@@ -87,27 +83,12 @@ protected ReactInstanceManager createReactInstanceManager() {
8783
// NB: Bundle is generated during build
8884
.setBundleAssetName("index.android.bundle")
8985
.setJSIModulesPackage(getJSIModulePackage())
90-
.setUseDeveloperSupport(false)
91-
.setNativeModuleCallExceptionHandler(new NativeModuleCallExceptionTestHandler());
86+
.setUseDeveloperSupport(false);
9287

9388
for (ReactPackage reactPackage : getPackages()) {
9489
builder.addPackage(reactPackage);
9590
}
9691

9792
return builder.build();
9893
}
99-
100-
101-
/**
102-
* Implementation of NativeModuleCallExceptionHandler used for testing (when using bundle)
103-
*
104-
* Marks the current test running is marked as failed if any javascript error takes place
105-
*/
106-
static class NativeModuleCallExceptionTestHandler implements NativeModuleCallExceptionHandler {
107-
108-
@Override
109-
public void handleException(Exception e) {
110-
TestResult.recordTestResult(TestResult.failure(e.getMessage()));
111-
}
112-
}
11394
}

0 commit comments

Comments
 (0)