Skip to content

Commit

Permalink
chore: upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Nov 17, 2019
1 parent cd7c9c4 commit d619292
Show file tree
Hide file tree
Showing 36 changed files with 1,834 additions and 1,553 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"example": "yarn --cwd packages/example"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.6.2",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@babel/runtime": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/preset-env": "^7.7.1",
"@babel/preset-react": "^7.7.0",
"@babel/preset-typescript": "^7.7.2",
"@babel/runtime": "^7.7.2",
"@commitlint/config-conventional": "^8.2.0",
"@types/jest": "^24.0.13",
"@types/jest": "^24.0.23",
"codecov": "^3.6.1",
"commitlint": "^8.2.0",
"core-js": "^3.2.1",
"eslint": "^6.5.1",
"core-js": "^3.4.1",
"eslint": "^6.6.0",
"eslint-config-satya164": "^3.1.2",
"husky": "^3.0.8",
"husky": "^3.0.9",
"jest": "^24.8.0",
"lerna": "^3.16.4",
"prettier": "^1.18.2",
"lerna": "^3.18.4",
"prettier": "^1.19.1",
"typescript": "^3.7.2"
},
"resolutions": {
Expand Down
6 changes: 3 additions & 3 deletions packages/bottom-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
},
"devDependencies": {
"@react-native-community/bob": "^0.7.0",
"@types/react": "^16.9.4",
"@types/react-native": "^0.60.17",
"@types/react": "^16.9.11",
"@types/react-native": "^0.60.22",
"del-cli": "^3.0.0",
"react": "~16.8.3",
"react-native": "~0.59.10",
"react-native-safe-area-context": "^0.3.6",
"react-native-safe-area-context": "^0.6.0",
"typescript": "^3.7.2"
},
"peerDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions packages/bottom-tabs/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/**
* Navigators
*/
export {
default as createBottomTabNavigator,
} from './navigators/createBottomTabNavigator';
export { default as createBottomTabNavigator } from './navigators/createBottomTabNavigator';

/**
* Views
Expand Down
2 changes: 1 addition & 1 deletion packages/bottom-tabs/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type BottomTabNavigationProp<
* @param [params] Params object for the route.
*/
jumpTo<RouteName extends Extract<keyof ParamList, string>>(
...args: ParamList[RouteName] extends (undefined | any)
...args: ParamList[RouteName] extends undefined | any
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
): void;
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@react-navigation/routers": "^5.0.0-alpha.14"
},
"devDependencies": {
"@types/react": "^16.9.4",
"@types/react": "^16.9.11",
"react": "~16.8.3",
"typescript": "^3.7.2"
},
Expand Down
8 changes: 2 additions & 6 deletions packages/compat/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import * as SwitchActions from './SwitchActions';

export { NavigationActions, StackActions, DrawerActions, SwitchActions };

export {
default as createCompatNavigatorFactory,
} from './createCompatNavigatorFactory';
export { default as createCompatNavigatorFactory } from './createCompatNavigatorFactory';

export {
default as createCompatNavigationProp,
} from './createCompatNavigationProp';
export { default as createCompatNavigationProp } from './createCompatNavigationProp';

