Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
fix: sync latest stack
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Feb 5, 2020
1 parent 06918b6 commit a9fd46d
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 97 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"react-native-unimodules": "^0.7.0-rc.1",
"react-native-web": "^0.11.4",
"react-native-webview": "7.4.3",
"react-navigation": "^4.0.10",
"react-navigation": "^4.1.1",
"react-navigation-drawer": "^2.2.2",
"react-navigation-tabs": "^2.5.5"
},
Expand Down
57 changes: 35 additions & 22 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1820,24 +1820,23 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.5.tgz#25421be6cd943a4b1660b62cfbcd45be8891462c"
integrity sha512-Lj1DzfCmW0f4HnmHtEuX8Yy2f7cnUA8r5KGGUuDDGtQt1so6QJkKeUmsnLo2zYDtsF8due6hvIL06Vdo5xxuLQ==

"@react-navigation/core@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d"
integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==
"@react-navigation/core@^3.5.2":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.2.tgz#3a3d147b8419e5839e0f2ad4dea086bd2d307fe3"
integrity sha512-HgKXci1h74aETgm5CXMBoIWG8R7VZG1eUUHYb3BdxwekdiZjW1P/srjiXzsCqFGlsESnVIOIkzT4DqI9J752Bw==
dependencies:
hoist-non-react-statics "^3.3.0"
path-to-regexp "^1.7.0"
query-string "^6.4.2"
react-is "^16.8.6"

"@react-navigation/native@^3.6.2":
version "3.6.2"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.6.2.tgz#3634697b6350cc5189657ae4551f2d52b57fbbf0"
integrity sha512-Cybeou6N82ZeRmgnGlu+wzlV3z5BZQR2dmYaNFV1TNLUGHqtvv8E7oNw9uYcz9Ox5LFbiX+FdNTn2d6ZPlK0kg==
"@react-navigation/native@^3.6.5":
version "3.6.5"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.6.5.tgz#97b0b9a48f059a0704e3527f40fb034720ef363d"
integrity sha512-ttEmnokFVf09CvrkzlPIdfA693KfYcRxTYf9OZwp0Ll6El27UYjJD4arwGc+zvlohjTErCdba6CAKV702Wv28w==
dependencies:
hoist-non-react-statics "^3.0.1"
react-native-safe-area-view "^0.14.1"
react-native-screens "^1.0.0 || ^1.0.0-alpha"
hoist-non-react-statics "^3.3.2"
react-native-safe-area-view "^0.14.8"

"@segment/loosely-validate-event@^2.0.0":
version "2.0.0"
Expand Down Expand Up @@ -6122,9 +6121,9 @@ gzip-size@5.1.1, gzip-size@^5.0.0:
duplexer "^0.1.1"
pify "^4.0.1"

"hammerjs@git+https://github.com/naver/hammer.js.git":
"hammerjs@https://github.com/naver/hammer.js.git":
version "2.0.17-snapshot"
resolved "git+https://github.com/naver/hammer.js.git#54bc698b25edd6e1b76ca975ebaced5ce0467d51"
resolved "https://github.com/naver/hammer.js.git#54bc698b25edd6e1b76ca975ebaced5ce0467d51"
dependencies:
"@types/hammerjs" "^2.0.36"

Expand Down Expand Up @@ -6273,13 +6272,20 @@ hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:
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.0.1, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0:
hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b"
integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==
dependencies:
react-is "^16.7.0"

hoist-non-react-statics@^3.3.2:
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==
dependencies:
react-is "^16.7.0"

hoopy@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
Expand Down Expand Up @@ -10021,14 +10027,21 @@ react-native-safe-area-view@^0.12.0:
dependencies:
hoist-non-react-statics "^2.3.1"

