mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
chore: upgrade expo to 32.0.0
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"presets": ["react-native"]
|
||||
}
|
||||
@@ -3,8 +3,18 @@
|
||||
|
||||
"plugins": ["react-native-globals"],
|
||||
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
|
||||
"env": {
|
||||
"es6": true,
|
||||
"react-native-globals/all": true,
|
||||
},
|
||||
|
||||
"rules": {
|
||||
"flowtype/no-dupe-keys": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
|
||||
; Ignore metro
|
||||
.*/node_modules/metro/.*
|
||||
.*/node_modules/metro-config/.*
|
||||
|
||||
; These should not be required directly
|
||||
; require from fbjs/lib instead: require('fbjs/lib/invariant')
|
||||
.*/node_modules/invariant/.*
|
||||
.*/node_modules/warning/.*
|
||||
|
||||
; Ignore duplicate modules under example/
|
||||
.*/example/node_modules/fbjs/.*
|
||||
@@ -39,12 +45,14 @@
|
||||
; Ignore some modules we don't need to parse
|
||||
.*/node_modules/prettier/.*
|
||||
.*/node_modules/eslint.*
|
||||
.*/node_modules/reqwest/tests/fixtures/.*
|
||||
|
||||
; Ignore modules with errors
|
||||
.*/node_modules/@expo/.*
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/expo/.*
|
||||
.*/node_modules/xdl/.*
|
||||
.*/node_modules/react-native-gesture-handler/.*
|
||||
.*/node_modules/react-native-view-shot/.*
|
||||
|
||||
[include]
|
||||
|
||||
@@ -56,13 +64,29 @@ node_modules/react-native/flow
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# keep the following in sync with server/haste/hasteImpl.js
|
||||
# get basename
|
||||
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
|
||||
# strip .js or .js.flow suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
|
||||
# strip .ios suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^expo$' -> 'emptyObject'
|
||||
module.name_mapper='^react-native-gesture-handler$' -> 'emptyObject'
|
||||
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
@@ -70,10 +94,34 @@ suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[lints]
|
||||
all=warn
|
||||
unnecessary-optional-chain=off
|
||||
|
||||
# There is an ESLint rule for this
|
||||
unclear-type=off
|
||||
|
||||
sketchy-null=off
|
||||
sketchy-null-number=warn
|
||||
sketchy-null-mixed=warn
|
||||
|
||||
# This is noisy for now. We *do* still want to warn on importing types
|
||||
# from untyped files, which is covered by untyped-type-import
|
||||
untyped-import=off
|
||||
|
||||
[strict]
|
||||
deprecated-type
|
||||
nonstrict-import
|
||||
sketchy-null
|
||||
unclear-type
|
||||
unsafe-getters-setters
|
||||
untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.67.1
|
||||
^0.78.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"plugins": [
|
||||
["module-resolver", {
|
||||
"alias": {
|
||||
"react-navigation-tabs": "../src"
|
||||
"react-navigation-tabs": "../src/index"
|
||||
}
|
||||
}]
|
||||
]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import Expo from 'expo';
|
||||
import { registerRootComponent } from 'expo';
|
||||
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
||||
import { createStackNavigator } from 'react-navigation';
|
||||
import { createAppContainer } from '@react-navigation/native';
|
||||
@@ -53,4 +53,4 @@ const styles = {
|
||||
},
|
||||
};
|
||||
|
||||
Expo.registerRootComponent(App);
|
||||
registerRootComponent(App);
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
"name": "React Navigation Tabs Example",
|
||||
"description": "Demonstrates the various capabilities of react-navigation-tabs: https://github.com/react-navigation/react-navigation-tabs",
|
||||
"slug": "react-navigation-tabs-demos",
|
||||
"sdkVersion": "30.0.0",
|
||||
"sdkVersion": "32.0.0",
|
||||
"version": "1.0.0",
|
||||
"primaryColor": "#2196f3",
|
||||
"packagerOpts": {
|
||||
"assetExts": [
|
||||
"ttf"
|
||||
],
|
||||
"config": "./rn-cli.config.js",
|
||||
"assetExts": ["ttf"],
|
||||
"config": "./metro.config.js",
|
||||
"projectRoots": ""
|
||||
}
|
||||
}
|
||||
|
||||
31
packages/tabs/example/metro.config.js
Normal file
31
packages/tabs/example/metro.config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const path = require('path');
|
||||
const blacklist = require('metro-config/src/defaults/blacklist');
|
||||
const pak = require('../package.json');
|
||||
const escape = require('escape-string-regexp');
|
||||
|
||||
const dependencies = Object.keys(pak.dependencies);
|
||||
const peerDependencies = Object.keys(pak.peerDependencies);
|
||||
|
||||
module.exports = {
|
||||
projectRoot: __dirname,
|
||||
watchFolders: [path.resolve(__dirname, '..')],
|
||||
|
||||
resolver: {
|
||||
blacklistRE: blacklist([
|
||||
new RegExp(
|
||||
`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
|
||||
),
|
||||
]),
|
||||
|
||||
providesModuleNodeModules: [
|
||||
'@expo/vector-icons',
|
||||
'@babel/runtime',
|
||||
'@react-navigation/core',
|
||||
'@react-navigation/native',
|
||||
...dependencies,
|
||||
...peerDependencies,
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -7,30 +7,27 @@
|
||||
"android": "expo android",
|
||||
"ios": "expo ios"
|
||||
},
|
||||
"main": "App.js",
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": "^6.2.0",
|
||||
"@react-navigation/core": "^3.0.0-alpha.11",
|
||||
"@react-navigation/native": "^3.0.0-alpha.6",
|
||||
"expo": "30",
|
||||
"hoist-non-react-statics": "^2.5.0",
|
||||
"prop-types": "^15.6.1",
|
||||
"react": "16.3.1",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"react-native": "~0.55.4",
|
||||
"react-native-safe-area-view": "^0.7.0",
|
||||
"react-native-tab-view": "^1.0.0",
|
||||
"react-navigation": "^3.0.0-alpha.4"
|
||||
"@expo/vector-icons": "^9.0.0",
|
||||
"@react-navigation/core": "^3.1.1",
|
||||
"@react-navigation/native": "^3.1.5",
|
||||
"expo": "32.0.6",
|
||||
"react": "16.5.0",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
|
||||
"react-native-safe-area-view": "^0.13.1",
|
||||
"react-native-screens": "^1.0.0-alpha.22",
|
||||
"react-native-tab-view": "^1.2.0",
|
||||
"react-navigation": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-module-resolver": "^3.0.0",
|
||||
"babel-preset-expo": "^4.0.0",
|
||||
"glob-to-regexp": "^0.3.0"
|
||||
"babel-plugin-module-resolver": "^3.2.0",
|
||||
"babel-preset-expo": "^5.0.0",
|
||||
"glob-to-regexp": "^0.4.0"
|
||||
},
|
||||
"main": "App.js",
|
||||
"resolutions": {
|
||||
"**/hoist-non-react-statics": "2.5.0",
|
||||
"**/prop-types": "15.6.1",
|
||||
"**/react-lifecycles-compat": "3.0.4",
|
||||
"**/react-native-tab-view": "1.0.0"
|
||||
"**/react-native-tab-view": "1.2.0",
|
||||
"**/prop-types": "15.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const path = require('path');
|
||||
const glob = require('glob-to-regexp');
|
||||
const blacklist = require('metro/src/blacklist');
|
||||
const pak = require('../package.json');
|
||||
const pak2 = require('./package.json');
|
||||
|
||||
const dependencies = Object.keys(pak.dependencies);
|
||||
const localDependencies = Object.keys(pak2.dependencies);
|
||||
const peerDependencies = Object.keys(pak.peerDependencies);
|
||||
|
||||
module.exports = {
|
||||
getProjectRoots() {
|
||||
return [__dirname, path.resolve(__dirname, '..')];
|
||||
},
|
||||
getProvidesModuleNodeModules() {
|
||||
return [...dependencies, ...localDependencies, ...peerDependencies];
|
||||
},
|
||||
getBlacklistRE() {
|
||||
return blacklist([glob(`${path.resolve(__dirname, '..')}/node_modules/*`)]);
|
||||
},
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,19 +2,17 @@
|
||||
"name": "react-navigation-tabs",
|
||||
"version": "1.0.1",
|
||||
"description": "Tab Navigation components for React Navigation",
|
||||
"main": "dist/index.js",
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
"dist/",
|
||||
"src/"
|
||||
],
|
||||
"react-native": "src/index.js",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"flow": "flow",
|
||||
"lint": "eslint .",
|
||||
"precommit": "yarn lint && yarn flow && yarn test",
|
||||
"build": "babel --no-babelrc --plugins=syntax-jsx,syntax-class-properties,syntax-object-rest-spread,transform-flow-strip-types src --out-dir dist --ignore '**/__tests__/**'",
|
||||
"prepare": "yarn build"
|
||||
"bootstrap": "yarn && yarn --cwd example",
|
||||
"example": "yarn --cwd example"
|
||||
},
|
||||
"keywords": [
|
||||
"react-native-component",
|
||||
@@ -41,20 +39,12 @@
|
||||
"hoist-non-react-statics": "^2.5.0",
|
||||
"prop-types": "^15.6.1",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"react-native-tab-view": "^1.0.0"
|
||||
"react-native-tab-view": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/config-conventional": "^7.5.0",
|
||||
"@expo/vector-icons": "^6.2.0",
|
||||
"@react-navigation/core": "^3.1.1",
|
||||
"@react-navigation/native": "^3.1.5",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-jest": "^21.2.0",
|
||||
"babel-plugin-syntax-class-properties": "^6.13.0",
|
||||
"babel-plugin-syntax-jsx": "^6.18.0",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"babel-preset-react-native": "^4.0.0",
|
||||
"commitlint": "^7.5.2",
|
||||
"conventional-changelog-cli": "^2.0.12",
|
||||
"enzyme": "3.2.0",
|
||||
@@ -63,15 +53,16 @@
|
||||
"eslint": "^4.12.1",
|
||||
"eslint-config-satya164": "^1.0.1",
|
||||
"eslint-plugin-react-native-globals": "^0.1.0",
|
||||
"flow-bin": "~0.67.0",
|
||||
"flow-bin": "~0.78.0",
|
||||
"husky": "^1.3.1",
|
||||
"jest": "^21.2.1",
|
||||
"prettier": "^1.8.2",
|
||||
"react": "16.3.1",
|
||||
"react-dom": "16.3.1",
|
||||
"react-native": "~0.55.4",
|
||||
"react-native-screens": "^1.0.0-alpha.15",
|
||||
"react-test-renderer": "16.2.0",
|
||||
"react": "16.5.0",
|
||||
"react-dom": "16.5.0",
|
||||
"react-native": "~0.57.1",
|
||||
"react-native-reanimated": "^1.0.0-alpha.12",
|
||||
"react-navigation": "^3.3.2",
|
||||
"react-test-renderer": "16.5.0",
|
||||
"release-it": "^10.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user