Merge react-native-implementation.*

This commit is contained in:
REDMOND\acoates 2019-05-01 14:29:51 -07:00
Родитель 7be4e4364d
Коммит e81755d397
3 изменённых файлов: 517 добавлений и 364 удалений

Просмотреть файл

@ -10,16 +10,8 @@
'use strict';
<<<<<<< HEAD
const invariant = require('fbjs/lib/invariant');
let showedListViewDeprecation = false;
let showedSwipeableListViewDeprecation = false;
let showedWebWiewDeprecation = false;
=======
const invariant = require('invariant');
const warnOnce = require('warnOnce');
>>>>>>> v0.59.0
// Export React, plus some native additions.
module.exports = {
@ -189,24 +181,12 @@ module.exports = {
return require('VirtualizedList');
},
get WebView() {
<<<<<<< HEAD
if (!showedWebWiewDeprecation) {
console.warn(
'WebView has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-webview for more informations.',
);
showedWebWiewDeprecation = true;
}
=======
warnOnce(
'webview-moved',
'WebView has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-webview',
);
>>>>>>> v0.59.0
return require('WebView');
},

Просмотреть файл

@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
@ -8,20 +8,18 @@
* @flow
*/
// TODO(macOS ISS#2323203)
'use strict';
const invariant = require('fbjs/lib/invariant');
const invariant = require('invariant');
const warnOnce = require('warnOnce');
// Export React, plus some native additions.
const ReactNative = {
module.exports = {
// Components
/*
get AccessibilityInfo() {
return require('AccessibilityInfo');
},
*/
},*/
get ActivityIndicator() {
return require('ActivityIndicator');
},
@ -40,8 +38,7 @@ const ReactNative = {
/*
get DrawerLayoutAndroid() {
return require('DrawerLayoutAndroid');
},
*/
},*/
get FlatList() {
return require('FlatList');
},
@ -55,6 +52,13 @@ const ReactNative = {
return require('ImageEditor');
},
get ImageStore() {
warnOnce(
'imagestore-deprecation',
'ImageStore is deprecated and will be removed in a future release. ' +
'To get a base64-encoded string from a local image use either of the following third-party libraries:' +
"* expo-file-system: `readAsStringAsync(filepath, 'base64')`" +
"* react-native-fs: `readFile(filepath, 'base64')`",
);
return require('ImageStore');
},
/*
@ -63,22 +67,28 @@ const ReactNative = {
},
get KeyboardAvoidingView() {
return require('KeyboardAvoidingView');
},
*/
},*/
get ListView() {
warnOnce(
'listview-deprecation',
'ListView is deprecated and will be removed in a future release. ' +
'See https://fb.me/nolistview for more information',
);
return require('ListView');
},
/*
get MaskedViewIOS() {
warnOnce(
'maskedviewios-moved',
'MaskedViewIOS has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/masked-view' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-masked-view',
);
return require('MaskedViewIOS');
},
get Modal() {
return require('Modal');
},
get NavigatorIOS() {
return require('NavigatorIOS');
},
*/
},*/
get Picker() {
return require('Picker');
},
@ -88,8 +98,7 @@ const ReactNative = {
/*
get ProgressBarAndroid() {
return require('ProgressBarAndroid');
},
*/
},*/
get ProgressViewIOS() {
return require('ProgressViewIOS');
},
@ -106,13 +115,18 @@ const ReactNative = {
return require('SegmentedControlIOS');
},
get Slider() {
warnOnce(
'slider-moved',
'Slider has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-slider',
);
return require('Slider');
},
/*
get SnapshotViewIOS() {
return require('SnapshotViewIOS');
},
*/
},*/
get Switch() {
return require('Switch');
},
@ -122,19 +136,18 @@ const ReactNative = {
},
get StatusBar() {
return require('StatusBar');
},
*/
},*/
get SwipeableFlatList() {
return require('SwipeableFlatList');
},
get SwipeableListView() {
warnOnce(
'swipablelistview-deprecation',
'ListView and SwipeableListView are deprecated and will be removed in a future release. ' +
'See https://fb.me/nolistview for more information',
);
return require('SwipeableListView');
},
/*
get TabBarIOS() {
return require('TabBarIOS');
},
*/
get Text() {
return require('Text');
},
@ -142,13 +155,9 @@ const ReactNative = {
return require('TextInput');
},
/*
get ToastAndroid() {
return require('ToastAndroid');
},
get ToolbarAndroid() {
return require('ToolbarAndroid');
},
*/
},*/
get Touchable() {
return require('Touchable');
},
@ -169,13 +178,24 @@ const ReactNative = {
},
/*
get ViewPagerAndroid() {
warnOnce(
'viewpager-moved',
'ViewPagerAndroid has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/viewpager' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-viewpager',
);
return require('ViewPagerAndroid');
},
*/
},*/
get VirtualizedList() {
return require('VirtualizedList');
},
get WebView() {
warnOnce(
'webview-moved',
'WebView has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-webview',
);
return require('WebView');
},
@ -187,7 +207,11 @@ const ReactNative = {
return require('Alert');
},
get AlertIOS() {
return require('AlertIOS');
warnOnce(
'alert-ios',
'AlertIOS is deprecated. Use the `Alert` module directly instead.',
);
return require('Alert');
},
get AlertMacOS() {
return require('AlertMacOS');
@ -202,30 +226,31 @@ const ReactNative = {
return require('AppState');
},
get AsyncStorage() {
warnOnce(
'async-storage-moved',
'Async Storage has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-async-storage',
);
return require('AsyncStorage');
},
/*
get BackAndroid() {
return require('BackAndroid');
}, // deprecated: use BackHandler instead
*/
get BackHandler() {
return require('BackHandler');
},
/*
get CameraRoll() {
return require('CameraRoll');
},
*/
},*/
get Clipboard() {
return require('Clipboard');
},
get DatePickerAndroid() {
return require('DatePickerAndroid');
},
// [TODO(macOS ISS#2323203)
get DatePickerMacOS() {
return require('DatePickerMacOS');
},
}, // ]TODO(macOS ISS#2323203)
get DeviceInfo() {
return require('DeviceInfo');
},
@ -244,16 +269,14 @@ const ReactNative = {
/*
get ImagePickerIOS() {
return require('ImagePickerIOS');
},
*/
},*/
get InteractionManager() {
return require('InteractionManager');
},
/*
get Keyboard() {
return require('Keyboard');
},
*/
},*/
get LayoutAnimation() {
return require('LayoutAnimation');
},
@ -264,6 +287,12 @@ const ReactNative = {
return require('NativeEventEmitter');
},
get NetInfo() {
warnOnce(
'netinfo-moved',
'NetInfo has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-netinfo',
);
return require('NetInfo');
},
get PanResponder() {
@ -272,8 +301,7 @@ const ReactNative = {
/*
get PermissionsAndroid() {
return require('PermissionsAndroid');
},
*/
},*/
get PixelRatio() {
return require('PixelRatio');
},
@ -289,8 +317,7 @@ const ReactNative = {
},
get StatusBarIOS() {
return require('StatusBarIOS');
},
*/
},*/
get StyleSheet() {
return require('StyleSheet');
},
@ -301,7 +328,9 @@ const ReactNative = {
get TimePickerAndroid() {
return require('TimePickerAndroid');
},
*/
get ToastAndroid() {
return require('ToastAndroid');
},*/
get TVEventHandler() {
return require('TVEventHandler');
},
@ -311,14 +340,16 @@ const ReactNative = {
get unstable_batchedUpdates() {
return require('ReactNative').unstable_batchedUpdates;
},
get UTFSequence() {
return require('UTFSequence');
},
/*
get Vibration() {
return require('Vibration');
},
get VibrationIOS() {
return require('VibrationIOS');
},
*/
},*/
get YellowBox() {
return require('YellowBox');
},
@ -351,16 +382,24 @@ const ReactNative = {
return require('DeprecatedColorPropType');
},
get EdgeInsetsPropType() {
return require('EdgeInsetsPropType');
return require('DeprecatedEdgeInsetsPropType');
},
get PointPropType() {
return require('PointPropType');
return require('DeprecatedPointPropType');
},
get ViewPropTypes() {
return require('ViewPropTypes');
return require('DeprecatedViewPropTypes');
},
// Deprecated
get BackAndroid() {
invariant(
false,
'BackAndroid is deprecated and has been removed from this package. ' +
'Use BackHandler instead',
);
},
get Navigator() {
invariant(
false,
@ -369,6 +408,11 @@ const ReactNative = {
'Learn about alternative navigation solutions at http://facebook.github.io/react-native/docs/navigation.html',
);
},
};
module.exports = ReactNative;
get NavigatorIOS() {
invariant(
false,
'NavigatorIOS is deprecated and has been removed from this package. ' +
'Learn about alternative navigation solutions at http://facebook.github.io/react-native/docs/navigation.html',
);
},
};

697
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу