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 commit https://github.com/facebook/react/commit/0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f.
This commit is contained in:
kassens
2024-05-03 18:12:57 +00:00
parent 532629987f
commit 01110acca4
5 changed files with 20 additions and 36 deletions
@@ -7,17 +7,14 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ab6461aaac1e5e9824380130b8d84e2c>>
* @generated SignedSource<<5917bdf46559392459c712d28247d2c7>>
*/
'use strict';
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,9 +22,9 @@ if (
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
var ReactVersion = '19.0.0-beta-b4f8872e';
var ReactVersion = '19.0.0-beta-536f9068';
// Re-export dynamic flags from the internal module.
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
@@ -3331,7 +3328,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 ===
@@ -3339,6 +3335,6 @@ if (
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
@@ -7,17 +7,14 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f35f511f0b893fdc50a8e31e3f106821>>
* @generated SignedSource<<e367cc047b9d2098d9835d7bb141eaa2>>
*/
'use strict';
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 enableSchedulerDebugging = false;
var enableSchedulerDebugging = false;
var enableProfiling = false;
var frameYieldMs = 5;
var userBlockingPriorityTimeout = 250;
@@ -614,7 +611,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 ===
@@ -622,6 +618,6 @@ if (
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
@@ -1 +1 @@
1d618a9cf36948dbf94aa6a6f2eb9e6a64b52eb0
0a0a3af75a740d0920ebf7f4affaf8d1ce8c107f
@@ -7,17 +7,14 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<aa761accb291cac97fef5f7da27eea9a>>
* @generated SignedSource<<c1c4b5e9c9be53b3abfee5f289a1221a>>
*/
'use strict';
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());
}
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore');
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore');
var React = require('react');
var ReactNativePrivateInterface = require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface');
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
@@ -26055,7 +26052,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}
var ReactVersion = '19.0.0-beta-f64f755b';
var ReactVersion = '19.0.0-beta-72ec4a89';
/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
@@ -27106,7 +27103,6 @@ exports.render = render;
exports.sendAccessibilityEvent = sendAccessibilityEvent;
exports.stopSurface = stopSurface;
exports.unmountComponentAtNode = unmountComponentAtNode;
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
@@ -27114,6 +27110,6 @@ if (
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
@@ -7,17 +7,14 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<af158c6fdf92fc4e43e592ad1c7a98ee>>
* @generated SignedSource<<9675f2f5127aace0edc91083bd5c4242>>
*/
'use strict';
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());
}
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore');
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore');
var React = require('react');
var ReactNativePrivateInterface = require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface');
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
@@ -26467,7 +26464,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}
var ReactVersion = '19.0.0-beta-4aa1a800';
var ReactVersion = '19.0.0-beta-07071eeb';
/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
@@ -27526,7 +27523,6 @@ exports.sendAccessibilityEvent = sendAccessibilityEvent;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unmountComponentAtNodeAndRemoveContainer = unmountComponentAtNodeAndRemoveContainer;
exports.unstable_batchedUpdates = batchedUpdates$1;
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
@@ -27534,6 +27530,6 @@ if (
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}