Skip to content

Commit

Permalink
feat: remove v4 from repo (#1790)
Browse files Browse the repository at this point in the history
PR removing createNativeStackNavigator.tsx file from the repo along with all the code regarding it. It may be considered BREAKING CHANGE for people still using react-navigation v4 in their app and should not update the version of react-native-screens if they still want to use that deprecated version.
  • Loading branch information
WoLewicki authored Jun 13, 2023
1 parent 6272e44 commit 48aaf98
Show file tree
Hide file tree
Showing 20 changed files with 11 additions and 1,598 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module.exports = {
'import/core-modules': [
'react-native-screens',
'react-native-screens/native-stack',
'react-native-screens/createNativeStackNavigator',
'react-native-screens/reanimated',
],
'import/ignore': [
Expand Down
7 changes: 0 additions & 7 deletions Example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import HeaderOptions from './src/screens/HeaderOptions';
import StatusBarExample from './src/screens/StatusBar';
import Animations from './src/screens/Animations';
import BottomTabsAndStack from './src/screens/BottomTabsAndStack';
import StackReactNavigation4 from './src/screens/StackReactNavigation4';
import Modals from './src/screens/Modals';
import Orientation from './src/screens/Orientation';
import SearchBar from './src/screens/SearchBar';
Expand Down Expand Up @@ -63,12 +62,6 @@ const SCREENS: Record<
component: Modals,
type: 'example',
},
StackReactNavigation4: {
title: 'Stack react-navigation v4',
// @ts-ignore react-navigation v4 AppNavigator type
component: StackReactNavigation4,
type: 'example',
},
HeaderOptions: {
title: 'Header Options',
component: HeaderOptions,
Expand Down
2 changes: 0 additions & 2 deletions Example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const root = path.resolve(__dirname, '..');

const modules = [
'@react-navigation/native',
'react-navigation',
'react-navigation-stack',
'react-native-safe-area-context',
...Object.keys(pack.peerDependencies),
];
Expand Down
4 changes: 1 addition & 3 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "link:../",
"react-native-vector-icons": "^8.0.0",
"react-native-webview": "^11.13.0",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.3"
"react-native-webview": "^11.13.0"
},
"devDependencies": {
"@babel/core": "^7.12.16",
Expand Down
100 changes: 0 additions & 100 deletions Example/src/screens/StackReactNavigation4.tsx

This file was deleted.

60 changes: 1 addition & 59 deletions Example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1320,16 +1320,6 @@
resolved "https://registry.yarnpkg.com/@react-navigation/compat/-/compat-5.3.20.tgz#96cc6995f4bd40f70958b420735a189a87b22a0e"
integrity sha512-4CDw3QRN2zKj2L1Fxjq6ZOK95EW8UOnW3Par1o+P07qc+dZTAL1poKeRx74yqGLQyGVawozTHOgyE8/XWjdDvg==

"@react-navigation/core@^3.7.9":
version "3.7.9"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.7.9.tgz#3f7ba0fcb6c8d74a77a057382af198d84c7c4e3b"
integrity sha512-EknbzM8OI9A5alRxXtQRV5Awle68B+z1QAxNty5DxmlS3BNfmduWNGnim159ROyqxkuDffK9L/U/Tbd45mx+Jg==
dependencies:
hoist-non-react-statics "^3.3.2"
path-to-regexp "^1.8.0"
query-string "^6.13.6"
react-is "^16.13.0"

"@react-navigation/core@^5.16.1":
version "5.16.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.16.1.tgz#e0d308bd9bbd930114ce55c4151806b6d7907f69"
Expand All @@ -1349,14 +1339,6 @@
color "^3.1.3"
react-native-iphone-x-helper "^1.3.0"

"@react-navigation/native@^3.8.4":
version "3.8.4"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.8.4.tgz#4d77f86506364ecf18b33c7f8740afb6763d0b37"
integrity sha512-gXSVcL7bfFDyVkvyg1FiAqTCIgZub5K1X/TZqURBs2CPqDpfX1OsCtB9D33eTF14SpbfgHW866btqrrxoCACfg==
dependencies:
hoist-non-react-statics "^3.3.2"
react-native-safe-area-view "^0.14.9"

"@react-navigation/native@^5.9.2":
version "5.9.8"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.9.8.tgz#ac76ee6390ea7ce807486ca5c38d903e23433a97"
Expand Down Expand Up @@ -3602,12 +3584,7 @@ hermes-profile-transformer@^0.0.6:
dependencies:
source-map "^0.7.3"

hoist-non-react-statics@^2.3.1:
version "2.5.5"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==

hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
hoist-non-react-statics@^3.3.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
Expand Down Expand Up @@ -3984,11 +3961,6 @@ is-wsl@^1.1.0:
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==

isarray@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==

isarray@1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
Expand Down Expand Up @@ -5660,13 +5632,6 @@ path-parse@^1.0.7:
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==

path-to-regexp@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a"
integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==
dependencies:
isarray "0.0.1"

picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
Expand Down Expand Up @@ -5919,13 +5884,6 @@ react-native-safe-area-context@^4.4.1:
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz#239c60b8a9a80eac70a38a822b04c0f1d15ffc01"
integrity sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA==

react-native-safe-area-view@^0.14.9:
version "0.14.9"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz#90ee8383037010d9a5055a97cf97e4c1da1f0c3d"
integrity sha512-WII/ulhpVyL/qbYb7vydq7dJAfZRBcEhg4/UWt6F6nAKpLa3gAceMOxBxI914ppwSP/TdUsandFy6lkJQE0z4A==
dependencies:
hoist-non-react-statics "^2.3.1"

"react-native-screens@link:..":
version "0.0.0"
uid ""
Expand Down Expand Up @@ -5991,22 +5949,6 @@ react-native@0.69.7:
whatwg-fetch "^3.0.0"
ws "^6.1.4"

react-navigation-stack@^2.10.3:
version "2.10.4"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-2.10.4.tgz#377fd6533f8ae0cf5ca5a435a0115851f010306a"
integrity sha512-3LE1PFsFV9v4PUlZRATMotqs6H7MOOpIKtjyP+l8D1cyzYmsMQh3EFikeDfzGQUXIvy8VyLAMtcEssicQPYvFA==
dependencies:
color "^3.1.3"
react-native-iphone-x-helper "^1.3.0"

react-navigation@^4.4.4:
version "4.4.4"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.4.4.tgz#8cda2219196311db440e54998bc724523359949f"
integrity sha512-08Nzy1aKEd73496CsuzN49vLFmxPKYF5WpKGgGvkQ10clB79IRM2BtAfVl6NgPKuUM8FXq1wCsrjo/c5ftl5og==
dependencies:
"@react-navigation/core" "^3.7.9"
"@react-navigation/native" "^3.8.4"

react-refresh@^0.4.0:
version "0.4.3"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53"
Expand Down
2 changes: 0 additions & 2 deletions FabricExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const root = path.resolve(__dirname, '..');

const modules = [
'@react-navigation/native',
'react-navigation',
'react-navigation-stack',
'react-native-safe-area-context',
...Object.keys(pack.peerDependencies),
];
Expand Down
2 changes: 0 additions & 2 deletions FabricTestExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ const root = path.resolve(__dirname, '..');
const modules = [
'@react-navigation/native',
'@react-navigation/stack',
'react-navigation',
'react-native-reanimated',
'react-navigation-stack',
'react-native-safe-area-context',
...Object.keys(pack.peerDependencies),
];
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ To take advantage of the native stack navigator primitive for React Navigation t

- for React Navigation >= v6 to the [Native Stack Navigator part of React Navigation documentation](https://reactnavigation.org/docs/native-stack-navigator)
- for React Navigation v5 to the [README in react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/main/native-stack)
- for older versions to the [README in react-native-screens/createNativeStackNavigator](https://github.com/software-mansion/react-native-screens/tree/main/createNativeStackNavigator)

## `FullWindowOverlay`

Expand Down
2 changes: 0 additions & 2 deletions TVOSExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const root = path.resolve(__dirname, '..');

const modules = [
'@react-navigation/native',
'react-navigation',
'react-navigation-stack',
'react-native-reanimated',
'react-native-safe-area-context',
...Object.keys(pack.peerDependencies),
Expand Down
6 changes: 1 addition & 5 deletions TVOSExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
"react-native-safe-area-context": "^4.0.1-rc.5",
"react-native-screens": "link:../",
"react-native-vector-icons": "^7.1.0",
"react-native-webview": "^11.0.0",
"react-navigation": "^4.4.3",
"react-navigation-material-bottom-tabs": "^2.3.3",
"react-navigation-stack": "^2.10.1",
"react-navigation-tabs": "^2.10.1"
"react-native-webview": "^11.0.0"
},
"devDependencies": {
"@babel/core": "^7.15.0",
Expand Down
Loading

0 comments on commit 48aaf98

Please sign in to comment.