Reorganize code structure (#11288)

* Move files and tests to more meaningful places

* Fix the build

Now that we import reconciler via react-reconciler, I needed to make a few tweaks.

* Update sizes

* Move @preventMunge directive to FB header

* Revert unintentional change

* Fix Flow coverage

I forgot to @flow-ify those files. This uncovered some issues.

* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down

Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down

Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime

Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink

Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out

Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown

And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right

And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
This commit is contained in:
Dan Abramov 2017-10-19 19:50:24 +01:00 committed by GitHub
parent 1740f30d5c
commit 313611572b
145 changed files with 193 additions and 197 deletions

View File

@ -3,8 +3,10 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @flow
*/ */
'use strict'; 'use strict';
module.exports = require('./src/ReactARTFiberEntry'); module.exports = require('./src/ReactART');

View File

@ -3,9 +3,8 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @providesModule ReactARTFiberEntry
*/ */
'use strict'; 'use strict';
require('art/modes/current').setCurrent( require('art/modes/current').setCurrent(
@ -18,7 +17,7 @@ const Transform = require('art/core/transform');
const invariant = require('fbjs/lib/invariant'); const invariant = require('fbjs/lib/invariant');
const emptyObject = require('fbjs/lib/emptyObject'); const emptyObject = require('fbjs/lib/emptyObject');
const React = require('react'); const React = require('react');
const ReactFiberReconciler = require('ReactFiberReconciler'); const ReactFiberReconciler = require('react-reconciler');
const ReactDOMFrameScheduling = require('ReactDOMFrameScheduling'); const ReactDOMFrameScheduling = require('ReactDOMFrameScheduling');
const {Component} = React; const {Component} = React;

View File

@ -3,8 +3,10 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @flow
*/ */
'use strict'; 'use strict';
module.exports = require('./src/ReactNativeCSFiberEntry'); module.exports = require('./src/ReactNativeCS');

View File

@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
* *
* @providesModule ReactNativeCSFiberEntry
* @flow * @flow
*/ */
@ -17,7 +16,7 @@ const {injectInternals} = require('ReactFiberDevToolsHook');
import type {ReactNativeCSType} from 'ReactNativeCSTypes'; import type {ReactNativeCSType} from 'ReactNativeCSTypes';
const ReactFiberReconciler = require('ReactFiberReconciler'); const ReactFiberReconciler = require('react-reconciler');
const emptyObject = require('fbjs/lib/emptyObject'); const emptyObject = require('fbjs/lib/emptyObject');

View File

@ -7,24 +7,20 @@
'use strict'; 'use strict';
// TODO: Move the source into packages var ReactDOM = require('./src/client/ReactDOM');
var ReactDOMFiber = require('ReactDOMFiberEntry');
Object.assign( Object.assign(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
ReactDOMFiber.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, // These are real internal dependencies that are trickier to remove:
{ ReactBrowserEventEmitter: require('ReactBrowserEventEmitter'),
// These are real internal dependencies that are trickier to remove: ReactErrorUtils: require('ReactErrorUtils'),
ReactBrowserEventEmitter: require('ReactBrowserEventEmitter'), ReactFiberErrorLogger: require('ReactFiberErrorLogger'),
ReactErrorUtils: require('ReactErrorUtils'), ReactFiberTreeReflection: require('ReactFiberTreeReflection'),
ReactFiberErrorLogger: require('ReactFiberErrorLogger'), ReactDOMComponentTree: require('ReactDOMComponentTree'),
ReactFiberTreeReflection: require('ReactFiberTreeReflection'), ReactInstanceMap: require('ReactInstanceMap'),
ReactDOMComponentTree: require('ReactDOMComponentTree'), // These are dependencies of TapEventPlugin:
ReactInstanceMap: require('ReactInstanceMap'), EventPluginUtils: require('EventPluginUtils'),
// These are dependencies of TapEventPlugin: EventPropagators: require('EventPropagators'),
EventPluginUtils: require('EventPluginUtils'), SyntheticUIEvent: require('SyntheticUIEvent'),
EventPropagators: require('EventPropagators'), });
SyntheticUIEvent: require('SyntheticUIEvent'),
},
);
module.exports = ReactDOMFiber; module.exports = ReactDOM;

View File

@ -3,8 +3,10 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @flow
*/ */
'use strict'; 'use strict';
module.exports = require('./src/ReactDOMFiberEntry'); module.exports = require('./src/client/ReactDOM');

View File

@ -3,8 +3,10 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @flow
*/ */
'use strict'; 'use strict';
module.exports = require('./src/ReactDOMServerBrowserEntry'); module.exports = require('./src/server/ReactDOMServerBrowser');

View File

@ -3,8 +3,10 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @flow
*/ */
'use strict'; 'use strict';
module.exports = require('./src/ReactDOMServerNodeEntry'); module.exports = require('./src/server/ReactDOMServerNode');

View File

@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
* *
* @providesModule ReactDOMFiberEntry
* @flow * @flow
*/ */
@ -22,7 +21,7 @@ var ReactDOMComponentTree = require('ReactDOMComponentTree');
var ReactDOMFiberComponent = require('ReactDOMFiberComponent'); var ReactDOMFiberComponent = require('ReactDOMFiberComponent');
var ReactDOMFrameScheduling = require('ReactDOMFrameScheduling'); var ReactDOMFrameScheduling = require('ReactDOMFrameScheduling');
var ReactGenericBatching = require('ReactGenericBatching'); var ReactGenericBatching = require('ReactGenericBatching');
var ReactFiberReconciler = require('ReactFiberReconciler'); var ReactFiberReconciler = require('react-reconciler');
var ReactInputSelection = require('ReactInputSelection'); var ReactInputSelection = require('ReactInputSelection');
var ReactInstanceMap = require('ReactInstanceMap'); var ReactInstanceMap = require('ReactInstanceMap');
var ReactPortal = require('ReactPortal'); var ReactPortal = require('ReactPortal');
@ -784,7 +783,7 @@ ReactRoot.prototype.unmount = function(callback) {
DOMRenderer.updateContainer(null, root, null, callback); DOMRenderer.updateContainer(null, root, null, callback);
}; };
var ReactDOMFiber = { var ReactDOM = {
createRoot(container: DOMContainer, options?: RootOptions): ReactRootNode { createRoot(container: DOMContainer, options?: RootOptions): ReactRootNode {
const hydrate = options != null && options.hydrate === true; const hydrate = options != null && options.hydrate === true;
return new ReactRoot(container, hydrate); return new ReactRoot(container, hydrate);
@ -988,4 +987,4 @@ if (__DEV__) {
} }
} }
module.exports = ReactDOMFiber; module.exports = ReactDOM;

View File

@ -3,8 +3,6 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*
* @providesModule ReactDOMServerBrowserEntry
*/ */
'use strict'; 'use strict';

Some files were not shown because too many files have changed in this diff Show More