Skip to content

Commit da81607

Browse files
committed
Update RN dynamic flag types (#28427)
Updates the RN flag flow types to work like www does, so we can use the `.native-fb-dynamic.js` file as the type/shim for the dynamically imported file. DiffTrain build for commit fa0efa1.
1 parent 5dd6a48 commit da81607

File tree

15 files changed

+106
-96
lines changed

15 files changed

+106
-96
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<6d931d2de9a1892cd33381697c43409f>>
10+
* @generated SignedSource<<2efa0f7ab5ad5e492b13b7c939b8e190>>
1111
*/
1212

1313
"use strict";
@@ -16,7 +16,7 @@ if (__DEV__) {
1616
(function () {
1717
"use strict";
1818

19-
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
19+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2020

2121
// ATTENTION
2222
// When adding new symbols to this file,
@@ -39,7 +39,8 @@ if (__DEV__) {
3939
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
4040
var REACT_CACHE_TYPE = Symbol.for("react.cache");
4141

42-
// NOTE: There are no flags, currently. Uncomment the stuff below if we add one.
42+
// Re-export dynamic flags from the internal module.
43+
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
4344
// the exports object every time a flag is read.
4445

4546
var enableRenderableContext = dynamicFlags.enableRenderableContext;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f4f9eb9ce7783ae0921b56d253c4faad>>
10+
* @generated SignedSource<<f71d56737b959dc3ce937d61f1bd9834>>
1111
*/
1212

1313
"use strict";
14-
var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
14+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
1515
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1616
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1717
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -27,7 +27,7 @@ var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
2727
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2828
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
2929
REACT_CACHE_TYPE = Symbol.for("react.cache"),
30-
enableRenderableContext = dynamicFlags.enableRenderableContext,
30+
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
3131
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
3232
function typeOf(object) {
3333
if ("object" === typeof object && null !== object) {

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f4f9eb9ce7783ae0921b56d253c4faad>>
10+
* @generated SignedSource<<f71d56737b959dc3ce937d61f1bd9834>>
1111
*/
1212

1313
"use strict";
14-
var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
14+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
1515
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1616
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1717
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -27,7 +27,7 @@ var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
2727
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2828
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
2929
REACT_CACHE_TYPE = Symbol.for("react.cache"),
30-
enableRenderableContext = dynamicFlags.enableRenderableContext,
30+
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
3131
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
3232
function typeOf(object) {
3333
if ("object" === typeof object && null !== object) {

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e8fc1f0235d7e4a937828eef96c3d9d7>>
10+
* @generated SignedSource<<0d9a77506743aad44cc841af6c1c670c>>
1111
*/
1212

1313
"use strict";
@@ -17,7 +17,7 @@ if (__DEV__) {
1717
"use strict";
1818

1919
var React = require("react");
20-
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
20+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2121

2222
// ATTENTION
2323
// When adding new symbols to this file,
@@ -103,7 +103,8 @@ if (__DEV__) {
103103
}
104104
}
105105

106-
// NOTE: There are no flags, currently. Uncomment the stuff below if we add one.
106+
// Re-export dynamic flags from the internal module.
107+
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
107108
// the exports object every time a flag is read.
108109

109110
var enableComponentStackLocations =

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<9adef053c6c5541fdc8c531c06ac6d64>>
10+
* @generated SignedSource<<adeaae2f5066d7efda21fb798629deec>>
1111
*/
1212

1313
"use strict";
@@ -17,7 +17,7 @@ if (__DEV__) {
1717
"use strict";
1818

1919
var React = require("react");
20-
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
20+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2121

2222
// ATTENTION
2323
// When adding new symbols to this file,
@@ -103,7 +103,8 @@ if (__DEV__) {
103103
}
104104
}
105105

106-
// NOTE: There are no flags, currently. Uncomment the stuff below if we add one.
106+
// Re-export dynamic flags from the internal module.
107+
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
107108
// the exports object every time a flag is read.
108109

109110
var enableComponentStackLocations =

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<7d6e6eb20c84cbe47eca19d4810dcb60>>
10+
* @generated SignedSource<<ea0358e696426d4e3e4a41698c95dba1>>
1111
*/
1212

1313
"use strict";
@@ -24,9 +24,9 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
27+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "18.3.0-canary-71c3a245";
29+
var ReactVersion = "18.3.0-canary-f6aabfc7";
3030

3131
// ATTENTION
3232
// When adding new symbols to this file,
@@ -490,7 +490,8 @@ if (__DEV__) {
490490
return isArrayImpl(a);
491491
}
492492

493-
// NOTE: There are no flags, currently. Uncomment the stuff below if we add one.
493+
// Re-export dynamic flags from the internal module.
494+
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
494495
// the exports object every time a flag is read.
495496

496497
var enableAsyncActions = dynamicFlags.enableAsyncActions,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<0ad08d0ae422694c93c891090ccf41af>>
10+
* @generated SignedSource<<66e537022089ccfa9fc66af1a02c3dcf>>
1111
*/
1212

1313
"use strict";
14-
var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
14+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
1515
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
1616
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1717
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -83,8 +83,8 @@ pureComponentPrototype.constructor = PureComponent;
8383
assign(pureComponentPrototype, Component.prototype);
8484
pureComponentPrototype.isPureReactComponent = !0;
8585
var isArrayImpl = Array.isArray,
86-
enableAsyncActions = dynamicFlags.enableAsyncActions,
87-
enableRenderableContext = dynamicFlags.enableRenderableContext,
86+
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
87+
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
8888
ReactCurrentDispatcher = { current: null },
8989
ReactCurrentCache = { current: null },
9090
ReactCurrentBatchConfig = { transition: null },
@@ -628,4 +628,4 @@ exports.useSyncExternalStore = function (
628628
exports.useTransition = function () {
629629
return ReactCurrentDispatcher.current.useTransition();
630630
};
631-
exports.version = "18.3.0-canary-20925769";
631+
exports.version = "18.3.0-canary-56830a7d";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<9d38179074b2fce93bbd3958437928a4>>
10+
* @generated SignedSource<<af7de104fc236eac212bded7bf6ecd5d>>
1111
*/
1212

1313
"use strict";
1414
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1515
"function" ===
1616
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
1717
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
18-
var dynamicFlags = require("ReactNativeInternalFeatureFlags"),
18+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
1919
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
2020
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
2121
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -86,8 +86,8 @@ pureComponentPrototype.constructor = PureComponent;
8686
assign(pureComponentPrototype, Component.prototype);
8787
pureComponentPrototype.isPureReactComponent = !0;
8888
var isArrayImpl = Array.isArray,
89-
enableAsyncActions = dynamicFlags.enableAsyncActions,
90-
enableRenderableContext = dynamicFlags.enableRenderableContext,
89+
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
90+
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
9191
ReactCurrentDispatcher = { current: null },
9292
ReactCurrentCache = { current: null },
9393
ReactCurrentBatchConfig = { transition: null },
@@ -624,7 +624,7 @@ exports.useSyncExternalStore = function (
624624
exports.useTransition = function () {
625625
return ReactCurrentDispatcher.current.useTransition();
626626
};
627-
exports.version = "18.3.0-canary-e9a347e8";
627+
exports.version = "18.3.0-canary-eb44066b";
628628
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
629629
"function" ===
630630
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
67081159377b438b48e3c2f2278af8e5f56b9f64
1+
fa0efa1ae3b83e573e21dfd6d0620039fa7fedd3

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<eeaebeab7f3f68483a0c03e29c84175e>>
10+
* @generated SignedSource<<1ec886cf24e81b1ab42f1e17f0ac5358>>
1111
*/
1212

1313
"use strict";
@@ -27,7 +27,7 @@ if (__DEV__) {
2727
var React = require("react");
2828
require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
2929
var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface");
30-
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
30+
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
3131
var Scheduler = require("scheduler");
3232

3333
var ReactSharedInternals =
@@ -2969,7 +2969,8 @@ to return true:wantsResponderID| |
29692969
// where it would do it.
29702970
}
29712971

2972-
// NOTE: There are no flags, currently. Uncomment the stuff below if we add one.
2972+
// Re-export dynamic flags from the internal module.
2973+
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
29732974
// the exports object every time a flag is read.
29742975

29752976
var alwaysThrottleDisappearingFallbacks =
@@ -29806,7 +29807,7 @@ to return true:wantsResponderID| |
2980629807
return root;
2980729808
}
2980829809

29809-
var ReactVersion = "18.3.0-canary-dec7bc1a";
29810+
var ReactVersion = "18.3.0-canary-032b0204";
2981029811

2981129812
function createPortal$1(
2981229813
children,

0 commit comments

Comments
 (0)