close
The Wayback Machine - https://web.archive.org/web/20201214132644/https://github.com/facebook/react/pull/20403
Skip to content
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

[Flight] Rename react-transport-... packages to react-server-... #20403

Merged
merged 5 commits into from Dec 8, 2020

Conversation

@sebmarkbage
Copy link
Member

@sebmarkbage sebmarkbage commented Dec 8, 2020

Also renames /server to /writer and uses the .server.js convention to enforce that it's only loaded within a react-server environment.

The client is still /index but I use the Reader suffix convention as import name.

If this naming convention sticks then SSR (react-dom/server) will need a different name (not named server). It's not fully clear yet whether Fizz will be a standalone thing or if it will be built to include the Reader. In the later case it might end up in this same package but under a different name.

sebmarkbage added 4 commits Dec 8, 2020
This is mainly because "React Server Server" is weird so we need another
dimension.
@codesandbox
Copy link

@codesandbox codesandbox bot commented Dec 8, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9c3bfe2:

Sandbox Source
React Configuration
@sizebot
Copy link

@sizebot sizebot commented Dec 8, 2020

Details of bundled changes.

Comparing: ce40f1d...9c3bfe2

react-server-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-dom-webpack-node-loader.js n/a n/a 0 B 8.24 KB 0 B 2.8 KB NODE_ESM
react-server-dom-webpack.development.js n/a n/a 0 B 16.8 KB 0 B 4.83 KB NODE_DEV
react-server-dom-webpack.production.min.js n/a n/a 0 B 3.73 KB 0 B 1.67 KB NODE_PROD
react-server-dom-webpack-writer.browser.server.development.js n/a n/a 0 B 26.23 KB 0 B 6.88 KB UMD_DEV
react-server-dom-webpack-writer.node.server.development.js n/a n/a 0 B 25.56 KB 0 B 7 KB NODE_DEV
react-server-dom-webpack-writer.browser.server.production.min.js n/a n/a 0 B 6.44 KB 0 B 2.71 KB UMD_PROD
react-server-dom-webpack-writer.node.server.production.min.js n/a n/a 0 B 6.43 KB 0 B 2.63 KB NODE_PROD
react-server-dom-webpack-writer.browser.server.development.js n/a n/a 0 B 24.62 KB 0 B 6.74 KB NODE_DEV
react-server-dom-webpack-node-register.js n/a n/a 0 B 3.22 KB 0 B 1.35 KB NODE_ES2015
react-server-dom-webpack-writer.browser.server.production.min.js n/a n/a 0 B 6.24 KB 0 B 2.61 KB NODE_PROD
react-server-dom-webpack-plugin.js n/a n/a 0 B 7.65 KB 0 B 2.54 KB NODE_ES2015
react-server-dom-webpack.development.js n/a n/a 0 B 18.01 KB 0 B 4.94 KB UMD_DEV
react-server-dom-webpack.production.min.js n/a n/a 0 B 3.93 KB 0 B 1.76 KB UMD_PROD

Size changes (stable)

Generated by 🚫 dangerJS against 9c3bfe2

@sizebot
Copy link

@sizebot sizebot commented Dec 8, 2020

Details of bundled changes.

Comparing: ce40f1d...9c3bfe2

