-
Notifications
You must be signed in to change notification settings - Fork 50.2k
[Flight] Build Node.js Web Streams builds for Turbopack and Parcel #33457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export {default as rendererVersion} from 'shared/ReactVersion'; | ||
| export const rendererPackageName = 'react-server-dom-parcel'; | ||
|
|
||
| export * from 'react-client/src/ReactFlightClientStreamConfigWeb'; | ||
| export * from 'react-client/src/ReactClientConsoleConfigServer'; | ||
| export * from 'react-server-dom-parcel/src/client/ReactFlightClientConfigBundlerParcel'; | ||
| export * from 'react-server-dom-parcel/src/client/ReactFlightClientConfigTargetParcelServer'; | ||
| export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; | ||
| export const usedWithSSR = true; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export {default as rendererVersion} from 'shared/ReactVersion'; | ||
| export const rendererPackageName = 'react-server-dom-turbopack'; | ||
|
|
||
| export * from 'react-client/src/ReactFlightClientStreamConfigWeb'; | ||
| export * from 'react-client/src/ReactClientConsoleConfigServer'; | ||
| export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigBundlerTurbopack'; | ||
| export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigBundlerTurbopackServer'; | ||
| export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigTargetTurbopackServer'; | ||
| export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; | ||
| export const usedWithSSR = true; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,28 @@ | ||
| 'use strict'; | ||
|
|
||
| var n, w; | ||
| if (process.env.NODE_ENV === 'production') { | ||
| module.exports = require('./cjs/react-server-dom-parcel-client.node.production.js'); | ||
| n = require('./cjs/react-server-dom-parcel-client.node.production.js'); | ||
| w = require('./cjs/react-server-dom-parcel-client.node-webstreams.production.js'); | ||
| } else { | ||
| module.exports = require('./cjs/react-server-dom-parcel-client.node.development.js'); | ||
| n = require('./cjs/react-server-dom-parcel-client.node.development.js'); | ||
| w = require('./cjs/react-server-dom-parcel-client.node-webstreams.development.js'); | ||
| } | ||
|
|
||
| exports.registerServerReference = function (r, i, e) { | ||
| return w.registerServerReference(n.registerServerReference(r, i, e), i, e); | ||
| }; | ||
| exports.createServerReference = function (i, c, e, d, f) { | ||
| return w.registerServerReference( | ||
| n.createServerReference(i, c, e, d, f), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same answer
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one's a bit different than the others though, because the second arg is actually |
||
| i, | ||
| e | ||
| ); | ||
| }; | ||
|
|
||
| exports.createFromNodeStream = n.createFromNodeStream; | ||
| exports.createFromFetch = w.createFromFetch; | ||
| exports.createFromReadableStream = w.createFromReadableStream; | ||
|
|
||
| exports.createTemporaryReferenceSet = w.createTemporaryReferenceSet; | ||
| exports.encodeReply = w.encodeReply; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientBrowser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientEdge'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientEdge'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientNode'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export { | ||
| renderToReadableStream, | ||
| prerender as unstable_prerender, | ||
| decodeReply, | ||
| decodeReplyFromAsyncIterable, | ||
| decodeAction, | ||
| decodeFormState, | ||
| createClientReference, | ||
| registerServerReference, | ||
| createTemporaryReferenceSet, | ||
| registerServerActions, | ||
| loadServerAction, | ||
| } from './ReactFlightDOMServerEdge'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,28 @@ | ||
| 'use strict'; | ||
|
|
||
| var n, w; | ||
| if (process.env.NODE_ENV === 'production') { | ||
| module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.js'); | ||
| n = require('./cjs/react-server-dom-turbopack-client.node.production.js'); | ||
| w = require('./cjs/react-server-dom-turbopack-client.node-webstreams.production.js'); | ||
| } else { | ||
| module.exports = require('./cjs/react-server-dom-turbopack-client.node.development.js'); | ||
| n = require('./cjs/react-server-dom-turbopack-client.node.development.js'); | ||
| w = require('./cjs/react-server-dom-turbopack-client.node-webstreams.development.js'); | ||
| } | ||
|
|
||
| exports.registerServerReference = function (r, i, e) { | ||
| return w.registerServerReference(n.registerServerReference(r, i, e), i, e); | ||
| }; | ||
| exports.createServerReference = function (i, c, e, d, f) { | ||
| return w.registerServerReference( | ||
| n.createServerReference(i, c, e, d, f), | ||
unstubbable marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| i, | ||
| e | ||
| ); | ||
| }; | ||
|
|
||
| exports.createFromNodeStream = n.createFromNodeStream; | ||
| exports.createFromFetch = w.createFromFetch; | ||
| exports.createFromReadableStream = w.createFromReadableStream; | ||
|
|
||
| exports.createTemporaryReferenceSet = w.createTemporaryReferenceSet; | ||
| exports.encodeReply = w.encodeReply; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientBrowser'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientEdge'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientEdge'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export * from './ReactFlightDOMClientNode'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /** | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| * | ||
| * @flow | ||
| */ | ||
|
|
||
| export { | ||
| renderToReadableStream, | ||
| prerender as unstable_prerender, | ||
| decodeReply, | ||
| decodeReplyFromAsyncIterable, | ||
| decodeAction, | ||
| decodeFormState, | ||
| registerServerReference, | ||
| registerClientReference, | ||
| createClientModuleProxy, | ||
| createTemporaryReferenceSet, | ||
| } from './ReactFlightDOMServerEdge'; |
Uh oh!
There was an error while loading. Please reload this page.