Skip to content

Commit

Permalink
Bundle config: inline internal hook wrapper (#28978)
Browse files Browse the repository at this point in the history
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 [0a0a3af](0a0a3af)
  • Loading branch information
kassens committed May 3, 2024
1 parent bc32eda commit b76cf7b
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 61 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1beb73de0f7c3261a0de37620453b102caaa6236
0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f
10 changes: 3 additions & 7 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__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');
Expand Down Expand Up @@ -3504,14 +3501,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
10 changes: 3 additions & 7 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__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');
Expand Down Expand Up @@ -3493,14 +3490,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
12 changes: 4 additions & 8 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__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');
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -26679,14 +26676,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
12 changes: 4 additions & 8 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__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');
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -25957,14 +25954,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
12 changes: 4 additions & 8 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var Scheduler = require('scheduler');
var Scheduler = require('scheduler');
var React = require('react');

var assign = Object.assign;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -41891,14 +41888,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
12 changes: 4 additions & 8 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var Scheduler = require('scheduler');
var Scheduler = require('scheduler');
var React = require('react');

var assign = Object.assign;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -40879,14 +40876,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
10 changes: 3 additions & 7 deletions compiled/facebook-www/Scheduler-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
// $FlowFixMe[cannot-resolve-module]
// $FlowFixMe[cannot-resolve-module]
var dynamicFeatureFlags = require('SchedulerFeatureFlags');

var enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling;
Expand Down Expand Up @@ -804,14 +801,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}
10 changes: 3 additions & 7 deletions compiled/facebook-www/Scheduler-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@

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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
// $FlowFixMe[cannot-resolve-module]
// $FlowFixMe[cannot-resolve-module]
var dynamicFeatureFlags = require('SchedulerFeatureFlags');

var enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling;
Expand Down Expand Up @@ -804,14 +801,13 @@ 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 ===
'function'
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}

})();
}

0 comments on commit b76cf7b

Please sign in to comment.