react-server-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-dom-webpack-node-loader.js n/a n/a 0 B 8.25 KB 0 B 2.81 KB NODE_ESM
react-server-dom-webpack.development.js n/a n/a 0 B 16.81 KB 0 B 4.83 KB NODE_DEV
react-server-dom-webpack.production.min.js n/a n/a 0 B 3.75 KB 0 B 1.68 KB NODE_PROD
react-server-dom-webpack-writer.browser.server.development.js n/a n/a 0 B 26.24 KB 0 B 6.89 KB UMD_DEV
react-server-dom-webpack-writer.node.server.development.js n/a n/a 0 B 25.58 KB 0 B 7.01 KB NODE_DEV
react-server-dom-webpack-writer.browser.server.production.min.js n/a n/a 0 B 6.46 KB 0 B 2.71 KB UMD_PROD
react-server-dom-webpack-writer.node.server.production.min.js n/a n/a 0 B 6.44 KB 0 B 2.64 KB NODE_PROD
react-server-dom-webpack-writer.browser.server.development.js n/a n/a 0 B 24.64 KB 0 B 6.75 KB NODE_DEV
react-server-dom-webpack-node-register.js n/a n/a 0 B 3.24 KB 0 B 1.36 KB NODE_ES2015
react-server-dom-webpack-writer.browser.server.production.min.js n/a n/a 0 B 6.25 KB 0 B 2.62 KB NODE_PROD
react-server-dom-webpack-plugin.js n/a n/a 0 B 7.66 KB 0 B 2.55 KB NODE_ES2015
react-server-dom-webpack.development.js n/a n/a 0 B 18.02 KB 0 B 4.95 KB UMD_DEV
react-server-dom-webpack.production.min.js n/a n/a 0 B 3.95 KB 0 B 1.77 KB UMD_PROD

Size changes (experimental)

Generated by 🚫 dangerJS against 9c3bfe2

@sebmarkbage sebmarkbage force-pushed the sebmarkbage:transporttoserver branch from 3d3ccae to 9c3bfe2 Dec 8, 2020
ReactDOMFlightRelayServer = require('react-transport-dom-relay/server');
ReactDOMFlightRelayClient = require('react-transport-dom-relay');
ReactDOMFlightRelayServer = require('react-server-dom-relay/server');
ReactDOMFlightRelayClient = require('react-server-dom-relay');

This comment has been minimized.

@gaearon

gaearon Dec 8, 2020
Member

Should we start getting rid of the codename in source? It’s already being referred to in some places which risks confusion.

This comment has been minimized.

@sebmarkbage

sebmarkbage Dec 8, 2020
Author Member

These are internal FB names. I think I’ve changed the external ones.

This comment has been minimized.

@gaearon

gaearon Dec 8, 2020
Member

Yeah but I mean people read the source too. If we don't need the codename we could just remove it everywhere.

"./node-register": "./node-register.js",
"./package.json": "./package.json"
},
"browser": {
"./server.js": "./server.browser.js"
"./writer.js": "./writer.browser.server.js"

This comment has been minimized.

@gaearon

gaearon Dec 8, 2020
Member

What’s up with this change?

This comment has been minimized.

@gaearon

gaearon Dec 8, 2020
Member

I guess this is still a server even in the browser. So was the extension missing before?

This comment has been minimized.

@gaearon

gaearon Dec 8, 2020
Member

ah I see

uses the .server.js convention to enforce that it's only loaded within a react-server environment.

This comment has been minimized.

@sebmarkbage

sebmarkbage Dec 8, 2020
Author Member

It’s weird that this convention wins and have to be one the end.

It’s also weird that since this reexports, the reexport is considered a hybrid. That just works because it doesn’t have dependencies on other server files.

We probably should change our CJS build output convention to include server at the end.

@gaearon
gaearon approved these changes Dec 8, 2020
@sebmarkbage sebmarkbage merged commit 5fd9db7 into facebook:master Dec 8, 2020
34 checks passed
34 checks passed
Facebook CLA Check Contributor License Agreement is valid!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_lint_build Your tests passed on CircleCI!
Details
ci/circleci: RELEASE_CHANNEL_stable_yarn_test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_and_process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_scheduling_profiler Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: sizebot_stable Your tests passed on CircleCI!
Details
ci/circleci: yarn_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_flow Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint Your tests passed on CircleCI!
Details
ci/circleci: yarn_lint_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-classic Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-classic_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-classic_prod_variant Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-classic_variant Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-stable Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-stable_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-stable_build_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-stable_persistent Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-stable_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-www Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-www_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-www_prod_variant Your tests passed on CircleCI!
Details
ci/circleci: yarn_test-www_variant Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_devtools Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_prod Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.