diff --git a/Libraries/ART/ReactNativeART.js b/Libraries/ART/ReactNativeART.js index 5d635a8cc0f..a0d571fc176 100644 --- a/Libraries/ART/ReactNativeART.js +++ b/Libraries/ART/ReactNativeART.js @@ -17,7 +17,7 @@ var Transform = require('art/core/transform'); var React = require('React'); var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); -var createReactNativeComponentClass = require('createReactNativeComponentClass'); +var createReactNativeComponentClass = require('react/lib/createReactNativeComponentClass'); var merge = require('merge'); // Diff Helpers diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 1b6e560b482..283ee64ea5e 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -19,7 +19,7 @@ var SpringConfig = require('SpringConfig'); var ViewStylePropTypes = require('ViewStylePropTypes'); var NativeAnimatedHelper = require('NativeAnimatedHelper'); -var findNodeHandle = require('findNodeHandle'); +var findNodeHandle = require('react/lib/findNodeHandle'); var flattenStyle = require('flattenStyle'); var invariant = require('fbjs/lib/invariant'); var requestAnimationFrame = require('fbjs/lib/requestAnimationFrame'); diff --git a/Libraries/AppRegistry/AppRegistry.js b/Libraries/AppRegistry/AppRegistry.js index 8e85c894027..996c693b0d4 100644 --- a/Libraries/AppRegistry/AppRegistry.js +++ b/Libraries/AppRegistry/AppRegistry.js @@ -13,7 +13,7 @@ var BatchedBridge = require('BatchedBridge'); var BugReporting = require('BugReporting'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var invariant = require('fbjs/lib/invariant'); var renderApplication = require('renderApplication'); diff --git a/Libraries/BugReporting/dumpReactTree.js b/Libraries/BugReporting/dumpReactTree.js index 394ae9d3518..89a7d874c53 100644 --- a/Libraries/BugReporting/dumpReactTree.js +++ b/Libraries/BugReporting/dumpReactTree.js @@ -11,7 +11,7 @@ */ 'use strict'; -const ReactNativeMount = require('ReactNativeMount'); +const ReactNativeMount = require('react/lib/ReactNativeMount'); const getReactData = require('getReactData'); const INDENTATION_SIZE = 2; diff --git a/Libraries/CameraRoll/CameraRoll.js b/Libraries/CameraRoll/CameraRoll.js index 140adc25f72..7ef5962759a 100644 --- a/Libraries/CameraRoll/CameraRoll.js +++ b/Libraries/CameraRoll/CameraRoll.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var RCTCameraRollManager = require('NativeModules').CameraRollManager; var createStrictShapeTypeChecker = require('createStrictShapeTypeChecker'); diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicator.js b/Libraries/Components/ActivityIndicator/ActivityIndicator.js index f30fe79ace0..282960556e3 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicator.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicator.js @@ -12,9 +12,9 @@ 'use strict'; const ColorPropType = require('ColorPropType'); -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const Platform = require('Platform'); -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const StyleSheet = require('StyleSheet'); const View = require('View'); diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicatorIOS.ios.js b/Libraries/Components/ActivityIndicator/ActivityIndicatorIOS.ios.js index 869a62e5a30..4386dc46f4c 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicatorIOS.ios.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicatorIOS.ios.js @@ -11,8 +11,8 @@ 'use strict'; var ActivityIndicator = require('ActivityIndicator'); -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var View = require('View'); diff --git a/Libraries/Components/DatePicker/DatePickerIOS.ios.js b/Libraries/Components/DatePicker/DatePickerIOS.ios.js index 00ff474590d..86b08e9aa53 100644 --- a/Libraries/Components/DatePicker/DatePickerIOS.ios.js +++ b/Libraries/Components/DatePicker/DatePickerIOS.ios.js @@ -13,8 +13,8 @@ */ 'use strict'; -const NativeMethodsMixin = require('NativeMethodsMixin'); -const PropTypes = require('ReactPropTypes'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const StyleSheet = require('StyleSheet'); const View = require('View'); diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index 2d2c73ea056..83bb4e87e2b 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -11,11 +11,11 @@ 'use strict'; var ColorPropType = require('ColorPropType'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var Platform = require('Platform'); var React = require('React'); -var ReactNative = require('ReactNative'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactNative = require('react/lib/ReactNative'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var StatusBar = require('StatusBar'); var StyleSheet = require('StyleSheet'); var UIManager = require('UIManager'); diff --git a/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/Libraries/Components/Keyboard/KeyboardAvoidingView.js index c5c1d9ba0b9..a02ba4dbc47 100644 --- a/Libraries/Components/Keyboard/KeyboardAvoidingView.js +++ b/Libraries/Components/Keyboard/KeyboardAvoidingView.js @@ -14,7 +14,7 @@ const Keyboard = require('Keyboard'); const LayoutAnimation = require('LayoutAnimation'); const Platform = require('Platform'); -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const TimerMixin = require('react-timer-mixin'); const View = require('View'); diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js index d6eb93f7e85..b7699ce3908 100644 --- a/Libraries/Components/MapView/MapView.js +++ b/Libraries/Components/MapView/MapView.js @@ -14,7 +14,7 @@ const ColorPropType = require('ColorPropType'); const EdgeInsetsPropType = require('EdgeInsetsPropType'); const Image = require('Image'); -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const Platform = require('Platform'); const React = require('React'); const StyleSheet = require('StyleSheet'); @@ -128,21 +128,21 @@ const MapView = React.createClass({ /** * When this property is set to `true` and a valid camera is associated with - * the map, the camera’s heading angle is used to rotate the plane of the + * the map, the camera's heading angle is used to rotate the plane of the * map around its center point. * * When this property is set to `false`, the - * camera’s heading angle is ignored and the map is always oriented so + * camera's heading angle is ignored and the map is always oriented so * that true north is situated at the top of the map view */ rotateEnabled: React.PropTypes.bool, /** * When this property is set to `true` and a valid camera is associated - * with the map, the camera’s pitch angle is used to tilt the plane + * with the map, the camera's pitch angle is used to tilt the plane * of the map. * - * When this property is set to `false`, the camera’s pitch + * When this property is set to `false`, the camera's pitch * angle is ignored and the map is always displayed as if the user * is looking straight down onto it. */ diff --git a/Libraries/Components/Navigation/NavigatorIOS.ios.js b/Libraries/Components/Navigation/NavigatorIOS.ios.js index b44843640c6..80a42fbb368 100644 --- a/Libraries/Components/Navigation/NavigatorIOS.ios.js +++ b/Libraries/Components/Navigation/NavigatorIOS.ios.js @@ -16,7 +16,7 @@ var Image = require('Image'); var NavigationContext = require('NavigationContext'); var RCTNavigatorManager = require('NativeModules').NavigatorManager; var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var StaticContainer = require('StaticContainer.react'); var StyleSheet = require('StyleSheet'); var View = require('View'); diff --git a/Libraries/Components/Picker/PickerAndroid.android.js b/Libraries/Components/Picker/PickerAndroid.android.js index ff91aac7081..b6dfc21c874 100644 --- a/Libraries/Components/Picker/PickerAndroid.android.js +++ b/Libraries/Components/Picker/PickerAndroid.android.js @@ -14,8 +14,8 @@ var ColorPropType = require('ColorPropType'); var React = require('React'); -var ReactChildren = require('ReactChildren'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactChildren = require('react/lib/ReactChildren'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var StyleSheet = require('StyleSheet'); var StyleSheetPropType = require('StyleSheetPropType'); var View = require('View'); diff --git a/Libraries/Components/Picker/PickerIOS.ios.js b/Libraries/Components/Picker/PickerIOS.ios.js index f9090d60c6f..cc61bf59ed0 100644 --- a/Libraries/Components/Picker/PickerIOS.ios.js +++ b/Libraries/Components/Picker/PickerIOS.ios.js @@ -12,9 +12,9 @@ */ 'use strict'; -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); -var ReactChildren = require('ReactChildren'); +var ReactChildren = require('react/lib/ReactChildren'); var StyleSheet = require('StyleSheet'); var StyleSheetPropType = require('StyleSheetPropType'); var TextStylePropTypes = require('TextStylePropTypes'); diff --git a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js index fb6cb8255b0..61526441e43 100644 --- a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +++ b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js @@ -10,9 +10,9 @@ */ 'use strict'; -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var View = require('View'); var ColorPropType = require('ColorPropType'); diff --git a/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js b/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js index 781d746d890..975718e9e46 100644 --- a/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +++ b/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js @@ -12,8 +12,8 @@ 'use strict'; var Image = require('Image'); -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleSheet = require('StyleSheet'); var View = require('View'); diff --git a/Libraries/Components/RefreshControl/RefreshControl.js b/Libraries/Components/RefreshControl/RefreshControl.js index c80520fad1e..4f40c826015 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.js +++ b/Libraries/Components/RefreshControl/RefreshControl.js @@ -12,7 +12,7 @@ 'use strict'; const ColorPropType = require('ColorPropType'); -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const Platform = require('Platform'); const React = require('React'); const View = require('View'); diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 0169dd30331..f95b2b5795c 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -14,7 +14,7 @@ var Dimensions = require('Dimensions'); var Platform = require('Platform'); var Keyboard = require('Keyboard'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var Subscribable = require('Subscribable'); var TextInputState = require('TextInputState'); var UIManager = require('UIManager'); diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index ec2608cea1d..8c07462052a 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -16,7 +16,7 @@ const EdgeInsetsPropType = require('EdgeInsetsPropType'); const Platform = require('Platform'); const PointPropType = require('PointPropType'); const React = require('React'); -const ReactNative = require('ReactNative'); +const ReactNative = require('react/lib/ReactNative'); const ScrollResponder = require('ScrollResponder'); const StyleSheet = require('StyleSheet'); const StyleSheetPropType = require('StyleSheetPropType'); diff --git a/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js b/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js index b296da3ea8f..2a43028154b 100644 --- a/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +++ b/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js @@ -11,8 +11,8 @@ */ 'use strict'; -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleSheet = require('StyleSheet'); var View = require('View'); diff --git a/Libraries/Components/Slider/Slider.js b/Libraries/Components/Slider/Slider.js index df2ff8bfc64..d4de6ab518b 100644 --- a/Libraries/Components/Slider/Slider.js +++ b/Libraries/Components/Slider/Slider.js @@ -12,9 +12,9 @@ 'use strict'; var Image = require('Image'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var Platform = require('Platform'); -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleSheet = require('StyleSheet'); var View = require('View'); @@ -159,7 +159,7 @@ var Slider = React.createClass({ onSlidingComplete && onSlidingComplete(event.nativeEvent.value); }); - return true} diff --git a/Libraries/Components/SliderIOS/SliderIOS.ios.js b/Libraries/Components/SliderIOS/SliderIOS.ios.js index acc4c3224f0..3515c5d2329 100644 --- a/Libraries/Components/SliderIOS/SliderIOS.ios.js +++ b/Libraries/Components/SliderIOS/SliderIOS.ios.js @@ -12,8 +12,8 @@ 'use strict'; var Image = require('Image'); -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleSheet = require('StyleSheet'); var View = require('View'); @@ -130,7 +130,7 @@ var SliderIOS = React.createClass({ 'SliderIOS is deprecated and will be removed in ' + 'future versions of React Native. Use the cross-platform Slider ' + 'as a drop-in replacement.'); - + let {style, onValueChange, onSlidingComplete, ...props} = this.props; props.style = [styles.slider, style]; diff --git a/Libraries/Components/StaticContainer.js b/Libraries/Components/StaticContainer.js index 9165576d7f9..64964e842d8 100644 --- a/Libraries/Components/StaticContainer.js +++ b/Libraries/Components/StaticContainer.js @@ -1,27 +1,19 @@ /** - * @generated SignedSource<<2a163cdb088fb963f941e627fd89ce11>> + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !! This file is a check-in of a static_upstream project! !! - * !! !! - * !! You should not modify this file directly. Instead: !! - * !! 1) Use `fjs use-upstream` to temporarily replace this with !! - * !! the latest version from upstream. !! - * !! 2) Make your changes, test them, etc. !! - * !! 3) Use `fjs push-upstream` to copy your changes back to !! - * !! static_upstream. !! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * Copyright 2004-present Facebook. All Rights Reserved. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule StaticContainer.react - * @typechecks * @flow */ +'use strict'; var React = require('React'); -var onlyChild = require('onlyChild'); +var onlyChild = require('react/lib/onlyChild'); /** * Renders static content efficiently by allowing React to short-circuit the diff --git a/Libraries/Components/Switch/Switch.js b/Libraries/Components/Switch/Switch.js index 2954f0dafe9..c8a24b00833 100644 --- a/Libraries/Components/Switch/Switch.js +++ b/Libraries/Components/Switch/Switch.js @@ -12,7 +12,7 @@ 'use strict'; var ColorPropType = require('ColorPropType'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var Platform = require('Platform'); var React = require('React'); var StyleSheet = require('StyleSheet'); diff --git a/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js b/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js index d9a2bbe1abb..90b87537989 100644 --- a/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js +++ b/Libraries/Components/SwitchAndroid/SwitchAndroid.android.js @@ -10,8 +10,8 @@ */ 'use strict'; -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var View = require('View'); diff --git a/Libraries/Components/SwitchIOS/SwitchIOS.ios.js b/Libraries/Components/SwitchIOS/SwitchIOS.ios.js index 1546f41dfe8..0e45c22a3df 100644 --- a/Libraries/Components/SwitchIOS/SwitchIOS.ios.js +++ b/Libraries/Components/SwitchIOS/SwitchIOS.ios.js @@ -14,8 +14,8 @@ 'use strict'; var ColorPropType = require('ColorPropType'); -var NativeMethodsMixin = require('NativeMethodsMixin'); -var PropTypes = require('ReactPropTypes'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleSheet = require('StyleSheet'); var View = require('View'); diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index dc8b5fe133f..4a34b7c4fb5 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -14,12 +14,12 @@ const ColorPropType = require('ColorPropType'); const DocumentSelectionState = require('DocumentSelectionState'); const EventEmitter = require('EventEmitter'); -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const Platform = require('Platform'); -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); -const ReactNative = require('ReactNative'); -const ReactChildren = require('ReactChildren'); +const ReactNative = require('react/lib/ReactNative'); +const ReactChildren = require('react/lib/ReactChildren'); const StyleSheet = require('StyleSheet'); const Text = require('Text'); const TextInputState = require('TextInputState'); diff --git a/Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js b/Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js index 060c6a1d0e4..d790456fed0 100644 --- a/Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js +++ b/Libraries/Components/ToolbarAndroid/ToolbarAndroid.android.js @@ -12,10 +12,10 @@ 'use strict'; var Image = require('Image'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var UIManager = require('UIManager'); var View = require('View'); var ColorPropType = require('ColorPropType'); diff --git a/Libraries/Components/Touchable/BoundingDimensions.js b/Libraries/Components/Touchable/BoundingDimensions.js index ca63fd14b08..7d654c11de7 100644 --- a/Libraries/Components/Touchable/BoundingDimensions.js +++ b/Libraries/Components/Touchable/BoundingDimensions.js @@ -1,10 +1,17 @@ /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * * @providesModule BoundingDimensions */ 'use strict'; -var PooledClass = require('PooledClass'); +var PooledClass = require('react/lib/PooledClass'); var twoArgumentPooler = PooledClass.twoArgumentPooler; @@ -39,4 +46,3 @@ BoundingDimensions.getPooledFromElement = function(element) { PooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler); module.exports = BoundingDimensions; - diff --git a/Libraries/Components/Touchable/Position.js b/Libraries/Components/Touchable/Position.js index 5287e929afb..e85f8dd35d5 100644 --- a/Libraries/Components/Touchable/Position.js +++ b/Libraries/Components/Touchable/Position.js @@ -1,10 +1,17 @@ /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * * @providesModule Position */ 'use strict'; -var PooledClass = require('PooledClass'); +var PooledClass = require('react/lib/PooledClass'); var twoArgumentPooler = PooledClass.twoArgumentPooler; diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index 4f6e8cbf623..8d82fd5b9bd 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -13,7 +13,7 @@ var Animated = require('Animated'); var EdgeInsetsPropType = require('EdgeInsetsPropType'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); var Touchable = require('Touchable'); diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 9286d81a15c..ca93c40a1c0 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -14,7 +14,7 @@ // Note (avik): add @flow when Flow supports spread properties in propTypes var ColorPropType = require('ColorPropType'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); var StyleSheet = require('StyleSheet'); @@ -27,7 +27,7 @@ var ensureComponentIsNative = require('ensureComponentIsNative'); var ensurePositiveDelayProps = require('ensurePositiveDelayProps'); var keyOf = require('fbjs/lib/keyOf'); var merge = require('merge'); -var onlyChild = require('onlyChild'); +var onlyChild = require('react/lib/onlyChild'); type Event = Object; diff --git a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js index 4fe52273256..8d8a12af759 100644 --- a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js +++ b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js @@ -10,15 +10,15 @@ */ 'use strict'; -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var Touchable = require('Touchable'); var TouchableWithoutFeedback = require('TouchableWithoutFeedback'); var UIManager = require('UIManager'); var ensurePositiveDelayProps = require('ensurePositiveDelayProps'); -var onlyChild = require('onlyChild'); +var onlyChild = require('react/lib/onlyChild'); var processColor = require('processColor'); var requireNativeComponent = require('requireNativeComponent'); diff --git a/Libraries/Components/Touchable/TouchableOpacity.js b/Libraries/Components/Touchable/TouchableOpacity.js index 4e82c2983ec..fba3a779a58 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.js +++ b/Libraries/Components/Touchable/TouchableOpacity.js @@ -14,7 +14,7 @@ // Note (avik): add @flow when Flow supports spread properties in propTypes var Animated = require('Animated'); -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var React = require('React'); var TimerMixin = require('react-timer-mixin'); var Touchable = require('Touchable'); diff --git a/Libraries/Components/Touchable/TouchableWithoutFeedback.js b/Libraries/Components/Touchable/TouchableWithoutFeedback.js index db139fd12ad..fd5d977bfce 100755 --- a/Libraries/Components/Touchable/TouchableWithoutFeedback.js +++ b/Libraries/Components/Touchable/TouchableWithoutFeedback.js @@ -1,4 +1,3 @@ - /** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. @@ -19,7 +18,7 @@ const Touchable = require('Touchable'); const View = require('View'); const ensurePositiveDelayProps = require('ensurePositiveDelayProps'); -const onlyChild = require('onlyChild'); +const onlyChild = require('react/lib/onlyChild'); const warning = require('fbjs/lib/warning'); type Event = Object; diff --git a/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js b/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js index a01482e42a0..597484c4fd0 100644 --- a/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js +++ b/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js @@ -15,7 +15,7 @@ jest.mock('NativeModules') .mock('View'); const React = require('React'); -const ReactTestRenderer = require('ReactTestRenderer'); +const ReactTestRenderer = require('react/lib/ReactTestRenderer'); const Text = require('Text'); const TouchableHighlight = require('TouchableHighlight'); diff --git a/Libraries/Components/View/ShadowPropTypesIOS.js b/Libraries/Components/View/ShadowPropTypesIOS.js index c770ca9ed26..ee9fc34a115 100644 --- a/Libraries/Components/View/ShadowPropTypesIOS.js +++ b/Libraries/Components/View/ShadowPropTypesIOS.js @@ -12,7 +12,7 @@ 'use strict'; var ColorPropType = require('ColorPropType'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var ShadowPropTypesIOS = { /** diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index eb6618e0a4e..61057465058 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -12,8 +12,8 @@ 'use strict'; const EdgeInsetsPropType = require('EdgeInsetsPropType'); -const NativeMethodsMixin = require('NativeMethodsMixin'); -const PropTypes = require('ReactPropTypes'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes'); const ReactNativeViewAttributes = require('ReactNativeViewAttributes'); @@ -390,10 +390,10 @@ const View = React.createClass({ * in CSS: * ``` * .box-none { - * pointer-events: none; + * pointer-events: none; * } * .box-none * { - * pointer-events: all; + * pointer-events: all; * } * ``` * - `'box-only'`: The view can be the target of touch events but it's @@ -401,10 +401,10 @@ const View = React.createClass({ * in CSS: * ``` * .box-only { - * pointer-events: all; + * pointer-events: all; * } * .box-only * { - * pointer-events: none; + * pointer-events: none; * } * ``` * > Since `pointerEvents` does not affect layout/appearance, and we are diff --git a/Libraries/Components/View/ViewStylePropTypes.js b/Libraries/Components/View/ViewStylePropTypes.js index 619df34c8d9..136ab5c50fc 100644 --- a/Libraries/Components/View/ViewStylePropTypes.js +++ b/Libraries/Components/View/ViewStylePropTypes.js @@ -12,7 +12,7 @@ 'use strict'; var LayoutPropTypes = require('LayoutPropTypes'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var ColorPropType = require('ColorPropType'); var ShadowPropTypesIOS = require('ShadowPropTypesIOS'); var TransformPropTypes = require('TransformPropTypes'); diff --git a/Libraries/Components/ViewPager/ViewPagerAndroid.android.js b/Libraries/Components/ViewPager/ViewPagerAndroid.android.js index d14dc91a552..0e0dfccfc64 100644 --- a/Libraries/Components/ViewPager/ViewPagerAndroid.android.js +++ b/Libraries/Components/ViewPager/ViewPagerAndroid.android.js @@ -12,9 +12,9 @@ 'use strict'; var React = require('React'); -var ReactNative = require('ReactNative'); -var ReactElement = require('ReactElement'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactNative = require('react/lib/ReactNative'); +var ReactElement = require('react/lib/ReactElement'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var UIManager = require('UIManager'); var View = require('View'); diff --git a/Libraries/Components/WebView/WebView.android.js b/Libraries/Components/WebView/WebView.android.js index d4eb7707908..005048113e2 100644 --- a/Libraries/Components/WebView/WebView.android.js +++ b/Libraries/Components/WebView/WebView.android.js @@ -13,7 +13,7 @@ var EdgeInsetsPropType = require('EdgeInsetsPropType'); var ActivityIndicator = require('ActivityIndicator'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); var StyleSheet = require('StyleSheet'); var UIManager = require('UIManager'); diff --git a/Libraries/Components/WebView/WebView.ios.js b/Libraries/Components/WebView/WebView.ios.js index c691f6932ac..49891d3e660 100644 --- a/Libraries/Components/WebView/WebView.ios.js +++ b/Libraries/Components/WebView/WebView.ios.js @@ -14,7 +14,7 @@ var ActivityIndicator = require('ActivityIndicator'); var EdgeInsetsPropType = require('EdgeInsetsPropType'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var StyleSheet = require('StyleSheet'); var Text = require('Text'); var UIManager = require('UIManager'); diff --git a/Libraries/CustomComponents/ListView/ListView.js b/Libraries/CustomComponents/ListView/ListView.js index 132775bca74..4edc42844fd 100644 --- a/Libraries/CustomComponents/ListView/ListView.js +++ b/Libraries/CustomComponents/ListView/ListView.js @@ -34,7 +34,7 @@ var ListViewDataSource = require('ListViewDataSource'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var RCTScrollViewManager = require('NativeModules').ScrollViewManager; var ScrollView = require('ScrollView'); var ScrollResponder = require('ScrollResponder'); diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js index 155377ee454..5db97cd95f7 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCard.js @@ -40,7 +40,7 @@ const NavigationPagerStyleInterpolator = require('NavigationPagerStyleInterpolat const NavigationPointerEventsContainer = require('NavigationPointerEventsContainer'); const NavigationPropTypes = require('NavigationPropTypes'); const React = require('React'); -const ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin'); +const ReactComponentWithPureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); const StyleSheet = require('StyleSheet'); const View = require('View'); diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js index 8373b4ddafc..d04e13373ff 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js @@ -38,7 +38,7 @@ const NavigationCardStackStyleInterpolator = require('NavigationCardStackStyleIn const NavigationCardStackPanResponder = require('NavigationCardStackPanResponder'); const NavigationPropTypes = require('NavigationPropTypes'); const React = require('React'); -const ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin'); +const ReactComponentWithPureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); const StyleSheet = require('StyleSheet'); const View = require('View'); diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js index 39a449b43ef..996b0974345 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationHeader.js @@ -38,7 +38,7 @@ const NavigationHeaderTitle = require('NavigationHeaderTitle'); const NavigationHeaderBackButton = require('NavigationHeaderBackButton'); const NavigationPropTypes = require('NavigationPropTypes'); const NavigationHeaderStyleInterpolator = require('NavigationHeaderStyleInterpolator'); -const ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin'); +const ReactComponentWithPureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); const { Animated, diff --git a/Libraries/Devtools/setupDevtools.js b/Libraries/Devtools/setupDevtools.js index c5b164c66ad..307c268f717 100644 --- a/Libraries/Devtools/setupDevtools.js +++ b/Libraries/Devtools/setupDevtools.js @@ -65,7 +65,7 @@ function setupDevtools() { return; } // This is breaking encapsulation of the React package. Move plz. - var ReactNativeComponentTree = require('ReactNativeComponentTree'); + var ReactNativeComponentTree = require('react/lib/ReactNativeComponentTree'); window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ ComponentTree: { getClosestInstanceFromNode: function (node) { @@ -83,8 +83,8 @@ function setupDevtools() { } } }, - Mount: require('ReactNativeMount'), - Reconciler: require('ReactReconciler') + Mount: require('react/lib/ReactNativeMount'), + Reconciler: require('react/lib/ReactReconciler') }); ws.onmessage = handleMessage; } diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 9e4705e0f56..dfcfe7317e3 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -11,12 +11,12 @@ */ 'use strict'; -var NativeMethodsMixin = require('NativeMethodsMixin'); +var NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); var NativeModules = require('NativeModules'); var ImageResizeMode = require('ImageResizeMode'); var ImageStylePropTypes = require('ImageStylePropTypes'); var ViewStylePropTypes = require('ViewStylePropTypes'); -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); var StyleSheet = require('StyleSheet'); diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 766d8c21ebf..88b03b6ee1f 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -15,9 +15,9 @@ const EdgeInsetsPropType = require('EdgeInsetsPropType'); const ImageResizeMode = require('ImageResizeMode'); const ImageSourcePropType = require('ImageSourcePropType'); const ImageStylePropTypes = require('ImageStylePropTypes'); -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const NativeModules = require('NativeModules'); -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const ReactNativeViewAttributes = require('ReactNativeViewAttributes'); const StyleSheet = require('StyleSheet'); diff --git a/Libraries/Image/ImageSourcePropType.js b/Libraries/Image/ImageSourcePropType.js index 6f6c7bf8f4d..7cd593ff420 100644 --- a/Libraries/Image/ImageSourcePropType.js +++ b/Libraries/Image/ImageSourcePropType.js @@ -11,7 +11,7 @@ */ 'use strict'; -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const ImageSourcePropType = PropTypes.oneOfType([ PropTypes.shape({ @@ -24,12 +24,12 @@ const ImageSourcePropType = PropTypes.oneOfType([ uri: PropTypes.string, /** * `method` is the HTTP Method to use. Defaults to GET if not specified. - */ + */ method: PropTypes.string, /** * `headers` is an object representing the HTTP headers to send along with the * request for a remote image. - */ + */ headers: PropTypes.objectOf(PropTypes.string), /** * `body` is the HTTP body to send with the request. This must be a valid diff --git a/Libraries/Image/ImageStylePropTypes.js b/Libraries/Image/ImageStylePropTypes.js index 58b3b00f083..bac91d034f3 100644 --- a/Libraries/Image/ImageStylePropTypes.js +++ b/Libraries/Image/ImageStylePropTypes.js @@ -13,7 +13,7 @@ var ImageResizeMode = require('ImageResizeMode'); var LayoutPropTypes = require('LayoutPropTypes'); -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var ColorPropType = require('ColorPropType'); var ShadowPropTypesIOS = require('ShadowPropTypesIOS'); var TransformPropTypes = require('TransformPropTypes'); diff --git a/Libraries/Inspector/ElementProperties.js b/Libraries/Inspector/ElementProperties.js index 2da4dc74732..9170a62f17e 100644 --- a/Libraries/Inspector/ElementProperties.js +++ b/Libraries/Inspector/ElementProperties.js @@ -12,7 +12,7 @@ 'use strict'; var BoxInspector = require('BoxInspector'); -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var React = require('React'); var StyleInspector = require('StyleInspector'); var StyleSheet = require('StyleSheet'); diff --git a/Libraries/Inspector/InspectorUtils.js b/Libraries/Inspector/InspectorUtils.js index b9ce53a3bd8..f65ae444bcf 100644 --- a/Libraries/Inspector/InspectorUtils.js +++ b/Libraries/Inspector/InspectorUtils.js @@ -10,7 +10,7 @@ */ 'use strict'; -var ReactNativeComponentTree = require('ReactNativeComponentTree'); +var ReactNativeComponentTree = require('react/lib/ReactNativeComponentTree'); function traverseOwnerTreeUp(hierarchy, instance) { if (instance) { diff --git a/Libraries/Interaction/PanResponder.js b/Libraries/Interaction/PanResponder.js index 76f588b9cc8..a5ad0af42b0 100644 --- a/Libraries/Interaction/PanResponder.js +++ b/Libraries/Interaction/PanResponder.js @@ -12,7 +12,7 @@ 'use strict'; const InteractionManager = require('./InteractionManager'); -const TouchHistoryMath = require('TouchHistoryMath'); +const TouchHistoryMath = require('react/lib/TouchHistoryMath'); const currentCentroidXOfTouchesChangedAfter = TouchHistoryMath.currentCentroidXOfTouchesChangedAfter; const currentCentroidYOfTouchesChangedAfter = TouchHistoryMath.currentCentroidYOfTouchesChangedAfter; diff --git a/Libraries/LayoutAnimation/LayoutAnimation.js b/Libraries/LayoutAnimation/LayoutAnimation.js index 6f28182873d..365c4ea781e 100644 --- a/Libraries/LayoutAnimation/LayoutAnimation.js +++ b/Libraries/LayoutAnimation/LayoutAnimation.js @@ -11,7 +11,7 @@ */ 'use strict'; -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var UIManager = require('UIManager'); var createStrictShapeTypeChecker = require('createStrictShapeTypeChecker'); diff --git a/Libraries/Modal/Modal.js b/Libraries/Modal/Modal.js index 208ffdee71c..076123468e8 100644 --- a/Libraries/Modal/Modal.js +++ b/Libraries/Modal/Modal.js @@ -12,7 +12,7 @@ 'use strict'; const Platform = require('Platform'); -const PropTypes = require('ReactPropTypes'); +const PropTypes = require('react/lib/ReactPropTypes'); const React = require('React'); const StyleSheet = require('StyleSheet'); const UIManager = require('UIManager'); @@ -31,18 +31,18 @@ const RCTModalHostView = requireNativeComponent('RCTModalHostView', null); * ```javascript * import React, { Component } from 'react'; * import { Modal, Text, TouchableHighlight, View } from 'react-native'; - * + * * class ModalExample extends Component { - * + * * constructor(props) { * super(props); * this.state = {modalVisible: false}; * } - * + * * setModalVisible(visible) { * this.setState({modalVisible: visible}); * } - * + * * render() { * return ( * @@ -55,23 +55,23 @@ const RCTModalHostView = requireNativeComponent('RCTModalHostView', null); * * * Hello World! - * + * * { * this.setModalVisible(!this.state.modalVisible) * }}> * Hide Modal * - * + * * * * - * + * * { * this.setModalVisible(true) * }}> * Show Modal * - * + * * * ); * } @@ -98,7 +98,7 @@ class Modal extends React.Component { visible: PropTypes.bool, /** * The `onRequestClose` prop allows passing a function that will be called once the modal has been dismissed. - * + * * _On the Android platform, this is a required function._ */ onRequestClose: Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func, diff --git a/Libraries/ReactIOS/AppContainer.js b/Libraries/ReactIOS/AppContainer.js index d49653db7e7..16da9c2202e 100644 --- a/Libraries/ReactIOS/AppContainer.js +++ b/Libraries/ReactIOS/AppContainer.js @@ -14,7 +14,7 @@ var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var Subscribable = require('Subscribable'); var StyleSheet = require('StyleSheet'); var View = require('View'); diff --git a/Libraries/ReactIOS/renderApplication.js b/Libraries/ReactIOS/renderApplication.js index 3fa622f85ba..cad4c0e1479 100644 --- a/Libraries/ReactIOS/renderApplication.js +++ b/Libraries/ReactIOS/renderApplication.js @@ -14,7 +14,7 @@ var AppContainer = require('AppContainer'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var invariant = require('fbjs/lib/invariant'); diff --git a/Libraries/ReactIOS/requireNativeComponent.js b/Libraries/ReactIOS/requireNativeComponent.js index 61993f799fb..2c1987df352 100644 --- a/Libraries/ReactIOS/requireNativeComponent.js +++ b/Libraries/ReactIOS/requireNativeComponent.js @@ -15,7 +15,7 @@ var ReactNativeStyleAttributes = require('ReactNativeStyleAttributes'); var UIManager = require('UIManager'); var UnimplementedView = require('UnimplementedView'); -var createReactNativeComponentClass = require('createReactNativeComponentClass'); +var createReactNativeComponentClass = require('react/lib/createReactNativeComponentClass'); var insetsDiffer = require('insetsDiffer'); var pointsDiffer = require('pointsDiffer'); diff --git a/Libraries/StyleSheet/ColorPropType.js b/Libraries/StyleSheet/ColorPropType.js index ab6cf45243d..76f3a465d95 100644 --- a/Libraries/StyleSheet/ColorPropType.js +++ b/Libraries/StyleSheet/ColorPropType.js @@ -1,17 +1,16 @@ - /** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ColorPropType - */ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ColorPropType + */ 'use strict'; -var ReactPropTypes = require('ReactPropTypes'); -var ReactPropTypeLocationNames = require('ReactPropTypeLocationNames'); +var ReactPropTypeLocationNames = require('react/lib/ReactPropTypeLocationNames'); var normalizeColor = require('normalizeColor'); diff --git a/Libraries/StyleSheet/EdgeInsetsPropType.js b/Libraries/StyleSheet/EdgeInsetsPropType.js index 1850ae6119a..7bb8c7fbd85 100644 --- a/Libraries/StyleSheet/EdgeInsetsPropType.js +++ b/Libraries/StyleSheet/EdgeInsetsPropType.js @@ -11,7 +11,7 @@ */ 'use strict'; -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var createStrictShapeTypeChecker = require('createStrictShapeTypeChecker'); diff --git a/Libraries/StyleSheet/LayoutPropTypes.js b/Libraries/StyleSheet/LayoutPropTypes.js index 384c4581bc3..2e21f43f430 100644 --- a/Libraries/StyleSheet/LayoutPropTypes.js +++ b/Libraries/StyleSheet/LayoutPropTypes.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); /** * React Native's layout system is based on Flexbox and is powered both diff --git a/Libraries/StyleSheet/PointPropType.js b/Libraries/StyleSheet/PointPropType.js index 606482dd5d7..e9e85ce35b2 100644 --- a/Libraries/StyleSheet/PointPropType.js +++ b/Libraries/StyleSheet/PointPropType.js @@ -11,7 +11,7 @@ */ 'use strict'; -var PropTypes = require('ReactPropTypes'); +var PropTypes = require('react/lib/ReactPropTypes'); var createStrictShapeTypeChecker = require('createStrictShapeTypeChecker'); diff --git a/Libraries/StyleSheet/StyleSheet.js b/Libraries/StyleSheet/StyleSheet.js index 3c12f5f05cb..28ee3fae54c 100644 --- a/Libraries/StyleSheet/StyleSheet.js +++ b/Libraries/StyleSheet/StyleSheet.js @@ -12,7 +12,7 @@ 'use strict'; var PixelRatio = require('PixelRatio'); -var ReactNativePropRegistry = require('ReactNativePropRegistry'); +var ReactNativePropRegistry = require('react/lib/ReactNativePropRegistry'); var StyleSheetValidation = require('StyleSheetValidation'); var flatten = require('flattenStyle'); diff --git a/Libraries/StyleSheet/StyleSheetValidation.js b/Libraries/StyleSheet/StyleSheetValidation.js index 2be4ca2f249..99cc380df92 100644 --- a/Libraries/StyleSheet/StyleSheetValidation.js +++ b/Libraries/StyleSheet/StyleSheetValidation.js @@ -12,7 +12,7 @@ 'use strict'; var ImageStylePropTypes = require('ImageStylePropTypes'); -var ReactPropTypeLocations = require('ReactPropTypeLocations'); +var ReactPropTypeLocations = require('react/lib/ReactPropTypeLocations'); var TextStylePropTypes = require('TextStylePropTypes'); var ViewStylePropTypes = require('ViewStylePropTypes'); diff --git a/Libraries/StyleSheet/TransformPropTypes.js b/Libraries/StyleSheet/TransformPropTypes.js index 3250b8aab88..568775d2541 100644 --- a/Libraries/StyleSheet/TransformPropTypes.js +++ b/Libraries/StyleSheet/TransformPropTypes.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var deprecatedPropType = require('deprecatedPropType'); var ArrayOfNumberPropType = ReactPropTypes.arrayOf(ReactPropTypes.number); diff --git a/Libraries/StyleSheet/flattenStyle.js b/Libraries/StyleSheet/flattenStyle.js index 9cecf3d3e0a..0285d48c86d 100644 --- a/Libraries/StyleSheet/flattenStyle.js +++ b/Libraries/StyleSheet/flattenStyle.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactNativePropRegistry = require('ReactNativePropRegistry'); +var ReactNativePropRegistry = require('react/lib/ReactNativePropRegistry'); var invariant = require('fbjs/lib/invariant'); import type { StyleObj } from 'StyleSheetTypes'; diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 9c50447fa3d..bf28e3bef87 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -11,7 +11,7 @@ */ 'use strict'; -const NativeMethodsMixin = require('NativeMethodsMixin'); +const NativeMethodsMixin = require('react/lib/NativeMethodsMixin'); const Platform = require('Platform'); const React = require('React'); const ReactNativeViewAttributes = require('ReactNativeViewAttributes'); @@ -20,7 +20,7 @@ const TextStylePropTypes = require('TextStylePropTypes'); const Touchable = require('Touchable'); const createReactNativeComponentClass = - require('createReactNativeComponentClass'); + require('react/lib/createReactNativeComponentClass'); const merge = require('merge'); const stylePropType = StyleSheetPropType(TextStylePropTypes); diff --git a/Libraries/Text/TextStylePropTypes.js b/Libraries/Text/TextStylePropTypes.js index 9ceea21dc25..daa3094a636 100644 --- a/Libraries/Text/TextStylePropTypes.js +++ b/Libraries/Text/TextStylePropTypes.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactPropTypes = require('ReactPropTypes'); +var ReactPropTypes = require('react/lib/ReactPropTypes'); var ColorPropType = require('ColorPropType'); var ViewStylePropTypes = require('ViewStylePropTypes'); diff --git a/Libraries/Utilities/RCTRenderingPerf.js b/Libraries/Utilities/RCTRenderingPerf.js index 27aee69abc7..f9016624f71 100644 --- a/Libraries/Utilities/RCTRenderingPerf.js +++ b/Libraries/Utilities/RCTRenderingPerf.js @@ -11,8 +11,8 @@ */ 'use strict'; -var ReactPerf = require('ReactPerf'); -var ReactDebugTool = require('ReactDebugTool'); +var ReactPerf = require('react/lib/ReactPerf'); +var ReactDebugTool = require('react/lib/ReactDebugTool'); var invariant = require('fbjs/lib/invariant'); var performanceNow = require('fbjs/lib/performanceNow'); diff --git a/Libraries/Utilities/Systrace.js b/Libraries/Utilities/Systrace.js index 6c23a7e1160..0bd4536a8c6 100644 --- a/Libraries/Utilities/Systrace.js +++ b/Libraries/Utilities/Systrace.js @@ -32,14 +32,14 @@ let _asyncCookie = 0; const ReactSystraceDevtool = __DEV__ ? { onBeginReconcilerTimer(debugID, timerType) { - const displayName = require('ReactComponentTreeDevtool').getDisplayName(debugID); + const displayName = require('react/lib/ReactComponentTreeDevtool').getDisplayName(debugID); Systrace.beginEvent(`ReactReconciler.${timerType}(${displayName})`); }, onEndReconcilerTimer(debugID, timerType) { Systrace.endEvent(); }, onBeginLifeCycleTimer(debugID, timerType) { - const displayName = require('ReactComponentTreeDevtool').getDisplayName(debugID); + const displayName = require('react/lib/ReactComponentTreeDevtool').getDisplayName(debugID); Systrace.beginEvent(`${displayName}.${timerType}()`); }, onEndLifeCycleTimer(debugID, timerType) { @@ -53,10 +53,10 @@ const Systrace = { if (__DEV__) { if (enabled) { global.nativeTraceBeginLegacy && global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS); - require('ReactDebugTool').addDevtool(ReactSystraceDevtool); + require('react/lib/ReactDebugTool').addDevtool(ReactSystraceDevtool); } else { global.nativeTraceEndLegacy && global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS); - require('ReactDebugTool').removeDevtool(ReactSystraceDevtool); + require('react/lib/ReactDebugTool').removeDevtool(ReactSystraceDevtool); } } _enabled = enabled; diff --git a/Libraries/Utilities/UIManager.js b/Libraries/Utilities/UIManager.js index af12f8ce6d8..e3d4271d549 100644 --- a/Libraries/Utilities/UIManager.js +++ b/Libraries/Utilities/UIManager.js @@ -15,7 +15,7 @@ const Platform = require('Platform'); const NativeModules = require('NativeModules'); const { UIManager } = NativeModules; -const findNodeHandle = require('findNodeHandle'); +const findNodeHandle = require('react/lib/findNodeHandle'); const _takeSnapshot = UIManager.takeSnapshot; diff --git a/Libraries/Utilities/createStrictShapeTypeChecker.js b/Libraries/Utilities/createStrictShapeTypeChecker.js index b5fe14a1b95..710de6a5477 100644 --- a/Libraries/Utilities/createStrictShapeTypeChecker.js +++ b/Libraries/Utilities/createStrictShapeTypeChecker.js @@ -11,7 +11,7 @@ */ 'use strict'; -var ReactPropTypeLocationNames = require('ReactPropTypeLocationNames'); +var ReactPropTypeLocationNames = require('react/lib/ReactPropTypeLocationNames'); var invariant = require('fbjs/lib/invariant'); var merge = require('merge'); diff --git a/Libraries/react-native/React.js b/Libraries/react-native/React.js new file mode 100644 index 00000000000..05c1f2eafdc --- /dev/null +++ b/Libraries/react-native/React.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule React + */ + 'use strict'; + module.exports = require('react/lib/React'); diff --git a/Libraries/react-native/ReactNative.js b/Libraries/react-native/ReactNative.js new file mode 100644 index 00000000000..354620e1db8 --- /dev/null +++ b/Libraries/react-native/ReactNative.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @flow + * @providesModule ReactNative + */ + 'use strict'; + module.exports = require('react/lib/ReactNative'); diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index c3096adfd21..361234ace4b 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -13,8 +13,8 @@ const warning = require('fbjs/lib/warning'); if (__DEV__) { - const warningDedupe = {}; - const addonWarn = function(prevName, newPackageName) { + var warningDedupe = {}; + var addonWarn = function(prevName, newPackageName) { warning( warningDedupe[prevName], 'React.addons.' + prevName + ' is deprecated. Please import the "' + @@ -127,14 +127,14 @@ const ReactNative = { if (__DEV__) { addonWarn('LinkedStateMixin', 'react-addons-linked-state-mixin'); } - return require('LinkedStateMixin'); + return require('react/lib/LinkedStateMixin'); }, Perf: undefined, get PureRenderMixin() { if (__DEV__) { addonWarn('PureRenderMixin', 'react-addons-pure-render-mixin'); } - return require('ReactComponentWithPureRenderMixin'); + return require('react/lib/ReactComponentWithPureRenderMixin'); }, get TestModule() { if (__DEV__) { @@ -157,19 +157,19 @@ const ReactNative = { ); warningDedupe.batchedUpdates = true; } - return require('ReactUpdates').batchedUpdates; + return require('react/lib/ReactUpdates').batchedUpdates; }, get createFragment() { if (__DEV__) { addonWarn('createFragment', 'react-addons-create-fragment'); } - return require('ReactFragment').create; + return require('react/lib/ReactFragment').create; }, get update() { if (__DEV__) { addonWarn('update', 'react-addons-update'); } - return require('update'); + return require('react/lib/update'); }, }, }; @@ -190,7 +190,7 @@ if (__DEV__) { // Preserve getters with warnings on the internal ReactNative copy without // invoking them. -const ReactNativeInternal = require('ReactNative'); +const ReactNativeInternal = require('react/lib/ReactNative'); function applyForwarding(key) { if (__DEV__) { Object.defineProperty( @@ -213,7 +213,7 @@ if (__DEV__) { if (__DEV__) { addonWarn('Perf', 'react-addons-perf'); } - return require('ReactPerf'); + return require('react/lib/ReactPerf'); } }); Object.defineProperty(ReactNative.addons, 'TestUtils', { @@ -222,7 +222,7 @@ if (__DEV__) { if (__DEV__) { addonWarn('update', 'react-addons-test-utils'); } - return require('ReactTestUtils'); + return require('react/lib/ReactTestUtils'); } }); } diff --git a/Libraries/react-native/react-native.js.flow b/Libraries/react-native/react-native.js.flow index eebab5e27cd..05eff164c74 100644 --- a/Libraries/react-native/react-native.js.flow +++ b/Libraries/react-native/react-native.js.flow @@ -22,7 +22,7 @@ // Our ReactNative.js has had its types stripped, so here we // need to enumerate and type the properties we need access to. // -var ReactNativeInternal = (require('ReactNative'): { +var ReactNativeInternal = (require('react/lib/ReactNative'): { // render render: ( element: ReactElement, diff --git a/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js b/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js index 2bec7735212..a768668ad25 100644 --- a/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +++ b/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js @@ -13,7 +13,7 @@ var BatchedBridge = require('BatchedBridge'); var React = require('React'); -var ReactNative = require('ReactNative'); +var ReactNative = require('react/lib/ReactNative'); var View = require('View'); var StyleSheet = require('StyleSheet'); var UIManager = require('UIManager'); diff --git a/package.json b/package.json index 4d0247b9db9..60d54b64b52 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,8 @@ "haste": { "defaultPlatform": "ios", "providesModuleNodeModules": [ - "fbjs", - "react", "react-native", - "parse", - "react-transform-hmr" + "parse" ], "platforms": [ "ios", diff --git a/packager/react-packager/src/Resolver/index.js b/packager/react-packager/src/Resolver/index.js index c8faa60a5b3..5d577e3d30b 100644 --- a/packager/react-packager/src/Resolver/index.js +++ b/packager/react-packager/src/Resolver/index.js @@ -93,7 +93,6 @@ class Resolver { (opts.blacklistRE && opts.blacklistRE.test(filepath)); }, providesModuleNodeModules: [ - 'react', 'react-native', 'react-native-windows', // Parse requires AsyncStorage. They will