From a758eaca4fda35c9cf6010c063adc8b22223cc85 Mon Sep 17 00:00:00 2001 From: mofeiZ Date: Tue, 22 Oct 2024 13:15:33 -0700 Subject: [PATCH] `react-hooks/rules-of-hooks`: Add support for `do/while` loops (#28714) ## Summary Currently, `react-hooks/rules-of-hooks` does not support `do/while` loops - I've also reported this in https://github.com/facebook/react/issues/28713. This PR takes a stab at adding support for `do/while` by following the same logic we already have for detecting `while` loops. After this PR, any hooks called inside a `do/while` loop will be considered invalid. We're also adding some unit tests to confirm that the behavior is working as expected. Fixes #28713. ## How did you test this change? I've added unit tests that cover the case and verified that they pass by running: ``` yarn test packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js --watch ``` I've also verified that the rest of the tests continue to pass by running: ``` yarn test ``` and ``` yarn test --prod ``` DiffTrain build for [9daabc0bf97805be23f6131be4d84d063a3ff446](https://github.com/facebook/react/commit/9daabc0bf97805be23f6131be4d84d063a3ff446) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 2 +- compiled/facebook-www/React-dev.modern.js | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- compiled/facebook-www/React-profiling.classic.js | 2 +- compiled/facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 6 +++--- compiled/facebook-www/ReactART-dev.modern.js | 6 +++--- compiled/facebook-www/ReactART-prod.classic.js | 6 +++--- compiled/facebook-www/ReactART-prod.modern.js | 6 +++--- compiled/facebook-www/ReactDOM-dev.classic.js | 10 +++++----- compiled/facebook-www/ReactDOM-dev.modern.js | 10 +++++----- compiled/facebook-www/ReactDOM-prod.classic.js | 10 +++++----- compiled/facebook-www/ReactDOM-prod.modern.js | 10 +++++----- compiled/facebook-www/ReactDOM-profiling.classic.js | 10 +++++----- compiled/facebook-www/ReactDOM-profiling.modern.js | 10 +++++----- compiled/facebook-www/ReactDOMServer-dev.classic.js | 2 +- compiled/facebook-www/ReactDOMServer-dev.modern.js | 2 +- compiled/facebook-www/ReactDOMServer-prod.classic.js | 2 +- compiled/facebook-www/ReactDOMServer-prod.modern.js | 2 +- compiled/facebook-www/ReactDOMTesting-dev.classic.js | 10 +++++----- compiled/facebook-www/ReactDOMTesting-dev.modern.js | 10 +++++----- compiled/facebook-www/ReactDOMTesting-prod.classic.js | 10 +++++----- compiled/facebook-www/ReactDOMTesting-prod.modern.js | 10 +++++----- compiled/facebook-www/ReactReconciler-dev.classic.js | 2 +- compiled/facebook-www/ReactReconciler-dev.modern.js | 2 +- compiled/facebook-www/ReactReconciler-prod.classic.js | 2 +- compiled/facebook-www/ReactReconciler-prod.modern.js | 2 +- compiled/facebook-www/ReactTestRenderer-dev.classic.js | 6 +++--- compiled/facebook-www/ReactTestRenderer-dev.modern.js | 6 +++--- compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- compiled/facebook-www/eslint-plugin-react-hooks.js | 2 +- 35 files changed, 87 insertions(+), 87 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index a67d3f350f..2ed12c8726 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -b8ae38f88b70f8a0ea96421a4355266aafefee7f +9daabc0bf97805be23f6131be4d84d063a3ff446 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index a67d3f350f..2ed12c8726 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -b8ae38f88b70f8a0ea96421a4355266aafefee7f +9daabc0bf97805be23f6131be4d84d063a3ff446 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 5631534395..38fa47e75d 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -2021,7 +2021,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 58a36ffeb7..d0a06968bb 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -2001,7 +2001,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index f424784173..c89a1222e6 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -824,4 +824,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 08bae5fed5..7dbe7bc37f 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -820,4 +820,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 8617ff27fa..b132a74af1 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -828,7 +828,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 4ae08dd60e..b971222d59 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -824,7 +824,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 178fc3252b..19fb3715b0 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -17059,11 +17059,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17097,7 +17097,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index bc89a3e0b4..de371e0084 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -16502,11 +16502,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16540,7 +16540,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 8609c8a44a..e3e8ac3ded 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -10871,13 +10871,13 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1474 = { bundleType: 0, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1475 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -10903,4 +10903,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index c3f8f0112a..956d3729b3 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -10385,13 +10385,13 @@ var slice = Array.prototype.slice, })(React.Component); var internals$jscomp$inline_1467 = { bundleType: 0, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -10417,4 +10417,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index c55da18141..bf158ba40a 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -27823,11 +27823,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-b8ae38f8-20241018" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-9daabc0b-20241022" !== 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.0.0-www-classic-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27871,11 +27871,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28528,7 +28528,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 118ed98b58..51e07c1cbd 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -26937,11 +26937,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-b8ae38f8-20241018" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-9daabc0b-20241022" !== 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.0.0-www-modern-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26984,11 +26984,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27593,7 +27593,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 124d81f1a3..9461412dad 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -17456,14 +17456,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1781 = React.version; if ( - "19.0.0-www-classic-b8ae38f8-20241018" !== + "19.0.0-www-classic-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1781 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1781, - "19.0.0-www-classic-b8ae38f8-20241018" + "19.0.0-www-classic-9daabc0b-20241022" ) ); function flushSyncFromReconciler(fn) { @@ -17508,11 +17508,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2294 = { bundleType: 0, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17968,4 +17968,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 7bba6f351c..7e68c555f2 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -16827,14 +16827,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1752 = React.version; if ( - "19.0.0-www-modern-b8ae38f8-20241018" !== + "19.0.0-www-modern-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1752 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1752, - "19.0.0-www-modern-b8ae38f8-20241018" + "19.0.0-www-modern-9daabc0b-20241022" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16852,11 +16852,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2286 = { bundleType: 0, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2287 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17219,4 +17219,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index dc8806c362..f3ce510580 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -18178,14 +18178,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1874 = React.version; if ( - "19.0.0-www-classic-b8ae38f8-20241018" !== + "19.0.0-www-classic-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1874 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1874, - "19.0.0-www-classic-b8ae38f8-20241018" + "19.0.0-www-classic-9daabc0b-20241022" ) ); function flushSyncFromReconciler(fn) { @@ -18230,11 +18230,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_1881 = { bundleType: 0, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; enableSchedulingProfiler && ((internals$jscomp$inline_1881.getLaneLabelMap = getLaneLabelMap), @@ -18693,7 +18693,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 9bb6856750..8be1f18ecb 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -17532,14 +17532,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1845 = React.version; if ( - "19.0.0-www-modern-b8ae38f8-20241018" !== + "19.0.0-www-modern-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1845 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1845, - "19.0.0-www-modern-b8ae38f8-20241018" + "19.0.0-www-modern-9daabc0b-20241022" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17557,11 +17557,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_1847 = { bundleType: 0, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; enableSchedulingProfiler && ((internals$jscomp$inline_1847.getLaneLabelMap = getLaneLabelMap), @@ -17927,7 +17927,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index afd0a0dbe3..4ad20b3365 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8991,5 +8991,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index b4c5bee3f4..9bfbec44b8 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8809,5 +8809,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 42d683b875..2fbec130fd 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5914,4 +5914,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index e5c56c8d60..b21834b45f 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5826,4 +5826,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 00abf842d1..a3e32dd16b 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -28157,11 +28157,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-b8ae38f8-20241018" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-9daabc0b-20241022" !== 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.0.0-www-classic-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28205,11 +28205,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29028,5 +29028,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 329b39499e..cdd2e7786b 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -27271,11 +27271,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-b8ae38f8-20241018" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-9daabc0b-20241022" !== 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.0.0-www-modern-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-9daabc0b-20241022\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27318,11 +27318,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28093,5 +28093,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 9e7a5803f6..42d731c52e 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -17785,14 +17785,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1811 = React.version; if ( - "19.0.0-www-classic-b8ae38f8-20241018" !== + "19.0.0-www-classic-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1811 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1811, - "19.0.0-www-classic-b8ae38f8-20241018" + "19.0.0-www-classic-9daabc0b-20241022" ) ); function flushSyncFromReconciler(fn) { @@ -17837,11 +17837,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2329 = { bundleType: 0, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -18448,4 +18448,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; +exports.version = "19.0.0-www-classic-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 89df8bad84..0b3c06cae8 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -17156,14 +17156,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version; if ( - "19.0.0-www-modern-b8ae38f8-20241018" !== + "19.0.0-www-modern-9daabc0b-20241022" !== isomorphicReactPackageVersion$jscomp$inline_1782 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1782, - "19.0.0-www-modern-b8ae38f8-20241018" + "19.0.0-www-modern-9daabc0b-20241022" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17181,11 +17181,11 @@ Internals.Events = [ ]; var internals$jscomp$inline_2321 = { bundleType: 0, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2322 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17699,4 +17699,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; +exports.version = "19.0.0-www-modern-9daabc0b-20241022"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 8e21f9ef0b..e05ad79ac8 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -19270,7 +19270,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 6b32d46d91..c91d24a44a 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -18661,7 +18661,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index f1725f1ef9..a6da299293 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -12903,7 +12903,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 527ff986e7..2b5cc75f2b 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -12393,7 +12393,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 6d2673dbd6..99bedd4693 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -14948,11 +14948,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-b8ae38f8-20241018", + version: "19.0.0-www-classic-9daabc0b-20241022", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-classic-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15087,5 +15087,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-b8ae38f8-20241018"; + exports.version = "19.0.0-www-classic-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 453849c855..e869e39eb7 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -14948,11 +14948,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-b8ae38f8-20241018", + version: "19.0.0-www-modern-9daabc0b-20241022", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-b8ae38f8-20241018" + reconcilerVersion: "19.0.0-www-modern-9daabc0b-20241022" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15087,5 +15087,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-b8ae38f8-20241018"; + exports.version = "19.0.0-www-modern-9daabc0b-20241022"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index ab49870062..a048a35d84 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-b8ae38f8-20241018 \ No newline at end of file +19.0.0-www-classic-9daabc0b-20241022 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index d68c075e9f..e555fd86a2 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-b8ae38f8-20241018 \ No newline at end of file +19.0.0-www-modern-9daabc0b-20241022 \ No newline at end of file diff --git a/compiled/facebook-www/eslint-plugin-react-hooks.js b/compiled/facebook-www/eslint-plugin-react-hooks.js index bff0c03085..dd434a4d56 100644 --- a/compiled/facebook-www/eslint-plugin-react-hooks.js +++ b/compiled/facebook-www/eslint-plugin-react-hooks.js @@ -693,7 +693,7 @@ pathHistory = new Set(pathHistory); if (pathHistory.has(segment.id)) { cache = Array.from(pathHistory); - segment = cache.slice(cache.indexOf(segment.id) + 1); + segment = cache.slice(cache.indexOf(segment.id) - 1); segment = _createForOfIteratorHelper(segment); var _step5; try {