export { default as createSwitchNavigator } from './createSwitchNavigator';

Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
},
"dependencies": {
"escape-string-regexp": "^2.0.0",
"query-string": "^6.8.3",
"query-string": "^6.9.0",
"shortid": "^2.2.15",
"use-subscription": "^1.1.1"
"use-subscription": "^1.3.0"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/core": "^7.7.2",
"@react-native-community/bob": "^0.7.0",
"@types/react": "^16.9.4",
"@types/react": "^16.9.11",
"@types/shortid": "^0.0.29",
"del-cli": "^3.0.0",
"react": "~16.8.3",
Expand Down
25 changes: 20 additions & 5 deletions packages/core/src/__tests__/NavigationContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ it('handle dispatching with ref', () => {
index: 0,
key: '4',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand Down Expand Up @@ -273,7 +276,10 @@ it('handle dispatching with ref', () => {
index: 0,
key: '1',
routeNames: ['qux', 'lex'],
routes: [{ key: 'lex', name: 'lex' }, { key: 'qux', name: 'qux' }],
routes: [
{ key: 'lex', name: 'lex' },
{ key: 'qux', name: 'qux' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand Down Expand Up @@ -333,7 +339,10 @@ it('handle resetting state with ref', () => {
index: 0,
key: '4',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand All @@ -359,7 +368,10 @@ it('handle resetting state with ref', () => {
index: 0,
key: '6',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
stale: false,
type: 'test',
},
Expand Down Expand Up @@ -414,7 +426,10 @@ it('handle getRootState', () => {
index: 0,
key: '8',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
stale: false,
type: 'test',
},
Expand Down
25 changes: 20 additions & 5 deletions packages/core/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ it('rehydrates state for a navigator on navigation', () => {

const initialState = {
index: 1,
routes: [{ key: 'foo', name: 'foo' }, { key: 'bar', name: 'bar' }],
routes: [
{ key: 'foo', name: 'foo' },
{ key: 'bar', name: 'bar' },
],
};

const onStateChange = jest.fn();
Expand All @@ -126,7 +129,10 @@ it('rehydrates state for a navigator on navigation', () => {
index: 1,
key: '0',
routeNames: ['foo', 'bar'],
routes: [{ key: 'foo', name: 'foo' }, { key: 'bar', name: 'bar' }],
routes: [
{ key: 'foo', name: 'foo' },
{ key: 'bar', name: 'bar' },
],
stale: false,
type: 'test',
});
Expand All @@ -151,7 +157,10 @@ it("doesn't rehydrate state if the type of state didn't match router", () => {
const initialState = {
index: 1,
type: 'something-else',
routes: [{ key: 'foo', name: 'foo' }, { key: 'bar', name: 'bar' }],
routes: [
{ key: 'foo', name: 'foo' },
{ key: 'bar', name: 'bar' },
],
};

const onStateChange = jest.fn();
Expand Down Expand Up @@ -398,7 +407,10 @@ it('cleans up state when the navigator unmounts', () => {
index: 0,
key: '0',
routeNames: ['foo', 'bar'],
routes: [{ key: 'foo', name: 'foo' }, { key: 'bar', name: 'bar' }],
routes: [
{ key: 'foo', name: 'foo' },
{ key: 'bar', name: 'bar' },
],
});

root.update(
Expand Down Expand Up @@ -451,7 +463,10 @@ it('allows state updates by dispatching a function returning an action', () => {
index: 1,
key: '0',
routeNames: ['foo', 'bar'],
routes: [{ key: 'foo', name: 'foo' }, { key: 'bar', name: 'bar' }],
routes: [
{ key: 'foo', name: 'foo' },
{ key: 'bar', name: 'bar' },
],
});
});

Expand Down
15 changes: 12 additions & 3 deletions packages/core/src/__tests__/useOnAction.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ it("lets children handle the action if parent didn't", () => {
index: 0,
key: '4',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand Down Expand Up @@ -206,7 +209,10 @@ it("lets children handle the action if parent didn't", () => {
index: 0,
key: '1',
routeNames: ['qux', 'lex'],
routes: [{ key: 'lex', name: 'lex' }, { key: 'qux', name: 'qux' }],
routes: [
{ key: 'lex', name: 'lex' },
{ key: 'qux', name: 'qux' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand Down Expand Up @@ -333,7 +339,10 @@ it("doesn't crash if no navigator handled the action", () => {
index: 0,
key: '4',
routeNames: ['qux', 'lex'],
routes: [{ key: 'qux', name: 'qux' }, { key: 'lex', name: 'lex' }],
routes: [
{ key: 'qux', name: 'qux' },
{ key: 'lex', name: 'lex' },
],
},
},
{ key: 'bar', name: 'bar' },
Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ type NavigationHelpersCommon<
* @param [params] Params object for the route.
*/
navigate<RouteName extends keyof ParamList>(
...args: ParamList[RouteName] extends (undefined | any)
...args: ParamList[RouteName] extends undefined | any
? [RouteName] | [RouteName, ParamList[RouteName]]
: [RouteName, ParamList[RouteName]]
): void;
Expand Down Expand Up @@ -552,18 +552,19 @@ export type RouteConfig<
route: RouteProp<ParamList, RouteName>;
navigation: any;
}) => React.ReactNode;
});
}
);

export type NavigationContainerRef =
| NavigationHelpers<ParamListBase> & {
| (NavigationHelpers<ParamListBase> & {
/**
* Reset the navigation state of the root navigator to the provided state.
*
* @param state Navigation state object.
*/
resetRoot(state?: PartialState<NavigationState> | NavigationState): void;
getRootState(): NavigationState;
}
})
| undefined
| null;

Expand Down
12 changes: 5 additions & 7 deletions packages/core/src/useNavigationBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ const getRouteConfigsFromChildren = <ScreenOptions extends object>(
if (child.type === Screen) {
// We can only extract the config from `Screen` elements
// If something else was rendered, it's probably a bug
acc.push(child.props as RouteConfig<
ParamListBase,
string,
ScreenOptions
>);
acc.push(
child.props as RouteConfig<ParamListBase, string, ScreenOptions>
);
return acc;
}

Expand Down Expand Up @@ -105,9 +103,9 @@ export default function useNavigationBuilder<
) {
useRegisterNavigator();

const route = React.useContext(NavigationRouteContext) as (
const route = React.useContext(NavigationRouteContext) as
| NavigatorRoute
| undefined);
| undefined;

const previousRouteRef = React.useRef(route);

Expand Down
12 changes: 6 additions & 6 deletions packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
},
"devDependencies": {
"@react-native-community/bob": "^0.7.0",
"@types/react": "^16.9.4",
"@types/react-native": "^0.60.17",
"@types/react": "^16.9.11",
"@types/react-native": "^0.60.22",
"del-cli": "^3.0.0",
"react": "~16.8.3",
"react-native": "~0.59.10",
"react-native-gesture-handler": "^1.3.0",
"react-native-reanimated": "^1.3.0",
"react-native-safe-area-context": "^0.3.6",
"react-native-screens": "^2.0.0-alpha.8",
"react-native-gesture-handler": "^1.5.0",
"react-native-reanimated": "^1.4.0",
"react-native-safe-area-context": "^0.6.0",
"react-native-screens": "^2.0.0-alpha.11",
"typescript": "^3.7.2"
},
"peerDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions packages/drawer/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/**
* Navigators
*/
export {
default as createDrawerNavigator,
} from './navigators/createDrawerNavigator';
export { default as createDrawerNavigator } from './navigators/createDrawerNavigator';

/**
* Views
Expand Down
8 changes: 4 additions & 4 deletions packages/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PODS:
- glog (0.3.5)
- React (0.59.10):
- React/Core (= 0.59.10)
- react-native-safe-area-context (0.3.6):
- react-native-safe-area-context (0.6.0):
- React
- React/Core (0.59.10):
- yoga (= 0.59.10.React)
Expand Down Expand Up @@ -93,7 +93,7 @@ PODS:
- React
- RNReanimated (1.2.0):
- React
- RNScreens (2.0.0-alpha.8):
- RNScreens (2.0.0-alpha.11):
- React
- UMBarCodeScannerInterface (4.0.0)
- UMCameraInterface (4.0.0)
Expand Down Expand Up @@ -264,10 +264,10 @@ SPEC CHECKSUMS:
Folly: de497beb10f102453a1afa9edbf8cf8a251890de
glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
React: 36d0768f9e93be2473b37e7fa64f92c1d5341eef
react-native-safe-area-context: e380a6f783ccaec848e2f3cc8eb205a62362950d
react-native-safe-area-context: d288138da2c800caa111f9352e9333f186a06ead
RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0
RNReanimated: 1b52415c4302f198cb581282a0166690bad62c43
RNScreens: bfa9143ca291bcf3804c932f77b9617ff324704f
RNScreens: ad3661f864ef18d952e9a4799b6791683e33c1fc
UMBarCodeScannerInterface: d5a6fdc98ed6241225b0a8432a7f4e2b397668bc
UMCameraInterface: 68870a3197fee85bd5afca5609ba4a5b7257d19d
UMConstantsInterface: d25b8e8887ca7aaf568c06caf08f4d40734ee4ef
Expand Down
Loading

0 comments on commit d619292

Please sign in to comment.