Skip to content

Commit 974c68f

Browse files
committed
fix(eslint-plugin-react-compiler): support v9 context api (facebook#32045)
## 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)
1 parent deea2c8 commit 974c68f

34 files changed

+98
-92
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
540efebcc34357c98412a96805bfd9244d6aa678
1+
b3a95caf61bc716fb618997e6e9f3a0c8c9c8374
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
540efebcc34357c98412a96805bfd9244d6aa678
1+
b3a95caf61bc716fb618997e6e9f3a0c8c9c8374

compiled/facebook-www/React-dev.classic.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,10 @@ __DEV__ &&
12801280
});
12811281
}
12821282
: enqueueTask,
1283-
ReactCompilerRuntime = { c: useMemoCache },
1283+
ReactCompilerRuntime = Object.freeze({
1284+
__proto__: null,
1285+
c: useMemoCache
1286+
}),
12841287
Children = {
12851288
map: mapChildren,
12861289
forEach: function (children, forEachFunc, forEachContext) {
@@ -1944,7 +1947,7 @@ __DEV__ &&
19441947
exports.useTransition = function () {
19451948
return resolveDispatcher().useTransition();
19461949
};
1947-
exports.version = "19.1.0-www-classic-540efebc-20250112";
1950+
exports.version = "19.1.0-www-classic-b3a95caf-20250113";
19481951
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19491952
"function" ===
19501953
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,10 @@ __DEV__ &&
12801280
});
12811281
}
12821282
: enqueueTask,
1283-
ReactCompilerRuntime = { c: useMemoCache },
1283+
ReactCompilerRuntime = Object.freeze({
1284+
__proto__: null,
1285+
c: useMemoCache
1286+
}),
12841287
Children = {
12851288
map: mapChildren,
12861289
forEach: function (children, forEachFunc, forEachContext) {
@@ -1944,7 +1947,7 @@ __DEV__ &&
19441947
exports.useTransition = function () {
19451948
return resolveDispatcher().useTransition();
19461949
};
1947-
exports.version = "19.1.0-www-modern-540efebc-20250112";
1950+
exports.version = "19.1.0-www-modern-b3a95caf-20250113";
19481951
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19491952
"function" ===
19501953
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ var reportGlobalError =
364364
console.error(error);
365365
};
366366
function noop() {}
367-
var ReactCompilerRuntime = { c: useMemoCache },
367+
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
368368
experimental_useResourceEffect = enableUseResourceEffectHook
369369
? useResourceEffect
370370
: void 0;
@@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
630630
exports.useTransition = function () {
631631
return ReactSharedInternals.H.useTransition();
632632
};
633-
exports.version = "19.1.0-www-classic-540efebc-20250112";
633+
exports.version = "19.1.0-www-classic-b3a95caf-20250113";

compiled/facebook-www/React-prod.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ var reportGlobalError =
364364
console.error(error);
365365
};
366366
function noop() {}
367-
var ReactCompilerRuntime = { c: useMemoCache },
367+
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
368368
experimental_useResourceEffect = enableUseResourceEffectHook
369369
? useResourceEffect
370370
: void 0;
@@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
630630
exports.useTransition = function () {
631631
return ReactSharedInternals.H.useTransition();
632632
};
633-
exports.version = "19.1.0-www-modern-540efebc-20250112";
633+
exports.version = "19.1.0-www-modern-b3a95caf-20250113";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ var reportGlobalError =
368368
console.error(error);
369369
};
370370
function noop() {}
371-
var ReactCompilerRuntime = { c: useMemoCache },
371+
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
372372
experimental_useResourceEffect = enableUseResourceEffectHook
373373
? useResourceEffect
374374
: void 0;
@@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
634634
exports.useTransition = function () {
635635
return ReactSharedInternals.H.useTransition();
636636
};
637-
exports.version = "19.1.0-www-classic-540efebc-20250112";
637+
exports.version = "19.1.0-www-classic-b3a95caf-20250113";
638638
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
639639
"function" ===
640640
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ var reportGlobalError =
368368
console.error(error);
369369
};
370370
function noop() {}
371-
var ReactCompilerRuntime = { c: useMemoCache },
371+
var ReactCompilerRuntime = { __proto__: null, c: useMemoCache },
372372
experimental_useResourceEffect = enableUseResourceEffectHook
373373
? useResourceEffect
374374
: void 0;
@@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
634634
exports.useTransition = function () {
635635
return ReactSharedInternals.H.useTransition();
636636
};
637-
exports.version = "19.1.0-www-modern-540efebc-20250112";
637+
exports.version = "19.1.0-www-modern-b3a95caf-20250113";
638638
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
639639
"function" ===
640640
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16945,10 +16945,10 @@ __DEV__ &&
1694516945
(function () {
1694616946
var internals = {
1694716947
bundleType: 1,
16948-
version: "19.1.0-www-classic-540efebc-20250112",
16948+
version: "19.1.0-www-classic-b3a95caf-20250113",
1694916949
rendererPackageName: "react-art",
1695016950
currentDispatcherRef: ReactSharedInternals,
16951-
reconcilerVersion: "19.1.0-www-classic-540efebc-20250112"
16951+
reconcilerVersion: "19.1.0-www-classic-b3a95caf-20250113"
1695216952
};
1695316953
internals.overrideHookState = overrideHookState;
1695416954
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16982,7 +16982,7 @@ __DEV__ &&
1698216982
exports.Shape = Shape;
1698316983
exports.Surface = Surface;
1698416984
exports.Text = Text;
16985-
exports.version = "19.1.0-www-classic-540efebc-20250112";
16985+
exports.version = "19.1.0-www-classic-b3a95caf-20250113";
1698616986
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1698716987
"function" ===
1698816988
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16717,10 +16717,10 @@ __DEV__ &&
1671716717
(function () {
1671816718
var internals = {
1671916719
bundleType: 1,
16720-
version: "19.1.0-www-modern-540efebc-20250112",
16720+
version: "19.1.0-www-modern-b3a95caf-20250113",
1672116721
rendererPackageName: "react-art",
1672216722
currentDispatcherRef: ReactSharedInternals,
16723-
reconcilerVersion: "19.1.0-www-modern-540efebc-20250112"
16723+
reconcilerVersion: "19.1.0-www-modern-b3a95caf-20250113"
1672416724
};
1672516725
internals.overrideHookState = overrideHookState;
1672616726
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16754,7 +16754,7 @@ __DEV__ &&
1675416754
exports.Shape = Shape;
1675516755
exports.Surface = Surface;
1675616756
exports.Text = Text;
16757-
exports.version = "19.1.0-www-modern-540efebc-20250112";
16757+
exports.version = "19.1.0-www-modern-b3a95caf-20250113";
1675816758
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1675916759
"function" ===
1676016760
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)