Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit 378973b

Browse files
[Flight] Move react-server-dom-webpack/*.unbundled to private react-server-dom-unbundled (#35290)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
1 parent 3016ff8 commit 378973b

47 files changed

Lines changed: 2908 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = {
331331
'packages/react-server-dom-turbopack/**/*.js',
332332
'packages/react-server-dom-parcel/**/*.js',
333333
'packages/react-server-dom-fb/**/*.js',
334+
'packages/react-server-dom-unbundled/**/*.js',
334335
'packages/react-test-renderer/**/*.js',
335336
'packages/react-debug-tools/**/*.js',
336337
'packages/react-devtools-extensions/**/*.js',

‎.github/workflows/runtime_build_and_test.yml‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
path: |
4343
**/node_modules
44-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
44+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
4545
lookup-only: true
4646
- uses: actions/setup-node@v4
4747
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -55,10 +55,8 @@ jobs:
5555
with:
5656
path: |
5757
**/node_modules
58-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59-
restore-keys: |
60-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
61-
runtime-node_modules-v6-
58+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
6260
- run: yarn install --frozen-lockfile
6361
if: steps.node_modules.outputs.cache-hit != 'true'
6462
- name: Save cache
@@ -67,7 +65,7 @@ jobs:
6765
with:
6866
path: |
6967
**/node_modules
70-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
68+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
7169

7270
runtime_compiler_node_modules_cache:
7371
name: Cache Runtime, Compiler node_modules
@@ -82,7 +80,7 @@ jobs:
8280
with:
8381
path: |
8482
**/node_modules
85-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
83+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
8684
lookup-only: true
8785
- uses: actions/setup-node@v4
8886
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -98,10 +96,8 @@ jobs:
9896
with:
9997
path: |
10098
**/node_modules
101-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
102-
restore-keys: |
103-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
104-
runtime-and-compiler-node_modules-v6-
99+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
100+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
105101
- run: yarn install --frozen-lockfile
106102
if: steps.node_modules.outputs.cache-hit != 'true'
107103
- run: yarn --cwd compiler install --frozen-lockfile
@@ -112,7 +108,7 @@ jobs:
112108
with:
113109
path: |
114110
**/node_modules
115-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
111+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
116112

