* Require deep for reconcilers * Delete inline* files * Delete react-reconciler/persistent This no longer makes any sense because it react-reconciler takes supportsMutation or supportsPersistence as options. It's no longer based on feature flags. * Fix jest mocking * Fix Flow strategy We now explicitly list which paths we want to be checked by a renderer. For every other renderer config we ignore those paths. Nothing is "any" typed. So if some transitive dependency isn't reachable it won't be accidentally "any" that leaks.
33 lines
757 B
JavaScript
33 lines
757 B
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
import type {ReactNodeList} from 'shared/ReactTypes';
|
|
import type {Writable} from 'stream';
|
|
|
|
import {
|
|
createRequest,
|
|
startWork,
|
|
startFlowing,
|
|
} from 'react-server/src/ReactFizzStreamer';
|
|
|
|
function createDrainHandler(destination, request) {
|
|
return () => startFlowing(request);
|
|
}
|
|
|
|
function pipeToNodeWritable(
|
|
children: ReactNodeList,
|
|
destination: Writable,
|
|
): void {
|
|
let request = createRequest(children, destination);
|
|
destination.on('drain', createDrainHandler(destination, request));
|
|
startWork(request);
|
|
}
|
|
|
|
export {pipeToNodeWritable};
|