fix: add dummy functions to throw on wrong version

This commit is contained in:
Satyajit Sahoo
2020-02-04 23:27:35 +01:00
parent f1575ae19e
commit bb4b21712a
4 changed files with 19 additions and 5 deletions

View File

@@ -41,7 +41,7 @@
"homepage": "https://github.com/react-navigation/react-navigation-native#readme",
"dependencies": {
"hoist-non-react-statics": "^3.3.2",
"react-native-safe-area-view": "^0.14.1"
"react-native-safe-area-view": "^0.14.8"
},
"devDependencies": {
"@expo/vector-icons": "^6.2.0",

View File

@@ -1,5 +1,7 @@
/* eslint-disable import/no-commonjs */
import throwIfWrongVersion from './throwIfWrongVersion';
module.exports = {
get createAppContainer() {
return require('./createAppContainer').default;
@@ -39,4 +41,11 @@ module.exports = {
get Themed() {
return require('./Themed').default;
},
get createNavigationFactory() {
return throwIfWrongVersion;
},
get NavigationContainer() {
return throwIfWrongVersion;
},
};

View File

@@ -0,0 +1,5 @@
export default function() {
throw new Error(
"This version of '@react-navigation/native' is not compatible with React Navigation 5. Make sure you install 5.x version of '@react-navigation/native'."
);
}

View File

@@ -7153,10 +7153,10 @@ react-native-safe-area-view@0.11.0:
dependencies:
hoist-non-react-statics "^2.3.1"
react-native-safe-area-view@^0.14.1:
version "0.14.1"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.1.tgz#3981f6f8628c1769a163313bd8c8eba5edecca0f"
integrity sha512-pLAPWdirNWO/1F6IYkbayW9nDIXkM2F/NPtigYNjZj9nISCW+G2dNuI39DI8LenkxYdhiDaGMXfQHHx9TRn6Fw==
react-native-safe-area-view@^0.14.8:
version "0.14.8"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz#ef33c46ff8164ae77acad48c3039ec9c34873e5b"
integrity sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==
dependencies:
hoist-non-react-statics "^2.3.1"