From b76cf7b7a84130d6cbb67286fbb09c1ecfa00a2b Mon Sep 17 00:00:00 2001 From: kassens Date: Fri, 3 May 2024 18:13:10 +0000 Subject: [PATCH] Bundle config: inline internal hook wrapper (#28978) Bundle config: inline internal hook wrapper Instead of reading this wrapper from 2 files for "start" and "end" and then string modifying the templates, just inline them like the other wrappers in this file. DiffTrain build for [0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f](https://github.com/facebook/react/commit/0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/React-dev.classic.js | 10 +++------- compiled/facebook-www/React-dev.modern.js | 10 +++------- compiled/facebook-www/ReactART-dev.classic.js | 12 ++++-------- compiled/facebook-www/ReactART-dev.modern.js | 12 ++++-------- compiled/facebook-www/ReactDOM-dev.classic.js | 12 ++++-------- compiled/facebook-www/ReactDOM-dev.modern.js | 12 ++++-------- compiled/facebook-www/Scheduler-dev.classic.js | 10 +++------- compiled/facebook-www/Scheduler-dev.modern.js | 10 +++------- 9 files changed, 29 insertions(+), 61 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 7755a36186259..2e655f245375d 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -1beb73de0f7c3261a0de37620453b102caaa6236 +0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 9a72d6c9a02ff..918e37ec299a0 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = '19.0.0-www-classic-f1929680'; +var ReactVersion = '19.0.0-www-classic-efefdbe4'; // Re-export dynamic flags from the www version. var dynamicFeatureFlags = require('ReactFeatureFlags'); @@ -3504,7 +3501,6 @@ exports.useState = useState; exports.useSyncExternalStore = useSyncExternalStore; exports.useTransition = useTransition; exports.version = ReactVersion; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -3512,6 +3508,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 7956b1301f021..84a1abb297cf7 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = '19.0.0-www-modern-1ac5c7b0'; +var ReactVersion = '19.0.0-www-modern-a366d2dc'; // Re-export dynamic flags from the www version. var dynamicFeatureFlags = require('ReactFeatureFlags'); @@ -3493,7 +3490,6 @@ exports.useState = useState; exports.useSyncExternalStore = useSyncExternalStore; exports.useTransition = useTransition; exports.version = ReactVersion; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -3501,6 +3497,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 836752e47feaa..aa7f48ef8eefb 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React = require('react'); +var React = require('react'); var Transform = require('art/core/transform'); var Mode$1 = require('art/modes/current'); var Scheduler = require('scheduler'); @@ -63,7 +60,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-classic-0ce7839f'; +var ReactVersion = '19.0.0-www-classic-bcc8c760'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -26679,7 +26676,6 @@ exports.RadialGradient = RadialGradient; exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -26687,6 +26683,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 66001d698b1ba..e34a5ec5e4f39 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var React = require('react'); +var React = require('react'); var Transform = require('art/core/transform'); var Mode$1 = require('art/modes/current'); var Scheduler = require('scheduler'); @@ -63,7 +60,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-modern-3acd2c75'; +var ReactVersion = '19.0.0-www-modern-23dbd06a'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -25957,7 +25954,6 @@ exports.RadialGradient = RadialGradient; exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -25965,6 +25961,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index f220c5d638224..f219d6d8eccd0 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var Scheduler = require('scheduler'); +var Scheduler = require('scheduler'); var React = require('react'); var assign = Object.assign; @@ -30841,7 +30838,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-c1bcb6b8'; +var ReactVersion = '19.0.0-www-classic-f43a9c2f'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { @@ -41891,7 +41888,6 @@ exports.unstable_runWithPriority = runWithPriority; exports.useFormState = useFormState; exports.useFormStatus = useFormStatus; exports.version = ReactVersion; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -41899,6 +41895,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 109df8eaa0ccb..0bb8b6a3d25ed 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var Scheduler = require('scheduler'); +var Scheduler = require('scheduler'); var React = require('react'); var assign = Object.assign; @@ -30016,7 +30013,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-2f73daed'; +var ReactVersion = '19.0.0-www-modern-c9b0d0d3'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { @@ -40879,7 +40876,6 @@ exports.unstable_runWithPriority = runWithPriority; exports.useFormState = useFormState; exports.useFormStatus = useFormStatus; exports.version = ReactVersion; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -40887,6 +40883,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/Scheduler-dev.classic.js b/compiled/facebook-www/Scheduler-dev.classic.js index b233718ffd3bf..e89eb9b3f0dbc 100644 --- a/compiled/facebook-www/Scheduler-dev.classic.js +++ b/compiled/facebook-www/Scheduler-dev.classic.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - // $FlowFixMe[cannot-resolve-module] +// $FlowFixMe[cannot-resolve-module] var dynamicFeatureFlags = require('SchedulerFeatureFlags'); var enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling; @@ -804,7 +801,6 @@ exports.unstable_runWithPriority = unstable_runWithPriority; exports.unstable_scheduleCallback = unstable_scheduleCallback; exports.unstable_shouldYield = shouldYieldToHost; exports.unstable_wrapCallback = unstable_wrapCallback; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -812,6 +808,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); } diff --git a/compiled/facebook-www/Scheduler-dev.modern.js b/compiled/facebook-www/Scheduler-dev.modern.js index b233718ffd3bf..e89eb9b3f0dbc 100644 --- a/compiled/facebook-www/Scheduler-dev.modern.js +++ b/compiled/facebook-www/Scheduler-dev.modern.js @@ -14,10 +14,7 @@ if (__DEV__) { (function() { - - 'use strict'; - -/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ +'use strict'; if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === @@ -25,7 +22,7 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - // $FlowFixMe[cannot-resolve-module] +// $FlowFixMe[cannot-resolve-module] var dynamicFeatureFlags = require('SchedulerFeatureFlags'); var enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling; @@ -804,7 +801,6 @@ exports.unstable_runWithPriority = unstable_runWithPriority; exports.unstable_scheduleCallback = unstable_scheduleCallback; exports.unstable_shouldYield = shouldYieldToHost; exports.unstable_wrapCallback = unstable_wrapCallback; - /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === @@ -812,6 +808,6 @@ if ( ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } - + })(); }