Skip to content

Commit 9d91828

Browse files
committed
[compiler] Infer deps configuration (facebook#31616)
Adds a way to configure how we insert deps for experimental purposes. ``` [ { module: 'react', imported: 'useEffect', numRequiredArgs: 1, }, { module: 'MyExperimentalEffectHooks', imported: 'useExperimentalEffect', numRequiredArgs: 2, }, ] ``` would insert dependencies for calls of `useEffect` imported from `react` if they have 1 argument and calls of useExperimentalEffect` from `MyExperimentalEffectHooks` if they have 2 arguments. The pushed dep array is appended to the arg list. DiffTrain build for [2a9f4c0](facebook@2a9f4c0)
1 parent a058ee7 commit 9d91828

23 files changed

+137
-137
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.0.0-native-fb-aba370f1-20241122
1+
19.0.0-native-fb-2a9f4c04-20241122

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

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

1313
"use strict";
@@ -420,5 +420,5 @@ __DEV__ &&
420420
exports.useFormStatus = function () {
421421
return resolveDispatcher().useHostTransitionStatus();
422422
};
423-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
423+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";
424424
})();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<81c01fe21e27672bef833613e7a3e25c>>
10+
* @generated SignedSource<<6333fffa5ab523cc9687eb23bac28b0b>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
206+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<81c01fe21e27672bef833613e7a3e25c>>
10+
* @generated SignedSource<<6333fffa5ab523cc9687eb23bac28b0b>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
206+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";

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

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

1313
/*
@@ -25768,11 +25768,11 @@ __DEV__ &&
2576825768
};
2576925769
(function () {
2577025770
var isomorphicReactPackageVersion = React.version;
25771-
if ("19.0.0-native-fb-aba370f1-20241122" !== isomorphicReactPackageVersion)
25771+
if ("19.0.0-native-fb-2a9f4c04-20241122" !== isomorphicReactPackageVersion)
2577225772
throw Error(
2577325773
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2577425774
(isomorphicReactPackageVersion +
25775-
"\n - react-dom: 19.0.0-native-fb-aba370f1-20241122\nLearn more: https://react.dev/warnings/version-mismatch")
25775+
"\n - react-dom: 19.0.0-native-fb-2a9f4c04-20241122\nLearn more: https://react.dev/warnings/version-mismatch")
2577625776
);
2577725777
})();
2577825778
("function" === typeof Map &&
@@ -25809,11 +25809,11 @@ __DEV__ &&
2580925809
!(function () {
2581025810
var internals = {
2581125811
bundleType: 1,
25812-
version: "19.0.0-native-fb-aba370f1-20241122",
25812+
version: "19.0.0-native-fb-2a9f4c04-20241122",
2581325813
rendererPackageName: "react-dom",
2581425814
currentDispatcherRef: ReactSharedInternals,
2581525815
findFiberByHostInstance: getClosestInstanceFromNode,
25816-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122"
25816+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122"
2581725817
};
2581825818
internals.overrideHookState = overrideHookState;
2581925819
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -25957,5 +25957,5 @@ __DEV__ &&
2595725957
listenToAllSupportedEvents(container);
2595825958
return new ReactDOMHydrationRoot(initialChildren);
2595925959
};
25960-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
25960+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";
2596125961
})();

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

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

1313
/*
@@ -15838,14 +15838,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1583815838
};
1583915839
var isomorphicReactPackageVersion$jscomp$inline_1735 = React.version;
1584015840
if (
15841-
"19.0.0-native-fb-aba370f1-20241122" !==
15841+
"19.0.0-native-fb-2a9f4c04-20241122" !==
1584215842
isomorphicReactPackageVersion$jscomp$inline_1735
1584315843
)
1584415844
throw Error(
1584515845
formatProdErrorMessage(
1584615846
527,
1584715847
isomorphicReactPackageVersion$jscomp$inline_1735,
15848-
"19.0.0-native-fb-aba370f1-20241122"
15848+
"19.0.0-native-fb-2a9f4c04-20241122"
1584915849
)
1585015850
);
1585115851
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15867,11 +15867,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1586715867
};
1586815868
var internals$jscomp$inline_2193 = {
1586915869
bundleType: 0,
15870-
version: "19.0.0-native-fb-aba370f1-20241122",
15870+
version: "19.0.0-native-fb-2a9f4c04-20241122",
1587115871
rendererPackageName: "react-dom",
1587215872
currentDispatcherRef: ReactSharedInternals,
1587315873
findFiberByHostInstance: getClosestInstanceFromNode,
15874-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122"
15874+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122"
1587515875
};
1587615876
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1587715877
var hook$jscomp$inline_2194 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15975,4 +15975,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1597515975
listenToAllSupportedEvents(container);
1597615976
return new ReactDOMHydrationRoot(initialChildren);
1597715977
};
15978-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
15978+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";

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

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

1313
/*
@@ -16491,14 +16491,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1649116491
};
1649216492
var isomorphicReactPackageVersion$jscomp$inline_1825 = React.version;
1649316493
if (
16494-
"19.0.0-native-fb-aba370f1-20241122" !==
16494+
"19.0.0-native-fb-2a9f4c04-20241122" !==
1649516495
isomorphicReactPackageVersion$jscomp$inline_1825
1649616496
)
1649716497
throw Error(
1649816498
formatProdErrorMessage(
1649916499
527,
1650016500
isomorphicReactPackageVersion$jscomp$inline_1825,
16501-
"19.0.0-native-fb-aba370f1-20241122"
16501+
"19.0.0-native-fb-2a9f4c04-20241122"
1650216502
)
1650316503
);
1650416504
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16520,11 +16520,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1652016520
};
1652116521
var internals$jscomp$inline_1832 = {
1652216522
bundleType: 0,
16523-
version: "19.0.0-native-fb-aba370f1-20241122",
16523+
version: "19.0.0-native-fb-2a9f4c04-20241122",
1652416524
rendererPackageName: "react-dom",
1652516525
currentDispatcherRef: ReactSharedInternals,
1652616526
findFiberByHostInstance: getClosestInstanceFromNode,
16527-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122",
16527+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122",
1652816528
getLaneLabelMap: function () {
1652916529
for (
1653016530
var map = new Map(), lane = 1, index$292 = 0;
@@ -16643,4 +16643,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1664316643
listenToAllSupportedEvents(container);
1664416644
return new ReactDOMHydrationRoot(initialChildren);
1664516645
};
16646-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
16646+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";

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

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

1313
/*
@@ -25829,11 +25829,11 @@ __DEV__ &&
2582925829
};
2583025830
(function () {
2583125831
var isomorphicReactPackageVersion = React.version;
25832-
if ("19.0.0-native-fb-aba370f1-20241122" !== isomorphicReactPackageVersion)
25832+
if ("19.0.0-native-fb-2a9f4c04-20241122" !== isomorphicReactPackageVersion)
2583325833
throw Error(
2583425834
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2583525835
(isomorphicReactPackageVersion +
25836-
"\n - react-dom: 19.0.0-native-fb-aba370f1-20241122\nLearn more: https://react.dev/warnings/version-mismatch")
25836+
"\n - react-dom: 19.0.0-native-fb-2a9f4c04-20241122\nLearn more: https://react.dev/warnings/version-mismatch")
2583725837
);
2583825838
})();
2583925839
("function" === typeof Map &&
@@ -25870,11 +25870,11 @@ __DEV__ &&
2587025870
!(function () {
2587125871
var internals = {
2587225872
bundleType: 1,
25873-
version: "19.0.0-native-fb-aba370f1-20241122",
25873+
version: "19.0.0-native-fb-2a9f4c04-20241122",
2587425874
rendererPackageName: "react-dom",
2587525875
currentDispatcherRef: ReactSharedInternals,
2587625876
findFiberByHostInstance: getClosestInstanceFromNode,
25877-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122"
25877+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122"
2587825878
};
2587925879
internals.overrideHookState = overrideHookState;
2588025880
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26334,7 +26334,7 @@ __DEV__ &&
2633426334
exports.useFormStatus = function () {
2633526335
return resolveDispatcher().useHostTransitionStatus();
2633626336
};
26337-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
26337+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";
2633826338
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2633926339
"function" ===
2634026340
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

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

1313
/*
@@ -15849,14 +15849,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1584915849
};
1585015850
var isomorphicReactPackageVersion$jscomp$inline_1736 = React.version;
1585115851
if (
15852-
"19.0.0-native-fb-aba370f1-20241122" !==
15852+
"19.0.0-native-fb-2a9f4c04-20241122" !==
1585315853
isomorphicReactPackageVersion$jscomp$inline_1736
1585415854
)
1585515855
throw Error(
1585615856
formatProdErrorMessage(
1585715857
527,
1585815858
isomorphicReactPackageVersion$jscomp$inline_1736,
15859-
"19.0.0-native-fb-aba370f1-20241122"
15859+
"19.0.0-native-fb-2a9f4c04-20241122"
1586015860
)
1586115861
);
1586215862
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15878,11 +15878,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1587815878
};
1587915879
var internals$jscomp$inline_2196 = {
1588015880
bundleType: 0,
15881-
version: "19.0.0-native-fb-aba370f1-20241122",
15881+
version: "19.0.0-native-fb-2a9f4c04-20241122",
1588215882
rendererPackageName: "react-dom",
1588315883
currentDispatcherRef: ReactSharedInternals,
1588415884
findFiberByHostInstance: getClosestInstanceFromNode,
15885-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122"
15885+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122"
1588615886
};
1588715887
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1588815888
var hook$jscomp$inline_2197 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16140,4 +16140,4 @@ exports.useFormState = function (action, initialState, permalink) {
1614016140
exports.useFormStatus = function () {
1614116141
return ReactSharedInternals.H.useHostTransitionStatus();
1614216142
};
16143-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
16143+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<86fce667118c0d10a972b2051d4ef079>>
10+
* @generated SignedSource<<28e7d40d420bf23c038e1fb7dafaabb8>>
1111
*/
1212

1313
/*
@@ -16506,14 +16506,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1650616506
};
1650716507
var isomorphicReactPackageVersion$jscomp$inline_1826 = React.version;
1650816508
if (
16509-
"19.0.0-native-fb-aba370f1-20241122" !==
16509+
"19.0.0-native-fb-2a9f4c04-20241122" !==
1651016510
isomorphicReactPackageVersion$jscomp$inline_1826
1651116511
)
1651216512
throw Error(
1651316513
formatProdErrorMessage(
1651416514
527,
1651516515
isomorphicReactPackageVersion$jscomp$inline_1826,
16516-
"19.0.0-native-fb-aba370f1-20241122"
16516+
"19.0.0-native-fb-2a9f4c04-20241122"
1651716517
)
1651816518
);
1651916519
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16535,11 +16535,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1653516535
};
1653616536
var internals$jscomp$inline_1833 = {
1653716537
bundleType: 0,
16538-
version: "19.0.0-native-fb-aba370f1-20241122",
16538+
version: "19.0.0-native-fb-2a9f4c04-20241122",
1653916539
rendererPackageName: "react-dom",
1654016540
currentDispatcherRef: ReactSharedInternals,
1654116541
findFiberByHostInstance: getClosestInstanceFromNode,
16542-
reconcilerVersion: "19.0.0-native-fb-aba370f1-20241122",
16542+
reconcilerVersion: "19.0.0-native-fb-2a9f4c04-20241122",
1654316543
getLaneLabelMap: function () {
1654416544
for (
1654516545
var map = new Map(), lane = 1, index$292 = 0;
@@ -16812,7 +16812,7 @@ exports.useFormState = function (action, initialState, permalink) {
1681216812
exports.useFormStatus = function () {
1681316813
return ReactSharedInternals.H.useHostTransitionStatus();
1681416814
};
16815-
exports.version = "19.0.0-native-fb-aba370f1-20241122";
16815+
exports.version = "19.0.0-native-fb-2a9f4c04-20241122";
1681616816
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1681716817
"function" ===
1681816818
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)