@samitouri / QOS-React-2 / commits / bf40b02442

[Fizz] Stop publishing external-runtime to stable channel (#28796)

The external runtime is not vetted for stability yet. We should stop publishing it with our stable build

Josh Story committed Apr 9, 2024 at 11:57 UTC bf40b024421a0e1f2f882fd7171ea39cd74c88df
3 files changed +10 -3
packages/shared/ReactFeatureFlags.js
+1 -1
@@ -110,7 +110,7 @@ export const enableUseEffectEventHook = __EXPERIMENTAL__;
110 // Test in www before enabling in open source.
111 // Enables DOM-server to stream its instruction set as data-attributes
112 // (handled with an MutationObserver) instead of inline-scripts
113 -export const enableFizzExternalRuntime = true;
113 +export const enableFizzExternalRuntime = __EXPERIMENTAL__;
114
115 export const alwaysThrottleRetries = true;
116
scripts/rollup/bundles.js
+1 -1
@@ -328,7 +328,7 @@ const bundles = [
328
329 /******* React DOM Fizz Server External Runtime *******/
330 {
331 - bundleTypes: [BROWSER_SCRIPT],
331 + bundleTypes: __EXPERIMENTAL__ ? [BROWSER_SCRIPT] : [],
332 moduleType: RENDERER,
333 entry: 'react-dom/unstable_server-external-runtime',
334 outputPath: 'unstable_server-external-runtime.js',
scripts/rollup/packaging.js
+8 -1
@@ -235,7 +235,14 @@ function filterOutEntrypoints(name) {
235 // Let's remove it.
236 files.splice(i, 1);
237 i--;
238 - unlinkSync(`build/node_modules/${name}/${filename}`);
238 + try {
239 + unlinkSync(`build/node_modules/${name}/${filename}`);
240 + } catch (err) {
241 + // If the file doesn't exist we can just move on. Otherwise throw the halt the build
242 + if (err.code !== 'ENOENT') {
243 + throw err;
244 + }
245 + }
246 changed = true;
247 // Remove it from the exports field too if it exists.
248 if (exportsJSON) {