Skip to content

Commit

Permalink
fix(eslint-plugin-react-compiler): support v9 context api (facebook#3…
Browse files Browse the repository at this point in the history
…2045)

## Summary

This change fixes a gap in the plugin's support of eslint v9. In one
place that it's using the `SourceCode` api, it's correctly considering
v9's api. But in the other place where `SourceCode` is used, it's only
using the legacy api, which was removed in v9.

DiffTrain build for [b3a95ca](facebook@b3a95ca)
  • Loading branch information
pull[bot] committed Jan 14, 2025
1 parent eae5101 commit c4af03f
Show file tree
Hide file tree
Showing 23 changed files with 92 additions and 89 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-540efebc-20250112
19.1.0-native-fb-b3a95caf-20250113
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<aa0e55b6654c2889ba207184a473769a>>
* @generated SignedSource<<240089cce633c540a77902535a822455>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a71906e662a14de7c4f0c101df1dac50>>
* @generated SignedSource<<9eddcd5aedcc1cd9c6670e6463916988>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a71906e662a14de7c4f0c101df1dac50>>
* @generated SignedSource<<9eddcd5aedcc1cd9c6670e6463916988>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<050c3749b4b11090ff847a8becad081d>>
* @generated SignedSource<<180f512d052d35c3916e509323b8438c>>
*/

/*
Expand Down Expand Up @@ -25951,11 +25951,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-540efebc-20250112" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-b3a95caf-20250113" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-540efebc-20250112\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-b3a95caf-20250113\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25992,10 +25992,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26141,5 +26141,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ece04e991388643c3ced2c583456f4a3>>
* @generated SignedSource<<b23dba4ec2272d38219ea3998e7237bf>>
*/

/*
Expand Down Expand Up @@ -15968,14 +15968,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1785 = React.version;
if (
"19.1.0-native-fb-540efebc-20250112" !==
"19.1.0-native-fb-b3a95caf-20250113" !==
isomorphicReactPackageVersion$jscomp$inline_1785
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1785,
"19.1.0-native-fb-540efebc-20250112"
"19.1.0-native-fb-b3a95caf-20250113"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15997,10 +15997,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2241 = {
bundleType: 0,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2242 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16106,4 +16106,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a7252fdace3cd2dc928756acc1ca192e>>
* @generated SignedSource<<db4ad4d66e452da32d19e41b73aea217>>
*/

/*
Expand Down Expand Up @@ -16617,14 +16617,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1880 = React.version;
if (
"19.1.0-native-fb-540efebc-20250112" !==
"19.1.0-native-fb-b3a95caf-20250113" !==
isomorphicReactPackageVersion$jscomp$inline_1880
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1880,
"19.1.0-native-fb-540efebc-20250112"
"19.1.0-native-fb-b3a95caf-20250113"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16646,10 +16646,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1887 = {
bundleType: 0,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112",
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16770,4 +16770,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<654905b4b5ec1ea50093b8884e0a0de0>>
* @generated SignedSource<<76e548c810a61eff31f6f8bef4681a4b>>
*/

/*
Expand Down Expand Up @@ -26012,11 +26012,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-540efebc-20250112" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-b3a95caf-20250113" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-540efebc-20250112\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-b3a95caf-20250113\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26053,10 +26053,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26518,7 +26518,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9e4fff1b1a60975fb9ee378ffcdd59cf>>
* @generated SignedSource<<7f2a5db1ba76c79cd482fa5420e78d83>>
*/

/*
Expand Down Expand Up @@ -15979,14 +15979,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1786 = React.version;
if (
"19.1.0-native-fb-540efebc-20250112" !==
"19.1.0-native-fb-b3a95caf-20250113" !==
isomorphicReactPackageVersion$jscomp$inline_1786
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1786,
"19.1.0-native-fb-540efebc-20250112"
"19.1.0-native-fb-b3a95caf-20250113"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16008,10 +16008,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2244 = {
bundleType: 0,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2245 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16271,4 +16271,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<415b4a7e71ecb77ec11710c644aa05c8>>
* @generated SignedSource<<1e6f255d00433d40b7067a78cdcb12e6>>
*/

/*
Expand Down Expand Up @@ -16632,14 +16632,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1881 = React.version;
if (
"19.1.0-native-fb-540efebc-20250112" !==
"19.1.0-native-fb-b3a95caf-20250113" !==
isomorphicReactPackageVersion$jscomp$inline_1881
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1881,
"19.1.0-native-fb-540efebc-20250112"
"19.1.0-native-fb-b3a95caf-20250113"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16661,10 +16661,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1888 = {
bundleType: 0,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112",
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16939,7 +16939,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<404284638f8afd070ce79367c0d5bb1c>>
* @generated SignedSource<<426ff95fba60e439632a42b6a083e35e>>
*/

"use strict";
Expand Down Expand Up @@ -15637,10 +15637,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -15785,5 +15785,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0d2a2b2614580234c6bcb51ca9551869>>
* @generated SignedSource<<2e2b60a49934a15e7d81fbcaad5048b1>>
*/

"use strict";
Expand Down Expand Up @@ -9826,10 +9826,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1402 = {
bundleType: 0,
version: "19.1.0-native-fb-540efebc-20250112",
version: "19.1.0-native-fb-b3a95caf-20250113",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-540efebc-20250112"
reconcilerVersion: "19.1.0-native-fb-b3a95caf-20250113"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1403 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -9965,4 +9965,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.1.0-native-fb-540efebc-20250112";
exports.version = "19.1.0-native-fb-b3a95caf-20250113";
Loading

0 comments on commit c4af03f

Please sign in to comment.