117113
# ----- FLOW -----
118114
discover_flow_inline_configs:
@@ -154,10 +150,8 @@ jobs:
154150
with:
155151
path: |
156152
**/node_modules
157-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
158-
restore-keys: |
159-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
160-
runtime-node_modules-v6-
153+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
161155
- name: Ensure clean build directory
162156
run: rm -rf build
163157
- run: yarn install --frozen-lockfile
@@ -184,10 +178,8 @@ jobs:
184178
with:
185179
path: |
186180
**/node_modules
187-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
188-
restore-keys: |
189-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
190-
runtime-node_modules-v6-
181+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
182+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
191183
- name: Ensure clean build directory
192184
run: rm -rf build
193185
- run: yarn install --frozen-lockfile
@@ -216,7 +208,7 @@ jobs:
216208
with:
217209
path: |
218210
**/node_modules
219-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
211+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
220212
- name: Ensure clean build directory
221213
run: rm -rf build
222214
- run: yarn install --frozen-lockfile
@@ -274,10 +266,8 @@ jobs:
274266
with:
275267
path: |
276268
**/node_modules
277-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
278-
restore-keys: |
279-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
280-
runtime-and-compiler-node_modules-v6-
269+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
270+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
281271
- name: Ensure clean build directory
282272
run: rm -rf build
283273
- run: yarn install --frozen-lockfile
@@ -306,7 +296,7 @@ jobs:
306296
with:
307297
path: |
308298
**/node_modules
309-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
299+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
310300
- name: Install runtime dependencies
311301
run: yarn install --frozen-lockfile
312302
if: steps.node_modules.outputs.cache-hit != 'true'
@@ -349,10 +339,8 @@ jobs:
349339
with:
350340
path: |
351341
**/node_modules
352-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
353-
restore-keys: |
354-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
355-
runtime-and-compiler-node_modules-v6-
342+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
343+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
356344
- name: Ensure clean build directory
357345
run: rm -rf build
358346
- run: yarn install --frozen-lockfile
@@ -440,10 +428,8 @@ jobs:
440428
with:
441429
path: |
442430
**/node_modules
443-
key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
444-
restore-keys: |
445-
runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
446-
runtime-and-compiler-node_modules-v6-
431+
key: runtime-and-compiler-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
432+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
447433
- name: Ensure clean build directory
448434
run: rm -rf build
449435
- run: yarn install --frozen-lockfile
@@ -483,10 +469,8 @@ jobs:
483469
with:
484470
path: |
485471
**/node_modules
486-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
487-
restore-keys: |
488-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
489-
runtime-node_modules-v6-
472+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
473+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
490474
- name: Ensure clean build directory
491475
run: rm -rf build
492476
- run: yarn install --frozen-lockfile
@@ -548,10 +532,8 @@ jobs:
548532
with:
549533
path: |
550534
**/node_modules
551-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
552-
restore-keys: |
553-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
554-
runtime-node_modules-v6-
535+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
536+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
555537
- name: Ensure clean build directory
556538
run: rm -rf build
557539
- run: yarn install --frozen-lockfile
@@ -588,10 +570,8 @@ jobs:
588570
with:
589571
path: |
590572
**/node_modules
591-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
592-
restore-keys: |
593-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
594-
runtime-node_modules-v6-
573+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
574+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
595575
- name: Ensure clean build directory
596576
run: rm -rf build
597577
- run: yarn install --frozen-lockfile
@@ -740,10 +720,8 @@ jobs:
740720
with:
741721
path: |
742722
**/node_modules
743-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
744-
restore-keys: |
745-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
746-
runtime-node_modules-v6-
723+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
724+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
747725
- name: Ensure clean build directory
748726
run: rm -rf build
749727
- run: yarn install --frozen-lockfile
@@ -802,10 +780,8 @@ jobs:
802780
with:
803781
path: |
804782
**/node_modules
805-
key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
806-
restore-keys: |
807-
runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-
808-
runtime-node_modules-v6-
783+
key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
784+
# Don't use restore-keys here. Otherwise the cache grows indefinitely.
809785
- name: Ensure clean build directory
810786
run: rm -rf build
811787
- run: yarn install --frozen-lockfile

‎fixtures/flight/loader/region.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
loadasreactLoad,
44
getSourceasgetSourceImpl,
55
transformSourceasreactTransformSource,
6-
}from'react-server-dom-webpack/node-loader';
6+
}from'react-server-dom-unbundled/node-loader';
77

88
export{resolve};
99

‎fixtures/flight/server/global.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const http = require('http');
3636
constReact=require('react');
3737

3838
const{renderToPipeableStream}=require('react-dom/server');
39-
const{createFromNodeStream}=require('react-server-dom-webpack/client');
39+
const{createFromNodeStream}=require('react-server-dom-unbundled/client');
4040
const{PassThrough}=require('stream');
4141

4242
constapp=express();

‎fixtures/flight/server/region.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
constpath=require('path');
66
consturl=require('url');
77

8-
constregister=require('react-server-dom-webpack/node-register');
8+
constregister=require('react-server-dom-unbundled/node-register');
9+
// TODO: This seems to have no effect anymore. Remove?
910
register();
1011

