react-navigation/package.json
Ashoat Tevosyan b759d3136e Fix Flow types (and update RN version) (#2619)
* Fix .flowconfig to stop ignoring modules and properly include React Native libraries

Currently, there are numerous ignored libraries that are hiding type errors. Actually, they're causing type errors too. This sort of thing only patches over actual problems, so we have to revert them to get a config we can build upon.

* Update react-native/flow-bin dependencies

We want to have Flow types working with the latest packages.

* Update flow-typed libraries (auto-generated)

* Fix typing of navigation prop used by withNavigation HOC

The current typing is clearly a typo, as it is circular. `NavigationScreenProp` should be used to type the navigation prop

* Fix typing of easing function

What's funny is that I fixed this before in d71ed75133b97e33a8a683eda334b3005107d379. @skevy reintroduced the mistyped function in 9436d03fe8fface09001a5a40ce0aa8a01ad9e7e, which didn't trigger any Flow errors because .flowconfig was ignoring the entire react-native package

* Correct typing of View and Text style prop

The current code thinks it can import these, but this isn't true, and was being hidden because the .flowconfig ignored the whole react-native package. There's no easy to type Text and View at the current moment, as far as I can tell. Importing the highly generic `StyleObj` seems like the best bet, and is what I have being using in my projects.

* Import NavigationScreenComponent using full path

* Updating yarn.lock files

* Get rid of library overrides in flow-typed/react-native.js and flow/react-navigation.js

* Add @flow to src/react-navigation.js and make last three params to createNavigator optional

* Make screenProps and navigationOptions optional in NavigationNavigatorProps

* yarn run format

* Readd react-navigation/node_modules ignore to NavigationPlayground's .flowconfig

Realized this line I removed in the first commit is necessary when using npm link/yarn link, which is what the CircleCI build does

* Make all DrawerViewConfig's params optional

Some of these params are marked as optional because they have defaults. However, the only place `DrawerViewConfig` is used is as the input the function that then applies the defaults

* Make all props in NavigationNavigatorProps optional

`NavigationNavigatorProps` is used to type the props of the component that is output by the `StackNavigator`, `TabNavigator`, etc. component factories. This component does not need to have any props specified.

* Make second param to `DrawerNavigator` factory optional

`DrawerNavigator`, just like `TabNavigator` and `StackNavigator`, can be called with just a single argument (ie. omitting the config)

* Upgrade to RN 0.48.4 to address https://github.com/facebook/react-native/issues/15810
2017-09-25 11:29:34 -05:00

114 lines
3.9 KiB
JSON

{
"name": "react-navigation",
"version": "1.0.0-beta.12",
"description": "React Navigation",
"main": "src/react-navigation.js",
"sources": {
"react-native-v1": "lib-rn/react-navigation.js",
"web": "lib/react-navigation.web.js"
},
"module": "lib/react-navigation.web.js",
"webpack": "lib/react-navigation.web.js",
"repository": {
"url": "git@github.com:react-community/react-navigation.git",
"type": "git"
},
"author": "Adam Miskiewicz <adam@sk3vy.com>",
"license": "BSD-2-Clause",
"scripts": {
"clean": "rm -rf lib/ lib-rn/",
"build": "npm run build-docs && npm run build-web && npm run build-rn && npm run build-dot-flow",
"watch-rn": "mkdir -p lib-rn/views/ && cp -R src/views/assets lib/views/assets && BABEL_ENV=publish-rn babel -w src -d lib-rn",
"watch-web": "mkdir -p lib/views/ && cp -R src/views/assets lib/views/assets && BABEL_ENV=publish-web babel -w src -d lib",
"build-rn": "mkdir -p lib-rn/views/ && cp -R src/views/assets lib-rn/views/assets && BABEL_ENV=publish-rn babel src -d lib-rn --ignore __tests__",
"build-web": "mkdir -p lib/views/ && cp -R src/views/assets lib/views/assets && BABEL_ENV=publish-web babel src -d lib --ignore __tests__",
"build-dot-flow": "find ./src -name '*.js' -not -path '*/__tests__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow && cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib-rn\\//g'`.flow; done",
"build-docs": "node scripts/compile-docs",
"start": "npm run run-playground-ios",
"run-playground-ios": "cd examples/NavigationPlayground && npm run ios",
"run-playground-android": "cd examples/NavigationPlayground && npm run android",
"test": "npm run lint && npm run flow-check && npm run jest",
"codecov": "codecov",
"jest": "jest",
"lint": "eslint .",
"format": "eslint --fix .",
"flow": "flow",
"flow-check": "flow check --show-all-errors",
"precommit": "lint-staged",
"prepublish": "npm run clean && npm run build"
},
"files": [
"lib",
"lib-rn",
"src"
],
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"dependencies": {
"babel-plugin-transform-define": "^1.3.0",
"clamp": "^1.0.1",
"hoist-non-react-statics": "^2.2.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.5.10",
"react-native-drawer-layout-polyfill": "^1.3.2",
"react-native-tab-view": "^0.0.69"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-eslint": "^7.2.3",
"babel-jest": "^20.0.3",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-native": "^2.1.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"babel-preset-react-native-syntax": "^1.0.0",
"babel-preset-stage-1": "^6.24.1",
"codecov": "^2.2.0",
"eslint": "^4.2.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.1.0",
"flow-bin": "^0.51.0",
"husky": "^0.14.3",
"jest": "^20.0.4",
"lint-staged": "^4.2.1",
"prettier": "^1.5.3",
"prettier-eslint": "^6.4.2",
"react": "16.0.0-alpha.12",
"react-native": "^0.48.4",
"react-native-vector-icons": "^4.2.0",
"react-test-renderer": "^15.6.1"
},
"jest": {
"notify": true,
"preset": "react-native",
"testRegex": "./src/.*\\-test\\.js$",
"setupFiles": [
"<rootDir>/jest-setup.js"
],
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"coveragePathIgnorePatterns": [
"jest-setup.js"
],
"modulePathIgnorePatterns": [
"examples"
]
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
}
}