react-native-safe-area-view@^0.14.1, react-native-safe-area-view@^0.14.6:
react-native-safe-area-view@^0.14.6:
version "0.14.6"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.6.tgz#9a9d37d9f8f3887d60c4076eae7b5d2319539446"
integrity sha512-dbzuvaeHFV1VBpyMaC0gtJ2BqFt6ls/405A0t78YN1sXiTrVr3ki86Ysct8mzifWqLdvWzcWagE5wfMtdxnqoA==
dependencies:
hoist-non-react-statics "^2.3.1"

react-native-screens@1.0.0-alpha.23, "react-native-screens@^1.0.0 || ^1.0.0-alpha":
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"

react-native-screens@1.0.0-alpha.23:
version "1.0.0-alpha.23"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz#25d7ea4d11bda4fcde2d1da7ae50271c6aa636e0"
integrity sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw==
Expand Down Expand Up @@ -10143,13 +10156,13 @@ react-navigation-tabs@^2.5.5:
react-native-safe-area-view "^0.14.6"
react-native-tab-view "^2.9.0"

react-navigation@^4.0.10:
version "4.0.10"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.10.tgz#ddf41134600689d6ba99e35dd22ba1f664f91e5c"
integrity sha512-7PqvmsdQ7HIyxPUMYbd9Uq//VoMdniEOLAOSvIhb/ExtbAt/1INSjUF+RiMWOMCWLTCNvNPRvTz7xy7qwWureg==
react-navigation@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.1.1.tgz#670a1712e945e454fe9cafa424e685c2f1f30832"
integrity sha512-HEzPOsndrKnxTf0+gsi1N/0GKbwu8KSTOveL7ptJLG7XNXHBXVvp4lbaS3PVPe2IaiXbXCC+y3VJ8dH50wHR4g==
dependencies:
"@react-navigation/core" "^3.5.1"
"@react-navigation/native" "^3.6.2"
"@react-navigation/core" "^3.5.2"
"@react-navigation/native" "^3.6.5"

react-refresh@^0.4.0:
version "0.4.2"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@expo/vector-icons": "^10.0.6",
"@react-native-community/bob": "^0.7.0",
"@react-native-community/masked-view": "^0.1.5",
"@react-navigation/stack": "^5.0.0-alpha.66",
"@react-navigation/stack": "^5.0.0-alpha.71",
"@release-it/conventional-changelog": "^1.1.0",
"@types/color": "^3.0.1",
"@types/jest": "^24.0.25",
Expand All @@ -70,7 +70,7 @@
"react-native-gesture-handler": "^1.5.5",
"react-native-safe-area-context": "^0.6.2",
"react-native-screens": "^2.0.0-alpha.22",
"react-navigation": "^4.0.10",
"react-navigation": "^4.1.1",
"react-test-renderer": "~16.9.0",
"release-it": "^12.4.3",
"scheduler": "^0.18.0",
Expand Down
59 changes: 29 additions & 30 deletions scripts/stack.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Naur node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx
--- node_modules/@react-navigation/stack/src/index.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/index.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/index.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/index.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -3,11 +3,6 @@
import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
Expand Down Expand Up @@ -28,7 +28,7 @@ diff -Naur node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.t
StackHeaderTitleProps,
StackCardInterpolatedStyle,
diff -Naur node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx
--- node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-02-03 00:46:19.000000000 +0100
--- node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100
@@ -1,81 +0,0 @@
-import * as React from 'react';
Expand Down Expand Up @@ -113,8 +113,8 @@ diff -Naur node_modules/@react-navigation/stack/src/navigators/createStackNaviga
- typeof StackNavigator
->(StackNavigator);
diff -Naur node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx
--- node_modules/@react-navigation/stack/src/types.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/types.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/types.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/types.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -7,13 +7,28 @@
} from 'react-native';
import { EdgeInsets } from 'react-native-safe-area-context';
Expand Down Expand Up @@ -259,8 +259,8 @@ diff -Naur node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.t