1112
constbabelRegister=require('@babel/register');
@@ -76,7 +77,7 @@ function getDebugChannel(req) {
7677

7778
asyncfunctionrenderApp(res,returnValue,formState,noCache,debugChannel){
7879
const{renderToPipeableStream}=awaitimport(
79-
'react-server-dom-webpack/server'
80+
'react-server-dom-unbundled/server'
8081
);
8182
// const m = require('../src/App.js');
8283
constm=awaitimport('../src/App.js');
@@ -134,7 +135,7 @@ async function renderApp(res, returnValue, formState, noCache, debugChannel) {
134135

135136
asyncfunctionprerenderApp(res,returnValue,formState,noCache){
136137
const{prerenderToNodeStream}=awaitimport(
137-
'react-server-dom-webpack/static'
138+
'react-server-dom-unbundled/static'
138139
);
139140
// const m = require('../src/App.js');
140141
constm=awaitimport('../src/App.js');
@@ -202,7 +203,7 @@ app.get('/', async function (req, res) {
202203
app.post('/',bodyParser.text(),asyncfunction(req,res){
203204
constnoCache=req.headers['cache-control']==='no-cache';
204205
const{decodeReply, decodeReplyFromBusboy, decodeAction, decodeFormState}=
205-
awaitimport('react-server-dom-webpack/server');
206+
awaitimport('react-server-dom-unbundled/server');
206207
constserverReference=req.get('rsc-action');
207208
if(serverReference){
208209
// This is the client-side case

‎fixtures/flight/src/App.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import*asReactfrom'react';
2-
import{renderToReadableStream}from'react-server-dom-webpack/server';
2+
import{renderToReadableStream}from'react-server-dom-unbundled/server';
33
import{createFromReadableStream}from'react-server-dom-webpack/client';
44
import{PassThrough,Readable}from'stream';
55

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"build-for-devtools": "cross-env yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE --release-channel=experimental",
127127
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
128128
"build-for-devtools-prod": "yarn build-for-devtools --type=NODE_PROD",
129-
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
129+
"build-for-flight-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react.react-server,react-dom/index,react-dom/client,react-dom/server,react-dom.react-server,react-dom-server.node,react-dom-server-legacy.node,scheduler,react-server-dom-webpack/,react-server-dom-unbundled/ --type=NODE_DEV,ESM_PROD,NODE_ES2015 && mv ./build/node_modules ./build/oss-experimental",
130130
"build-for-vt-dev": "cross-env RELEASE_CHANNEL=experimental node ./scripts/rollup/build.js react/index,react/jsx,react-dom/index,react-dom/client,react-dom/server,react-dom-server.node,react-dom-server-legacy.node,scheduler --type=NODE_DEV && mv ./build/node_modules ./build/oss-experimental",
131131
"flow-typed-install": "yarn flow-typed install --skip --skipFlowRestart --ignore-deps=dev",
132132
"linc": "node ./scripts/tasks/linc.js",

packages/react-client/src/forks/ReactFlightClientConfig.dom-node-webpack.js renamed to packages/react-client/src/forks/ReactFlightClientConfig.dom-node-unbundled.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9+
910
export{defaultasrendererVersion}from'shared/ReactVersion';
10-
exportconstrendererPackageName='react-server-dom-webpack';
11+
exportconstrendererPackageName='react-server-dom-unbundled';
1112

1213
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1314
export*from'react-client/src/ReactClientConsoleConfigServer';
14-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
16-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
15+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode';
16+
export*from'react-server-dom-unbundled/src/client/ReactFlightClientConfigTargetNodeServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;

‎packages/react-client/src/forks/ReactFlightClientConfig.dom-node.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
*
77
* @flow
88
*/
9-
109
export{defaultasrendererVersion}from'shared/ReactVersion';
1110
exportconstrendererPackageName='react-server-dom-webpack';
1211

1312
export*from'react-client/src/ReactFlightClientStreamConfigNode';
1413
export*from'react-client/src/ReactClientConsoleConfigServer';
15-
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerNode';
14+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpack';
15+
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackServer';
1616
export*from'react-server-dom-webpack/src/client/ReactFlightClientConfigTargetWebpackServer';
1717
export*from'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
1818
exportconstusedWithSSR=true;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# react-server-dom-unbundled
2+
3+
Test-only React Flight bindings for DOM using Node.js.
4+
5+
This only exists for internal testing.

0 commit comments

Comments
 (0)