mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 22:51:57 +08:00
fix: add dummy functions to throw on wrong version
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
5
packages/native/src/throwIfWrongVersion.js
Normal file
5
packages/native/src/throwIfWrongVersion.js
Normal 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'."
|
||||
);
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user