export type StackNavigationConfig = {
diff -Naur node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx
--- node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/Header.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/Header.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -1,11 +1,13 @@
import * as React from 'react';
-import { StackActions } from '@react-navigation/routers';
Expand Down Expand Up @@ -329,8 +329,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/
+
+export default Header;
diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx
--- node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/HeaderBackButton.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/HeaderBackButton.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -8,9 +8,9 @@
StyleSheet,
LayoutChangeEvent,
Expand All @@ -343,8 +343,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackButto

type Props = StackHeaderLeftButtonProps;
diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx
--- node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/HeaderBackground.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/HeaderBackground.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Animated, StyleSheet, Platform, ViewProps } from 'react-native';
Expand All @@ -354,8 +354,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderBackgroun
type Props = ViewProps & {
children?: React.ReactNode;
diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx
--- node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/HeaderContainer.tsx 2020-02-03 00:53:51.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/HeaderContainer.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -1,10 +1,6 @@
import * as React from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
Expand Down Expand Up @@ -388,8 +388,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderContainer
mode === 'float'
? isHeaderStatic
diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx
--- node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/HeaderSegment.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/HeaderSegment.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -8,7 +8,7 @@
ViewStyle,
} from 'react-native';
Expand All @@ -409,8 +409,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.t
};

diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx
--- node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Header/HeaderTitle.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Header/HeaderTitle.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Animated, StyleSheet, Platform, TextProps } from 'react-native';
Expand All @@ -420,8 +420,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx
type Props = TextProps & {
tintColor?: string;
diff -Naur node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx
--- node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Stack/Card.tsx 2020-02-03 00:56:15.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Stack/Card.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -133,7 +133,7 @@

private interactionHandle: number | undefined;
Expand All @@ -441,12 +441,11 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/ven
<StackGestureRefContext.Provider value={this.gestureRef}>
<CardAnimationContext.Provider value={animationContext}>
diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx
--- node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Stack/CardContainer.tsx 2020-02-03 00:54:36.000000000 +0100
@@ -7,11 +7,17 @@
ViewStyle,
Platform,
} from 'react-native';
--- node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Stack/CardContainer.tsx 2020-02-05 09:57:48.000000000 +0100
@@ -1,10 +1,16 @@
import * as React from 'react';
import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
-import { Route, useTheme } from '@react-navigation/native';
import { Props as HeaderContainerProps } from '../Header/HeaderContainer';
import Card from './Card';
Expand All @@ -463,7 +462,7 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardContainer.ts

type Props = TransitionPreset & {
index: number;
@@ -187,7 +193,7 @@
@@ -180,7 +186,7 @@
? { marginTop: headerHeight }
: null
}
Expand All @@ -473,8 +472,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardContainer.ts
>
<View style={styles.container}>
diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx
--- node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Stack/CardStack.tsx 2020-02-03 00:52:58.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Stack/CardStack.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -11,8 +11,7 @@
import { EdgeInsets } from 'react-native-safe-area-context';
// eslint-disable-next-line import/no-unresolved
Expand Down Expand Up @@ -503,8 +502,8 @@ diff -Naur node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx sr
/>
);
diff -Naur node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx
--- node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-02-03 00:46:19.000000000 +0100
+++ src/vendor/views/Stack/StackView.tsx 2020-02-03 00:55:11.000000000 +0100
--- node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-02-05 09:47:09.000000000 +0100
+++ src/vendor/views/Stack/StackView.tsx 2020-02-05 09:56:54.000000000 +0100
@@ -1,9 +1,11 @@
import * as React from 'react';
import { View, Platform, StyleSheet } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"react-navigation": ["react-navigation"],
"react-navigation": ["./node_modules/react-navigation"],
"react-navigation-stack": ["./src/index"],
"react-native-gesture-handler": ["react-native-gesture-handler", "example/node_modules/react-native-gesture-handler/react-native-gesture-handler"],
"@react-native-community/masked-view": ["@react-native-community/masked-view"],
Expand Down
Loading

0 comments on commit a9fd46d

Please sign in to comment.