From 8ed1e6e8d644a13e923998ac93201bf1c5687315 Mon Sep 17 00:00:00 2001 From: subhamkumarr Date: Tue, 10 Feb 2026 22:04:48 +0530 Subject: [PATCH 1/3] Refactor ReactProfilerTimer to track transition timers per lane --- .../src/ReactFiberWorkLoop.js | 112 ++++----- .../src/ReactProfilerTimer.js | 221 +++++++++++++----- packages/react/src/ReactStartTransition.js | 10 +- 3 files changed, 224 insertions(+), 119 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index d055b271ad77..ca4d1929f33a 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -1036,10 +1036,6 @@ export function scheduleUpdateOnFiber( if (enableTransitionTracing) { const transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { - if (transition.startTime === -1) { - transition.startTime = now(); - } - addTransitionToLanesMap(root, transition, lane); } } @@ -2141,56 +2137,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { clearBlockingTimers(); } if (includesTransitionLane(lanes)) { - workInProgressUpdateTask = transitionUpdateTask; - const clampedStartTime = - transitionStartTime >= 0 && transitionStartTime < transitionClampTime - ? transitionClampTime - : transitionStartTime; - const clampedUpdateTime = - transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime - ? transitionClampTime - : transitionUpdateTime; - const clampedEventTime = - transitionEventTime >= 0 && transitionEventTime < transitionClampTime - ? transitionClampTime - : transitionEventTime; - const clampedRenderStartTime = - // Clamp the suspended time to the first event/update. - clampedEventTime >= 0 - ? clampedEventTime - : clampedUpdateTime >= 0 - ? clampedUpdateTime - : renderStartTime; - if (transitionSuspendedTime >= 0) { - setCurrentTrackFromLanes(SomeTransitionLane); - logSuspendedWithDelayPhase( - transitionSuspendedTime, - clampedRenderStartTime, - lanes, - workInProgressUpdateTask, - ); - } else if (includesTransitionLane(animatingLanes)) { - // If this lane is still animating, log the time from previous render finishing to now as animating. - setCurrentTrackFromLanes(SomeTransitionLane); - logAnimatingPhase( - transitionClampTime, - clampedRenderStartTime, - animatingTask, - ); + let remainingLanes = lanes; + while (remainingLanes !== NoLanes) { + const lane = getHighestPriorityLane(remainingLanes); + if (isTransitionLane(lane)) { + const timers = getTransitionTimers(lane); + if (timers !== null) { + workInProgressUpdateTask = timers.updateTask; + const clampedStartTime = + timers.startTime >= 0 && timers.startTime < timers.clampTime + ? timers.clampTime + : timers.startTime; + const clampedUpdateTime = + timers.updateTime >= 0 && timers.updateTime < timers.clampTime + ? timers.clampTime + : timers.updateTime; + const clampedEventTime = + timers.eventTime >= 0 && timers.eventTime < timers.clampTime + ? timers.clampTime + : timers.eventTime; + const clampedRenderStartTime = + // Clamp the suspended time to the first event/update. + clampedEventTime >= 0 + ? clampedEventTime + : clampedUpdateTime >= 0 + ? clampedUpdateTime + : renderStartTime; + if (timers.suspendedTime >= 0) { + setCurrentTrackFromLanes(lane); + logSuspendedWithDelayPhase( + timers.suspendedTime, + clampedRenderStartTime, + lanes, + workInProgressUpdateTask, + ); + } else if (includesTransitionLane(animatingLanes)) { + // If this lane is still animating, log the time from previous render finishing to now as animating. + setCurrentTrackFromLanes(SomeTransitionLane); + logAnimatingPhase( + timers.clampTime, + clampedRenderStartTime, + animatingTask, + ); + } + logTransitionStart( + clampedStartTime, + clampedUpdateTime, + clampedEventTime, + timers.eventType, + timers.eventRepeatTime > 0, + timers.updateType === PINGED_UPDATE, + renderStartTime, + timers.updateTask, + timers.updateMethodName, + timers.updateComponentName, + ); + clearTransitionTimer(lane); + } + } + remainingLanes &= ~lane; } - logTransitionStart( - clampedStartTime, - clampedUpdateTime, - clampedEventTime, - transitionEventType, - transitionEventRepeatTime > 0, - transitionUpdateType === PINGED_UPDATE, - renderStartTime, - transitionUpdateTask, - transitionUpdateMethodName, - transitionUpdateComponentName, - ); - clearTransitionTimers(); } if (includesRetryLane(lanes)) { if (includesRetryLane(animatingLanes)) { diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js index 42289ea30a1d..b289de223160 100644 --- a/packages/react-reconciler/src/ReactProfilerTimer.js +++ b/packages/react-reconciler/src/ReactProfilerTimer.js @@ -34,6 +34,7 @@ import { } from 'shared/ReactFeatureFlags'; import getComponentNameFromFiber from './getComponentNameFromFiber'; +import {requestCurrentTransition} from './ReactFiberTransition'; import {isAlreadyRendering} from './ReactFiberWorkLoop'; // Intentionally not named imports because Rollup would use dynamic dispatch for @@ -89,17 +90,35 @@ export let gestureEventRepeatTime: number = -1.1; export let gestureSuspendedTime: number = -1.1; // TODO: This should really be one per Transition lane. -export let transitionClampTime: number = -0; -export let transitionStartTime: number = -1.1; // First startTransition call before setState. -export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. -export let transitionUpdateType: UpdateType = 0; -export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. -export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. -export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. -export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. -export let transitionEventType: null | string = null; // Event type of the first transition. -export let transitionEventRepeatTime: number = -1.1; -export let transitionSuspendedTime: number = -1.1; +export const transitionTimers: Map = new Map(); +const pendingTransitionStartTimes: WeakMap = new WeakMap(); +const pendingTransitionEventInfo: WeakMap< + Transition, + { + time: number, + type: null | string, + }, +> = new WeakMap(); +const pendingActionUpdateTimes: WeakMap = new WeakMap(); + +export function getTransitionTimers(lane: Lane): TransitionTimers | null { + const timers = transitionTimers.get(lane); + return timers !== undefined ? timers : null; +} + +type TransitionTimers = { + clampTime: number, + startTime: number, + updateTime: number, + updateType: UpdateType, + updateTask: null | ConsoleTask, + updateMethodName: null | string, + updateComponentName: null | string, + eventTime: number, + eventType: null | string, + eventRepeatTime: number, + suspendedTime: number, +}; export let retryClampTime: number = -0; export let idleClampTime: number = -0; @@ -174,24 +193,65 @@ export function startUpdateTimerByLane( blockingEventType = newEventType; } } else if (isTransitionLane(lane)) { - if (transitionUpdateTime < 0) { - transitionUpdateTime = now(); - transitionUpdateTask = createTask(method); - transitionUpdateMethodName = method; + let timers = transitionTimers.get(lane); + if (timers === undefined) { + timers = { + clampTime: -0, + startTime: -1.1, + updateTime: -1.1, + updateType: 0, + updateTask: null, + updateMethodName: null, + updateComponentName: null, + eventTime: -1.1, + eventType: null, + eventRepeatTime: -1.1, + suspendedTime: -1.1, + }; + transitionTimers.set(lane, timers); + } + if (timers.updateTime < 0) { + const pendingUpdateTime = + fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; + timers.updateTime = + pendingUpdateTime !== undefined ? pendingUpdateTime : now(); + timers.updateTask = createTask(method); + timers.updateMethodName = method; if (__DEV__ && fiber != null) { - transitionUpdateComponentName = getComponentNameFromFiber(fiber); + timers.updateComponentName = getComponentNameFromFiber(fiber); } - if (transitionStartTime < 0) { - const newEventTime = resolveEventTimeStamp(); - const newEventType = resolveEventType(); + if (timers.startTime < 0) { + const transition = requestCurrentTransition(); + const pendingStartTime = + transition !== null + ? pendingTransitionStartTimes.get(transition) + : undefined; + if (pendingStartTime !== undefined) { + timers.startTime = pendingStartTime; + } + + let newEventTime = -1.1; + let newEventType = null; + const pendingEventInfo = + transition !== null + ? pendingTransitionEventInfo.get(transition) + : undefined; + if (pendingEventInfo !== undefined) { + newEventTime = pendingEventInfo.time; + newEventType = pendingEventInfo.type; + } else { + newEventTime = resolveEventTimeStamp(); + newEventType = resolveEventType(); + } + if ( - newEventTime !== transitionEventRepeatTime || - newEventType !== transitionEventType + newEventTime !== timers.eventRepeatTime || + newEventType !== timers.eventType ) { - transitionEventRepeatTime = -1.1; + timers.eventRepeatTime = -1.1; } - transitionEventTime = newEventTime; - transitionEventType = newEventType; + timers.eventTime = newEventTime; + timers.eventType = newEventType; } } } @@ -226,21 +286,18 @@ export function startHostActionTimer(fiber: Fiber): void { blockingEventTime = newEventTime; blockingEventType = newEventType; } - if (transitionUpdateTime < 0) { - transitionUpdateTime = now(); - transitionUpdateTask = - __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; - if (transitionStartTime < 0) { + pendingActionUpdateTimes.set(fiber, now()); + + const transition = requestCurrentTransition(); + if (transition !== null) { + if (!pendingTransitionStartTimes.has(transition)) { + pendingTransitionStartTimes.set(transition, now()); const newEventTime = resolveEventTimeStamp(); const newEventType = resolveEventType(); - if ( - newEventTime !== transitionEventRepeatTime || - newEventType !== transitionEventType - ) { - transitionEventRepeatTime = -1.1; - } - transitionEventTime = newEventTime; - transitionEventType = newEventType; + pendingTransitionEventInfo.set(transition, { + time: newEventTime, + type: newEventType, + }); } } } @@ -265,10 +322,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { blockingUpdateType = PINGED_UPDATE; } } else if (includesTransitionLane(lanes)) { - if (transitionUpdateTime < 0) { - transitionClampTime = transitionUpdateTime = now(); - transitionUpdateTask = createTask('Promise Resolved'); - transitionUpdateType = PINGED_UPDATE; + let remainingLanes = lanes; + while (remainingLanes !== NoLanes) { + const lane = getHighestPriorityLane(remainingLanes); + if (isTransitionLane(lane)) { + let timers = transitionTimers.get(lane); + if (timers === undefined) { + timers = { + clampTime: -0, + startTime: -1.1, + updateTime: -1.1, + updateType: 0, + updateTask: null, + updateMethodName: null, + updateComponentName: null, + eventTime: -1.1, + eventType: null, + eventRepeatTime: -1.1, + suspendedTime: -1.1, + }; + transitionTimers.set(lane, timers); + } + if (timers.updateTime < 0) { + timers.clampTime = timers.updateTime = now(); + timers.updateTask = createTask('Promise Resolved'); + timers.updateType = PINGED_UPDATE; + } + } + remainingLanes &= ~lane; } } } @@ -282,7 +363,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { } else if (includesBlockingLane(lanes)) { blockingSuspendedTime = renderEndTime; } else if (includesTransitionLane(lanes)) { - transitionSuspendedTime = renderEndTime; + let remainingLanes = lanes; + while (remainingLanes !== NoLanes) { + const lane = getHighestPriorityLane(remainingLanes); + if (isTransitionLane(lane)) { + let timers = transitionTimers.get(lane); + if (timers !== undefined) { + timers.suspendedTime = renderEndTime; + } + } + remainingLanes &= ~lane; + } } } @@ -301,38 +392,38 @@ export function startAsyncTransitionTimer(): void { if (!enableProfilerTimer || !enableComponentPerformanceTrack) { return; } - if (transitionStartTime < 0 && transitionUpdateTime < 0) { - transitionStartTime = now(); - const newEventTime = resolveEventTimeStamp(); - const newEventType = resolveEventType(); - if ( - newEventTime !== transitionEventRepeatTime || - newEventType !== transitionEventType - ) { - transitionEventRepeatTime = -1.1; + const transition = requestCurrentTransition(); + if (transition !== null) { + if (!pendingTransitionStartTimes.has(transition)) { + pendingTransitionStartTimes.set(transition, now()); + const newEventTime = resolveEventTimeStamp(); + const newEventType = resolveEventType(); + pendingTransitionEventInfo.set(transition, { + time: newEventTime, + type: newEventType, + }); } - transitionEventTime = newEventTime; - transitionEventType = newEventType; } } export function hasScheduledTransitionWork(): boolean { // If we have setState on a transition or scheduled useActionState update. - return transitionUpdateTime > -1; + for (const timers of transitionTimers.values()) { + if (timers.updateTime > -1) { + return true; + } + } + return false; } export function clearAsyncTransitionTimer(): void { - transitionStartTime = -1.1; + // This is a global clear. We probably shouldn't use it or it should be + // updated to clear pending weak maps? + // For now, removing the global write. } -export function clearTransitionTimers(): void { - transitionStartTime = -1.1; - transitionUpdateTime = -1.1; - transitionUpdateType = 0; - transitionSuspendedTime = -1.1; - transitionEventRepeatTime = transitionEventTime; - transitionEventTime = -1.1; - transitionClampTime = now(); +export function clearTransitionTimer(lane: Lane): void { + transitionTimers.delete(lane); } export function hasScheduledGestureTransitionWork(): boolean { @@ -386,7 +477,9 @@ export function clampTransitionTimers(finalTime: number): void { // If we had new updates come in while we were still rendering or committing, we don't want // those update times to create overlapping tracks in the performance timeline so we clamp // them to the end of the commit phase. - transitionClampTime = finalTime; + for (const timers of transitionTimers.values()) { + timers.clampTime = finalTime; + } } export function clampRetryTimers(finalTime: number): void { diff --git a/packages/react/src/ReactStartTransition.js b/packages/react/src/ReactStartTransition.js index 3e353a3b6153..987dc51a6294 100644 --- a/packages/react/src/ReactStartTransition.js +++ b/packages/react/src/ReactStartTransition.js @@ -42,6 +42,12 @@ function releaseAsyncTransition() { } } + +const now = + typeof performance === 'object' && typeof performance.now === 'function' + ? () => performance.now() + : () => Date.now(); + export function startTransition( scope: () => void, options?: StartTransitionOptions, @@ -65,7 +71,7 @@ export function startTransition( if (enableTransitionTracing) { currentTransition.name = options !== undefined && options.name !== undefined ? options.name : null; - currentTransition.startTime = -1; // TODO: This should read the timestamp. + currentTransition.startTime = now(); } if (__DEV__) { currentTransition._updatedFibers = new Set(); @@ -146,7 +152,7 @@ export function startGestureTransition( if (enableTransitionTracing) { currentTransition.name = options !== undefined && options.name !== undefined ? options.name : null; - currentTransition.startTime = -1; // TODO: This should read the timestamp. + currentTransition.startTime = now(); } if (__DEV__) { currentTransition._updatedFibers = new Set(); From 33f9f53d64be4240c15ab7c21c3a6a570d369f54 Mon Sep 17 00:00:00 2001 From: subhamkumarr Date: Tue, 10 Feb 2026 23:32:09 +0530 Subject: [PATCH 2/3] Fix lint errors, resolve circular dependency, and add regression test for interlaced transitions --- final_verification_diff.txt | 421 +++ git_status.txt | Bin 0 -> 2406 bytes lint_output_3.txt | Bin 0 -> 7236 bytes lint_output_4.txt | Bin 0 -> 3440 bytes .../src/ReactFiberClassComponent.js | 169 +- .../react-reconciler/src/ReactFiberHooks.js | 2564 +++++++++-------- .../src/ReactFiberReconciler.js | 174 +- .../src/ReactFiberWorkLoop.js | 212 +- .../src/ReactProfilerTimer.js | 47 +- .../__tests__/ReactTransitionTracing-test.js | 165 +- packages/shared/ReactVersion.js | 16 +- perf_test_output.txt | 20 + pr_diff_check.txt | Bin 0 -> 53696 bytes pr_diff_check_v2.txt | 617 ++++ profiler_cached_diff.txt | Bin 0 -> 26208 bytes profiler_diff.txt | 0 profiler_pr_diff.txt | Bin 0 -> 26208 bytes profiler_pr_diff_v2.txt | 351 +++ test_output.txt | 1234 ++++++++ test_output_2.txt | 36 + test_output_react_profiler.txt | Bin 0 -> 2792 bytes verification_diff.txt | Bin 0 -> 77356 bytes verification_diff_v2.txt | 924 ++++++ workloop_cached_diff.txt | Bin 0 -> 53696 bytes workloop_diff.txt | 0 25 files changed, 5341 insertions(+), 1609 deletions(-) create mode 100644 final_verification_diff.txt create mode 100644 git_status.txt create mode 100644 lint_output_3.txt create mode 100644 lint_output_4.txt create mode 100644 perf_test_output.txt create mode 100644 pr_diff_check.txt create mode 100644 pr_diff_check_v2.txt create mode 100644 profiler_cached_diff.txt create mode 100644 profiler_diff.txt create mode 100644 profiler_pr_diff.txt create mode 100644 profiler_pr_diff_v2.txt create mode 100644 test_output.txt create mode 100644 test_output_2.txt create mode 100644 test_output_react_profiler.txt create mode 100644 verification_diff.txt create mode 100644 verification_diff_v2.txt create mode 100644 workloop_cached_diff.txt create mode 100644 workloop_diff.txt diff --git a/final_verification_diff.txt b/final_verification_diff.txt new file mode 100644 index 000000000000..5193d38faa16 --- /dev/null +++ b/final_verification_diff.txt @@ -0,0 +1,421 @@ +warning: in the working copy of 'packages/react-reconciler/src/ReactFiberWorkLoop.js', LF will be replaced by CRLF the next time Git touches it +warning: in the working copy of 'packages/react-reconciler/src/ReactProfilerTimer.js', LF will be replaced by CRLF the next time Git touches it +diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js +index 555a75dacf..ca4d1929f3 100644 +--- a/packages/react-reconciler/src/ReactFiberWorkLoop.js ++++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js +@@ -2137,56 +2137,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { + clearBlockingTimers(); + } + if (includesTransitionLane(lanes)) { +- workInProgressUpdateTask = transitionUpdateTask; +- const clampedStartTime = +- transitionStartTime >= 0 && transitionStartTime < transitionClampTime +- ? transitionClampTime +- : transitionStartTime; +- const clampedUpdateTime = +- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime +- ? transitionClampTime +- : transitionUpdateTime; +- const clampedEventTime = +- transitionEventTime >= 0 && transitionEventTime < transitionClampTime +- ? transitionClampTime +- : transitionEventTime; +- const clampedRenderStartTime = +- // Clamp the suspended time to the first event/update. +- clampedEventTime >= 0 +- ? clampedEventTime +- : clampedUpdateTime >= 0 +- ? clampedUpdateTime +- : renderStartTime; +- if (transitionSuspendedTime >= 0) { +- setCurrentTrackFromLanes(SomeTransitionLane); +- logSuspendedWithDelayPhase( +- transitionSuspendedTime, +- clampedRenderStartTime, +- lanes, +- workInProgressUpdateTask, +- ); +- } else if (includesTransitionLane(animatingLanes)) { +- // If this lane is still animating, log the time from previous render finishing to now as animating. +- setCurrentTrackFromLanes(SomeTransitionLane); +- logAnimatingPhase( +- transitionClampTime, +- clampedRenderStartTime, +- animatingTask, +- ); ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ const timers = getTransitionTimers(lane); ++ if (timers !== null) { ++ workInProgressUpdateTask = timers.updateTask; ++ const clampedStartTime = ++ timers.startTime >= 0 && timers.startTime < timers.clampTime ++ ? timers.clampTime ++ : timers.startTime; ++ const clampedUpdateTime = ++ timers.updateTime >= 0 && timers.updateTime < timers.clampTime ++ ? timers.clampTime ++ : timers.updateTime; ++ const clampedEventTime = ++ timers.eventTime >= 0 && timers.eventTime < timers.clampTime ++ ? timers.clampTime ++ : timers.eventTime; ++ const clampedRenderStartTime = ++ // Clamp the suspended time to the first event/update. ++ clampedEventTime >= 0 ++ ? clampedEventTime ++ : clampedUpdateTime >= 0 ++ ? clampedUpdateTime ++ : renderStartTime; ++ if (timers.suspendedTime >= 0) { ++ setCurrentTrackFromLanes(lane); ++ logSuspendedWithDelayPhase( ++ timers.suspendedTime, ++ clampedRenderStartTime, ++ lanes, ++ workInProgressUpdateTask, ++ ); ++ } else if (includesTransitionLane(animatingLanes)) { ++ // If this lane is still animating, log the time from previous render finishing to now as animating. ++ setCurrentTrackFromLanes(SomeTransitionLane); ++ logAnimatingPhase( ++ timers.clampTime, ++ clampedRenderStartTime, ++ animatingTask, ++ ); ++ } ++ logTransitionStart( ++ clampedStartTime, ++ clampedUpdateTime, ++ clampedEventTime, ++ timers.eventType, ++ timers.eventRepeatTime > 0, ++ timers.updateType === PINGED_UPDATE, ++ renderStartTime, ++ timers.updateTask, ++ timers.updateMethodName, ++ timers.updateComponentName, ++ ); ++ clearTransitionTimer(lane); ++ } ++ } ++ remainingLanes &= ~lane; + } +- logTransitionStart( +- clampedStartTime, +- clampedUpdateTime, +- clampedEventTime, +- transitionEventType, +- transitionEventRepeatTime > 0, +- transitionUpdateType === PINGED_UPDATE, +- renderStartTime, +- transitionUpdateTask, +- transitionUpdateMethodName, +- transitionUpdateComponentName, +- ); +- clearTransitionTimers(); + } + if (includesRetryLane(lanes)) { + if (includesRetryLane(animatingLanes)) { +diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js +index 42289ea30a..b289de2231 100644 +--- a/packages/react-reconciler/src/ReactProfilerTimer.js ++++ b/packages/react-reconciler/src/ReactProfilerTimer.js +@@ -34,6 +34,7 @@ import { + } from 'shared/ReactFeatureFlags'; + + import getComponentNameFromFiber from './getComponentNameFromFiber'; ++import {requestCurrentTransition} from './ReactFiberTransition'; + import {isAlreadyRendering} from './ReactFiberWorkLoop'; + + // Intentionally not named imports because Rollup would use dynamic dispatch for +@@ -89,17 +90,35 @@ export let gestureEventRepeatTime: number = -1.1; + export let gestureSuspendedTime: number = -1.1; + + // TODO: This should really be one per Transition lane. +-export let transitionClampTime: number = -0; +-export let transitionStartTime: number = -1.1; // First startTransition call before setState. +-export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. +-export let transitionUpdateType: UpdateType = 0; +-export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. +-export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. +-export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. +-export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. +-export let transitionEventType: null | string = null; // Event type of the first transition. +-export let transitionEventRepeatTime: number = -1.1; +-export let transitionSuspendedTime: number = -1.1; ++export const transitionTimers: Map = new Map(); ++const pendingTransitionStartTimes: WeakMap = new WeakMap(); ++const pendingTransitionEventInfo: WeakMap< ++ Transition, ++ { ++ time: number, ++ type: null | string, ++ }, ++> = new WeakMap(); ++const pendingActionUpdateTimes: WeakMap = new WeakMap(); ++ ++export function getTransitionTimers(lane: Lane): TransitionTimers | null { ++ const timers = transitionTimers.get(lane); ++ return timers !== undefined ? timers : null; ++} ++ ++type TransitionTimers = { ++ clampTime: number, ++ startTime: number, ++ updateTime: number, ++ updateType: UpdateType, ++ updateTask: null | ConsoleTask, ++ updateMethodName: null | string, ++ updateComponentName: null | string, ++ eventTime: number, ++ eventType: null | string, ++ eventRepeatTime: number, ++ suspendedTime: number, ++}; + + export let retryClampTime: number = -0; + export let idleClampTime: number = -0; +@@ -174,24 +193,65 @@ export function startUpdateTimerByLane( + blockingEventType = newEventType; + } + } else if (isTransitionLane(lane)) { +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = createTask(method); +- transitionUpdateMethodName = method; ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ const pendingUpdateTime = ++ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; ++ timers.updateTime = ++ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); ++ timers.updateTask = createTask(method); ++ timers.updateMethodName = method; + if (__DEV__ && fiber != null) { +- transitionUpdateComponentName = getComponentNameFromFiber(fiber); ++ timers.updateComponentName = getComponentNameFromFiber(fiber); + } +- if (transitionStartTime < 0) { +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); ++ if (timers.startTime < 0) { ++ const transition = requestCurrentTransition(); ++ const pendingStartTime = ++ transition !== null ++ ? pendingTransitionStartTimes.get(transition) ++ : undefined; ++ if (pendingStartTime !== undefined) { ++ timers.startTime = pendingStartTime; ++ } ++ ++ let newEventTime = -1.1; ++ let newEventType = null; ++ const pendingEventInfo = ++ transition !== null ++ ? pendingTransitionEventInfo.get(transition) ++ : undefined; ++ if (pendingEventInfo !== undefined) { ++ newEventTime = pendingEventInfo.time; ++ newEventType = pendingEventInfo.type; ++ } else { ++ newEventTime = resolveEventTimeStamp(); ++ newEventType = resolveEventType(); ++ } ++ + if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType ++ newEventTime !== timers.eventRepeatTime || ++ newEventType !== timers.eventType + ) { +- transitionEventRepeatTime = -1.1; ++ timers.eventRepeatTime = -1.1; + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ timers.eventTime = newEventTime; ++ timers.eventType = newEventType; + } + } + } +@@ -226,21 +286,18 @@ export function startHostActionTimer(fiber: Fiber): void { + blockingEventTime = newEventTime; + blockingEventType = newEventType; + } +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = +- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; +- if (transitionStartTime < 0) { ++ pendingActionUpdateTimes.set(fiber, now()); ++ ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); + const newEventTime = resolveEventTimeStamp(); + const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; +- } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } + } + } +@@ -265,10 +322,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { + blockingUpdateType = PINGED_UPDATE; + } + } else if (includesTransitionLane(lanes)) { +- if (transitionUpdateTime < 0) { +- transitionClampTime = transitionUpdateTime = now(); +- transitionUpdateTask = createTask('Promise Resolved'); +- transitionUpdateType = PINGED_UPDATE; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ timers.clampTime = timers.updateTime = now(); ++ timers.updateTask = createTask('Promise Resolved'); ++ timers.updateType = PINGED_UPDATE; ++ } ++ } ++ remainingLanes &= ~lane; + } + } + } +@@ -282,7 +363,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { + } else if (includesBlockingLane(lanes)) { + blockingSuspendedTime = renderEndTime; + } else if (includesTransitionLane(lanes)) { +- transitionSuspendedTime = renderEndTime; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers !== undefined) { ++ timers.suspendedTime = renderEndTime; ++ } ++ } ++ remainingLanes &= ~lane; ++ } + } + } + +@@ -301,38 +392,38 @@ export function startAsyncTransitionTimer(): void { + if (!enableProfilerTimer || !enableComponentPerformanceTrack) { + return; + } +- if (transitionStartTime < 0 && transitionUpdateTime < 0) { +- transitionStartTime = now(); +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); ++ const newEventTime = resolveEventTimeStamp(); ++ const newEventType = resolveEventType(); ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; + } + } + + export function hasScheduledTransitionWork(): boolean { + // If we have setState on a transition or scheduled useActionState update. +- return transitionUpdateTime > -1; ++ for (const timers of transitionTimers.values()) { ++ if (timers.updateTime > -1) { ++ return true; ++ } ++ } ++ return false; + } + + export function clearAsyncTransitionTimer(): void { +- transitionStartTime = -1.1; ++ // This is a global clear. We probably shouldn't use it or it should be ++ // updated to clear pending weak maps? ++ // For now, removing the global write. + } + +-export function clearTransitionTimers(): void { +- transitionStartTime = -1.1; +- transitionUpdateTime = -1.1; +- transitionUpdateType = 0; +- transitionSuspendedTime = -1.1; +- transitionEventRepeatTime = transitionEventTime; +- transitionEventTime = -1.1; +- transitionClampTime = now(); ++export function clearTransitionTimer(lane: Lane): void { ++ transitionTimers.delete(lane); + } + + export function hasScheduledGestureTransitionWork(): boolean { +@@ -386,7 +477,9 @@ export function clampTransitionTimers(finalTime: number): void { + // If we had new updates come in while we were still rendering or committing, we don't want + // those update times to create overlapping tracks in the performance timeline so we clamp + // them to the end of the commit phase. +- transitionClampTime = finalTime; ++ for (const timers of transitionTimers.values()) { ++ timers.clampTime = finalTime; ++ } + } + + export function clampRetryTimers(finalTime: number): void { diff --git a/git_status.txt b/git_status.txt new file mode 100644 index 0000000000000000000000000000000000000000..249a106162ee091be773d5e87dd4f9dd0ffaae91 GIT binary patch literal 2406 zcmc(hL2uJQ5QXO&B>sby6C6S$%BezJDj^O?ASmT%g*c%GC$_R%O8-3V_r?yf6O*P? zYPE`EkKeqReY-Q>>pvfCX^DNal})&t+Br{i%k8&~tioFQQ(-giM;04g01^3>_{f^u z!V$rq+7mm0MQq=(1^AZWBL9Kw#I2b}DPc>9S>nBL#$)$Sus*X3@H6g)cqm$eZ^lUM z_1~P{*b5&+tP!3BuL{hBC;47_Ci1<6qhM&Rdee?7Y-Z2*#$JI@{>oYY`*O&L6^Jka zt9+$uTaO$?l##f8f|XJU$lST7O_Zx9qXF8K{#NUvOpifpRIpBAs5K2Xc7NF-tD-zL zORcKrt`!`U*NW${ed4)BzU8enS+Q;fw!k>SZvnr&XZ#{6|G=)*eYkwy5x-=9;ZdSX zp>6#hLxrzspndY*)ud?0jKeNkJG0{%Bs$SY%=KmrFuRK*k z*4guCzTd^K9lqh#{{G_oT^Xph9vo8%Y5=}s z6n154)3Y}-8MtK$rr_-_pKtCq^`&+1PRT*mIT}QIerzhd?zk!Q)tW@_#a%?m32*Q;OC?XPKyX6;$r#@a>q<$s8B{g`w|i@WZa+wpxFufKss)7uVHeAlZ_an-3# o9=qS)`W#VLc71ASp9c1wJ#@}cXHqv&S8kt9x*Q{L!{!Tq1G-A39RL6T literal 0 HcmV?d00001 diff --git a/lint_output_3.txt b/lint_output_3.txt new file mode 100644 index 0000000000000000000000000000000000000000..d1a24ec18ef1b487e77c8171ad9169134b2b66ed GIT binary patch literal 7236 zcmds++io015Qa?ke;?VBEm)Z=o?qDKHb;5S z`c}6FsRdiKfz@cywgVfIUgTNf{n67M@_Upo*spx6{f_4h{n?_2n(b4+XD#}x^WCJR zLwZ0PU25|U`7QE?yi>}Kti)(SJ8%>wzT2er?D1|px{@7(GX+VBmTK2H*ISpo)Wh4|^3>;96m@c&TnT-bD6denL8?!>V<+SMtX63}tD%qfHGOZ{YkO<& zZP&h~Zq3#hy^5UmZrW2@=Bn8$^Vnbw*2#ZDx`Cj6^#&?A_%cReu z?YL}m$p-2^QrUMzgE8KQjp(7n>T7jNw9;DkeB_j;`qjNv`ak`{1$~O)w?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CruE*_L@_$18MjfOYRNOmcq3)RxYxnH|lI2ys zXiX;Nf={D4v=w`mDXNykVG?Ljlt^OkQYwG8uw$6hscEum7hb}?GxtG_!#OQU1I8{)B{!ZIj*i^ueR%+ zOWel!7F0sBaUZI)OnAENF3&eJ(O+s$;o0NebdPOxzuEsigfIC@$d2)`PL>(AR#^BF zyVS8Hp7vXr@C|Eg`mMN|)rHQH9($JDhidwwf14+5MDNR)BQ!>@q#$bdnfrNu-JXU!bm*y^2;cn( zt?o)$e#Ud{8GJ;>G&yt5KLgz!s*WY|6VIqIUn69@JcX_cs`xh)ePjkUacq#0gzkZ4 Wt$Mg2tI@Zq3ZvHx4XI+I0{;edvmSo{ literal 0 HcmV?d00001 diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.js b/packages/react-reconciler/src/ReactFiberClassComponent.js index 1fae90f07b1a..9f11fe6ecfda 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.js @@ -7,9 +7,9 @@ * @flow */ -import type {Fiber} from './ReactInternalTypes'; -import type {Lanes} from './ReactFiberLane'; -import type {UpdateQueue} from './ReactFiberClassUpdateQueue'; +import type { Fiber } from './ReactInternalTypes'; +import type { Lanes } from './ReactFiberLane'; +import type { UpdateQueue } from './ReactFiberClassUpdateQueue'; import { LayoutStatic, @@ -22,15 +22,15 @@ import { enableSchedulingProfiler, } from 'shared/ReactFeatureFlags'; import ReactStrictModeWarnings from './ReactStrictModeWarnings'; -import {get as getInstance, set as setInstance} from 'shared/ReactInstanceMap'; +import { get as getInstance, set as setInstance } from 'shared/ReactInstanceMap'; import shallowEqual from 'shared/shallowEqual'; import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFromFiber'; import getComponentNameFromType from 'shared/getComponentNameFromType'; import assign from 'shared/assign'; import isArray from 'shared/isArray'; -import {REACT_CONTEXT_TYPE, REACT_CONSUMER_TYPE} from 'shared/ReactSymbols'; +import { REACT_CONTEXT_TYPE, REACT_CONSUMER_TYPE } from 'shared/ReactSymbols'; -import {NoMode, StrictLegacyMode, StrictEffectsMode} from './ReactTypeOfMode'; +import { NoMode, StrictLegacyMode, StrictEffectsMode } from './ReactTypeOfMode'; import { enqueueUpdate, @@ -45,7 +45,7 @@ import { cloneUpdateQueue, suspendIfUpdateReadFromEntangledAsyncAction, } from './ReactFiberClassUpdateQueue'; -import {NoLanes} from './ReactFiberLane'; +import { NoLanes } from './ReactFiberLane'; import { cacheContext, getMaskedContext, @@ -53,14 +53,18 @@ import { hasContextChanged, emptyContextObject, } from './ReactFiberLegacyContext'; -import {readContext, checkIfContextChanged} from './ReactFiberNewContext'; -import {requestUpdateLane, scheduleUpdateOnFiber} from './ReactFiberWorkLoop'; +import { readContext, checkIfContextChanged } from './ReactFiberNewContext'; +import { + requestUpdateLane, + scheduleUpdateOnFiber, + isAlreadyRendering, +} from './ReactFiberWorkLoop'; import { markForceUpdateScheduled, markStateUpdateScheduled, setIsStrictModeForDevtools, } from './ReactFiberDevToolsHook'; -import {startUpdateTimerByLane} from './ReactProfilerTimer'; +import { startUpdateTimerByLane } from './ReactProfilerTimer'; const fakeInternalInstance = {}; @@ -77,17 +81,17 @@ let didWarnAboutInvalidateContextType; let didWarnOnInvalidCallback; if (__DEV__) { - didWarnAboutStateAssignmentForComponent = new Set(); - didWarnAboutUninitializedState = new Set(); - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); - didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); - didWarnAboutDirectlyAssigningPropsToState = new Set(); - didWarnAboutUndefinedDerivedState = new Set(); - didWarnAboutContextTypeAndContextTypes = new Set(); - didWarnAboutContextTypes = new Set(); - didWarnAboutChildContextTypes = new Set(); - didWarnAboutInvalidateContextType = new Set(); - didWarnOnInvalidCallback = new Set(); + didWarnAboutStateAssignmentForComponent = new Set < string > (); + didWarnAboutUninitializedState = new Set < string > (); + didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set < string > (); + didWarnAboutLegacyLifecyclesAndDerivedState = new Set < string > (); + didWarnAboutDirectlyAssigningPropsToState = new Set < string > (); + didWarnAboutUndefinedDerivedState = new Set < string > (); + didWarnAboutContextTypeAndContextTypes = new Set < string > (); + didWarnAboutContextTypes = new Set < mixed > (); + didWarnAboutChildContextTypes = new Set < mixed > (); + didWarnAboutInvalidateContextType = new Set < string > (); + didWarnOnInvalidCallback = new Set < string > (); Object.freeze(fakeInternalInstance); } @@ -103,7 +107,7 @@ function warnOnInvalidCallback(callback: mixed) { didWarnOnInvalidCallback.add(key); console.error( 'Expected the last optional `callback` argument to be a ' + - 'function. Instead received: %s.', + 'function. Instead received: %s.', callback, ); } @@ -118,7 +122,7 @@ function warnOnUndefinedDerivedState(type: any, partialState: any) { didWarnAboutUndefinedDerivedState.add(componentName); console.error( '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + - 'You have returned undefined.', + 'You have returned undefined.', componentName, ); } @@ -179,7 +183,12 @@ const classComponentUpdater = { const root = enqueueUpdate(fiber, update, lane); if (root !== null) { - startUpdateTimerByLane(lane, 'this.setState()', fiber); + startUpdateTimerByLane( + lane, + 'this.setState()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -205,7 +214,12 @@ const classComponentUpdater = { const root = enqueueUpdate(fiber, update, lane); if (root !== null) { - startUpdateTimerByLane(lane, 'this.replaceState()', fiber); + startUpdateTimerByLane( + lane, + 'this.replaceState()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -231,7 +245,12 @@ const classComponentUpdater = { const root = enqueueUpdate(fiber, update, lane); if (root !== null) { - startUpdateTimerByLane(lane, 'this.forceUpdate()', fiber); + startUpdateTimerByLane( + lane, + 'this.forceUpdate()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -275,7 +294,7 @@ function checkShouldComponentUpdate( if (shouldUpdate === undefined) { console.error( '%s.shouldComponentUpdate(): Returned undefined instead of a ' + - 'boolean value. Make sure to return true or false.', + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component', ); } @@ -303,13 +322,13 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { if (ctor.prototype && typeof ctor.prototype.render === 'function') { console.error( 'No `render` method found on the %s ' + - 'instance: did you accidentally return an object from the constructor?', + 'instance: did you accidentally return an object from the constructor?', name, ); } else { console.error( 'No `render` method found on the %s ' + - 'instance: you may have forgotten to define `render`.', + 'instance: you may have forgotten to define `render`.', name, ); } @@ -322,8 +341,8 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { ) { console.error( 'getInitialState was defined on %s, a plain JavaScript class. ' + - 'This is only supported for classes created using React.createClass. ' + - 'Did you mean to define a state property instead?', + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', name, ); } @@ -333,15 +352,15 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { ) { console.error( 'getDefaultProps was defined on %s, a plain JavaScript class. ' + - 'This is only supported for classes created using React.createClass. ' + - 'Use a static property to define defaultProps instead.', + 'This is only supported for classes created using React.createClass. ' + + 'Use a static property to define defaultProps instead.', name, ); } if (instance.contextType) { console.error( 'contextType was defined as an instance property on %s. Use a static ' + - 'property to define contextType instead.', + 'property to define contextType instead.', name, ); } @@ -351,7 +370,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutChildContextTypes.add(ctor); console.error( '%s uses the legacy childContextTypes API which was removed in React 19. ' + - 'Use React.createContext() instead. (https://react.dev/link/legacy-context)', + 'Use React.createContext() instead. (https://react.dev/link/legacy-context)', name, ); } @@ -359,8 +378,8 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutContextTypes.add(ctor); console.error( '%s uses the legacy contextTypes API which was removed in React 19. ' + - 'Use React.createContext() with static contextType instead. ' + - '(https://react.dev/link/legacy-context)', + 'Use React.createContext() with static contextType instead. ' + + '(https://react.dev/link/legacy-context)', name, ); } @@ -368,7 +387,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { if (instance.contextTypes) { console.error( 'contextTypes was defined as an instance property on %s. Use a static ' + - 'property to define contextTypes instead.', + 'property to define contextTypes instead.', name, ); } @@ -381,7 +400,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutContextTypeAndContextTypes.add(ctor); console.error( '%s declares both contextTypes and contextType static properties. ' + - 'The legacy contextTypes property will be ignored.', + 'The legacy contextTypes property will be ignored.', name, ); } @@ -389,7 +408,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutChildContextTypes.add(ctor); console.error( '%s uses the legacy childContextTypes API which will soon be removed. ' + - 'Use React.createContext() instead. (https://react.dev/link/legacy-context)', + 'Use React.createContext() instead. (https://react.dev/link/legacy-context)', name, ); } @@ -397,8 +416,8 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutContextTypes.add(ctor); console.error( '%s uses the legacy contextTypes API which will soon be removed. ' + - 'Use React.createContext() with static contextType instead. ' + - '(https://react.dev/link/legacy-context)', + 'Use React.createContext() with static contextType instead. ' + + '(https://react.dev/link/legacy-context)', name, ); } @@ -407,9 +426,9 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { if (typeof instance.componentShouldUpdate === 'function') { console.error( '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', name, ); } @@ -420,40 +439,40 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { ) { console.error( '%s has a method called shouldComponentUpdate(). ' + - 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + - 'Please extend React.Component if shouldComponentUpdate is used.', + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component', ); } if (typeof instance.componentDidUnmount === 'function') { console.error( '%s has a method called ' + - 'componentDidUnmount(). But there is no such lifecycle method. ' + - 'Did you mean componentWillUnmount()?', + 'componentDidUnmount(). But there is no such lifecycle method. ' + + 'Did you mean componentWillUnmount()?', name, ); } if (typeof instance.componentDidReceiveProps === 'function') { console.error( '%s has a method called ' + - 'componentDidReceiveProps(). But there is no such lifecycle method. ' + - 'If you meant to update the state in response to changing props, ' + - 'use componentWillReceiveProps(). If you meant to fetch data or ' + - 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + + 'If you meant to update the state in response to changing props, ' + + 'use componentWillReceiveProps(). If you meant to fetch data or ' + + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name, ); } if (typeof instance.componentWillRecieveProps === 'function') { console.error( '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name, ); } if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { console.error( '%s has a method called ' + - 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name, ); } @@ -461,14 +480,14 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { if (instance.props !== undefined && hasMutatedProps) { console.error( 'When calling super() in `%s`, make sure to pass ' + - "up the same props that your component's constructor was passed.", + "up the same props that your component's constructor was passed.", name, ); } if (instance.defaultProps) { console.error( 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + - ' Instead, define defaultProps as a static property on %s.', + ' Instead, define defaultProps as a static property on %s.', name, name, ); @@ -482,7 +501,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); console.error( '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + - 'This component defines getSnapshotBeforeUpdate() only.', + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor), ); } @@ -490,21 +509,21 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { if (typeof instance.getDerivedStateFromProps === 'function') { console.error( '%s: getDerivedStateFromProps() is defined as an instance method ' + - 'and will be ignored. Instead, declare it as a static method.', + 'and will be ignored. Instead, declare it as a static method.', name, ); } if (typeof instance.getDerivedStateFromError === 'function') { console.error( '%s: getDerivedStateFromError() is defined as an instance method ' + - 'and will be ignored. Instead, declare it as a static method.', + 'and will be ignored. Instead, declare it as a static method.', name, ); } if (typeof ctor.getSnapshotBeforeUpdate === 'function') { console.error( '%s: getSnapshotBeforeUpdate() is defined as a static method ' + - 'and will be ignored. Instead, declare it as an instance method.', + 'and will be ignored. Instead, declare it as an instance method.', name, ); } @@ -518,7 +537,7 @@ function checkClassInstance(workInProgress: Fiber, ctor: any, newProps: any) { ) { console.error( '%s.getChildContext(): childContextTypes must be defined in order to ' + - 'use getChildContext().', + 'use getChildContext().', name, ); } @@ -565,7 +584,7 @@ function constructClassInstance( } console.error( '%s defines an invalid contextType. ' + - 'contextType should point to the Context object returned by React.createContext().%s', + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum, ); @@ -617,9 +636,9 @@ function constructClassInstance( didWarnAboutUninitializedState.add(componentName); console.error( '`%s` uses `getDerivedStateFromProps` but its initial state is ' + - '%s. This is not recommended. Instead, define the initial state by ' + - 'assigning an object to `this.state` in the constructor of `%s`. ' + - 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', + '%s. This is not recommended. Instead, define the initial state by ' + + 'assigning an object to `this.state` in the constructor of `%s`. ' + + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName, @@ -677,9 +696,9 @@ function constructClassInstance( didWarnAboutLegacyLifecyclesAndDerivedState.add(componentName); console.error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + - '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + - 'The above lifecycles should be removed. Learn more about this warning here:\n' + - 'https://react.dev/link/unsafe-component-lifecycles', + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + + 'The above lifecycles should be removed. Learn more about this warning here:\n' + + 'https://react.dev/link/unsafe-component-lifecycles', componentName, newApiName, foundWillMountName !== null ? `\n ${foundWillMountName}` : '', @@ -716,8 +735,8 @@ function callComponentWillMount(workInProgress: Fiber, instance: any) { if (__DEV__) { console.error( '%s.componentWillMount(): Assigning directly to this.state is ' + - "deprecated (except inside a component's " + - 'constructor). Use setState instead.', + "deprecated (except inside a component's " + + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component', ); } @@ -747,8 +766,8 @@ function callComponentWillReceiveProps( didWarnAboutStateAssignmentForComponent.add(componentName); console.error( '%s.componentWillReceiveProps(): Assigning directly to ' + - "this.state is deprecated (except inside a component's " + - 'constructor). Use setState instead.', + "this.state is deprecated (except inside a component's " + + 'constructor). Use setState instead.', componentName, ); } @@ -792,8 +811,8 @@ function mountClassInstance( didWarnAboutDirectlyAssigningPropsToState.add(componentName); console.error( '%s: It is not recommended to assign props directly to state ' + - "because updates to props won't be reflected in state. " + - 'In most cases, it is better to use props directly.', + "because updates to props won't be reflected in state. " + + 'In most cases, it is better to use props directly.', componentName, ); } diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index 0450495ff0d4..5b0aaa27b956 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -22,11 +22,11 @@ import type { HookType, MemoCache, } from './ReactInternalTypes'; -import type {Lanes, Lane} from './ReactFiberLane'; -import type {HookFlags} from './ReactHookEffectTags'; -import type {Flags} from './ReactFiberFlags'; -import type {TransitionStatus} from './ReactFiberConfig'; -import type {ScheduledGesture} from './ReactFiberGestureScheduler'; +import type { Lanes, Lane } from './ReactFiberLane'; +import type { HookFlags } from './ReactHookEffectTags'; +import type { Flags } from './ReactFiberFlags'; +import type { TransitionStatus } from './ReactFiberConfig'; +import type { ScheduledGesture } from './ReactFiberGestureScheduler'; import { HostTransitionContext, @@ -78,8 +78,8 @@ import { ContinuousEventPriority, higherEventPriority, } from './ReactEventPriorities'; -import {readContext, checkIfContextChanged} from './ReactFiberNewContext'; -import {HostRoot, CacheComponent, HostComponent} from './ReactWorkTags'; +import { readContext, checkIfContextChanged } from './ReactFiberNewContext'; +import { HostRoot, CacheComponent, HostComponent } from './ReactWorkTags'; import { LayoutStatic as LayoutStaticEffect, Passive as PassiveEffect, @@ -105,6 +105,7 @@ import { requestDeferredLane, markSkippedUpdateLanes, isInvalidExecutionContextForEventFunction, + isAlreadyRendering, } from './ReactFiberWorkLoop'; import getComponentNameFromFiber from 'react-reconciler/src/getComponentNameFromFiber'; @@ -126,7 +127,7 @@ import { startUpdateTimerByLane, startHostActionTimer, } from './ReactProfilerTimer'; -import {createCache} from './ReactFiberCacheComponent'; +import { createCache } from './ReactFiberCacheComponent'; import { createUpdate as createLegacyQueueUpdate, enqueueUpdate as enqueueLegacyQueueUpdate, @@ -137,8 +138,8 @@ import { enqueueConcurrentHookUpdateAndEagerlyBailout, enqueueConcurrentRenderForLane, } from './ReactFiberConcurrentUpdates'; -import {getTreeId} from './ReactFiberTreeContext'; -import {now} from './Scheduler'; +import { getTreeId } from './ReactFiberTreeContext'; +import { now } from './Scheduler'; import { trackUsedThenable, checkIfUseWrappedInTryCatch, @@ -146,20 +147,20 @@ import { SuspenseException, SuspenseActionException, } from './ReactFiberThenable'; -import type {ThenableState} from './ReactFiberThenable'; -import type {Transition} from 'react/src/ReactStartTransition'; +import type { ThenableState } from './ReactFiberThenable'; +import type { Transition } from 'react/src/ReactStartTransition'; import { peekEntangledActionLane, peekEntangledActionThenable, chainThenableValue, } from './ReactFiberAsyncAction'; -import {requestTransitionLane} from './ReactFiberRootScheduler'; -import {isCurrentTreeHidden} from './ReactFiberHiddenContext'; -import {requestCurrentTransition} from './ReactFiberTransition'; +import { requestTransitionLane } from './ReactFiberRootScheduler'; +import { isCurrentTreeHidden } from './ReactFiberHiddenContext'; +import { requestCurrentTransition } from './ReactFiberTransition'; -import {callComponentInDEV} from './ReactFiberCallUserSpace'; +import { callComponentInDEV } from './ReactFiberCallUserSpace'; -import {scheduleGesture} from './ReactFiberGestureScheduler'; +import { scheduleGesture } from './ReactFiberGestureScheduler'; export type Update = { lane: Lane, @@ -175,8 +176,8 @@ export type UpdateQueue = { pending: Update | null, lanes: Lanes, dispatch: (A => mixed) | null, - lastRenderedReducer: ((S, A) => S) | null, - lastRenderedState: S | null, + lastRenderedReducer: ((S, A) => S) | null, + lastRenderedState: S | null, }; let didWarnAboutMismatchedHooksForComponent; @@ -185,10 +186,10 @@ let didWarnAboutUseWrappedInTryCatch; let didWarnAboutAsyncClientComponent; let didWarnAboutUseFormState; if (__DEV__) { - didWarnAboutMismatchedHooksForComponent = new Set(); - didWarnAboutUseWrappedInTryCatch = new Set(); - didWarnAboutAsyncClientComponent = new Set(); - didWarnAboutUseFormState = new Set(); + didWarnAboutMismatchedHooksForComponent = new Set < string | null > (); + didWarnAboutUseWrappedInTryCatch = new Set < string | null > (); + didWarnAboutAsyncClientComponent = new Set < string | null > (); + didWarnAboutUseFormState = new Set < string | null > (); } export type Hook = { @@ -235,10 +236,10 @@ type StoreConsistencyCheck = { getSnapshot: () => T, }; -type EventFunctionPayload) => Return> = { +type EventFunctionPayload) => Return > = { ref: { eventFn: F, - impl: F, + impl: F, }, nextImpl: F, }; @@ -337,7 +338,7 @@ function checkDepsAreArrayDev(deps: mixed): void { // It's unlikely their type would change as usually you define them inline. console.error( '%s received a final argument that is not an array (instead, received `%s`). When ' + - 'specified, the final argument must be an array.', + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps, ); @@ -378,12 +379,12 @@ function warnOnHookMismatchInDev(currentHookName: HookType): void { console.error( 'React has detected a change in the order of Hooks called by %s. ' + - 'This will lead to bugs and errors if not fixed. ' + - 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + - ' Previous render Next render\n' + - ' ------------------------------------------------------\n' + - '%s' + - ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', + 'This will lead to bugs and errors if not fixed. ' + + 'For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n' + + ' Previous render Next render\n' + + ' ------------------------------------------------------\n' + + '%s' + + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table, ); @@ -400,7 +401,7 @@ function warnOnUseFormStateInDev(): void { console.error( 'ReactDOM.useFormState has been renamed to React.useActionState. ' + - 'Please update %s to use React.useActionState.', + 'Please update %s to use React.useActionState.', componentName, ); } @@ -419,7 +420,7 @@ function warnIfAsyncClientComponent(Component: Function) { Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] Object.prototype.toString.call(Component) === - '[object AsyncGeneratorFunction]'; + '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. const componentName = getComponentNameFromFiber(currentlyRenderingFiber); @@ -427,9 +428,9 @@ function warnIfAsyncClientComponent(Component: Function) { didWarnAboutAsyncClientComponent.add(componentName); console.error( '%s is an async Client Component. ' + - 'Only Server Components can be async at the moment. This error is often caused by accidentally ' + - "adding `'use client'` to a module that was originally written " + - 'for the server.', + 'Only Server Components can be async at the moment. This error is often caused by accidentally ' + + "adding `'use client'` to a module that was originally written " + + 'for the server.', componentName === null ? 'An unknown Component' : `<${componentName}>`, @@ -442,11 +443,11 @@ function warnIfAsyncClientComponent(Component: Function) { function throwInvalidHookError() { throw new Error( 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + - ' one of the following reasons:\n' + - '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + - '2. You might be breaking the Rules of Hooks\n' + - '3. You might have more than one copy of React in the same app\n' + - 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', + ' one of the following reasons:\n' + + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + + '2. You might be breaking the Rules of Hooks\n' + + '3. You might have more than one copy of React in the same app\n' + + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.', ); } @@ -465,8 +466,8 @@ function areHookInputsEqual( if (__DEV__) { console.error( '%s received a final argument during this render, but not during ' + - 'the previous render. Even though the final argument is optional, ' + - 'its type cannot change between renders.', + 'the previous render. Even though the final argument is optional, ' + + 'its type cannot change between renders.', currentHookNameInDev, ); } @@ -479,9 +480,9 @@ function areHookInputsEqual( if (nextDeps.length !== prevDeps.length) { console.error( 'The final argument passed to %s changed size between renders. The ' + - 'order and size of this array must remain constant.\n\n' + - 'Previous: %s\n' + - 'Incoming: %s', + 'order and size of this array must remain constant.\n\n' + + 'Previous: %s\n' + + 'Incoming: %s', currentHookNameInDev, `[${prevDeps.join(', ')}]`, `[${nextDeps.join(', ')}]`, @@ -513,7 +514,7 @@ export function renderWithHooks( if (__DEV__) { hookTypesDev = current !== null - ? ((current._debugHookTypes: any): Array) + ? ((current._debugHookTypes: any): Array < HookType >) : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: @@ -678,7 +679,7 @@ function finishRenderingHooks( if ( current !== null && (current.flags & StaticMaskEffect) !== - (workInProgress.flags & StaticMaskEffect) && + (workInProgress.flags & StaticMaskEffect) && // Disable this warning in legacy mode, because legacy Suspense is weird // and creates false positives. To make this work in legacy mode, we'd // need to mark fibers that commit in an incomplete state, somehow. For @@ -688,7 +689,7 @@ function finishRenderingHooks( ) { console.error( 'Internal React error: Expected static flag was missing. Please ' + - 'notify the React team.', + 'notify the React team.', ); } } @@ -703,7 +704,7 @@ function finishRenderingHooks( if (didRenderTooFewHooks) { throw new Error( 'Rendered fewer hooks than expected. This may be caused by an accidental ' + - 'early return statement.', + 'early return statement.', ); } @@ -740,8 +741,8 @@ function finishRenderingHooks( didWarnAboutUseWrappedInTryCatch.add(componentName); console.error( '`use` was called from inside a try/catch block. This is not allowed ' + - 'and can lead to unexpected behavior. To handle errors triggered ' + - 'by `use`, wrap your component in a error boundary.', + 'and can lead to unexpected behavior. To handle errors triggered ' + + 'by `use`, wrap your component in a error boundary.', ); } } @@ -817,7 +818,7 @@ function renderWithHooksAgain( if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( 'Too many re-renders. React limits the number of renders to prevent ' + - 'an infinite loop.', + 'an infinite loop.', ); } @@ -1117,8 +1118,8 @@ function useThenable(thenable: Thenable): T { const nextWorkInProgressHook = workInProgressHook === null ? // We're at the beginning of the list, so read from the first hook from - // the fiber. - workInProgressFiber.memoizedState + // the fiber. + workInProgressFiber.memoizedState : workInProgressHook.next; if (nextWorkInProgressHook !== null) { @@ -1207,7 +1208,7 @@ function useMemoCache(size: number): Array { data: enableNoCloningMemoCache ? currentMemoCache.data : // Clone the memo cache before each render (copy-on-write) - currentMemoCache.data.map(array => array.slice()), + currentMemoCache.data.map(array => array.slice()), index: 0 as number, }; } @@ -1238,7 +1239,7 @@ function useMemoCache(size: number): Array { if (__DEV__) { console.error( 'Expected a constant size argument for each invocation of useMemoCache. ' + - 'The previous cache was allocated with size %s but size %s was requested.', + 'The previous cache was allocated with size %s but size %s was requested.', data.length, size, ); @@ -1309,7 +1310,7 @@ function updateReducerImpl( if (queue === null) { throw new Error( 'Should have a queue. You are likely calling Hooks conditionally, ' + - 'which is not allowed. (https://react.dev/link/invalid-hook-call)', + 'which is not allowed. (https://react.dev/link/invalid-hook-call)', ); } @@ -1336,7 +1337,7 @@ function updateReducerImpl( // the future if we implement resuming, or some form of that. console.error( 'Internal error: Expected work-in-progress queue to be a clone. ' + - 'This is a bug in React.', + 'This is a bug in React.', ); } } @@ -1584,7 +1585,7 @@ function rerenderReducer( if (queue === null) { throw new Error( 'Should have a queue. You are likely calling Hooks conditionally, ' + - 'which is not allowed. (https://react.dev/link/invalid-hook-call)', + 'which is not allowed. (https://react.dev/link/invalid-hook-call)', ); } @@ -1632,8 +1633,8 @@ function rerenderReducer( function mountSyncExternalStore( subscribe: (() => void) => () => void, - getSnapshot: () => T, - getServerSnapshot?: () => T, + getSnapshot: () => T, + getServerSnapshot ?: () => T, ): T { const fiber = currentlyRenderingFiber; const hook = mountWorkInProgressHook(); @@ -1644,7 +1645,7 @@ function mountSyncExternalStore( if (getServerSnapshot === undefined) { throw new Error( 'Missing getServerSnapshot, which is required for ' + - 'server-rendered content. Will revert to client rendering.', + 'server-rendered content. Will revert to client rendering.', ); } nextSnapshot = getServerSnapshot(); @@ -1723,8 +1724,8 @@ function mountSyncExternalStore( function updateSyncExternalStore( subscribe: (() => void) => () => void, - getSnapshot: () => T, - getServerSnapshot?: () => T, + getSnapshot: () => T, + getServerSnapshot ?: () => T, ): T { const fiber = currentlyRenderingFiber; const hook = updateWorkInProgressHook(); @@ -1738,7 +1739,7 @@ function updateSyncExternalStore( if (getServerSnapshot === undefined) { throw new Error( 'Missing getServerSnapshot, which is required for ' + - 'server-rendered content. Will revert to client rendering.', + 'server-rendered content. Will revert to client rendering.', ); } nextSnapshot = getServerSnapshot(); @@ -2050,31 +2051,31 @@ type ActionStateQueue = { // If it's null, it means the action queue errored and subsequent actions // should not run. action: ((Awaited, P) => S) | null, - // This is a circular linked list of pending action payloads. It incudes the - // action that is currently running. - pending: ActionStateQueueNode | null, + // This is a circular linked list of pending action payloads. It incudes the + // action that is currently running. + pending: ActionStateQueueNode < S, P > | null, }; type ActionStateQueueNode = { payload: P, // This is the action implementation at the time it was dispatched. action: (Awaited, P) => S, - // This is never null because it's part of a circular linked list. - next: ActionStateQueueNode, - - // Whether or not the action was dispatched as part of a transition. We use - // this to restore the transition context when the queued action is run. Once - // we're able to track parallel async actions, this should be updated to - // represent the specific transition instance the action is associated with. - isTransition: boolean, - - // Implements the Thenable interface. We use it to suspend until the action - // finishes. - then: (listener: () => void) => void, - status: 'pending' | 'rejected' | 'fulfilled', - value: any, - reason: any, - listeners: Array<() => void>, + // This is never null because it's part of a circular linked list. + next: ActionStateQueueNode < S, P >, + + // Whether or not the action was dispatched as part of a transition. We use + // this to restore the transition context when the queued action is run. Once + // we're able to track parallel async actions, this should be updated to + // represent the specific transition instance the action is associated with. + isTransition: boolean, + + // Implements the Thenable interface. We use it to suspend until the action + // finishes. + then: (listener: () => void) => void, + status: 'pending' | 'rejected' | 'fulfilled', + value: any, + reason: any, + listeners: Array < () => void>, }; function dispatchActionState( @@ -2169,11 +2170,11 @@ function runActionStateAction( currentTransition.types = prevTransition !== null ? // If we're a nested transition, we should use the same set as the parent - // since we're conceptually always joined into the same entangled transition. - // In practice, this only matters if we add transition types in the inner - // without setting state. In that case, the inner transition can finish - // without waiting for the outer. - prevTransition.types + // since we're conceptually always joined into the same entangled transition. + // In practice, this only matters if we add transition types in the inner + // without setting state. In that case, the inner transition can finish + // without waiting for the outer. + prevTransition.types : null; } if (enableGestureTransition) { @@ -2208,8 +2209,8 @@ function runActionStateAction( // Just assert that assumption holds that we're not overriding anything. console.error( 'We expected inner Transitions to have transferred the outer types set and ' + - 'that you cannot add to the outer Transition while inside the inner.' + - 'This is a bug in React.', + 'that you cannot add to the outer Transition while inside the inner.' + + 'This is a bug in React.', ); } } @@ -2224,8 +2225,8 @@ function runActionStateAction( if (updatedFibersCount > 10) { console.warn( 'Detected a large number of updates inside startTransition. ' + - 'If this is due to a subscription please re-write it to use React provided hooks. ' + - 'Otherwise concurrent mode guarantees are off the table.', + 'If this is due to a subscription please re-write it to use React provided hooks. ' + + 'Otherwise concurrent mode guarantees are off the table.', ); } } @@ -2272,9 +2273,9 @@ function handleActionReturnValue( if (!node.isTransition) { console.error( 'An async function with useActionState was called outside of a transition. ' + - 'This is likely not what you intended (for example, isPending will not update ' + - 'correctly). Either call the returned function inside startTransition, or pass it ' + - 'to an `action` or `formAction` prop.', + 'This is likely not what you intended (for example, isPending will not update ' + + 'correctly). Either call the returned function inside startTransition, or pass it ' + + 'to an `action` or `formAction` prop.', ); } } @@ -2354,9 +2355,9 @@ function actionStateReducer(oldState: S, newState: S): S { function mountActionState( action: (Awaited, P) => S, - initialStateProp: Awaited, - permalink?: string, -): [Awaited, (P) => void, boolean] { + initialStateProp: Awaited < S >, + permalink ?: string, +): [Awaited < S >, (P) => void, boolean] { let initialState: Awaited = initialStateProp; if (getIsHydrating()) { const root: FiberRoot = (getWorkInProgressRoot(): any); @@ -2397,14 +2398,14 @@ function mountActionState( // Pending state. This is used to store the pending state of the action. // Tracked optimistically, like a transition pending state. - const pendingStateHook = mountStateImpl((false: Thenable | boolean)); + const pendingStateHook = mountStateImpl((false: Thenable < boolean > | boolean)); const setPendingState: boolean => void = (dispatchOptimisticSetState.bind( null, currentlyRenderingFiber, false, - ((pendingStateHook.queue: any): UpdateQueue< - S | Awaited, - S | Awaited, + ((pendingStateHook.queue: any): UpdateQueue < + S | Awaited < S >, + S | Awaited < S >, >), ): any); @@ -2439,9 +2440,9 @@ function mountActionState( function updateActionState( action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, -): [Awaited, (P) => void, boolean] { + initialState: Awaited < S >, + permalink ?: string, +): [Awaited < S >, (P) => void, boolean] { const stateHook = updateWorkInProgressHook(); const currentStateHook = ((currentHook: any): Hook); return updateActionStateImpl( @@ -2457,10 +2458,10 @@ function updateActionStateImpl( stateHook: Hook, currentStateHook: Hook, action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, -): [Awaited, (P) => void, boolean] { - const [actionResult] = updateReducerImpl, S | Thenable>( + initialState: Awaited < S >, + permalink ?: string, +): [Awaited < S >, (P) => void, boolean] { + const [actionResult] = updateReducerImpl < S | Thenable < S >, S | Thenable < S >> ( stateHook, currentStateHook, actionStateReducer, @@ -2519,9 +2520,9 @@ function actionStateActionEffect( function rerenderActionState( action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, -): [Awaited, (P) => void, boolean] { + initialState: Awaited < S >, + permalink ?: string, +): [Awaited < S >, (P) => void, boolean] { // Unlike useState, useActionState doesn't support render phase updates. // Also unlike useState, we need to replay all pending updates again in case // the passthrough value changed. @@ -2596,17 +2597,17 @@ function pushEffectImpl(effect: Effect): Effect { } function createEffectInstance(): EffectInstance { - return {destroy: undefined}; + return { destroy: undefined }; } -function mountRef(initialValue: T): {current: T} { +function mountRef(initialValue: T): { current: T } { const hook = mountWorkInProgressHook(); - const ref = {current: initialValue}; + const ref = { current: initialValue }; hook.memoizedState = ref; return ref; } -function updateRef(initialValue: T): {current: T} { +function updateRef(initialValue: T): { current: T } { const hook = updateWorkInProgressHook(); return hook.memoizedState; } @@ -2699,8 +2700,8 @@ function updateEffect( updateEffectImpl(PassiveEffect, HookPassive, create, deps); } -function useEffectEventImpl) => Return>( - payload: EventFunctionPayload, +function useEffectEventImpl) => Return > ( + payload: EventFunctionPayload < Args, Return, F >, ) { currentlyRenderingFiber.flags |= UpdateEffect; let componentUpdateQueue: null | FunctionComponentUpdateQueue = @@ -2719,11 +2720,11 @@ function useEffectEventImpl) => Return>( } } -function mountEvent) => Return>( +function mountEvent) => Return > ( callback: F, ): F { const hook = mountWorkInProgressHook(); - const ref = {impl: callback}; + const ref = { impl: callback }; hook.memoizedState = ref; // $FlowIgnore[incompatible-return] return function eventFn() { @@ -2736,12 +2737,12 @@ function mountEvent) => Return>( }; } -function updateEvent) => Return>( +function updateEvent) => Return > ( callback: F, ): F { const hook = updateWorkInProgressHook(); const ref = hook.memoizedState; - useEffectEventImpl({ref, nextImpl: callback}); + useEffectEventImpl({ ref, nextImpl: callback }); // $FlowIgnore[incompatible-return] return function eventFn() { if (isInvalidExecutionContextForEventFunction()) { @@ -2790,7 +2791,7 @@ function updateLayoutEffect( function imperativeHandleEffect( create: () => T, - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, ): void | (() => void) { if (typeof ref === 'function') { const refCallback = ref; @@ -2810,7 +2811,7 @@ function imperativeHandleEffect( if (!refObject.hasOwnProperty('current')) { console.error( 'Expected useImperativeHandle() first argument to either be a ' + - 'ref callback or React.createRef() object. Instead received: %s.', + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}', ); } @@ -2824,7 +2825,7 @@ function imperativeHandleEffect( } function mountImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, create: () => T, deps: Array | void | null, ): void { @@ -2832,7 +2833,7 @@ function mountImperativeHandle( if (typeof create !== 'function') { console.error( 'Expected useImperativeHandle() second argument to be a function ' + - 'that creates a handle. Instead received: %s.', + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null', ); } @@ -2858,7 +2859,7 @@ function mountImperativeHandle( } function updateImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, create: () => T, deps: Array | void | null, ): void { @@ -2866,7 +2867,7 @@ function updateImperativeHandle( if (typeof create !== 'function') { console.error( 'Expected useImperativeHandle() second argument to be a function ' + - 'that creates a handle. Instead received: %s.', + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null', ); } @@ -3105,11 +3106,11 @@ function startTransition( currentTransition.types = prevTransition !== null ? // If we're a nested transition, we should use the same set as the parent - // since we're conceptually always joined into the same entangled transition. - // In practice, this only matters if we add transition types in the inner - // without setting state. In that case, the inner transition can finish - // without waiting for the outer. - prevTransition.types + // since we're conceptually always joined into the same entangled transition. + // In practice, this only matters if we add transition types in the inner + // without setting state. In that case, the inner transition can finish + // without waiting for the outer. + prevTransition.types : null; } if (enableGestureTransition) { @@ -3184,7 +3185,7 @@ function startTransition( // When it unwraps the thenable with the `use` algorithm, the error // will be thrown. const rejectedThenable: RejectedThenable = { - then() {}, + then() { }, status: 'rejected', reason: error, }; @@ -3208,8 +3209,8 @@ function startTransition( // Just assert that assumption holds that we're not overriding anything. console.error( 'We expected inner Transitions to have transferred the outer types set and ' + - 'that you cannot add to the outer Transition while inside the inner.' + - 'This is a bug in React.', + 'that you cannot add to the outer Transition while inside the inner.' + + 'This is a bug in React.', ); } } @@ -3224,8 +3225,8 @@ function startTransition( if (updatedFibersCount > 10) { console.warn( 'Detected a large number of updates inside startTransition. ' + - 'If this is due to a subscription please re-write it to use React provided hooks. ' + - 'Otherwise concurrent mode guarantees are off the table.', + 'If this is due to a subscription please re-write it to use React provided hooks. ' + + 'Otherwise concurrent mode guarantees are off the table.', ); } } @@ -3233,51 +3234,51 @@ function startTransition( } } -const noop = () => {}; +const noop = () => { }; export function startHostTransition( formFiber: Fiber, pendingState: TransitionStatus, action: (F => mixed) | null, - formData: F, + formData: F, ): void { if (formFiber.tag !== HostComponent) { - throw new Error( - 'Expected the form instance to be a HostComponent. This ' + - 'is a bug in React.', - ); - } - - const stateHook = ensureFormComponentIsStateful(formFiber); - - const queue: UpdateQueue< - Thenable | TransitionStatus, - BasicStateAction | TransitionStatus>, - > = stateHook.queue; - - startHostActionTimer(formFiber); - - startTransition( - formFiber, - queue, - pendingState, - NoPendingHostTransition, - // TODO: `startTransition` both sets the pending state and dispatches - // the action, if one is provided. Consider refactoring these two - // concerns to avoid the extra lambda. - - action === null - ? // No action was provided, but we still call `startTransition` to - // set the pending form status. - noop - : () => { - // Automatically reset the form when the action completes. - requestFormReset(formFiber); - return action(formData); - }, + throw new Error( + 'Expected the form instance to be a HostComponent. This ' + + 'is a bug in React.', ); } +const stateHook = ensureFormComponentIsStateful(formFiber); + +const queue: UpdateQueue< + Thenable | TransitionStatus, + BasicStateAction | TransitionStatus>, +> = stateHook.queue; + +startHostActionTimer(formFiber, isAlreadyRendering()); + +startTransition( + formFiber, + queue, + pendingState, + NoPendingHostTransition, + // TODO: `startTransition` both sets the pending state and dispatches + // the action, if one is provided. Consider refactoring these two + // concerns to avoid the extra lambda. + + action === null + ? // No action was provided, but we still call `startTransition` to + // set the pending form status. + noop + : () => { + // Automatically reset the form when the action completes. + requestFormReset(formFiber); + return action(formData); + }, +); +} + function ensureFormComponentIsStateful(formFiber: Fiber) { const existingStateHook: Hook | null = formFiber.memoizedState; if (existingStateHook !== null) { @@ -3362,15 +3363,15 @@ export function requestFormReset(formFiber: Fiber) { // described above. But arguably we shouldn't. console.error( 'requestFormReset was called outside a transition or action. To ' + - 'fix, move to an action, or wrap with startTransition.', + 'fix, move to an action, or wrap with startTransition.', ); } } else if (enableGestureTransition && transition.gesture) { throw new Error( 'Cannot requestFormReset() inside a startGestureTransition. ' + - 'There should be no side-effects associated with starting a ' + - 'Gesture until its Action is invoked. Move side-effects to the ' + - 'Action instead.', + 'There should be no side-effects associated with starting a ' + + 'Gesture until its Action is invoked. Move side-effects to the ' + + 'Action instead.', ); } @@ -3398,7 +3399,7 @@ function mountTransition(): [ boolean, (callback: () => void, options?: StartTransitionOptions) => void, ] { - const stateHook = mountStateImpl((false: Thenable | boolean)); + const stateHook = mountStateImpl((false: Thenable < boolean > | boolean)); // The `start` method never changes. const start = startTransition.bind( null, @@ -3423,7 +3424,7 @@ function updateTransition(): [ typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished. - useThenable(booleanOrThenable); + useThenable(booleanOrThenable); return [isPending, start]; } @@ -3438,7 +3439,7 @@ function rerenderTransition(): [ typeof booleanOrThenable === 'boolean' ? booleanOrThenable : // This will suspend until the async action scope has finished. - useThenable(booleanOrThenable); + useThenable(booleanOrThenable); return [isPending, start]; } @@ -3517,7 +3518,12 @@ function refreshCache(fiber: Fiber, seedKey: ?() => T, seedValue: T): void { const refreshUpdate = createLegacyQueueUpdate(lane); const root = enqueueLegacyQueueUpdate(provider, refreshUpdate, lane); if (root !== null) { - startUpdateTimerByLane(lane, 'refresh()', fiber); + startUpdateTimerByLane( + lane, + 'refresh()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, provider, lane); entangleLegacyQueueTransitions(root, provider, lane); } @@ -3563,8 +3569,8 @@ function dispatchReducerAction( if (typeof args[3] === 'function') { console.error( "State updates from the useState() and useReducer() Hooks don't support the " + - 'second callback argument. To execute a side effect after ' + - 'rendering, declare it in the component body with useEffect().', + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', ); } } @@ -3586,7 +3592,12 @@ function dispatchReducerAction( } else { const root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - startUpdateTimerByLane(lane, 'dispatch()', fiber); + startUpdateTimerByLane( + lane, + 'dispatch()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } @@ -3606,8 +3617,8 @@ function dispatchSetState( if (typeof args[3] === 'function') { console.error( "State updates from the useState() and useReducer() Hooks don't support the " + - 'second callback argument. To execute a side effect after ' + - 'rendering, declare it in the component body with useEffect().', + 'second callback argument. To execute a side effect after ' + + 'rendering, declare it in the component body with useEffect().', ); } } @@ -3620,7 +3631,7 @@ function dispatchSetState( lane, ); if (didScheduleUpdate) { - startUpdateTimerByLane(lane, 'setState()', fiber); + startUpdateTimerByLane(lane, 'setState()', fiber, isAlreadyRendering()); } markUpdateInDevTools(fiber, lane, action); } @@ -3735,8 +3746,8 @@ function dispatchOptimisticSetState( // inside a regular event handler (e.g. onSubmit) instead of an action. console.error( 'An optimistic state update occurred outside a transition or ' + - 'action. To fix, move the update to an action, or wrap ' + - 'with startTransition.', + 'action. To fix, move the update to an action, or wrap ' + + 'with startTransition.', ); } } @@ -3782,7 +3793,12 @@ function dispatchOptimisticSetState( // will never be attempted before the optimistic update. This currently // holds because the optimistic update is always synchronous. If we ever // change that, we'll need to account for this. - startUpdateTimerByLane(lane, 'setOptimistic()', fiber); + startUpdateTimerByLane( + lane, + 'setOptimistic()', + fiber, + isAlreadyRendering(), + ); scheduleUpdateOnFiber(root, fiber, lane); // Optimistic updates are always synchronous, so we don't need to call // entangleTransitionUpdate here. @@ -3991,18 +4007,18 @@ if (__DEV__) { const warnInvalidContextAccess = () => { console.error( 'Context can only be read while React is rendering. ' + - 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + - 'In function components, you can read it directly in the function body, but not ' + - 'inside Hooks like useReducer() or useMemo().', + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + + 'In function components, you can read it directly in the function body, but not ' + + 'inside Hooks like useReducer() or useMemo().', ); }; const warnInvalidHookAccess = () => { console.error( 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + - 'You can only call Hooks at the top level of your React function. ' + - 'For more information, see ' + - 'https://react.dev/link/rules-of-hooks', + 'You can only call Hooks at the top level of your React function. ' + + 'For more information, see ' + + 'https://react.dev/link/rules-of-hooks', ); }; @@ -4032,7 +4048,7 @@ if (__DEV__) { return mountEffect(create, deps); }, useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, create: () => T, deps: Array | void | null, ): void { @@ -4086,7 +4102,7 @@ if (__DEV__) { ReactSharedInternals.H = prevDispatcher; } }, - useRef(initialValue: T): {current: T} { + useRef(initialValue: T): { current: T } { currentHookNameInDev = 'useRef'; mountHookTypesDev(); return mountRef(initialValue); @@ -4121,1117 +4137,1117 @@ if (__DEV__) { }, useSyncExternalStore( subscribe: (() => void) => () => void, - getSnapshot: () => T, - getServerSnapshot?: () => T, + getSnapshot: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - mountHookTypesDev(); - return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - mountHookTypesDev(); - return mountId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - mountHookTypesDev(); - warnOnUseFormStateInDev(); - return mountActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - mountHookTypesDev(); - return mountActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, + currentHookNameInDev = 'useSyncExternalStore'; + mountHookTypesDev(); + return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + }, + useId(): string { + currentHookNameInDev = 'useId'; + mountHookTypesDev(); + return mountId(); + }, + useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + mountHookTypesDev(); + warnOnUseFormStateInDev(); + return mountActionState(action, initialState, permalink); + }, + useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + mountHookTypesDev(); + return mountActionState(action, initialState, permalink); + }, + useOptimistic < S, A > ( + passthrough: S, reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - mountHookTypesDev(); - return mountOptimistic(passthrough, reducer); - }, - useHostTransitionStatus, + currentHookNameInDev = 'useOptimistic'; + mountHookTypesDev(); + return mountOptimistic(passthrough, reducer); + }, + useHostTransitionStatus, useMemoCache, useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - mountHookTypesDev(); - return mountRefresh(); - }, - useEffectEvent) => Return>( - callback: F, + currentHookNameInDev = 'useCacheRefresh'; + mountHookTypesDev(); + return mountRefresh(); + }, + useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - mountHookTypesDev(); - return mountEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + mountHookTypesDev(); + return mountEvent(callback); + }, +}; + +HooksDispatcherOnMountWithHookTypesInDEV = { + readContext(context: ReactContext): T { + return readContext(context); + }, + use, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + updateHookTypesDev(); + return mountInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return mountRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return mountDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return mountTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, + getSnapshot: () => T, + getServerSnapshot ?: () => T, + ): T { + currentHookNameInDev = 'useSyncExternalStore'; + updateHookTypesDev(); + return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + updateHookTypesDev(); + return mountId(); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + updateHookTypesDev(); + return mountActionState(action, initialState, permalink); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + updateHookTypesDev(); + warnOnUseFormStateInDev(); + return mountActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, + ): [S, (A) => void] { + currentHookNameInDev = 'useOptimistic'; + updateHookTypesDev(); + return mountOptimistic(passthrough, reducer); +}, +useHostTransitionStatus, + useMemoCache, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + updateHookTypesDev(); + return mountRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, + ): F { + currentHookNameInDev = 'useEffectEvent'; + updateHookTypesDev(); + return mountEvent(callback); +}, }; - HooksDispatcherOnMountWithHookTypesInDEV = { - readContext(context: ReactContext): T { - return readContext(context); - }, - use, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return mountCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return mountEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return mountImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - updateHookTypesDev(); - return mountInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return mountLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return mountRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return mountDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return mountDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return mountTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, +HooksDispatcherOnUpdateInDEV = { + readContext(context: ReactContext): T { + return readContext(context); + }, + use, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + updateHookTypesDev(); + return updateInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return updateDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return updateTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, getSnapshot: () => T, - getServerSnapshot?: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - updateHookTypesDev(); - return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - updateHookTypesDev(); - return mountId(); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - updateHookTypesDev(); - return mountActionState(action, initialState, permalink); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - updateHookTypesDev(); - warnOnUseFormStateInDev(); - return mountActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, + currentHookNameInDev = 'useSyncExternalStore'; + updateHookTypesDev(); + return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + updateHookTypesDev(); + return updateId(); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + updateHookTypesDev(); + warnOnUseFormStateInDev(); + return updateActionState(action, initialState, permalink); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + updateHookTypesDev(); + return updateActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - updateHookTypesDev(); - return mountOptimistic(passthrough, reducer); - }, - useHostTransitionStatus, - useMemoCache, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - updateHookTypesDev(); - return mountRefresh(); - }, - useEffectEvent) => Return>( - callback: F, + currentHookNameInDev = 'useOptimistic'; + updateHookTypesDev(); + return updateOptimistic(passthrough, reducer); +}, +useHostTransitionStatus, + useMemoCache, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + updateHookTypesDev(); + return updateRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - updateHookTypesDev(); - return mountEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + updateHookTypesDev(); + return updateEvent(callback); +}, }; - HooksDispatcherOnUpdateInDEV = { - readContext(context: ReactContext): T { - return readContext(context); - }, - use, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - updateHookTypesDev(); - return updateInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return updateRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return updateDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return updateDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return updateTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, - getSnapshot: () => T, - getServerSnapshot?: () => T, - ): T { - currentHookNameInDev = 'useSyncExternalStore'; - updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - updateHookTypesDev(); - return updateId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - updateHookTypesDev(); - warnOnUseFormStateInDev(); - return updateActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - updateHookTypesDev(); - return updateActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, - ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - updateHookTypesDev(); - return updateOptimistic(passthrough, reducer); - }, - useHostTransitionStatus, - useMemoCache, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - updateHookTypesDev(); - return updateRefresh(); - }, - useEffectEvent) => Return>( - callback: F, - ): F { - currentHookNameInDev = 'useEffectEvent'; - updateHookTypesDev(); - return updateEvent(callback); - }, - }; - - HooksDispatcherOnRerenderInDEV = { - readContext(context: ReactContext): T { - return readContext(context); - }, - use, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - updateHookTypesDev(); - return updateInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; - try { - return updateMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; - try { - return rerenderReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return updateRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; - try { - return rerenderState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return updateDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return rerenderDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return rerenderTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, +HooksDispatcherOnRerenderInDEV = { + readContext(context: ReactContext): T { + return readContext(context); + }, + use, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + updateHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + updateHookTypesDev(); + return updateInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; + try { + return updateMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; + try { + return rerenderReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; + try { + return rerenderState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + updateHookTypesDev(); + return rerenderDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + updateHookTypesDev(); + return rerenderTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, getSnapshot: () => T, - getServerSnapshot?: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - updateHookTypesDev(); - return updateId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - updateHookTypesDev(); - warnOnUseFormStateInDev(); - return rerenderActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - updateHookTypesDev(); - return rerenderActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, + currentHookNameInDev = 'useSyncExternalStore'; + updateHookTypesDev(); + return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + updateHookTypesDev(); + return updateId(); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + updateHookTypesDev(); + warnOnUseFormStateInDev(); + return rerenderActionState(action, initialState, permalink); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + updateHookTypesDev(); + return rerenderActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - updateHookTypesDev(); - return rerenderOptimistic(passthrough, reducer); - }, - useHostTransitionStatus, - useMemoCache, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - updateHookTypesDev(); - return updateRefresh(); - }, - useEffectEvent) => Return>( - callback: F, + currentHookNameInDev = 'useOptimistic'; + updateHookTypesDev(); + return rerenderOptimistic(passthrough, reducer); +}, +useHostTransitionStatus, + useMemoCache, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + updateHookTypesDev(); + return updateRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - updateHookTypesDev(); - return updateEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + updateHookTypesDev(); + return updateEvent(callback); +}, }; - InvalidNestedHooksDispatcherOnMountInDEV = { - readContext(context: ReactContext): T { - warnInvalidContextAccess(); - return readContext(context); - }, - use(usable: Usable): T { - warnInvalidHookAccess(); - return use(usable); - }, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - mountHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - mountHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - mountHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; - try { - return mountState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, +InvalidNestedHooksDispatcherOnMountInDEV = { + readContext(context: ReactContext): T { + warnInvalidContextAccess(); + return readContext(context); + }, + use(usable: Usable): T { + warnInvalidHookAccess(); + return use(usable); + }, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + mountHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + mountHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; + try { + return mountState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, getSnapshot: () => T, - getServerSnapshot?: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, + currentHookNameInDev = 'useSyncExternalStore'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountId(); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountActionState(action, initialState, permalink); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountOptimistic(passthrough, reducer); - }, - useMemoCache(size: number): Array { - warnInvalidHookAccess(); + currentHookNameInDev = 'useOptimistic'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountOptimistic(passthrough, reducer); +}, +useMemoCache(size: number): Array < any > { + warnInvalidHookAccess(); return useMemoCache(size); - }, - useHostTransitionStatus, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - mountHookTypesDev(); - return mountRefresh(); - }, - useEffectEvent) => Return>( - callback: F, +}, + useHostTransitionStatus, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + mountHookTypesDev(); + return mountRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + warnInvalidHookAccess(); + mountHookTypesDev(); + return mountEvent(callback); +}, }; - InvalidNestedHooksDispatcherOnUpdateInDEV = { - readContext(context: ReactContext): T { - warnInvalidContextAccess(); - return readContext(context); - }, - use(usable: Usable): T { - warnInvalidHookAccess(); - return use(usable); - }, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, +InvalidNestedHooksDispatcherOnUpdateInDEV = { + readContext(context: ReactContext): T { + warnInvalidContextAccess(); + return readContext(context); + }, + use(usable: Usable): T { + warnInvalidHookAccess(); + return use(usable); + }, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, getSnapshot: () => T, - getServerSnapshot?: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, + currentHookNameInDev = 'useSyncExternalStore'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateId(); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateActionState(action, initialState, permalink); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateOptimistic(passthrough, reducer); - }, - useMemoCache(size: number): Array { - warnInvalidHookAccess(); + currentHookNameInDev = 'useOptimistic'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateOptimistic(passthrough, reducer); +}, +useMemoCache(size: number): Array < any > { + warnInvalidHookAccess(); return useMemoCache(size); - }, - useHostTransitionStatus, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - updateHookTypesDev(); - return updateRefresh(); - }, - useEffectEvent) => Return>( - callback: F, +}, + useHostTransitionStatus, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + updateHookTypesDev(); + return updateRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEvent(callback); +}, }; - InvalidNestedHooksDispatcherOnRerenderInDEV = { - readContext(context: ReactContext): T { - warnInvalidContextAccess(); - return readContext(context); - }, - use(usable: Usable): T { - warnInvalidHookAccess(); - return use(usable); - }, - useCallback(callback: T, deps: Array | void | null): T { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext(context: ReactContext): T { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return readContext(context); - }, - useEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle( - ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - create: () => T, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useInsertionEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useInsertionEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateInsertionEffect(create, deps); - }, - useLayoutEffect( - create: () => (() => void) | void, - deps: Array | void | null, - ): void { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo(create: () => T, deps: Array | void | null): T { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return updateMemo(create, deps); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useReducer( - reducer: (S, A) => S, - initialArg: I, - init?: I => S, - ): [S, Dispatch] { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return rerenderReducer(reducer, initialArg, init); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useRef(initialValue: T): {current: T} { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateRef(initialValue); - }, - useState( - initialState: (() => S) | S, - ): [S, Dispatch>] { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - const prevDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; - try { - return rerenderState(initialState); - } finally { - ReactSharedInternals.H = prevDispatcher; - } - }, - useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDebugValue(value, formatterFn); - }, - useDeferredValue(value: T, initialValue?: T): T { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderDeferredValue(value, initialValue); - }, - useTransition(): [boolean, (() => void) => void] { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderTransition(); - }, - useSyncExternalStore( - subscribe: (() => void) => () => void, +InvalidNestedHooksDispatcherOnRerenderInDEV = { + readContext(context: ReactContext): T { + warnInvalidContextAccess(); + return readContext(context); + }, + use(usable: Usable): T { + warnInvalidHookAccess(); + return use(usable); + }, + useCallback(callback: T, deps: Array | void | null): T { + currentHookNameInDev = 'useCallback'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateCallback(callback, deps); + }, + useContext(context: ReactContext): T { + currentHookNameInDev = 'useContext'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return readContext(context); + }, + useEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEffect(create, deps); + }, + useImperativeHandle( + ref: { current: T | null } | ((inst: T | null) => mixed) | null | void, + create: () => T, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useImperativeHandle'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateImperativeHandle(ref, create, deps); + }, + useInsertionEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useInsertionEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateInsertionEffect(create, deps); + }, + useLayoutEffect( + create: () => (() => void) | void, + deps: Array | void | null, + ): void { + currentHookNameInDev = 'useLayoutEffect'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateLayoutEffect(create, deps); + }, + useMemo(create: () => T, deps: Array | void | null): T { + currentHookNameInDev = 'useMemo'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return updateMemo(create, deps); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useReducer( + reducer: (S, A) => S, + initialArg: I, + init?: I => S, + ): [S, Dispatch] { + currentHookNameInDev = 'useReducer'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return rerenderReducer(reducer, initialArg, init); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useRef(initialValue: T): { current: T } { + currentHookNameInDev = 'useRef'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateRef(initialValue); + }, + useState( + initialState: (() => S) | S, + ): [S, Dispatch>] { + currentHookNameInDev = 'useState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + const prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; + try { + return rerenderState(initialState); + } finally { + ReactSharedInternals.H = prevDispatcher; + } + }, + useDebugValue(value: T, formatterFn: ?(value: T) => mixed): void { + currentHookNameInDev = 'useDebugValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateDebugValue(value, formatterFn); + }, + useDeferredValue(value: T, initialValue?: T): T { + currentHookNameInDev = 'useDeferredValue'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return rerenderDeferredValue(value, initialValue); + }, + useTransition(): [boolean, (() => void) => void] { + currentHookNameInDev = 'useTransition'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return rerenderTransition(); + }, + useSyncExternalStore( + subscribe: (() => void) => () => void, getSnapshot: () => T, - getServerSnapshot?: () => T, + getServerSnapshot ?: () => T, ): T { - currentHookNameInDev = 'useSyncExternalStore'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }, - useId(): string { - currentHookNameInDev = 'useId'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateId(); - }, - useFormState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useFormState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderActionState(action, initialState, permalink); - }, - useActionState( - action: (Awaited, P) => S, - initialState: Awaited, - permalink?: string, - ): [Awaited, (P) => void, boolean] { - currentHookNameInDev = 'useActionState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderActionState(action, initialState, permalink); - }, - useOptimistic( - passthrough: S, - reducer: ?(S, A) => S, + currentHookNameInDev = 'useSyncExternalStore'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +}, +useId(): string { + currentHookNameInDev = 'useId'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateId(); +}, +useFormState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useFormState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return rerenderActionState(action, initialState, permalink); +}, +useActionState < S, P > ( + action: (Awaited < S >, P) => S, + initialState: Awaited < S >, + permalink ?: string, + ): [Awaited < S >, (P) => void, boolean] { + currentHookNameInDev = 'useActionState'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return rerenderActionState(action, initialState, permalink); +}, +useOptimistic < S, A > ( + passthrough: S, + reducer: ?(S, A) => S, ): [S, (A) => void] { - currentHookNameInDev = 'useOptimistic'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderOptimistic(passthrough, reducer); - }, - useMemoCache(size: number): Array { - warnInvalidHookAccess(); + currentHookNameInDev = 'useOptimistic'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return rerenderOptimistic(passthrough, reducer); +}, +useMemoCache(size: number): Array < any > { + warnInvalidHookAccess(); return useMemoCache(size); - }, - useHostTransitionStatus, - useCacheRefresh() { - currentHookNameInDev = 'useCacheRefresh'; - updateHookTypesDev(); - return updateRefresh(); - }, - useEffectEvent) => Return>( - callback: F, +}, + useHostTransitionStatus, + useCacheRefresh() { + currentHookNameInDev = 'useCacheRefresh'; + updateHookTypesDev(); + return updateRefresh(); +}, +useEffectEvent < Args, Return, F: (...Array) => Return > ( + callback: F, ): F { - currentHookNameInDev = 'useEffectEvent'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEvent(callback); - }, + currentHookNameInDev = 'useEffectEvent'; + warnInvalidHookAccess(); + updateHookTypesDev(); + return updateEvent(callback); +}, }; } diff --git a/packages/react-reconciler/src/ReactFiberReconciler.js b/packages/react-reconciler/src/ReactFiberReconciler.js index 4a36b39c43c8..a9b04f72ab16 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.js @@ -13,23 +13,23 @@ import type { SuspenseHydrationCallbacks, TransitionTracingCallbacks, } from './ReactInternalTypes'; -import type {RootTag} from './ReactRootTags'; +import type { RootTag } from './ReactRootTags'; import type { Container, PublicInstance, RendererInspectionConfig, } from './ReactFiberConfig'; -import type {ReactNodeList, ReactFormState} from 'shared/ReactTypes'; -import type {Lane} from './ReactFiberLane'; -import type {ActivityState} from './ReactFiberActivityComponent'; -import type {SuspenseState} from './ReactFiberSuspenseComponent'; +import type { ReactNodeList, ReactFormState } from 'shared/ReactTypes'; +import type { Lane } from './ReactFiberLane'; +import type { ActivityState } from './ReactFiberActivityComponent'; +import type { SuspenseState } from './ReactFiberSuspenseComponent'; -import {LegacyRoot} from './ReactRootTags'; +import { LegacyRoot } from './ReactRootTags'; import { findCurrentHostFiber, findCurrentHostFiberWithNoPortals, } from './ReactFiberTreeReflection'; -import {get as getInstance} from 'shared/ReactInstanceMap'; +import { get as getInstance } from 'shared/ReactInstanceMap'; import { HostComponent, HostSingleton, @@ -57,15 +57,15 @@ import { emptyContextObject, isContextProvider as isLegacyContextProvider, } from './ReactFiberLegacyContext'; -import {createFiberRoot} from './ReactFiberRoot'; -import {isRootDehydrated} from './ReactFiberShellHydration'; +import { createFiberRoot } from './ReactFiberRoot'; +import { isRootDehydrated } from './ReactFiberShellHydration'; import { injectInternals, markRenderScheduled, onScheduleRoot, injectProfilingHooks, } from './ReactFiberDevToolsHook'; -import {startUpdateTimerByLane} from './ReactProfilerTimer'; +import { startUpdateTimerByLane } from './ReactProfilerTimer'; import { requestUpdateLane, scheduleUpdateOnFiber, @@ -79,7 +79,7 @@ import { discreteUpdates, flushPendingEffects, } from './ReactFiberWorkLoop'; -import {enqueueConcurrentRenderForLane} from './ReactFiberConcurrentUpdates'; +import { enqueueConcurrentRenderForLane } from './ReactFiberConcurrentUpdates'; import { createUpdate, enqueueUpdate, @@ -90,7 +90,7 @@ import { current as ReactCurrentFiberCurrent, runWithFiberInDEV, } from './ReactCurrentFiber'; -import {StrictLegacyMode} from './ReactTypeOfMode'; +import { StrictLegacyMode } from './ReactTypeOfMode'; import { SyncLane, SelectiveHydrationLane, @@ -105,7 +105,7 @@ import { setRefreshHandler, } from './ReactFiberHotReloading'; import ReactVersion from 'shared/ReactVersion'; -export {createPortal} from './ReactPortal'; +export { createPortal } from './ReactPortal'; export { createComponentSelector, createHasPseudoClassSelector, @@ -118,14 +118,14 @@ export { focusWithin, observeVisibleRects, } from './ReactTestSelectors'; -export {startHostTransition} from './ReactFiberHooks'; +export { startHostTransition } from './ReactFiberHooks'; export { defaultOnUncaughtError, defaultOnCaughtError, defaultOnRecoverableError, } from './ReactFiberErrorLogger'; -import {getLabelForLane, TotalLanes} from 'react-reconciler/src/ReactFiberLane'; -import {registerDefaultIndicator} from './ReactFiberAsyncAction'; +import { getLabelForLane, TotalLanes } from 'react-reconciler/src/ReactFiberLane'; +import { registerDefaultIndicator } from './ReactFiberAsyncAction'; type OpaqueRoot = FiberRoot; @@ -134,7 +134,7 @@ let didWarnAboutFindNodeInStrictMode; if (__DEV__) { didWarnAboutNestedUpdates = false; - didWarnAboutFindNodeInStrictMode = ({}: {[string]: boolean}); + didWarnAboutFindNodeInStrictMode = ({}: { [string]: boolean }); } function getContextForSubtree( @@ -204,10 +204,10 @@ function findHostInstanceWithWarning( if (fiber.mode & StrictLegacyMode) { console.error( '%s is deprecated in StrictMode. ' + - '%s was passed an instance of %s which is inside StrictMode. ' + - 'Instead, add a ref directly to the element you want to reference. ' + - 'Learn more about using refs safely here: ' + - 'https://react.dev/link/strict-mode-find-node', + '%s was passed an instance of %s which is inside StrictMode. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName, @@ -215,10 +215,10 @@ function findHostInstanceWithWarning( } else { console.error( '%s is deprecated in StrictMode. ' + - '%s was passed an instance of %s which renders StrictMode children. ' + - 'Instead, add a ref directly to the element you want to reference. ' + - 'Learn more about using refs safely here: ' + - 'https://react.dev/link/strict-mode-find-node', + '%s was passed an instance of %s which renders StrictMode children. ' + + 'Instead, add a ref directly to the element you want to reference. ' + + 'Learn more about using refs safely here: ' + + 'https://react.dev/link/strict-mode-find-node', methodName, methodName, componentName, @@ -242,21 +242,21 @@ export function createContainer( identifierPrefix: string, onUncaughtError: ( error: mixed, - errorInfo: {+componentStack?: ?string}, + errorInfo: {+componentStack ?: ? string}, ) => void, onCaughtError: ( error: mixed, errorInfo: { - +componentStack?: ?string, - +errorBoundary?: ?component(...props: any), + +componentStack ?: ? string, + +errorBoundary ?: ? component(...props: any), }, ) => void, onRecoverableError: ( error: mixed, - errorInfo: {+componentStack?: ?string}, + errorInfo: {+componentStack ?: ? string}, ) => void, onDefaultTransitionIndicator: () => void | (() => void), - transitionCallbacks: null | TransitionTracingCallbacks, + transitionCallbacks: null | TransitionTracingCallbacks, ): OpaqueRoot { const hydrate = false; const initialChildren = null; @@ -292,22 +292,22 @@ export function createHydrationContainer( identifierPrefix: string, onUncaughtError: ( error: mixed, - errorInfo: {+componentStack?: ?string}, + errorInfo: {+componentStack ?: ? string}, ) => void, onCaughtError: ( error: mixed, errorInfo: { - +componentStack?: ?string, - +errorBoundary?: ?component(...props: any), + +componentStack ?: ? string, + +errorBoundary ?: ? component(...props: any), }, ) => void, onRecoverableError: ( error: mixed, - errorInfo: {+componentStack?: ?string}, + errorInfo: {+componentStack ?: ? string}, ) => void, onDefaultTransitionIndicator: () => void | (() => void), - transitionCallbacks: null | TransitionTracingCallbacks, - formState: ReactFormState | null, + transitionCallbacks: null | TransitionTracingCallbacks, + formState: ReactFormState < any, any > | null, ): OpaqueRoot { const hydrate = true; const root = createFiberRoot( @@ -344,7 +344,7 @@ export function createHydrationContainer( update.callback = callback !== undefined && callback !== null ? callback : null; enqueueUpdate(current, update, lane); - startUpdateTimerByLane(lane, 'hydrateRoot()', null); + startUpdateTimerByLane(lane, 'hydrateRoot()', null, isAlreadyRendering()); scheduleInitialHydrationOnRoot(root, lane); return root; @@ -354,7 +354,7 @@ export function updateContainer( element: ReactNodeList, container: OpaqueRoot, parentComponent: ?component(...props: any), - callback: ?Function, + callback: ?Function, ): Lane { const current = container.current; const lane = requestUpdateLane(current); @@ -373,7 +373,7 @@ export function updateContainerSync( element: ReactNodeList, container: OpaqueRoot, parentComponent: ?component(...props: any), - callback: ?Function, + callback: ?Function, ): Lane { if (!disableLegacyMode && container.tag === LegacyRoot) { flushPendingEffects(); @@ -396,7 +396,7 @@ function updateContainerImpl( element: ReactNodeList, container: OpaqueRoot, parentComponent: ?component(...props: any), - callback: ?Function, + callback: ?Function, ): void { if (__DEV__) { onScheduleRoot(container, element); @@ -408,53 +408,53 @@ function updateContainerImpl( const context = getContextForSubtree(parentComponent); if (container.context === null) { - container.context = context; - } else { - container.pendingContext = context; + container.context = context; +} else { + container.pendingContext = context; +} + +if (__DEV__) { + if ( + ReactCurrentFiberIsRendering && + ReactCurrentFiberCurrent !== null && + !didWarnAboutNestedUpdates + ) { + didWarnAboutNestedUpdates = true; + console.error( + 'Render methods should be a pure function of props and state; ' + + 'triggering nested component updates from render is not allowed. ' + + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + + 'Check the render method of %s.', + getComponentNameFromFiber(ReactCurrentFiberCurrent) || 'Unknown', + ); } +} + +const update = createUpdate(lane); +// Caution: React DevTools currently depends on this property +// being called "element". +update.payload = { element }; +callback = callback === undefined ? null : callback; +if (callback !== null) { if (__DEV__) { - if ( - ReactCurrentFiberIsRendering && - ReactCurrentFiberCurrent !== null && - !didWarnAboutNestedUpdates - ) { - didWarnAboutNestedUpdates = true; + if (typeof callback !== 'function') { console.error( - 'Render methods should be a pure function of props and state; ' + - 'triggering nested component updates from render is not allowed. ' + - 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + - 'Check the render method of %s.', - getComponentNameFromFiber(ReactCurrentFiberCurrent) || 'Unknown', + 'Expected the last optional `callback` argument to be a ' + + 'function. Instead received: %s.', + callback, ); } } + update.callback = callback; +} - const update = createUpdate(lane); - // Caution: React DevTools currently depends on this property - // being called "element". - update.payload = {element}; - - callback = callback === undefined ? null : callback; - if (callback !== null) { - if (__DEV__) { - if (typeof callback !== 'function') { - console.error( - 'Expected the last optional `callback` argument to be a ' + - 'function. Instead received: %s.', - callback, - ); - } - } - update.callback = callback; - } - - const root = enqueueUpdate(rootFiber, update, lane); - if (root !== null) { - startUpdateTimerByLane(lane, 'root.render()', null); - scheduleUpdateOnFiber(root, rootFiber, lane); - entangleTransitions(root, rootFiber, lane); - } +const root = enqueueUpdate(rootFiber, update, lane); +if (root !== null) { + startUpdateTimerByLane(lane, 'root.render()', null, isAlreadyRendering()); + scheduleUpdateOnFiber(root, rootFiber, lane); + entangleTransitions(root, rootFiber, lane); +} } export { @@ -562,9 +562,9 @@ export function attemptHydrationAtCurrentPriority(fiber: Fiber): void { markRetryLaneIfNotHydrated(fiber, lane); } -export {findHostInstance}; +export { findHostInstance }; -export {findHostInstanceWithWarning}; +export { findHostInstanceWithWarning }; export function findHostInstanceWithNoPortals( fiber: Fiber, @@ -606,7 +606,7 @@ if (__DEV__) { index: number, ): $FlowFixMe => { const key = path[index]; - const updated = isArray(obj) ? obj.slice() : {...obj}; + const updated = isArray(obj) ? obj.slice() : { ...obj }; if (index + 1 === path.length) { if (isArray(updated)) { updated.splice(((key: any): number), 1); @@ -634,7 +634,7 @@ if (__DEV__) { index: number, ): $FlowFixMe => { const oldKey = oldPath[index]; - const updated = isArray(obj) ? obj.slice() : {...obj}; + const updated = isArray(obj) ? obj.slice() : { ...obj }; if (index + 1 === oldPath.length) { const newKey = newPath[index]; // $FlowFixMe[incompatible-use] number or string is fine here @@ -688,7 +688,7 @@ if (__DEV__) { return value; } const key = path[index]; - const updated = isArray(obj) ? obj.slice() : {...obj}; + const updated = isArray(obj) ? obj.slice() : { ...obj }; // $FlowFixMe[incompatible-use] number or string is fine here updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); return updated; @@ -731,7 +731,7 @@ if (__DEV__) { // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. - fiber.memoizedProps = {...fiber.memoizedProps}; + fiber.memoizedProps = { ...fiber.memoizedProps }; const root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { @@ -755,7 +755,7 @@ if (__DEV__) { // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. - fiber.memoizedProps = {...fiber.memoizedProps}; + fiber.memoizedProps = { ...fiber.memoizedProps }; const root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { @@ -780,7 +780,7 @@ if (__DEV__) { // (There's no appropriate action type for DevTools overrides.) // As a result though, React will see the scheduled update as a noop and bailout. // Shallow cloning props works as a workaround for now to bypass the bailout check. - fiber.memoizedProps = {...fiber.memoizedProps}; + fiber.memoizedProps = { ...fiber.memoizedProps }; const root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index ca4d1929f33a..16730af7a1bc 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -7,25 +7,25 @@ * @flow */ -import {REACT_STRICT_MODE_TYPE} from 'shared/ReactSymbols'; +import { REACT_STRICT_MODE_TYPE } from 'shared/ReactSymbols'; import type { Wakeable, Thenable, GestureOptionsRequired, } from 'shared/ReactTypes'; -import type {Fiber, FiberRoot} from './ReactInternalTypes'; -import type {Lanes, Lane} from './ReactFiberLane'; -import type {ActivityState} from './ReactFiberActivityComponent'; -import type {SuspenseState} from './ReactFiberSuspenseComponent'; -import type {FunctionComponentUpdateQueue} from './ReactFiberHooks'; -import type {Transition} from 'react/src/ReactStartTransition'; +import type { Fiber, FiberRoot } from './ReactInternalTypes'; +import type { Lanes, Lane } from './ReactFiberLane'; +import type { ActivityState } from './ReactFiberActivityComponent'; +import type { SuspenseState } from './ReactFiberSuspenseComponent'; +import type { FunctionComponentUpdateQueue } from './ReactFiberHooks'; +import type { Transition } from 'react/src/ReactStartTransition'; import type { PendingTransitionCallbacks, PendingBoundaries, TransitionAbort, } from './ReactFiberTracingMarkerComponent'; -import type {OffscreenInstance} from './ReactFiberOffscreenComponent'; +import type { OffscreenInstance } from './ReactFiberOffscreenComponent'; import type { Resource, ViewTransitionInstance, @@ -33,12 +33,12 @@ import type { GestureTimeline, SuspendedState, } from './ReactFiberConfig'; -import type {RootState} from './ReactFiberRoot'; +import type { RootState } from './ReactFiberRoot'; import { getViewTransitionName, type ViewTransitionState, } from './ReactFiberViewTransitionComponent'; -import type {TransitionTypes} from 'react/src/ReactTransitionType'; +import type { TransitionTypes } from 'react/src/ReactTransitionType'; import { enableCreateEventHandleAPI, @@ -60,7 +60,7 @@ import { enableDefaultTransitionIndicator, enableParallelTransitions, } from 'shared/ReactFeatureFlags'; -import {resetOwnerStackLimit} from 'shared/ReactOwnerStackReset'; +import { resetOwnerStackLimit } from 'shared/ReactOwnerStackReset'; import ReactSharedInternals from 'shared/ReactSharedInternals'; import is from 'shared/objectIs'; @@ -126,8 +126,8 @@ import { flushHydrationEvents, } from './ReactFiberConfig'; -import {createWorkInProgress, resetWorkInProgress} from './ReactFiber'; -import {isRootDehydrated} from './ReactFiberShellHydration'; +import { createWorkInProgress, resetWorkInProgress } from './ReactFiber'; +import { isRootDehydrated } from './ReactFiberShellHydration'; import { getIsHydrating, popHydrationStateOnInterruptedWork, @@ -154,8 +154,8 @@ import { HostHoistable, HostSingleton, } from './ReactWorkTags'; -import {ConcurrentRoot, LegacyRoot} from './ReactRootTags'; -import type {Flags} from './ReactFiberFlags'; +import { ConcurrentRoot, LegacyRoot } from './ReactRootTags'; +import type { Flags } from './ReactFiberFlags'; import { NoFlags, Incomplete, @@ -180,6 +180,7 @@ import { NoLanes, NoLane, SyncLane, + getHighestPriorityLane, claimNextRetryLane, includesSyncLane, isSubsetOfLanes, @@ -191,6 +192,7 @@ import { includesOnlyTransitions, includesBlockingLane, includesTransitionLane, + isTransitionLane, includesRetryLane, includesIdleGroupLanes, includesExpiredLane, @@ -226,14 +228,14 @@ import { lanesToEventPriority, eventPriorityToLane, } from './ReactEventPriorities'; -import {requestCurrentTransition} from './ReactFiberTransition'; +import { requestCurrentTransition } from './ReactFiberTransition'; import { SelectiveHydrationException, beginWork, replayFunctionComponent, } from './ReactFiberBeginWork'; -import {completeWork} from './ReactFiberCompleteWork'; -import {unwindWork, unwindInterruptedWork} from './ReactFiberUnwindWork'; +import { completeWork } from './ReactFiberCompleteWork'; +import { unwindWork, unwindInterruptedWork } from './ReactFiberUnwindWork'; import { throwException, createRootErrorUpdate, @@ -258,21 +260,21 @@ import { invokePassiveEffectUnmountInDEV, accumulateSuspenseyCommit, } from './ReactFiberCommitWork'; -import {resetShouldStartViewTransition} from './ReactFiberCommitViewTransitions'; -import {shouldStartViewTransition} from './ReactFiberCommitViewTransitions'; +import { resetShouldStartViewTransition } from './ReactFiberCommitViewTransitions'; +import { shouldStartViewTransition } from './ReactFiberCommitViewTransitions'; import { insertDestinationClones, applyDepartureTransitions, startGestureAnimations, } from './ReactFiberApplyGesture'; -import {enqueueUpdate} from './ReactFiberClassUpdateQueue'; -import {resetContextDependencies} from './ReactFiberNewContext'; +import { enqueueUpdate } from './ReactFiberClassUpdateQueue'; +import { resetContextDependencies } from './ReactFiberNewContext'; import { resetHooksAfterThrow, resetHooksOnUnwind, ContextOnlyDispatcher, } from './ReactFiberHooks'; -import {DefaultAsyncDispatcher} from './ReactFiberAsyncDispatcher'; +import { DefaultAsyncDispatcher } from './ReactFiberAsyncDispatcher'; import { createCapturedValueAtFiber, type CapturedValue, @@ -304,21 +306,10 @@ import { gestureEventType, gestureEventRepeatTime, gestureSuspendedTime, - transitionClampTime, - transitionStartTime, - transitionUpdateTime, - transitionUpdateTask, - transitionUpdateType, - transitionUpdateMethodName, - transitionUpdateComponentName, - transitionEventTime, - transitionEventType, - transitionEventRepeatTime, - transitionSuspendedTime, clearBlockingTimers, clearGestureTimers, clearGestureUpdates, - clearTransitionTimers, + clearTransitionTimer, clampBlockingTimers, clampGestureTimers, clampTransitionTimers, @@ -350,6 +341,7 @@ import { retryClampTime, idleClampTime, animatingTask, + getTransitionTimers, } from './ReactProfilerTimer'; // DEV stuff @@ -378,13 +370,13 @@ import { onPostCommitRoot as onPostCommitRootDevTools, setIsStrictModeForDevtools, } from './ReactFiberDevToolsHook'; -import {onCommitRoot as onCommitRootTestSelector} from './ReactTestSelectors'; -import {releaseCache} from './ReactFiberCacheComponent'; +import { onCommitRoot as onCommitRootTestSelector } from './ReactTestSelectors'; +import { releaseCache } from './ReactFiberCacheComponent'; import { isLegacyActEnvironment, isConcurrentActEnvironment, } from './ReactFiberAct'; -import {processTransitionCallbacks} from './ReactFiberTracingMarkerComponent'; +import { processTransitionCallbacks } from './ReactFiberTracingMarkerComponent'; import { SuspenseException, SuspenseActionException, @@ -392,25 +384,25 @@ import { getSuspendedThenable, isThenableResolved, } from './ReactFiberThenable'; -import {schedulePostPaintCallback} from './ReactPostPaintCallback'; +import { schedulePostPaintCallback } from './ReactPostPaintCallback'; import { getSuspenseHandler, getShellBoundary, } from './ReactFiberSuspenseContext'; -import {resetChildReconcilerOnUnwind} from './ReactChildFiber'; +import { resetChildReconcilerOnUnwind } from './ReactChildFiber'; import { ensureRootIsScheduled, flushSyncWorkOnAllRoots, flushSyncWorkOnLegacyRootsOnly, requestTransitionLane, } from './ReactFiberRootScheduler'; -import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext'; -import {logUncaughtError} from './ReactFiberErrorLogger'; +import { getMaskedContext, getUnmaskedContext } from './ReactFiberLegacyContext'; +import { logUncaughtError } from './ReactFiberErrorLogger'; import { scheduleGestureCommit, stopCommittedGesture, } from './ReactFiberGestureScheduler'; -import {claimQueuedTransitionTypes} from './ReactFiberTransitionTypes'; +import { claimQueuedTransitionTypes } from './ReactFiberTransitionTypes'; const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; @@ -559,7 +551,7 @@ export function addTransitionStartCallbackToPendingTransition( if (currentPendingTransitionCallbacks.transitionStart === null) { currentPendingTransitionCallbacks.transitionStart = - ([]: Array); + ([]: Array < Transition >); } currentPendingTransitionCallbacks.transitionStart.push(transition); @@ -693,7 +685,7 @@ export function addTransitionCompleteCallbackToPendingTransition( if (currentPendingTransitionCallbacks.transitionComplete === null) { currentPendingTransitionCallbacks.transitionComplete = - ([]: Array); + ([]: Array < Transition >); } currentPendingTransitionCallbacks.transitionComplete.push(transition); @@ -828,9 +820,9 @@ export function requestUpdateLane(fiber: Fiber): Lane { if (transition.gesture) { throw new Error( 'Cannot setState on regular state inside a startGestureTransition. ' + - 'Gestures can only update the useOptimistic() hook. There should be no ' + - 'side-effects associated with starting a Gesture until its Action is ' + - 'invoked. Move side-effects to the Action instead.', + 'Gestures can only update the useOptimistic() hook. There should be no ' + + 'side-effects associated with starting a Gesture until its Action is ' + + 'invoked. Move side-effects to the Action instead.', ); } } @@ -1572,7 +1564,7 @@ function completeRootWhenReady( const maySuspendCommit = subtreeFlags & ShouldSuspendCommit || (subtreeFlags & BothVisibilityAndMaySuspendCommit) === - BothVisibilityAndMaySuspendCommit; + BothVisibilityAndMaySuspendCommit; let suspendedState: null | SuspendedState = null; if (isViewTransitionEligible || maySuspendCommit || isGestureTransition) { // Before committing, ask the renderer whether the host tree is ready. @@ -2339,11 +2331,11 @@ function handleThrow(root: FiberRoot, thrownValue: any): void { workInProgressSuspendedReason = isWakeable ? // A wakeable object was thrown by a legacy Suspense implementation. - // This has slightly different behavior than suspending with `use`. - SuspendedOnDeprecatedThrowPromise + // This has slightly different behavior than suspending with `use`. + SuspendedOnDeprecatedThrowPromise : // This is a regular error. If something earlier in the component already - // suspended, we must clear the thenable state to unblock the work loop. - SuspendedOnError; + // suspended, we must clear the thenable state to unblock the work loop. + SuspendedOnError; } workInProgressThrownValue = thrownValue; @@ -2935,7 +2927,7 @@ function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus { if (__DEV__) { console.error( 'Unexpected type of fiber triggered a suspensey commit. ' + - 'This is a bug in React.', + 'This is a bug in React.', ); } break; @@ -3546,7 +3538,7 @@ function completeRoot( finishedWork !== null && finishedWork.alternate !== null && (finishedWork.alternate.memoizedState: RootState).isDehydrated && - (finishedWork.flags & ForceClientRender) !== NoFlags; + (finishedWork.flags & ForceClientRender) !== NoFlags; logRecoveredRenderPhase( completedRenderStartTime, completedRenderEndTime, @@ -3585,7 +3577,7 @@ function completeRoot( if (lanes === NoLanes) { console.error( 'finishedLanes should not be empty during a commit. This is a ' + - 'bug in React.', + 'bug in React.', ); } } @@ -3594,7 +3586,7 @@ function completeRoot( if (finishedWork === root.current) { throw new Error( 'Cannot commit the same tree as before. This error is likely caused by ' + - 'a bug in React. Please file an issue.', + 'a bug in React. Please file an issue.', ); } @@ -3888,7 +3880,7 @@ function commitRoot( enableProfilerTimer ? suspendedViewTransition : (null: any), enableProfilerTimer ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. - finishedViewTransition.bind(null, lanes) + finishedViewTransition.bind(null, lanes) : (null: any), ); } else { @@ -3951,8 +3943,18 @@ function finishedViewTransition(lanes: Lanes): void { !includesTransitionLane(workInProgressRootRenderLanes) && !includesTransitionLane(pendingEffectsLanes) ) { - setCurrentTrackFromLanes(SomeTransitionLane); - logAnimatingPhase(transitionClampTime, now(), task); + let remainingLanes = lanes; + while (remainingLanes !== NoLanes) { + const lane = getHighestPriorityLane(remainingLanes); + if (isTransitionLane(lane)) { + const timers = getTransitionTimers(lane); + if (timers !== null) { + setCurrentTrackFromLanes(lane); + logAnimatingPhase(timers.clampTime, now(), task); + } + } + remainingLanes = removeLanes(remainingLanes, lane); + } } if ( includesRetryLane(lanes) && @@ -4447,7 +4449,7 @@ function applyGestureOnRoot( reportViewTransitionError, enableProfilerTimer ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. - finishedViewTransition.bind(null, pendingEffectsLanes) + finishedViewTransition.bind(null, pendingEffectsLanes) : (null: any), ); } @@ -4588,8 +4590,8 @@ function makeErrorInfo(componentStack: ?string) { get() { console.error( 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - ' This property is no longer provided as part of errorInfo but can be accessed as a property' + - ' of the Error instance itself.', + ' This property is no longer provided as part of errorInfo but can be accessed as a property' + + ' of the Error instance itself.', ); }, }); @@ -4630,9 +4632,9 @@ export function flushPendingEffects(): boolean { didWarnAboutInterruptedViewTransitions = true; console.warn( 'A flushSync update cancelled a View Transition because it was called ' + - 'while the View Transition was still preparing. To preserve the synchronous ' + - 'semantics, React had to skip the View Transition. If you can, try to avoid ' + - "flushSync() in a scenario that's likely to interfere.", + 'while the View Transition was still preparing. To preserve the synchronous ' + + 'semantics, React had to skip the View Transition. If you can, try to avoid ' + + "flushSync() in a scenario that's likely to interfere.", ); } } @@ -4918,10 +4920,10 @@ export function captureCommitPhaseError( if (__DEV__) { console.error( 'Internal React error: Attempted to capture a commit phase error ' + - 'inside a detached tree. This indicates a bug in React. Potential ' + - 'causes include deleting the same fiber more than once, committing an ' + - 'already-finished tree, or an inconsistent return pointer.\n\n' + - 'Error message:\n\n%s', + 'inside a detached tree. This indicates a bug in React. Potential ' + + 'causes include deleting the same fiber more than once, committing an ' + + 'already-finished tree, or an inconsistent return pointer.\n\n' + + 'Error message:\n\n%s', error, ); } @@ -4948,7 +4950,7 @@ export function attachPingListener( let threadIDs; if (pingCache === null) { pingCache = root.pingCache = new PossiblyWeakMap(); - threadIDs = new Set(); + threadIDs = new Set < mixed > (); pingCache.set(wakeable, threadIDs); } else { threadIDs = pingCache.get(wakeable); @@ -5138,7 +5140,7 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) { default: throw new Error( 'Pinged unknown suspense boundary type. ' + - 'This is probably a bug in React.', + 'This is probably a bug in React.', ); } @@ -5173,9 +5175,9 @@ export function throwIfInfiniteUpdateLoopDetected() { throw new Error( 'Maximum update depth exceeded. This can happen when a component ' + - 'repeatedly calls setState inside componentWillUpdate or ' + - 'componentDidUpdate. React limits the number of nested updates to ' + - 'prevent infinite loops.', + 'repeatedly calls setState inside componentWillUpdate or ' + + 'componentDidUpdate. React limits the number of nested updates to ' + + 'prevent infinite loops.', ); } @@ -5186,9 +5188,9 @@ export function throwIfInfiniteUpdateLoopDetected() { console.error( 'Maximum update depth exceeded. This can happen when a component ' + - "calls setState inside useEffect, but useEffect either doesn't " + - 'have a dependency array, or one of the dependencies changes on ' + - 'every render.', + "calls setState inside useEffect, but useEffect either doesn't " + + 'have a dependency array, or one of the dependencies changes on ' + + 'every render.', ); } } @@ -5399,9 +5401,9 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { runWithFiberInDEV(fiber, () => { console.error( "Can't perform a React state update on a component that hasn't mounted yet. " + - 'This indicates that you have a side-effect in your render function that ' + - 'asynchronously tries to update the component. Move this work to ' + - 'useEffect instead.', + 'This indicates that you have a side-effect in your render function that ' + + 'asynchronously tries to update the component. Move this work to ' + + 'useEffect instead.', ); }); } @@ -5410,7 +5412,7 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { let didWarnAboutUpdateInRender = false; let didWarnAboutUpdateInRenderForAnotherComponent; if (__DEV__) { - didWarnAboutUpdateInRenderForAnotherComponent = new Set(); + didWarnAboutUpdateInRenderForAnotherComponent = new Set < string > (); } function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { @@ -5431,8 +5433,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { getComponentNameFromFiber(fiber) || 'Unknown'; console.error( 'Cannot update a component (`%s`) while rendering a ' + - 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + - 'follow the stack trace as described in https://react.dev/link/setstate-in-render', + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + + 'follow the stack trace as described in https://react.dev/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName, @@ -5444,8 +5446,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { if (!didWarnAboutUpdateInRender) { console.error( 'Cannot update during an existing state transition (such as ' + - 'within `render`). Render methods should be a pure ' + - 'function of props and state.', + 'within `render`). Render methods should be a pure ' + + 'function of props and state.', ); didWarnAboutUpdateInRender = true; } @@ -5528,15 +5530,15 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { runWithFiberInDEV(fiber, () => { console.error( 'An update to %s inside a test was not wrapped in act(...).\n\n' + - 'When testing, code that causes React state updates should be ' + - 'wrapped into act(...):\n\n' + - 'act(() => {\n' + - ' /* fire events that update state */\n' + - '});\n' + - '/* assert on the output */\n\n' + - "This ensures that you're testing the behavior the user would see " + - 'in the browser.' + - ' Learn more at https://react.dev/link/wrap-tests-with-act', + 'When testing, code that causes React state updates should be ' + + 'wrapped into act(...):\n\n' + + 'act(() => {\n' + + ' /* fire events that update state */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://react.dev/link/wrap-tests-with-act', getComponentNameFromFiber(fiber), ); }); @@ -5553,16 +5555,16 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { ) { console.error( 'A suspended resource finished loading inside a test, but the event ' + - 'was not wrapped in act(...).\n\n' + - 'When testing, code that resolves suspended data should be wrapped ' + - 'into act(...):\n\n' + - 'act(() => {\n' + - ' /* finish loading suspended data */\n' + - '});\n' + - '/* assert on the output */\n\n' + - "This ensures that you're testing the behavior the user would see " + - 'in the browser.' + - ' Learn more at https://react.dev/link/wrap-tests-with-act', + 'was not wrapped in act(...).\n\n' + + 'When testing, code that resolves suspended data should be wrapped ' + + 'into act(...):\n\n' + + 'act(() => {\n' + + ' /* finish loading suspended data */\n' + + '});\n' + + '/* assert on the output */\n\n' + + "This ensures that you're testing the behavior the user would see " + + 'in the browser.' + + ' Learn more at https://react.dev/link/wrap-tests-with-act', ); } } diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js index b289de223160..5f8004baaef1 100644 --- a/packages/react-reconciler/src/ReactProfilerTimer.js +++ b/packages/react-reconciler/src/ReactProfilerTimer.js @@ -7,13 +7,14 @@ * @flow */ -import type {Fiber} from './ReactInternalTypes'; +import type { Fiber } from './ReactInternalTypes'; -import type {SuspendedReason} from './ReactFiberWorkLoop'; +import type { SuspendedReason } from './ReactFiberWorkLoop'; +import type { Transition } from 'react/src/ReactStartTransition'; -import type {Lane, Lanes} from './ReactFiberLane'; +import type { Lane, Lanes } from './ReactFiberLane'; -import type {CapturedValue} from './ReactCapturedValue'; +import type { CapturedValue } from './ReactCapturedValue'; import { isTransitionLane, @@ -21,10 +22,11 @@ import { isGestureRender, includesTransitionLane, includesBlockingLane, + getHighestPriorityLane, NoLanes, } from './ReactFiberLane'; -import {resolveEventType, resolveEventTimeStamp} from './ReactFiberConfig'; +import { resolveEventType, resolveEventTimeStamp } from './ReactFiberConfig'; import { enableProfilerCommitHooks, @@ -34,20 +36,19 @@ import { } from 'shared/ReactFeatureFlags'; import getComponentNameFromFiber from './getComponentNameFromFiber'; -import {requestCurrentTransition} from './ReactFiberTransition'; -import {isAlreadyRendering} from './ReactFiberWorkLoop'; +import { requestCurrentTransition } from './ReactFiberTransition'; // Intentionally not named imports because Rollup would use dynamic dispatch for // CommonJS interop named imports. import * as Scheduler from 'scheduler'; -const {unstable_now: now} = Scheduler; +const { unstable_now: now } = Scheduler; const createTask = // eslint-disable-next-line react-internal/no-production-logging __DEV__ && console.createTask ? // eslint-disable-next-line react-internal/no-production-logging - console.createTask + console.createTask : (name: string) => null; export const REGULAR_UPDATE: UpdateType = 0; @@ -106,7 +107,7 @@ export function getTransitionTimers(lane: Lane): TransitionTimers | null { return timers !== undefined ? timers : null; } -type TransitionTimers = { +export type TransitionTimers = { clampTime: number, startTime: number, updateTime: number, @@ -141,6 +142,7 @@ export function startUpdateTimerByLane( lane: Lane, method: string, fiber: Fiber | null, + isAlreadyRendering: boolean, ): void { if (!enableProfilerTimer || !enableComponentPerformanceTrack) { return; @@ -172,7 +174,7 @@ export function startUpdateTimerByLane( if (__DEV__ && fiber != null) { blockingUpdateComponentName = getComponentNameFromFiber(fiber); } - if (isAlreadyRendering()) { + if (isAlreadyRendering) { componentEffectSpawnedUpdate = true; blockingUpdateType = SPAWNED_UPDATE; } @@ -257,7 +259,10 @@ export function startUpdateTimerByLane( } } -export function startHostActionTimer(fiber: Fiber): void { +export function startHostActionTimer( + fiber: Fiber, + isAlreadyRendering: boolean, +): void { if (!enableProfilerTimer || !enableComponentPerformanceTrack) { return; } @@ -267,7 +272,7 @@ export function startHostActionTimer(fiber: Fiber): void { blockingUpdateTime = now(); blockingUpdateTask = __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; - if (isAlreadyRendering()) { + if (isAlreadyRendering) { blockingUpdateType = SPAWNED_UPDATE; } const newEventTime = resolveEventTimeStamp(); @@ -367,7 +372,7 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { while (remainingLanes !== NoLanes) { const lane = getHighestPriorityLane(remainingLanes); if (isTransitionLane(lane)) { - let timers = transitionTimers.get(lane); + const timers = transitionTimers.get(lane); if (timers !== undefined) { timers.suspendedTime = renderEndTime; } @@ -408,12 +413,10 @@ export function startAsyncTransitionTimer(): void { export function hasScheduledTransitionWork(): boolean { // If we have setState on a transition or scheduled useActionState update. - for (const timers of transitionTimers.values()) { - if (timers.updateTime > -1) { - return true; - } - } - return false; + // If we have setState on a transition or scheduled useActionState update. + return Array.from(transitionTimers.values()).some((timers) => { + return timers.updateTime > -1; + }); } export function clearAsyncTransitionTimer(): void { @@ -477,9 +480,9 @@ export function clampTransitionTimers(finalTime: number): void { // If we had new updates come in while we were still rendering or committing, we don't want // those update times to create overlapping tracks in the performance timeline so we clamp // them to the end of the commit phase. - for (const timers of transitionTimers.values()) { + transitionTimers.forEach((timers) => { timers.clampTime = finalTime; - } + }); } export function clampRetryTimers(finalTime: number): void { diff --git a/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js b/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js index 42d3ee57a613..67643c8baf76 100644 --- a/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js +++ b/packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js @@ -145,13 +145,13 @@ describe('ReactInteractionTracing', () => { } } - function AsyncText({text}) { + function AsyncText({ text }) { const fullText = readText(text); Scheduler.log(fullText); return fullText; } - function Text({text}) { + function Text({ text }) { Scheduler.log(text); return text; } @@ -177,7 +177,7 @@ describe('ReactInteractionTracing', () => { jest.advanceTimersByTime(ms); // Wait until the end of the current tick // We cannot use a timer since we're faking them - return Promise.resolve().then(() => {}); + return Promise.resolve().then(() => { }); } // @gate enableTransitionTracing @@ -216,7 +216,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({navigate}) { + function App({ navigate }) { return (
{navigate ? ( @@ -305,7 +305,7 @@ describe('ReactInteractionTracing', () => { await waitForAll(['Page One']); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -367,7 +367,7 @@ describe('ReactInteractionTracing', () => { navigateToPageTwo(); setText(); }, - {name: 'page transition'}, + { name: 'page transition' }, ); ReactNoop.expire(1000); @@ -434,7 +434,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -530,7 +530,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); await waitForAll([ 'Suspend [Page Two]', @@ -551,7 +551,7 @@ describe('ReactInteractionTracing', () => { 'onTransitionComplete(page transition, 1000, 2000)', ]); - startTransition(() => showTextFn(), {name: 'text transition'}); + startTransition(() => showTextFn(), { name: 'text transition' }); await waitForAll([ 'Suspend [Show Text]', 'Show Text Loading...', @@ -641,7 +641,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -657,7 +657,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => showTextFn(), {name: 'show text'}); + startTransition(() => showTextFn(), { name: 'show text' }); await waitForAll([ 'Suspend [Show Text]', @@ -763,7 +763,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -899,8 +899,8 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => setNavigate(), {name: 'navigate'}); - startTransition(() => setShowTextOne(), {name: 'show text one'}); + startTransition(() => setNavigate(), { name: 'navigate' }); + startTransition(() => setShowTextOne(), { name: 'show text one' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -937,7 +937,7 @@ describe('ReactInteractionTracing', () => { 'onTransitionProgress(show text one, 1000, 3000, [show text one, ])', ]); - startTransition(() => setShowTextTwo(), {name: 'show text two'}); + startTransition(() => setShowTextTwo(), { name: 'show text two' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -1064,7 +1064,7 @@ describe('ReactInteractionTracing', () => { await waitForAll(['Page One']); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -1150,7 +1150,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -1272,7 +1272,7 @@ describe('ReactInteractionTracing', () => { }); await act(async () => { - startTransition(() => navigateToPageTwo(), {name: 'page transition'}); + startTransition(() => navigateToPageTwo(), { name: 'page transition' }); ReactNoop.expire(1000); await advanceTimers(1000); @@ -1373,7 +1373,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({navigate, markerName}) { + function App({ navigate, markerName }) { return (
{navigate ? ( @@ -1485,7 +1485,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({navigate, showMarker}) { + function App({ navigate, showMarker }) { return (
{navigate ? ( @@ -1650,7 +1650,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({navigate, deleteOne}) { + function App({ navigate, deleteOne }) { return (
{navigate ? ( @@ -1790,7 +1790,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({navigate, deleteOne}) { + function App({ navigate, deleteOne }) { return (
{navigate ? ( @@ -1957,7 +1957,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({show}) { + function App({ show }) { return ( {show ? ( @@ -2078,7 +2078,7 @@ describe('ReactInteractionTracing', () => { }, }; - function App({show, showSuspense}) { + function App({ show, showSuspense }) { return ( {show ? ( @@ -2206,7 +2206,7 @@ describe('ReactInteractionTracing', () => { ); }, }; - function App({markerName, markerKey}) { + function App({ markerName, markerKey }) { return ( @@ -2249,8 +2249,8 @@ describe('ReactInteractionTracing', () => { ]); assertConsoleErrorDev([ 'Changing the name of a tracing marker after mount is not supported. ' + - 'To remount the tracing marker, pass it a new key.\n' + - ' in App (at **)', + 'To remount the tracing marker, pass it a new key.\n' + + ' in App (at **)', ]); startTransition( () => root.render(), @@ -2307,7 +2307,7 @@ describe('ReactInteractionTracing', () => { unstable_transitionCallbacks: transitionCallbacks, }); await act(() => { - startTransition(() => root.render(), {name: 'transition'}); + startTransition(() => root.render(), { name: 'transition' }); ReactNoop.expire(1000); advanceTimers(1000); }); @@ -2373,7 +2373,7 @@ describe('ReactInteractionTracing', () => { await act(async () => { ReactNoop.discreteUpdates(() => - startTransition(() => root.render(), {name: 'page transition'}), + startTransition(() => root.render(), { name: 'page transition' }), ); ReactNoop.expire(1000); await advanceTimers(1000); @@ -2443,7 +2443,7 @@ describe('ReactInteractionTracing', () => { }); await act(() => { - startTransition(() => root.render(), {name: 'transition'}); + startTransition(() => root.render(), { name: 'transition' }); ReactNoop.expire(1000); advanceTimers(1000); }); @@ -2500,7 +2500,7 @@ describe('ReactInteractionTracing', () => { }; }; - function App({name}) { + function App({ name }) { return ( <> }> @@ -2568,4 +2568,107 @@ describe('ReactInteractionTracing', () => { 'onTransitionComplete(transition two, 0, 3000) /root two/', ]); }); + // @gate enableTransitionTracing + it('should correctly track start times for interleaved transitions (regression test)', async () => { + const transitionCallbacks = { + onTransitionStart: (name, startTime) => { + Scheduler.log(`onTransitionStart(${name}, ${startTime})`); + }, + onTransitionComplete: (name, startTime, endTime) => { + Scheduler.log( + `onTransitionComplete(${name}, ${startTime}, ${endTime})`, + ); + }, + }; + + function App({ name }) { + return ( + }> + + + ); + } + + // Use two separate roots to simulate independent actions that might otherwise race on global state + const rootOne = ReactNoop.createRoot({ + unstable_transitionCallbacks: transitionCallbacks, + }); + + const rootTwo = ReactNoop.createRoot({ + unstable_transitionCallbacks: transitionCallbacks, + }); + + // 1. Initial State + await act(async () => { + rootOne.render(null); + rootTwo.render(null); + ReactNoop.expire(1000); + await advanceTimers(1000); + }); + + // 2. Start Transition A at 1000ms + await act(async () => { + startTransition(() => rootOne.render(), { + name: 'Transition A', + }); + + await waitForAll([ + 'Suspend [Text A]', + 'Loading A...', + 'Suspend [Text A]', // Pre-warm + 'onTransitionStart(Transition A, 1000)', + ]); + }); + + // 3. Advance to 2000ms + await act(async () => { + ReactNoop.expire(1000); + await advanceTimers(1000); + }); + + // 4. Start Transition B at 2000ms + await act(async () => { + startTransition(() => rootTwo.render(), { + name: 'Transition B', + }); + + await waitForAll([ + 'Suspend [Text B]', + 'Loading B...', + 'Suspend [Text B]', // Pre-warm + 'onTransitionStart(Transition B, 2000)', + ]); + }); + + // 5. Advance to 3000ms + await act(async () => { + ReactNoop.expire(1000); + await advanceTimers(1000); + }); + + // 6. Resolve A. It started at 1000ms. + // If globals were clobbered by B, it might say 2000ms or some other wrong time. + await act(async () => { + await resolveText('Text A'); + ReactNoop.expire(1000); + await advanceTimers(1000); + }); + + assertLog([ + 'Text A', + 'onTransitionComplete(Transition A, 1000, 4000)', + ]); + + // 7. Resolve B. Started at 2000ms. + await act(async () => { + await resolveText('Text B'); + ReactNoop.expire(1000); + await advanceTimers(1000); + }); + + assertLog([ + 'Text B', + 'onTransitionComplete(Transition B, 2000, 5000)', + ]); + }); }); diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index bd5fa23ca26b..9afcc7b4d1d4 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -1,15 +1 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// TODO: this is special because it gets imported during build. -// -// It exists as a placeholder so that DevTools can support work tag changes between releases. -// When we next publish a release, update the matching TODO in backend/renderer.js -// TODO: This module is used both by the release scripts and to expose a version -// at runtime. We should instead inject the version number as part of the build -// process, and use the ReactVersions.js module as the single source of truth. -export default '19.3.0'; +export default '19.3.0-canary-8ed1e6e8-20260210'; diff --git a/perf_test_output.txt b/perf_test_output.txt new file mode 100644 index 000000000000..fe33377e600e --- /dev/null +++ b/perf_test_output.txt @@ -0,0 +1,20 @@ +yarn run v1.22.22 +$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js --no-color +$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js --no-color + +Running tests for default (experimental)... +PASS packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js + ReactPerformanceTracks + √ shows a hint if an update is triggered by a deeply equal object (549 ms) + √ bails out of diffing wide arrays (148 ms) + √ does not show all properties of wide objects (129 ms) + √ includes console.timeStamp spans for Components with no prop changes (123 ms) + √ can handle bigint in arrays (113 ms) + √ diffs HTML-like objects (117 ms) + +Test Suites: 1 passed, 1 total +Tests: 6 passed, 6 total +Snapshots: 0 total +Time: 3.438 s +Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactPerformanceTrack-test.js/i. +Done in 5.72s. diff --git a/pr_diff_check.txt b/pr_diff_check.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f460d167853f78e29d379485dd5fe01e72bacf8 GIT binary patch literal 53696 zcmeI5dvjLDk;c#8TeaWejjIwV!N|s3jFZhp!8oQ08y1vMsogEdAi#ucB-w;@ydQmc z`!|nTJ#)^SIr9nu^469L-rJd(o}Ruu-P3c<|NQsv@Mw5of2-lF{XMi#2loE!;e+9Y z{eN$GZ2vzT?hpI+&7QsT-GN=n`+LLl;hFvaXn10u_Uwv%`~RN3-a5MSGyC;!`t^=o zy=VPhx7X*^`_}MRyMATAzOAwTdH5%z=Gm}o^!(jM-W@(1F52JS;iKW>;hfEF*QnYW z&Kp1U?WN%pyXHgter3P&?$U6<{^$vQoqemkV$?I~?`?DKcf;>&re}>y?;Ec!+WRxv zdwzwsmHqv~{{7DQ_r%utW%lg{hwsI?N5fN-0OSE_``+Z`>aaar8Fq%RhTHc4t>N0? zr!R&Z!>9J^SN83nhnx292W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I*FFo_knYWQRKa}2S-(xyn9&(Pi~5wn0qi@eOFIeJGbeeD6e>MKNlEbIo868Do%V; zC~$or;v9OC_Wp(L@X%3f0UuQ>2coS-oMYdxGB?R8vDJ+T>E$DJ*NKbB(=WQ`?@jT zo7MOlg;>;nZLjsvqv^GF*olbhPEN~fW7RagcHPNn_q6BJrP)*Z`n9^&_T6c8?sMuj L5mBG6yxac*Hdvg4 literal 0 HcmV?d00001 diff --git a/pr_diff_check_v2.txt b/pr_diff_check_v2.txt new file mode 100644 index 000000000000..25f9bbf90dd2 --- /dev/null +++ b/pr_diff_check_v2.txt @@ -0,0 +1,617 @@ +diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js +index d055b271ad..3f5b26900d 100644 +--- a/packages/react-reconciler/src/ReactFiberWorkLoop.js ++++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js +@@ -7,25 +7,25 @@ + * @flow + */ + +-import {REACT_STRICT_MODE_TYPE} from 'shared/ReactSymbols'; ++import { REACT_STRICT_MODE_TYPE } from 'shared/ReactSymbols'; + + import type { + Wakeable, + Thenable, + GestureOptionsRequired, + } from 'shared/ReactTypes'; +-import type {Fiber, FiberRoot} from './ReactInternalTypes'; +-import type {Lanes, Lane} from './ReactFiberLane'; +-import type {ActivityState} from './ReactFiberActivityComponent'; +-import type {SuspenseState} from './ReactFiberSuspenseComponent'; +-import type {FunctionComponentUpdateQueue} from './ReactFiberHooks'; +-import type {Transition} from 'react/src/ReactStartTransition'; ++import type { Fiber, FiberRoot } from './ReactInternalTypes'; ++import type { Lanes, Lane } from './ReactFiberLane'; ++import type { ActivityState } from './ReactFiberActivityComponent'; ++import type { SuspenseState } from './ReactFiberSuspenseComponent'; ++import type { FunctionComponentUpdateQueue } from './ReactFiberHooks'; ++import type { Transition } from 'react/src/ReactStartTransition'; + import type { + PendingTransitionCallbacks, + PendingBoundaries, + TransitionAbort, + } from './ReactFiberTracingMarkerComponent'; +-import type {OffscreenInstance} from './ReactFiberOffscreenComponent'; ++import type { OffscreenInstance } from './ReactFiberOffscreenComponent'; + import type { + Resource, + ViewTransitionInstance, +@@ -33,12 +33,12 @@ import type { + GestureTimeline, + SuspendedState, + } from './ReactFiberConfig'; +-import type {RootState} from './ReactFiberRoot'; ++import type { RootState } from './ReactFiberRoot'; + import { + getViewTransitionName, + type ViewTransitionState, + } from './ReactFiberViewTransitionComponent'; +-import type {TransitionTypes} from 'react/src/ReactTransitionType'; ++import type { TransitionTypes } from 'react/src/ReactTransitionType'; + + import { + enableCreateEventHandleAPI, +@@ -60,7 +60,7 @@ import { + enableDefaultTransitionIndicator, + enableParallelTransitions, + } from 'shared/ReactFeatureFlags'; +-import {resetOwnerStackLimit} from 'shared/ReactOwnerStackReset'; ++import { resetOwnerStackLimit } from 'shared/ReactOwnerStackReset'; + import ReactSharedInternals from 'shared/ReactSharedInternals'; + import is from 'shared/objectIs'; + +@@ -126,8 +126,8 @@ import { + flushHydrationEvents, + } from './ReactFiberConfig'; + +-import {createWorkInProgress, resetWorkInProgress} from './ReactFiber'; +-import {isRootDehydrated} from './ReactFiberShellHydration'; ++import { createWorkInProgress, resetWorkInProgress } from './ReactFiber'; ++import { isRootDehydrated } from './ReactFiberShellHydration'; + import { + getIsHydrating, + popHydrationStateOnInterruptedWork, +@@ -154,8 +154,8 @@ import { + HostHoistable, + HostSingleton, + } from './ReactWorkTags'; +-import {ConcurrentRoot, LegacyRoot} from './ReactRootTags'; +-import type {Flags} from './ReactFiberFlags'; ++import { ConcurrentRoot, LegacyRoot } from './ReactRootTags'; ++import type { Flags } from './ReactFiberFlags'; + import { + NoFlags, + Incomplete, +@@ -226,14 +226,14 @@ import { + lanesToEventPriority, + eventPriorityToLane, + } from './ReactEventPriorities'; +-import {requestCurrentTransition} from './ReactFiberTransition'; ++import { requestCurrentTransition } from './ReactFiberTransition'; + import { + SelectiveHydrationException, + beginWork, + replayFunctionComponent, + } from './ReactFiberBeginWork'; +-import {completeWork} from './ReactFiberCompleteWork'; +-import {unwindWork, unwindInterruptedWork} from './ReactFiberUnwindWork'; ++import { completeWork } from './ReactFiberCompleteWork'; ++import { unwindWork, unwindInterruptedWork } from './ReactFiberUnwindWork'; + import { + throwException, + createRootErrorUpdate, +@@ -258,21 +258,21 @@ import { + invokePassiveEffectUnmountInDEV, + accumulateSuspenseyCommit, + } from './ReactFiberCommitWork'; +-import {resetShouldStartViewTransition} from './ReactFiberCommitViewTransitions'; +-import {shouldStartViewTransition} from './ReactFiberCommitViewTransitions'; ++import { resetShouldStartViewTransition } from './ReactFiberCommitViewTransitions'; ++import { shouldStartViewTransition } from './ReactFiberCommitViewTransitions'; + import { + insertDestinationClones, + applyDepartureTransitions, + startGestureAnimations, + } from './ReactFiberApplyGesture'; +-import {enqueueUpdate} from './ReactFiberClassUpdateQueue'; +-import {resetContextDependencies} from './ReactFiberNewContext'; ++import { enqueueUpdate } from './ReactFiberClassUpdateQueue'; ++import { resetContextDependencies } from './ReactFiberNewContext'; + import { + resetHooksAfterThrow, + resetHooksOnUnwind, + ContextOnlyDispatcher, + } from './ReactFiberHooks'; +-import {DefaultAsyncDispatcher} from './ReactFiberAsyncDispatcher'; ++import { DefaultAsyncDispatcher } from './ReactFiberAsyncDispatcher'; + import { + createCapturedValueAtFiber, + type CapturedValue, +@@ -304,21 +304,12 @@ import { + gestureEventType, + gestureEventRepeatTime, + gestureSuspendedTime, +- transitionClampTime, +- transitionStartTime, +- transitionUpdateTime, +- transitionUpdateTask, +- transitionUpdateType, +- transitionUpdateMethodName, +- transitionUpdateComponentName, +- transitionEventTime, +- transitionEventType, +- transitionEventRepeatTime, + transitionSuspendedTime, + clearBlockingTimers, + clearGestureTimers, + clearGestureUpdates, +- clearTransitionTimers, ++ getTransitionTimers, ++ clearTransitionTimer, + clampBlockingTimers, + clampGestureTimers, + clampTransitionTimers, +@@ -378,13 +369,13 @@ import { + onPostCommitRoot as onPostCommitRootDevTools, + setIsStrictModeForDevtools, + } from './ReactFiberDevToolsHook'; +-import {onCommitRoot as onCommitRootTestSelector} from './ReactTestSelectors'; +-import {releaseCache} from './ReactFiberCacheComponent'; ++import { onCommitRoot as onCommitRootTestSelector } from './ReactTestSelectors'; ++import { releaseCache } from './ReactFiberCacheComponent'; + import { + isLegacyActEnvironment, + isConcurrentActEnvironment, + } from './ReactFiberAct'; +-import {processTransitionCallbacks} from './ReactFiberTracingMarkerComponent'; ++import { processTransitionCallbacks } from './ReactFiberTracingMarkerComponent'; + import { + SuspenseException, + SuspenseActionException, +@@ -392,25 +383,25 @@ import { + getSuspendedThenable, + isThenableResolved, + } from './ReactFiberThenable'; +-import {schedulePostPaintCallback} from './ReactPostPaintCallback'; ++import { schedulePostPaintCallback } from './ReactPostPaintCallback'; + import { + getSuspenseHandler, + getShellBoundary, + } from './ReactFiberSuspenseContext'; +-import {resetChildReconcilerOnUnwind} from './ReactChildFiber'; ++import { resetChildReconcilerOnUnwind } from './ReactChildFiber'; + import { + ensureRootIsScheduled, + flushSyncWorkOnAllRoots, + flushSyncWorkOnLegacyRootsOnly, + requestTransitionLane, + } from './ReactFiberRootScheduler'; +-import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext'; +-import {logUncaughtError} from './ReactFiberErrorLogger'; ++import { getMaskedContext, getUnmaskedContext } from './ReactFiberLegacyContext'; ++import { logUncaughtError } from './ReactFiberErrorLogger'; + import { + scheduleGestureCommit, + stopCommittedGesture, + } from './ReactFiberGestureScheduler'; +-import {claimQueuedTransitionTypes} from './ReactFiberTransitionTypes'; ++import { claimQueuedTransitionTypes } from './ReactFiberTransitionTypes'; + + const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + +@@ -559,7 +550,7 @@ export function addTransitionStartCallbackToPendingTransition( + + if (currentPendingTransitionCallbacks.transitionStart === null) { + currentPendingTransitionCallbacks.transitionStart = +- ([]: Array); ++ ([]: Array < Transition >); + } + + currentPendingTransitionCallbacks.transitionStart.push(transition); +@@ -693,7 +684,7 @@ export function addTransitionCompleteCallbackToPendingTransition( + + if (currentPendingTransitionCallbacks.transitionComplete === null) { + currentPendingTransitionCallbacks.transitionComplete = +- ([]: Array); ++ ([]: Array < Transition >); + } + + currentPendingTransitionCallbacks.transitionComplete.push(transition); +@@ -828,9 +819,9 @@ export function requestUpdateLane(fiber: Fiber): Lane { + if (transition.gesture) { + throw new Error( + 'Cannot setState on regular state inside a startGestureTransition. ' + +- 'Gestures can only update the useOptimistic() hook. There should be no ' + +- 'side-effects associated with starting a Gesture until its Action is ' + +- 'invoked. Move side-effects to the Action instead.', ++ 'Gestures can only update the useOptimistic() hook. There should be no ' + ++ 'side-effects associated with starting a Gesture until its Action is ' + ++ 'invoked. Move side-effects to the Action instead.', + ); + } + } +@@ -1036,10 +1027,6 @@ export function scheduleUpdateOnFiber( + if (enableTransitionTracing) { + const transition = ReactSharedInternals.T; + if (transition !== null && transition.name != null) { +- if (transition.startTime === -1) { +- transition.startTime = now(); +- } +- + addTransitionToLanesMap(root, transition, lane); + } + } +@@ -1576,7 +1563,7 @@ function completeRootWhenReady( + const maySuspendCommit = + subtreeFlags & ShouldSuspendCommit || + (subtreeFlags & BothVisibilityAndMaySuspendCommit) === +- BothVisibilityAndMaySuspendCommit; ++ BothVisibilityAndMaySuspendCommit; + let suspendedState: null | SuspendedState = null; + if (isViewTransitionEligible || maySuspendCommit || isGestureTransition) { + // Before committing, ask the renderer whether the host tree is ready. +@@ -2141,56 +2128,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { + clearBlockingTimers(); + } + if (includesTransitionLane(lanes)) { +- workInProgressUpdateTask = transitionUpdateTask; +- const clampedStartTime = +- transitionStartTime >= 0 && transitionStartTime < transitionClampTime +- ? transitionClampTime +- : transitionStartTime; +- const clampedUpdateTime = +- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime +- ? transitionClampTime +- : transitionUpdateTime; +- const clampedEventTime = +- transitionEventTime >= 0 && transitionEventTime < transitionClampTime +- ? transitionClampTime +- : transitionEventTime; +- const clampedRenderStartTime = +- // Clamp the suspended time to the first event/update. +- clampedEventTime >= 0 +- ? clampedEventTime +- : clampedUpdateTime >= 0 +- ? clampedUpdateTime +- : renderStartTime; +- if (transitionSuspendedTime >= 0) { +- setCurrentTrackFromLanes(SomeTransitionLane); +- logSuspendedWithDelayPhase( +- transitionSuspendedTime, +- clampedRenderStartTime, +- lanes, +- workInProgressUpdateTask, +- ); +- } else if (includesTransitionLane(animatingLanes)) { +- // If this lane is still animating, log the time from previous render finishing to now as animating. +- setCurrentTrackFromLanes(SomeTransitionLane); +- logAnimatingPhase( +- transitionClampTime, +- clampedRenderStartTime, +- animatingTask, +- ); ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ const timers = getTransitionTimers(lane); ++ if (timers !== null) { ++ workInProgressUpdateTask = timers.updateTask; ++ const clampedStartTime = ++ timers.startTime >= 0 && timers.startTime < timers.clampTime ++ ? timers.clampTime ++ : timers.startTime; ++ const clampedUpdateTime = ++ timers.updateTime >= 0 && timers.updateTime < timers.clampTime ++ ? timers.clampTime ++ : timers.updateTime; ++ const clampedEventTime = ++ timers.eventTime >= 0 && timers.eventTime < timers.clampTime ++ ? timers.clampTime ++ : timers.eventTime; ++ const clampedRenderStartTime = ++ // Clamp the suspended time to the first event/update. ++ clampedEventTime >= 0 ++ ? clampedEventTime ++ : clampedUpdateTime >= 0 ++ ? clampedUpdateTime ++ : renderStartTime; ++ if (timers.suspendedTime >= 0) { ++ setCurrentTrackFromLanes(lane); ++ logSuspendedWithDelayPhase( ++ timers.suspendedTime, ++ clampedRenderStartTime, ++ lanes, ++ workInProgressUpdateTask, ++ ); ++ } else if (includesTransitionLane(animatingLanes)) { ++ // If this lane is still animating, log the time from previous render finishing to now as animating. ++ setCurrentTrackFromLanes(SomeTransitionLane); ++ logAnimatingPhase( ++ timers.clampTime, ++ clampedRenderStartTime, ++ animatingTask, ++ ); ++ } ++ logTransitionStart( ++ clampedStartTime, ++ clampedUpdateTime, ++ clampedEventTime, ++ timers.eventType, ++ timers.eventRepeatTime > 0, ++ timers.updateType === PINGED_UPDATE, ++ renderStartTime, ++ timers.updateTask, ++ timers.updateMethodName, ++ timers.updateComponentName, ++ ); ++ clearTransitionTimer(lane); ++ } ++ } ++ remainingLanes &= ~lane; + } +- logTransitionStart( +- clampedStartTime, +- clampedUpdateTime, +- clampedEventTime, +- transitionEventType, +- transitionEventRepeatTime > 0, +- transitionUpdateType === PINGED_UPDATE, +- renderStartTime, +- transitionUpdateTask, +- transitionUpdateMethodName, +- transitionUpdateComponentName, +- ); +- clearTransitionTimers(); + } + if (includesRetryLane(lanes)) { + if (includesRetryLane(animatingLanes)) { +@@ -2333,11 +2330,11 @@ function handleThrow(root: FiberRoot, thrownValue: any): void { + + workInProgressSuspendedReason = isWakeable + ? // A wakeable object was thrown by a legacy Suspense implementation. +- // This has slightly different behavior than suspending with `use`. +- SuspendedOnDeprecatedThrowPromise ++ // This has slightly different behavior than suspending with `use`. ++ SuspendedOnDeprecatedThrowPromise + : // This is a regular error. If something earlier in the component already +- // suspended, we must clear the thenable state to unblock the work loop. +- SuspendedOnError; ++ // suspended, we must clear the thenable state to unblock the work loop. ++ SuspendedOnError; + } + + workInProgressThrownValue = thrownValue; +@@ -2929,7 +2926,7 @@ function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus { + if (__DEV__) { + console.error( + 'Unexpected type of fiber triggered a suspensey commit. ' + +- 'This is a bug in React.', ++ 'This is a bug in React.', + ); + } + break; +@@ -3540,7 +3537,7 @@ function completeRoot( + finishedWork !== null && + finishedWork.alternate !== null && + (finishedWork.alternate.memoizedState: RootState).isDehydrated && +- (finishedWork.flags & ForceClientRender) !== NoFlags; ++ (finishedWork.flags & ForceClientRender) !== NoFlags; + logRecoveredRenderPhase( + completedRenderStartTime, + completedRenderEndTime, +@@ -3579,7 +3576,7 @@ function completeRoot( + if (lanes === NoLanes) { + console.error( + 'finishedLanes should not be empty during a commit. This is a ' + +- 'bug in React.', ++ 'bug in React.', + ); + } + } +@@ -3588,7 +3585,7 @@ function completeRoot( + if (finishedWork === root.current) { + throw new Error( + 'Cannot commit the same tree as before. This error is likely caused by ' + +- 'a bug in React. Please file an issue.', ++ 'a bug in React. Please file an issue.', + ); + } + +@@ -3882,7 +3879,7 @@ function commitRoot( + enableProfilerTimer ? suspendedViewTransition : (null: any), + enableProfilerTimer + ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. +- finishedViewTransition.bind(null, lanes) ++ finishedViewTransition.bind(null, lanes) + : (null: any), + ); + } else { +@@ -4441,7 +4438,7 @@ function applyGestureOnRoot( + reportViewTransitionError, + enableProfilerTimer + ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. +- finishedViewTransition.bind(null, pendingEffectsLanes) ++ finishedViewTransition.bind(null, pendingEffectsLanes) + : (null: any), + ); + } +@@ -4582,8 +4579,8 @@ function makeErrorInfo(componentStack: ?string) { + get() { + console.error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + +- ' This property is no longer provided as part of errorInfo but can be accessed as a property' + +- ' of the Error instance itself.', ++ ' This property is no longer provided as part of errorInfo but can be accessed as a property' + ++ ' of the Error instance itself.', + ); + }, + }); +@@ -4624,9 +4621,9 @@ export function flushPendingEffects(): boolean { + didWarnAboutInterruptedViewTransitions = true; + console.warn( + 'A flushSync update cancelled a View Transition because it was called ' + +- 'while the View Transition was still preparing. To preserve the synchronous ' + +- 'semantics, React had to skip the View Transition. If you can, try to avoid ' + +- "flushSync() in a scenario that's likely to interfere.", ++ 'while the View Transition was still preparing. To preserve the synchronous ' + ++ 'semantics, React had to skip the View Transition. If you can, try to avoid ' + ++ "flushSync() in a scenario that's likely to interfere.", + ); + } + } +@@ -4912,10 +4909,10 @@ export function captureCommitPhaseError( + if (__DEV__) { + console.error( + 'Internal React error: Attempted to capture a commit phase error ' + +- 'inside a detached tree. This indicates a bug in React. Potential ' + +- 'causes include deleting the same fiber more than once, committing an ' + +- 'already-finished tree, or an inconsistent return pointer.\n\n' + +- 'Error message:\n\n%s', ++ 'inside a detached tree. This indicates a bug in React. Potential ' + ++ 'causes include deleting the same fiber more than once, committing an ' + ++ 'already-finished tree, or an inconsistent return pointer.\n\n' + ++ 'Error message:\n\n%s', + error, + ); + } +@@ -4942,7 +4939,7 @@ export function attachPingListener( + let threadIDs; + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap(); +- threadIDs = new Set(); ++ threadIDs = new Set < mixed > (); + pingCache.set(wakeable, threadIDs); + } else { + threadIDs = pingCache.get(wakeable); +@@ -5132,7 +5129,7 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) { + default: + throw new Error( + 'Pinged unknown suspense boundary type. ' + +- 'This is probably a bug in React.', ++ 'This is probably a bug in React.', + ); + } + +@@ -5167,9 +5164,9 @@ export function throwIfInfiniteUpdateLoopDetected() { + + throw new Error( + 'Maximum update depth exceeded. This can happen when a component ' + +- 'repeatedly calls setState inside componentWillUpdate or ' + +- 'componentDidUpdate. React limits the number of nested updates to ' + +- 'prevent infinite loops.', ++ 'repeatedly calls setState inside componentWillUpdate or ' + ++ 'componentDidUpdate. React limits the number of nested updates to ' + ++ 'prevent infinite loops.', + ); + } + +@@ -5180,9 +5177,9 @@ export function throwIfInfiniteUpdateLoopDetected() { + + console.error( + 'Maximum update depth exceeded. This can happen when a component ' + +- "calls setState inside useEffect, but useEffect either doesn't " + +- 'have a dependency array, or one of the dependencies changes on ' + +- 'every render.', ++ "calls setState inside useEffect, but useEffect either doesn't " + ++ 'have a dependency array, or one of the dependencies changes on ' + ++ 'every render.', + ); + } + } +@@ -5393,9 +5390,9 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { + runWithFiberInDEV(fiber, () => { + console.error( + "Can't perform a React state update on a component that hasn't mounted yet. " + +- 'This indicates that you have a side-effect in your render function that ' + +- 'asynchronously tries to update the component. Move this work to ' + +- 'useEffect instead.', ++ 'This indicates that you have a side-effect in your render function that ' + ++ 'asynchronously tries to update the component. Move this work to ' + ++ 'useEffect instead.', + ); + }); + } +@@ -5404,7 +5401,7 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { + let didWarnAboutUpdateInRender = false; + let didWarnAboutUpdateInRenderForAnotherComponent; + if (__DEV__) { +- didWarnAboutUpdateInRenderForAnotherComponent = new Set(); ++ didWarnAboutUpdateInRenderForAnotherComponent = new Set < string > (); + } + + function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { +@@ -5425,8 +5422,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { + getComponentNameFromFiber(fiber) || 'Unknown'; + console.error( + 'Cannot update a component (`%s`) while rendering a ' + +- 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + +- 'follow the stack trace as described in https://react.dev/link/setstate-in-render', ++ 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + ++ 'follow the stack trace as described in https://react.dev/link/setstate-in-render', + setStateComponentName, + renderingComponentName, + renderingComponentName, +@@ -5438,8 +5435,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { + if (!didWarnAboutUpdateInRender) { + console.error( + 'Cannot update during an existing state transition (such as ' + +- 'within `render`). Render methods should be a pure ' + +- 'function of props and state.', ++ 'within `render`). Render methods should be a pure ' + ++ 'function of props and state.', + ); + didWarnAboutUpdateInRender = true; + } +@@ -5522,15 +5519,15 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { + runWithFiberInDEV(fiber, () => { + console.error( + 'An update to %s inside a test was not wrapped in act(...).\n\n' + +- 'When testing, code that causes React state updates should be ' + +- 'wrapped into act(...):\n\n' + +- 'act(() => {\n' + +- ' /* fire events that update state */\n' + +- '});\n' + +- '/* assert on the output */\n\n' + +- "This ensures that you're testing the behavior the user would see " + +- 'in the browser.' + +- ' Learn more at https://react.dev/link/wrap-tests-with-act', ++ 'When testing, code that causes React state updates should be ' + ++ 'wrapped into act(...):\n\n' + ++ 'act(() => {\n' + ++ ' /* fire events that update state */\n' + ++ '});\n' + ++ '/* assert on the output */\n\n' + ++ "This ensures that you're testing the behavior the user would see " + ++ 'in the browser.' + ++ ' Learn more at https://react.dev/link/wrap-tests-with-act', + getComponentNameFromFiber(fiber), + ); + }); +@@ -5547,16 +5544,16 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { + ) { + console.error( + 'A suspended resource finished loading inside a test, but the event ' + +- 'was not wrapped in act(...).\n\n' + +- 'When testing, code that resolves suspended data should be wrapped ' + +- 'into act(...):\n\n' + +- 'act(() => {\n' + +- ' /* finish loading suspended data */\n' + +- '});\n' + +- '/* assert on the output */\n\n' + +- "This ensures that you're testing the behavior the user would see " + +- 'in the browser.' + +- ' Learn more at https://react.dev/link/wrap-tests-with-act', ++ 'was not wrapped in act(...).\n\n' + ++ 'When testing, code that resolves suspended data should be wrapped ' + ++ 'into act(...):\n\n' + ++ 'act(() => {\n' + ++ ' /* finish loading suspended data */\n' + ++ '});\n' + ++ '/* assert on the output */\n\n' + ++ "This ensures that you're testing the behavior the user would see " + ++ 'in the browser.' + ++ ' Learn more at https://react.dev/link/wrap-tests-with-act', + ); + } + } diff --git a/profiler_cached_diff.txt b/profiler_cached_diff.txt new file mode 100644 index 0000000000000000000000000000000000000000..77b215d4c49154bc61e4149e5b19cb602b0b3924 GIT binary patch literal 26208 zcmeHPYjYIG6`jwi%70jYu^~b-HrR&5jtw$kr))xjus>2l5*VWg(XJpaS^4Qn&Y8PM zw|n~bJXV-WC8;fGcXqq)`_;E+`d|OtZC*6b@R~L2cs<9}0-v{=51Uu`ztgLx~igx{|=pJLYa zhL9+)^>->OVqI%r?^mh~w7U7R@iX+QZD#<}Nh!w6%{jTt92A=K!BRfL>C&`WAXzwBrt;pZ#WQ z31g0te`;~9wU!oRnI(8;%|$WIT72t0_#QPUuyyii*0;O#ka_Dt{rFuXKeiHk*?foh zBS0I+X+Q2E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tl^vl8n!es<b3?(#T%ORDXtemP!hil{9`jx?>Y&r&K4(;vc z)9LtE%cy;Ni*(taFW+ywDE~OGBKxa3uAEc@TP3^R_Vf4*tUV9Qb0e(!<@LB~*Q}fO zjnO3i0M7nV99)fH3^3wA%YIg>dxWv~uTyekHE!3q+?pC3jdejOu?RunE5W)4h zcai)0q@@^xWTe%U^X(B%5dM32cbr%1IMqvOUFqti?lm?l^3Ex^WXb)JpzEPIhX3Ub zzWZ)u{T^?W;mqS|Iyc`P4>Q$X3DbTpGo4mmcG}U}@`R|z$O62R#X6Q-Z6@VOTz*!k zc(9%z*EZ~hF^1}739f$3|JB=a>=!rcu(~VB27^=))Lk8SGVFf@b_r>NEL#>}8dLuZo9EdyR zj-%2FI{nO8sQQg(p^$cJLl&Oa#KV@zz7cKr7}~s8rE3-#`M=pldg_z;f0V0rI+jkv zvU9O$qt8L<5%$=~FLQ_J-oO=4f8bpTJY9|>xD&_o4Ab+p4zXLqb9Bsh*?s4g*|>d9 zN88y^thg-78(pbo^S-AA=BKoD@08%VHI(j4jADKM3KV^r-0Nyk?=GpZvjWwDIl#BC zK_&MqiOEh4%BAoI9FumPWhJZ8IfX-U$fYzj*ey*@vV1!avl7DAdO{OmG% zT5PlZtK{5v>oj=oi)(H26XExH$~WfUV=!q(*ec6IBWjJU#JEVRli-`nGpABr@cc$yXhlJb)&|keUtTODB%`K5+XX(w`ZwT{r^Ygl z)6;bZn>}f7m0lXt>5C>4Qm*JuO6)8E<_lI+$F011rkE%*%Vf`mGmTTlY_1H-E{)^z zGgR4u5Ff77h null; + + export const REGULAR_UPDATE: UpdateType = 0; +@@ -89,17 +92,35 @@ export let gestureEventRepeatTime: number = -1.1; + export let gestureSuspendedTime: number = -1.1; + + // TODO: This should really be one per Transition lane. +-export let transitionClampTime: number = -0; +-export let transitionStartTime: number = -1.1; // First startTransition call before setState. +-export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. +-export let transitionUpdateType: UpdateType = 0; +-export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. +-export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. +-export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. +-export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. +-export let transitionEventType: null | string = null; // Event type of the first transition. +-export let transitionEventRepeatTime: number = -1.1; +-export let transitionSuspendedTime: number = -1.1; ++export const transitionTimers: Map = new Map(); ++const pendingTransitionStartTimes: WeakMap = new WeakMap(); ++const pendingTransitionEventInfo: WeakMap< ++ Transition, ++ { ++ time: number, ++ type: null | string, ++ }, ++> = new WeakMap(); ++const pendingActionUpdateTimes: WeakMap = new WeakMap(); ++ ++export function getTransitionTimers(lane: Lane): TransitionTimers | null { ++ const timers = transitionTimers.get(lane); ++ return timers !== undefined ? timers : null; ++} ++ ++type TransitionTimers = { ++ clampTime: number, ++ startTime: number, ++ updateTime: number, ++ updateType: UpdateType, ++ updateTask: null | ConsoleTask, ++ updateMethodName: null | string, ++ updateComponentName: null | string, ++ eventTime: number, ++ eventType: null | string, ++ eventRepeatTime: number, ++ suspendedTime: number, ++}; + + export let retryClampTime: number = -0; + export let idleClampTime: number = -0; +@@ -174,24 +195,65 @@ export function startUpdateTimerByLane( + blockingEventType = newEventType; + } + } else if (isTransitionLane(lane)) { +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = createTask(method); +- transitionUpdateMethodName = method; ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ const pendingUpdateTime = ++ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; ++ timers.updateTime = ++ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); ++ timers.updateTask = createTask(method); ++ timers.updateMethodName = method; + if (__DEV__ && fiber != null) { +- transitionUpdateComponentName = getComponentNameFromFiber(fiber); ++ timers.updateComponentName = getComponentNameFromFiber(fiber); + } +- if (transitionStartTime < 0) { +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); ++ if (timers.startTime < 0) { ++ const transition = requestCurrentTransition(); ++ const pendingStartTime = ++ transition !== null ++ ? pendingTransitionStartTimes.get(transition) ++ : undefined; ++ if (pendingStartTime !== undefined) { ++ timers.startTime = pendingStartTime; ++ } ++ ++ let newEventTime = -1.1; ++ let newEventType = null; ++ const pendingEventInfo = ++ transition !== null ++ ? pendingTransitionEventInfo.get(transition) ++ : undefined; ++ if (pendingEventInfo !== undefined) { ++ newEventTime = pendingEventInfo.time; ++ newEventType = pendingEventInfo.type; ++ } else { ++ newEventTime = resolveEventTimeStamp(); ++ newEventType = resolveEventType(); ++ } ++ + if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType ++ newEventTime !== timers.eventRepeatTime || ++ newEventType !== timers.eventType + ) { +- transitionEventRepeatTime = -1.1; ++ timers.eventRepeatTime = -1.1; + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ timers.eventTime = newEventTime; ++ timers.eventType = newEventType; + } + } + } +@@ -226,21 +288,18 @@ export function startHostActionTimer(fiber: Fiber): void { + blockingEventTime = newEventTime; + blockingEventType = newEventType; + } +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = +- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; +- if (transitionStartTime < 0) { ++ pendingActionUpdateTimes.set(fiber, now()); ++ ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); + const newEventTime = resolveEventTimeStamp(); + const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; +- } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } + } + } +@@ -265,10 +324,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { + blockingUpdateType = PINGED_UPDATE; + } + } else if (includesTransitionLane(lanes)) { +- if (transitionUpdateTime < 0) { +- transitionClampTime = transitionUpdateTime = now(); +- transitionUpdateTask = createTask('Promise Resolved'); +- transitionUpdateType = PINGED_UPDATE; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ timers.clampTime = timers.updateTime = now(); ++ timers.updateTask = createTask('Promise Resolved'); ++ timers.updateType = PINGED_UPDATE; ++ } ++ } ++ remainingLanes &= ~lane; + } + } + } +@@ -282,7 +365,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { + } else if (includesBlockingLane(lanes)) { + blockingSuspendedTime = renderEndTime; + } else if (includesTransitionLane(lanes)) { +- transitionSuspendedTime = renderEndTime; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers !== undefined) { ++ timers.suspendedTime = renderEndTime; ++ } ++ } ++ remainingLanes &= ~lane; ++ } + } + } + +@@ -301,38 +394,38 @@ export function startAsyncTransitionTimer(): void { + if (!enableProfilerTimer || !enableComponentPerformanceTrack) { + return; + } +- if (transitionStartTime < 0 && transitionUpdateTime < 0) { +- transitionStartTime = now(); +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); ++ const newEventTime = resolveEventTimeStamp(); ++ const newEventType = resolveEventType(); ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; + } + } + ++// Use getTransitionTimers instead. + export function hasScheduledTransitionWork(): boolean { +- // If we have setState on a transition or scheduled useActionState update. +- return transitionUpdateTime > -1; ++ for (const timers of transitionTimers.values()) { ++ if (timers.updateTime > -1) { ++ return true; ++ } ++ } ++ return false; + } + + export function clearAsyncTransitionTimer(): void { +- transitionStartTime = -1.1; ++ // This is a global clear. We probably shouldn't use it or it should be ++ // updated to clear pending weak maps? ++ // For now, removing the global write. + } + +-export function clearTransitionTimers(): void { +- transitionStartTime = -1.1; +- transitionUpdateTime = -1.1; +- transitionUpdateType = 0; +- transitionSuspendedTime = -1.1; +- transitionEventRepeatTime = transitionEventTime; +- transitionEventTime = -1.1; +- transitionClampTime = now(); ++export function clearTransitionTimer(lane: Lane): void { ++ transitionTimers.delete(lane); + } + + export function hasScheduledGestureTransitionWork(): boolean { +@@ -386,7 +479,9 @@ export function clampTransitionTimers(finalTime: number): void { + // If we had new updates come in while we were still rendering or committing, we don't want + // those update times to create overlapping tracks in the performance timeline so we clamp + // them to the end of the commit phase. +- transitionClampTime = finalTime; ++ for (const timers of transitionTimers.values()) { ++ timers.clampTime = finalTime; ++ } + } + + export function clampRetryTimers(finalTime: number): void { diff --git a/test_output.txt b/test_output.txt new file mode 100644 index 000000000000..68e16e295ec6 --- /dev/null +++ b/test_output.txt @@ -0,0 +1,1234 @@ +yarn run v1.22.22 +$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color +$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color + +Running tests for default (experimental)... +FAIL packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js + ReactInteractionTracing + × [GATED, SHOULD FAIL] should not call callbacks when transition is not defined (318 ms) + × [GATED, SHOULD FAIL] should correctly trace basic interaction (47 ms) + × [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call (62 ms) + × [GATED, SHOULD FAIL] should correctly trace interactions for async roots (47 ms) + × [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions (181 ms) + × [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions (92 ms) + × [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries (60 ms) + × [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries (63 ms) + × [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers (53 ms) + × [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers (52 ms) + × [GATED, SHOULD FAIL] trace interaction with multiple tracing markers (74 ms) + × [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers (56 ms) + × [GATED, SHOULD FAIL] marker gets deleted (56 ms) + × [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted (62 ms) + × [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted (53 ms) + × [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it (58 ms) + × [GATED, SHOULD FAIL] warns when marker name changes (51 ms) + × [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing (51 ms) + × [GATED, SHOULD FAIL] discrete events (60 ms) + × [GATED, SHOULD FAIL] multiple commits happen before a paint (51 ms) + × [GATED, SHOULD FAIL] transition callbacks work for multiple roots (46 ms) + ○ skipped warn and calls marker incomplete if name changes before transition completes + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should not call callbacks when transition is not defined + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace basic interaction + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace interactions for async roots + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interaction with multiple tracing markers + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker gets deleted + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] warns when marker name changes + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] discrete events + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] multiple commits happen before a paint + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + + ● ReactInteractionTracing › [GATED, SHOULD FAIL] transition callbacks work for multiple roots + + Jest encountered an unexpected token + + Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. + + Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. + + By default "node_modules" folder is ignored by transformers. + + Here's what you can do: + • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. + • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript + • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. + • If you need a custom transformation specify a "transform" option in your config. + • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. + + You'll find more details and examples of these config options in the docs: + https://jestjs.io/docs/configuration + For information about custom transformations, see: + https://jestjs.io/docs/code-transformation + + Details: + + SyntaxError: invalid expression (26:0) + } from './ReactFiberLane'; + ^ + + 106 | plugins.push(pathToTransformLazyJSXImport); + 107 | + > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); + | ^ + 109 | return { + 110 | code: babel.transformFromAstSync( + 111 | sourceAst, + + at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) + at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) + at Object.process (scripts/jest/preprocessor.js:108:36) + at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) + at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) + at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) + at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) + at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) + at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) + at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) + at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) + at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) + at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) + at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) + at Object. (packages/react-reconciler/index.js:10:29) + at scripts/jest/setupHostConfigs.js:141:17 + at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) + at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) + at Object. (packages/react-noop-renderer/index.js:10:18) + at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) + +Test Suites: 1 failed, 1 total +Tests: 21 failed, 1 skipped, 22 total +Snapshots: 0 total +Time: 2.725 s, estimated 3 s +Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactTransitionTracing-test.js/i. +error Command failed with exit code 1. +info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. diff --git a/test_output_2.txt b/test_output_2.txt new file mode 100644 index 000000000000..1e9bfd92b083 --- /dev/null +++ b/test_output_2.txt @@ -0,0 +1,36 @@ +yarn run v1.22.22 +$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color +$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color + +Running tests for default (experimental)... +PASS packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js (6.332 s) + ReactInteractionTracing + √ [GATED, SHOULD FAIL] should not call callbacks when transition is not defined (3164 ms) + √ [GATED, SHOULD FAIL] should correctly trace basic interaction (106 ms) + √ [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call (141 ms) + √ [GATED, SHOULD FAIL] should correctly trace interactions for async roots (120 ms) + √ [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions (96 ms) + √ [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions (81 ms) + √ [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries (87 ms) + √ [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries (111 ms) + √ [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers (113 ms) + √ [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers (92 ms) + √ [GATED, SHOULD FAIL] trace interaction with multiple tracing markers (85 ms) + √ [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers (110 ms) + √ [GATED, SHOULD FAIL] marker gets deleted (142 ms) + √ [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted (137 ms) + √ [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted (104 ms) + √ [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it (86 ms) + √ [GATED, SHOULD FAIL] warns when marker name changes (88 ms) + √ [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing (76 ms) + √ [GATED, SHOULD FAIL] discrete events (82 ms) + √ [GATED, SHOULD FAIL] multiple commits happen before a paint (85 ms) + √ [GATED, SHOULD FAIL] transition callbacks work for multiple roots (115 ms) + ○ skipped warn and calls marker incomplete if name changes before transition completes + +Test Suites: 1 passed, 1 total +Tests: 1 skipped, 21 passed, 22 total +Snapshots: 0 total +Time: 6.494 s +Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactTransitionTracing-test.js/i. +Done in 9.42s. diff --git a/test_output_react_profiler.txt b/test_output_react_profiler.txt new file mode 100644 index 0000000000000000000000000000000000000000..fb6c41ca7d4ba9eb6acc1ccff069fc40591ded33 GIT binary patch literal 2792 zcmd6pTTc@~6vxlAiQi#Eh!M3d7xkeD52Vycq7^~$fg+T)lnUK8?3PPH{OIcMf2O-z zE;b<{(M&p>ojLdOKWFCmuPbZWnZ*_{kNyALmaJ^cj4(g7CpOP{Y(wi^735ruF%A6%|jnLG#6Xu@NR^adYUTP&@x6u$o(}%CijLD_o&EqM9hZR8+oo2zcCS1j-KPe{aIMRGYv^@ zz#Zjy5Dq0zNblGyz9gg1d8YZozm7Rk+ydU0TvD(xvV!7(Oq4v=332^4;grTN$W=8Y zcHr7&L#An3LZM^Pb!=c)1Zt|*w6AarVF~MPEIzbjydUtjj)n^;h1wQ2ied!i(5tYG z-eq=*>QWpc#*)3U6`AVAZ9;w{GSu{QVQe3n zLYuHHy7ea~J{K~3_l?tJYlq49{(Wn4RD$M*b0NM7(; zK=E6dpy+NKZu%)NZ)aIH6v({4?~5jMey#5JL;easDY2d1{b%JZyVJ@ZIdx^(tSm{U zx=xM%foEJDLzUB_&Xpy76}_OS?xLo3kE-_8urkATZ0AUO4QG*kWuR%0_4_%-JovnX#Pu#($TLAttQu@f*O znX*T3gQDL~Tldrc^~gG(;w8&!#7R}y^Xy(xqcIs(cfLD>1oiTi?yI|A?-KP*MOkOM ze;$sLX^Z}bnJOAnWQRLx0bRS)q57jxuTCK!>eRY!alOF$?8SNi%DjE&{p6HPerBbY zN8v#|w|&Er9K2O@`XID>3-<+euwS#R3$fc_o$wRNkC{_Pa23Q9m>F@u^uUR#W5B*% zS`{=8+0pwkycP8(46o4Q))&PXp71sc7RuWQj}GAXe z^V4@XpL&tVs_v@p>H~;`XD1K<&ZWC5D=RN=W@T0X-~Y3}`gZlmel}Ly_Vd`@9oy^s ztM^wg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h|>2axGi4)e(4hTw<|Qf_p)c% z0Pb|uy@c}GI_tV^-Ar~Sf6h#8kHs8y2d6o*b-0?}9X##jOx%r?1kVh2;q^+#`js6% z%k>Hm|F-65oL}o!dU)IN*JF!P)AgOI9*lDgra>Wzn({(nz!0qPWdKwD8tKtPjf+hHI3$o104fLe(!q1x7rVT#d3W* zYn1o8X0GmD(#`I-_I{Q&&LwJKjH+EfG=$14mnpYyUf&%^Kz!^&sJ}PA;&^3RI+0DsWk;tw zgq*woi3`!#T<(Iu&Lih@ZhPI%j-|u3Mz+^0Bzy+yNS2;zz9RC2XRl^xRr2@g%$O@R zJ6Zc|S~}~tGkQ~tnhAgH|FNWQK{@@7XSnfvSyo7RuB#UIMTD-^UB@buz;*s;i zI@U7;KBK=#metSE7@jK>@}kvQ<{V4x*N-vc9s53>_=3TS6^TCd~t2=8QnT` zBMTm5ga` z&rf1=RPey!9i4fCkM_Krthk@b#vZ(vW{-7V1t&PxPK4q76n{R#xL;0W;8dXTxiRG2 z$YJLz=<;doaVs-&e#!*&p$(1}>Q=e#+1dS%Eza$*PU2ywVXpZlme#Z2YEtB~BQ*Vk zp(55i@Y-;B%AV#uv~n&^Z>^m=AL40nVFz;5o4+o(IDTq%j$?6v-KSg9}_G^|W*Allr!C4k%fqd@9wB#I89VU5zCli_2cJ`r; zFtCL}OQrW`1sVU$u2ynU;Eg;tD2&2iyqflA^GpORJfC>JRqN7@NYo-L={!qZ-(fY? z+P?MYww|XoamE-HH%Ca?d9QW&+@_<8iWQ*Ttvi%xJs%1{Q-_J)FU+1hWs*$tB;2Wy zy3Gd7k25RLSDbrF*1*RRb6TUGHG8Mf`w_o}Cu!x}!aqr--D51b2h>8A^7A%vna`KB jKX~RcFB>>bvm++|FMjvq0zNY;@T|_A7 literal 0 HcmV?d00001 diff --git a/verification_diff_v2.txt b/verification_diff_v2.txt new file mode 100644 index 000000000000..75944b19ddc0 --- /dev/null +++ b/verification_diff_v2.txt @@ -0,0 +1,924 @@ +diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js +index 555a75dacf..2c9a48aae6 100644 +--- a/packages/react-reconciler/src/ReactFiberWorkLoop.js ++++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js +@@ -7,25 +7,25 @@ + * @flow + */ + +-import {REACT_STRICT_MODE_TYPE} from 'shared/ReactSymbols'; ++import { REACT_STRICT_MODE_TYPE } from 'shared/ReactSymbols'; + + import type { + Wakeable, + Thenable, + GestureOptionsRequired, + } from 'shared/ReactTypes'; +-import type {Fiber, FiberRoot} from './ReactInternalTypes'; +-import type {Lanes, Lane} from './ReactFiberLane'; +-import type {ActivityState} from './ReactFiberActivityComponent'; +-import type {SuspenseState} from './ReactFiberSuspenseComponent'; +-import type {FunctionComponentUpdateQueue} from './ReactFiberHooks'; +-import type {Transition} from 'react/src/ReactStartTransition'; ++import type { Fiber, FiberRoot } from './ReactInternalTypes'; ++import type { Lanes, Lane } from './ReactFiberLane'; ++import type { ActivityState } from './ReactFiberActivityComponent'; ++import type { SuspenseState } from './ReactFiberSuspenseComponent'; ++import type { FunctionComponentUpdateQueue } from './ReactFiberHooks'; ++import type { Transition } from 'react/src/ReactStartTransition'; + import type { + PendingTransitionCallbacks, + PendingBoundaries, + TransitionAbort, + } from './ReactFiberTracingMarkerComponent'; +-import type {OffscreenInstance} from './ReactFiberOffscreenComponent'; ++import type { OffscreenInstance } from './ReactFiberOffscreenComponent'; + import type { + Resource, + ViewTransitionInstance, +@@ -33,12 +33,12 @@ import type { + GestureTimeline, + SuspendedState, + } from './ReactFiberConfig'; +-import type {RootState} from './ReactFiberRoot'; ++import type { RootState } from './ReactFiberRoot'; + import { + getViewTransitionName, + type ViewTransitionState, + } from './ReactFiberViewTransitionComponent'; +-import type {TransitionTypes} from 'react/src/ReactTransitionType'; ++import type { TransitionTypes } from 'react/src/ReactTransitionType'; + + import { + enableCreateEventHandleAPI, +@@ -60,7 +60,7 @@ import { + enableDefaultTransitionIndicator, + enableParallelTransitions, + } from 'shared/ReactFeatureFlags'; +-import {resetOwnerStackLimit} from 'shared/ReactOwnerStackReset'; ++import { resetOwnerStackLimit } from 'shared/ReactOwnerStackReset'; + import ReactSharedInternals from 'shared/ReactSharedInternals'; + import is from 'shared/objectIs'; + +@@ -126,8 +126,8 @@ import { + flushHydrationEvents, + } from './ReactFiberConfig'; + +-import {createWorkInProgress, resetWorkInProgress} from './ReactFiber'; +-import {isRootDehydrated} from './ReactFiberShellHydration'; ++import { createWorkInProgress, resetWorkInProgress } from './ReactFiber'; ++import { isRootDehydrated } from './ReactFiberShellHydration'; + import { + getIsHydrating, + popHydrationStateOnInterruptedWork, +@@ -154,8 +154,8 @@ import { + HostHoistable, + HostSingleton, + } from './ReactWorkTags'; +-import {ConcurrentRoot, LegacyRoot} from './ReactRootTags'; +-import type {Flags} from './ReactFiberFlags'; ++import { ConcurrentRoot, LegacyRoot } from './ReactRootTags'; ++import type { Flags } from './ReactFiberFlags'; + import { + NoFlags, + Incomplete, +@@ -226,14 +226,14 @@ import { + lanesToEventPriority, + eventPriorityToLane, + } from './ReactEventPriorities'; +-import {requestCurrentTransition} from './ReactFiberTransition'; ++import { requestCurrentTransition } from './ReactFiberTransition'; + import { + SelectiveHydrationException, + beginWork, + replayFunctionComponent, + } from './ReactFiberBeginWork'; +-import {completeWork} from './ReactFiberCompleteWork'; +-import {unwindWork, unwindInterruptedWork} from './ReactFiberUnwindWork'; ++import { completeWork } from './ReactFiberCompleteWork'; ++import { unwindWork, unwindInterruptedWork } from './ReactFiberUnwindWork'; + import { + throwException, + createRootErrorUpdate, +@@ -258,21 +258,21 @@ import { + invokePassiveEffectUnmountInDEV, + accumulateSuspenseyCommit, + } from './ReactFiberCommitWork'; +-import {resetShouldStartViewTransition} from './ReactFiberCommitViewTransitions'; +-import {shouldStartViewTransition} from './ReactFiberCommitViewTransitions'; ++import { resetShouldStartViewTransition } from './ReactFiberCommitViewTransitions'; ++import { shouldStartViewTransition } from './ReactFiberCommitViewTransitions'; + import { + insertDestinationClones, + applyDepartureTransitions, + startGestureAnimations, + } from './ReactFiberApplyGesture'; +-import {enqueueUpdate} from './ReactFiberClassUpdateQueue'; +-import {resetContextDependencies} from './ReactFiberNewContext'; ++import { enqueueUpdate } from './ReactFiberClassUpdateQueue'; ++import { resetContextDependencies } from './ReactFiberNewContext'; + import { + resetHooksAfterThrow, + resetHooksOnUnwind, + ContextOnlyDispatcher, + } from './ReactFiberHooks'; +-import {DefaultAsyncDispatcher} from './ReactFiberAsyncDispatcher'; ++import { DefaultAsyncDispatcher } from './ReactFiberAsyncDispatcher'; + import { + createCapturedValueAtFiber, + type CapturedValue, +@@ -378,13 +378,13 @@ import { + onPostCommitRoot as onPostCommitRootDevTools, + setIsStrictModeForDevtools, + } from './ReactFiberDevToolsHook'; +-import {onCommitRoot as onCommitRootTestSelector} from './ReactTestSelectors'; +-import {releaseCache} from './ReactFiberCacheComponent'; ++import { onCommitRoot as onCommitRootTestSelector } from './ReactTestSelectors'; ++import { releaseCache } from './ReactFiberCacheComponent'; + import { + isLegacyActEnvironment, + isConcurrentActEnvironment, + } from './ReactFiberAct'; +-import {processTransitionCallbacks} from './ReactFiberTracingMarkerComponent'; ++import { processTransitionCallbacks } from './ReactFiberTracingMarkerComponent'; + import { + SuspenseException, + SuspenseActionException, +@@ -392,25 +392,25 @@ import { + getSuspendedThenable, + isThenableResolved, + } from './ReactFiberThenable'; +-import {schedulePostPaintCallback} from './ReactPostPaintCallback'; ++import { schedulePostPaintCallback } from './ReactPostPaintCallback'; + import { + getSuspenseHandler, + getShellBoundary, + } from './ReactFiberSuspenseContext'; +-import {resetChildReconcilerOnUnwind} from './ReactChildFiber'; ++import { resetChildReconcilerOnUnwind } from './ReactChildFiber'; + import { + ensureRootIsScheduled, + flushSyncWorkOnAllRoots, + flushSyncWorkOnLegacyRootsOnly, + requestTransitionLane, + } from './ReactFiberRootScheduler'; +-import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext'; +-import {logUncaughtError} from './ReactFiberErrorLogger'; ++import { getMaskedContext, getUnmaskedContext } from './ReactFiberLegacyContext'; ++import { logUncaughtError } from './ReactFiberErrorLogger'; + import { + scheduleGestureCommit, + stopCommittedGesture, + } from './ReactFiberGestureScheduler'; +-import {claimQueuedTransitionTypes} from './ReactFiberTransitionTypes'; ++import { claimQueuedTransitionTypes } from './ReactFiberTransitionTypes'; + + const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; + +@@ -559,7 +559,7 @@ export function addTransitionStartCallbackToPendingTransition( + + if (currentPendingTransitionCallbacks.transitionStart === null) { + currentPendingTransitionCallbacks.transitionStart = +- ([]: Array); ++ ([]: Array < Transition >); + } + + currentPendingTransitionCallbacks.transitionStart.push(transition); +@@ -693,7 +693,7 @@ export function addTransitionCompleteCallbackToPendingTransition( + + if (currentPendingTransitionCallbacks.transitionComplete === null) { + currentPendingTransitionCallbacks.transitionComplete = +- ([]: Array); ++ ([]: Array < Transition >); + } + + currentPendingTransitionCallbacks.transitionComplete.push(transition); +@@ -828,9 +828,9 @@ export function requestUpdateLane(fiber: Fiber): Lane { + if (transition.gesture) { + throw new Error( + 'Cannot setState on regular state inside a startGestureTransition. ' + +- 'Gestures can only update the useOptimistic() hook. There should be no ' + +- 'side-effects associated with starting a Gesture until its Action is ' + +- 'invoked. Move side-effects to the Action instead.', ++ 'Gestures can only update the useOptimistic() hook. There should be no ' + ++ 'side-effects associated with starting a Gesture until its Action is ' + ++ 'invoked. Move side-effects to the Action instead.', + ); + } + } +@@ -1572,7 +1572,7 @@ function completeRootWhenReady( + const maySuspendCommit = + subtreeFlags & ShouldSuspendCommit || + (subtreeFlags & BothVisibilityAndMaySuspendCommit) === +- BothVisibilityAndMaySuspendCommit; ++ BothVisibilityAndMaySuspendCommit; + let suspendedState: null | SuspendedState = null; + if (isViewTransitionEligible || maySuspendCommit || isGestureTransition) { + // Before committing, ask the renderer whether the host tree is ready. +@@ -2137,56 +2137,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { + clearBlockingTimers(); + } + if (includesTransitionLane(lanes)) { +- workInProgressUpdateTask = transitionUpdateTask; +- const clampedStartTime = +- transitionStartTime >= 0 && transitionStartTime < transitionClampTime +- ? transitionClampTime +- : transitionStartTime; +- const clampedUpdateTime = +- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime +- ? transitionClampTime +- : transitionUpdateTime; +- const clampedEventTime = +- transitionEventTime >= 0 && transitionEventTime < transitionClampTime +- ? transitionClampTime +- : transitionEventTime; +- const clampedRenderStartTime = +- // Clamp the suspended time to the first event/update. +- clampedEventTime >= 0 +- ? clampedEventTime +- : clampedUpdateTime >= 0 +- ? clampedUpdateTime +- : renderStartTime; +- if (transitionSuspendedTime >= 0) { +- setCurrentTrackFromLanes(SomeTransitionLane); +- logSuspendedWithDelayPhase( +- transitionSuspendedTime, +- clampedRenderStartTime, +- lanes, +- workInProgressUpdateTask, +- ); +- } else if (includesTransitionLane(animatingLanes)) { +- // If this lane is still animating, log the time from previous render finishing to now as animating. +- setCurrentTrackFromLanes(SomeTransitionLane); +- logAnimatingPhase( +- transitionClampTime, +- clampedRenderStartTime, +- animatingTask, +- ); ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ const timers = getTransitionTimers(lane); ++ if (timers !== null) { ++ workInProgressUpdateTask = timers.updateTask; ++ const clampedStartTime = ++ timers.startTime >= 0 && timers.startTime < timers.clampTime ++ ? timers.clampTime ++ : timers.startTime; ++ const clampedUpdateTime = ++ timers.updateTime >= 0 && timers.updateTime < timers.clampTime ++ ? timers.clampTime ++ : timers.updateTime; ++ const clampedEventTime = ++ timers.eventTime >= 0 && timers.eventTime < timers.clampTime ++ ? timers.clampTime ++ : timers.eventTime; ++ const clampedRenderStartTime = ++ // Clamp the suspended time to the first event/update. ++ clampedEventTime >= 0 ++ ? clampedEventTime ++ : clampedUpdateTime >= 0 ++ ? clampedUpdateTime ++ : renderStartTime; ++ if (timers.suspendedTime >= 0) { ++ setCurrentTrackFromLanes(lane); ++ logSuspendedWithDelayPhase( ++ timers.suspendedTime, ++ clampedRenderStartTime, ++ lanes, ++ workInProgressUpdateTask, ++ ); ++ } else if (includesTransitionLane(animatingLanes)) { ++ // If this lane is still animating, log the time from previous render finishing to now as animating. ++ setCurrentTrackFromLanes(SomeTransitionLane); ++ logAnimatingPhase( ++ timers.clampTime, ++ clampedRenderStartTime, ++ animatingTask, ++ ); ++ } ++ logTransitionStart( ++ clampedStartTime, ++ clampedUpdateTime, ++ clampedEventTime, ++ timers.eventType, ++ timers.eventRepeatTime > 0, ++ timers.updateType === PINGED_UPDATE, ++ renderStartTime, ++ timers.updateTask, ++ timers.updateMethodName, ++ timers.updateComponentName, ++ ); ++ clearTransitionTimer(lane); ++ } ++ } ++ remainingLanes &= ~lane; + } +- logTransitionStart( +- clampedStartTime, +- clampedUpdateTime, +- clampedEventTime, +- transitionEventType, +- transitionEventRepeatTime > 0, +- transitionUpdateType === PINGED_UPDATE, +- renderStartTime, +- transitionUpdateTask, +- transitionUpdateMethodName, +- transitionUpdateComponentName, +- ); +- clearTransitionTimers(); + } + if (includesRetryLane(lanes)) { + if (includesRetryLane(animatingLanes)) { +@@ -2329,11 +2339,11 @@ function handleThrow(root: FiberRoot, thrownValue: any): void { + + workInProgressSuspendedReason = isWakeable + ? // A wakeable object was thrown by a legacy Suspense implementation. +- // This has slightly different behavior than suspending with `use`. +- SuspendedOnDeprecatedThrowPromise ++ // This has slightly different behavior than suspending with `use`. ++ SuspendedOnDeprecatedThrowPromise + : // This is a regular error. If something earlier in the component already +- // suspended, we must clear the thenable state to unblock the work loop. +- SuspendedOnError; ++ // suspended, we must clear the thenable state to unblock the work loop. ++ SuspendedOnError; + } + + workInProgressThrownValue = thrownValue; +@@ -2925,7 +2935,7 @@ function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus { + if (__DEV__) { + console.error( + 'Unexpected type of fiber triggered a suspensey commit. ' + +- 'This is a bug in React.', ++ 'This is a bug in React.', + ); + } + break; +@@ -3536,7 +3546,7 @@ function completeRoot( + finishedWork !== null && + finishedWork.alternate !== null && + (finishedWork.alternate.memoizedState: RootState).isDehydrated && +- (finishedWork.flags & ForceClientRender) !== NoFlags; ++ (finishedWork.flags & ForceClientRender) !== NoFlags; + logRecoveredRenderPhase( + completedRenderStartTime, + completedRenderEndTime, +@@ -3575,7 +3585,7 @@ function completeRoot( + if (lanes === NoLanes) { + console.error( + 'finishedLanes should not be empty during a commit. This is a ' + +- 'bug in React.', ++ 'bug in React.', + ); + } + } +@@ -3584,7 +3594,7 @@ function completeRoot( + if (finishedWork === root.current) { + throw new Error( + 'Cannot commit the same tree as before. This error is likely caused by ' + +- 'a bug in React. Please file an issue.', ++ 'a bug in React. Please file an issue.', + ); + } + +@@ -3878,7 +3888,7 @@ function commitRoot( + enableProfilerTimer ? suspendedViewTransition : (null: any), + enableProfilerTimer + ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. +- finishedViewTransition.bind(null, lanes) ++ finishedViewTransition.bind(null, lanes) + : (null: any), + ); + } else { +@@ -4437,7 +4447,7 @@ function applyGestureOnRoot( + reportViewTransitionError, + enableProfilerTimer + ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. +- finishedViewTransition.bind(null, pendingEffectsLanes) ++ finishedViewTransition.bind(null, pendingEffectsLanes) + : (null: any), + ); + } +@@ -4578,8 +4588,8 @@ function makeErrorInfo(componentStack: ?string) { + get() { + console.error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + +- ' This property is no longer provided as part of errorInfo but can be accessed as a property' + +- ' of the Error instance itself.', ++ ' This property is no longer provided as part of errorInfo but can be accessed as a property' + ++ ' of the Error instance itself.', + ); + }, + }); +@@ -4620,9 +4630,9 @@ export function flushPendingEffects(): boolean { + didWarnAboutInterruptedViewTransitions = true; + console.warn( + 'A flushSync update cancelled a View Transition because it was called ' + +- 'while the View Transition was still preparing. To preserve the synchronous ' + +- 'semantics, React had to skip the View Transition. If you can, try to avoid ' + +- "flushSync() in a scenario that's likely to interfere.", ++ 'while the View Transition was still preparing. To preserve the synchronous ' + ++ 'semantics, React had to skip the View Transition. If you can, try to avoid ' + ++ "flushSync() in a scenario that's likely to interfere.", + ); + } + } +@@ -4908,10 +4918,10 @@ export function captureCommitPhaseError( + if (__DEV__) { + console.error( + 'Internal React error: Attempted to capture a commit phase error ' + +- 'inside a detached tree. This indicates a bug in React. Potential ' + +- 'causes include deleting the same fiber more than once, committing an ' + +- 'already-finished tree, or an inconsistent return pointer.\n\n' + +- 'Error message:\n\n%s', ++ 'inside a detached tree. This indicates a bug in React. Potential ' + ++ 'causes include deleting the same fiber more than once, committing an ' + ++ 'already-finished tree, or an inconsistent return pointer.\n\n' + ++ 'Error message:\n\n%s', + error, + ); + } +@@ -4938,7 +4948,7 @@ export function attachPingListener( + let threadIDs; + if (pingCache === null) { + pingCache = root.pingCache = new PossiblyWeakMap(); +- threadIDs = new Set(); ++ threadIDs = new Set < mixed > (); + pingCache.set(wakeable, threadIDs); + } else { + threadIDs = pingCache.get(wakeable); +@@ -5128,7 +5138,7 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) { + default: + throw new Error( + 'Pinged unknown suspense boundary type. ' + +- 'This is probably a bug in React.', ++ 'This is probably a bug in React.', + ); + } + +@@ -5163,9 +5173,9 @@ export function throwIfInfiniteUpdateLoopDetected() { + + throw new Error( + 'Maximum update depth exceeded. This can happen when a component ' + +- 'repeatedly calls setState inside componentWillUpdate or ' + +- 'componentDidUpdate. React limits the number of nested updates to ' + +- 'prevent infinite loops.', ++ 'repeatedly calls setState inside componentWillUpdate or ' + ++ 'componentDidUpdate. React limits the number of nested updates to ' + ++ 'prevent infinite loops.', + ); + } + +@@ -5176,9 +5186,9 @@ export function throwIfInfiniteUpdateLoopDetected() { + + console.error( + 'Maximum update depth exceeded. This can happen when a component ' + +- "calls setState inside useEffect, but useEffect either doesn't " + +- 'have a dependency array, or one of the dependencies changes on ' + +- 'every render.', ++ "calls setState inside useEffect, but useEffect either doesn't " + ++ 'have a dependency array, or one of the dependencies changes on ' + ++ 'every render.', + ); + } + } +@@ -5389,9 +5399,9 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { + runWithFiberInDEV(fiber, () => { + console.error( + "Can't perform a React state update on a component that hasn't mounted yet. " + +- 'This indicates that you have a side-effect in your render function that ' + +- 'asynchronously tries to update the component. Move this work to ' + +- 'useEffect instead.', ++ 'This indicates that you have a side-effect in your render function that ' + ++ 'asynchronously tries to update the component. Move this work to ' + ++ 'useEffect instead.', + ); + }); + } +@@ -5400,7 +5410,7 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { + let didWarnAboutUpdateInRender = false; + let didWarnAboutUpdateInRenderForAnotherComponent; + if (__DEV__) { +- didWarnAboutUpdateInRenderForAnotherComponent = new Set(); ++ didWarnAboutUpdateInRenderForAnotherComponent = new Set < string > (); + } + + function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { +@@ -5421,8 +5431,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { + getComponentNameFromFiber(fiber) || 'Unknown'; + console.error( + 'Cannot update a component (`%s`) while rendering a ' + +- 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + +- 'follow the stack trace as described in https://react.dev/link/setstate-in-render', ++ 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + ++ 'follow the stack trace as described in https://react.dev/link/setstate-in-render', + setStateComponentName, + renderingComponentName, + renderingComponentName, +@@ -5434,8 +5444,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { + if (!didWarnAboutUpdateInRender) { + console.error( + 'Cannot update during an existing state transition (such as ' + +- 'within `render`). Render methods should be a pure ' + +- 'function of props and state.', ++ 'within `render`). Render methods should be a pure ' + ++ 'function of props and state.', + ); + didWarnAboutUpdateInRender = true; + } +@@ -5518,15 +5528,15 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { + runWithFiberInDEV(fiber, () => { + console.error( + 'An update to %s inside a test was not wrapped in act(...).\n\n' + +- 'When testing, code that causes React state updates should be ' + +- 'wrapped into act(...):\n\n' + +- 'act(() => {\n' + +- ' /* fire events that update state */\n' + +- '});\n' + +- '/* assert on the output */\n\n' + +- "This ensures that you're testing the behavior the user would see " + +- 'in the browser.' + +- ' Learn more at https://react.dev/link/wrap-tests-with-act', ++ 'When testing, code that causes React state updates should be ' + ++ 'wrapped into act(...):\n\n' + ++ 'act(() => {\n' + ++ ' /* fire events that update state */\n' + ++ '});\n' + ++ '/* assert on the output */\n\n' + ++ "This ensures that you're testing the behavior the user would see " + ++ 'in the browser.' + ++ ' Learn more at https://react.dev/link/wrap-tests-with-act', + getComponentNameFromFiber(fiber), + ); + }); +@@ -5543,16 +5553,16 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { + ) { + console.error( + 'A suspended resource finished loading inside a test, but the event ' + +- 'was not wrapped in act(...).\n\n' + +- 'When testing, code that resolves suspended data should be wrapped ' + +- 'into act(...):\n\n' + +- 'act(() => {\n' + +- ' /* finish loading suspended data */\n' + +- '});\n' + +- '/* assert on the output */\n\n' + +- "This ensures that you're testing the behavior the user would see " + +- 'in the browser.' + +- ' Learn more at https://react.dev/link/wrap-tests-with-act', ++ 'was not wrapped in act(...).\n\n' + ++ 'When testing, code that resolves suspended data should be wrapped ' + ++ 'into act(...):\n\n' + ++ 'act(() => {\n' + ++ ' /* finish loading suspended data */\n' + ++ '});\n' + ++ '/* assert on the output */\n\n' + ++ "This ensures that you're testing the behavior the user would see " + ++ 'in the browser.' + ++ ' Learn more at https://react.dev/link/wrap-tests-with-act', + ); + } + } +diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js +index 42289ea30a..77121babd3 100644 +--- a/packages/react-reconciler/src/ReactProfilerTimer.js ++++ b/packages/react-reconciler/src/ReactProfilerTimer.js +@@ -7,13 +7,13 @@ + * @flow + */ + +-import type {Fiber} from './ReactInternalTypes'; ++import type { Fiber } from './ReactInternalTypes'; + +-import type {SuspendedReason} from './ReactFiberWorkLoop'; ++import type { SuspendedReason } from './ReactFiberWorkLoop'; + +-import type {Lane, Lanes} from './ReactFiberLane'; ++import type { Lane, Lanes } from './ReactFiberLane'; + +-import type {CapturedValue} from './ReactCapturedValue'; ++import type { CapturedValue } from './ReactCapturedValue'; + + import { + isTransitionLane, +@@ -24,7 +24,7 @@ import { + NoLanes, + } from './ReactFiberLane'; + +-import {resolveEventType, resolveEventTimeStamp} from './ReactFiberConfig'; ++import { resolveEventType, resolveEventTimeStamp } from './ReactFiberConfig'; + + import { + enableProfilerCommitHooks, +@@ -34,19 +34,20 @@ import { + } from 'shared/ReactFeatureFlags'; + + import getComponentNameFromFiber from './getComponentNameFromFiber'; +-import {isAlreadyRendering} from './ReactFiberWorkLoop'; ++import { requestCurrentTransition } from './ReactFiberTransition'; ++import { isAlreadyRendering } from './ReactFiberWorkLoop'; + + // Intentionally not named imports because Rollup would use dynamic dispatch for + // CommonJS interop named imports. + import * as Scheduler from 'scheduler'; + +-const {unstable_now: now} = Scheduler; ++const { unstable_now: now } = Scheduler; + + const createTask = + // eslint-disable-next-line react-internal/no-production-logging + __DEV__ && console.createTask + ? // eslint-disable-next-line react-internal/no-production-logging +- console.createTask ++ console.createTask + : (name: string) => null; + + export const REGULAR_UPDATE: UpdateType = 0; +@@ -89,17 +90,35 @@ export let gestureEventRepeatTime: number = -1.1; + export let gestureSuspendedTime: number = -1.1; + + // TODO: This should really be one per Transition lane. +-export let transitionClampTime: number = -0; +-export let transitionStartTime: number = -1.1; // First startTransition call before setState. +-export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. +-export let transitionUpdateType: UpdateType = 0; +-export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. +-export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. +-export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. +-export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. +-export let transitionEventType: null | string = null; // Event type of the first transition. +-export let transitionEventRepeatTime: number = -1.1; +-export let transitionSuspendedTime: number = -1.1; ++export const transitionTimers: Map = new Map(); ++const pendingTransitionStartTimes: WeakMap = new WeakMap(); ++const pendingTransitionEventInfo: WeakMap< ++ Transition, ++ { ++ time: number, ++ type: null | string, ++ }, ++> = new WeakMap(); ++const pendingActionUpdateTimes: WeakMap = new WeakMap(); ++ ++export function getTransitionTimers(lane: Lane): TransitionTimers | null { ++ const timers = transitionTimers.get(lane); ++ return timers !== undefined ? timers : null; ++} ++ ++type TransitionTimers = { ++ clampTime: number, ++ startTime: number, ++ updateTime: number, ++ updateType: UpdateType, ++ updateTask: null | ConsoleTask, ++ updateMethodName: null | string, ++ updateComponentName: null | string, ++ eventTime: number, ++ eventType: null | string, ++ eventRepeatTime: number, ++ suspendedTime: number, ++}; + + export let retryClampTime: number = -0; + export let idleClampTime: number = -0; +@@ -174,24 +193,65 @@ export function startUpdateTimerByLane( + blockingEventType = newEventType; + } + } else if (isTransitionLane(lane)) { +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = createTask(method); +- transitionUpdateMethodName = method; ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ const pendingUpdateTime = ++ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; ++ timers.updateTime = ++ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); ++ timers.updateTask = createTask(method); ++ timers.updateMethodName = method; + if (__DEV__ && fiber != null) { +- transitionUpdateComponentName = getComponentNameFromFiber(fiber); ++ timers.updateComponentName = getComponentNameFromFiber(fiber); + } +- if (transitionStartTime < 0) { +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); ++ if (timers.startTime < 0) { ++ const transition = requestCurrentTransition(); ++ const pendingStartTime = ++ transition !== null ++ ? pendingTransitionStartTimes.get(transition) ++ : undefined; ++ if (pendingStartTime !== undefined) { ++ timers.startTime = pendingStartTime; ++ } ++ ++ let newEventTime = -1.1; ++ let newEventType = null; ++ const pendingEventInfo = ++ transition !== null ++ ? pendingTransitionEventInfo.get(transition) ++ : undefined; ++ if (pendingEventInfo !== undefined) { ++ newEventTime = pendingEventInfo.time; ++ newEventType = pendingEventInfo.type; ++ } else { ++ newEventTime = resolveEventTimeStamp(); ++ newEventType = resolveEventType(); ++ } ++ + if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType ++ newEventTime !== timers.eventRepeatTime || ++ newEventType !== timers.eventType + ) { +- transitionEventRepeatTime = -1.1; ++ timers.eventRepeatTime = -1.1; + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ timers.eventTime = newEventTime; ++ timers.eventType = newEventType; + } + } + } +@@ -226,21 +286,18 @@ export function startHostActionTimer(fiber: Fiber): void { + blockingEventTime = newEventTime; + blockingEventType = newEventType; + } +- if (transitionUpdateTime < 0) { +- transitionUpdateTime = now(); +- transitionUpdateTask = +- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; +- if (transitionStartTime < 0) { ++ pendingActionUpdateTimes.set(fiber, now()); ++ ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); + const newEventTime = resolveEventTimeStamp(); + const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; +- } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } + } + } +@@ -265,10 +322,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { + blockingUpdateType = PINGED_UPDATE; + } + } else if (includesTransitionLane(lanes)) { +- if (transitionUpdateTime < 0) { +- transitionClampTime = transitionUpdateTime = now(); +- transitionUpdateTask = createTask('Promise Resolved'); +- transitionUpdateType = PINGED_UPDATE; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers === undefined) { ++ timers = { ++ clampTime: -0, ++ startTime: -1.1, ++ updateTime: -1.1, ++ updateType: 0, ++ updateTask: null, ++ updateMethodName: null, ++ updateComponentName: null, ++ eventTime: -1.1, ++ eventType: null, ++ eventRepeatTime: -1.1, ++ suspendedTime: -1.1, ++ }; ++ transitionTimers.set(lane, timers); ++ } ++ if (timers.updateTime < 0) { ++ timers.clampTime = timers.updateTime = now(); ++ timers.updateTask = createTask('Promise Resolved'); ++ timers.updateType = PINGED_UPDATE; ++ } ++ } ++ remainingLanes &= ~lane; + } + } + } +@@ -282,7 +363,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { + } else if (includesBlockingLane(lanes)) { + blockingSuspendedTime = renderEndTime; + } else if (includesTransitionLane(lanes)) { +- transitionSuspendedTime = renderEndTime; ++ let remainingLanes = lanes; ++ while (remainingLanes !== NoLanes) { ++ const lane = getHighestPriorityLane(remainingLanes); ++ if (isTransitionLane(lane)) { ++ let timers = transitionTimers.get(lane); ++ if (timers !== undefined) { ++ timers.suspendedTime = renderEndTime; ++ } ++ } ++ remainingLanes &= ~lane; ++ } + } + } + +@@ -301,38 +392,38 @@ export function startAsyncTransitionTimer(): void { + if (!enableProfilerTimer || !enableComponentPerformanceTrack) { + return; + } +- if (transitionStartTime < 0 && transitionUpdateTime < 0) { +- transitionStartTime = now(); +- const newEventTime = resolveEventTimeStamp(); +- const newEventType = resolveEventType(); +- if ( +- newEventTime !== transitionEventRepeatTime || +- newEventType !== transitionEventType +- ) { +- transitionEventRepeatTime = -1.1; ++ const transition = requestCurrentTransition(); ++ if (transition !== null) { ++ if (!pendingTransitionStartTimes.has(transition)) { ++ pendingTransitionStartTimes.set(transition, now()); ++ const newEventTime = resolveEventTimeStamp(); ++ const newEventType = resolveEventType(); ++ pendingTransitionEventInfo.set(transition, { ++ time: newEventTime, ++ type: newEventType, ++ }); + } +- transitionEventTime = newEventTime; +- transitionEventType = newEventType; + } + } + + export function hasScheduledTransitionWork(): boolean { + // If we have setState on a transition or scheduled useActionState update. +- return transitionUpdateTime > -1; ++ for (const timers of transitionTimers.values()) { ++ if (timers.updateTime > -1) { ++ return true; ++ } ++ } ++ return false; + } + + export function clearAsyncTransitionTimer(): void { +- transitionStartTime = -1.1; ++ // This is a global clear. We probably shouldn't use it or it should be ++ // updated to clear pending weak maps? ++ // For now, removing the global write. + } + +-export function clearTransitionTimers(): void { +- transitionStartTime = -1.1; +- transitionUpdateTime = -1.1; +- transitionUpdateType = 0; +- transitionSuspendedTime = -1.1; +- transitionEventRepeatTime = transitionEventTime; +- transitionEventTime = -1.1; +- transitionClampTime = now(); ++export function clearTransitionTimer(lane: Lane): void { ++ transitionTimers.delete(lane); + } + + export function hasScheduledGestureTransitionWork(): boolean { +@@ -386,7 +477,9 @@ export function clampTransitionTimers(finalTime: number): void { + // If we had new updates come in while we were still rendering or committing, we don't want + // those update times to create overlapping tracks in the performance timeline so we clamp + // them to the end of the commit phase. +- transitionClampTime = finalTime; ++ for (const timers of transitionTimers.values()) { ++ timers.clampTime = finalTime; ++ } + } + + export function clampRetryTimers(finalTime: number): void { diff --git a/workloop_cached_diff.txt b/workloop_cached_diff.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f460d167853f78e29d379485dd5fe01e72bacf8 GIT binary patch literal 53696 zcmeI5dvjLDk;c#8TeaWejjI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i^hjY|eVC}Q%m$TMySnqm% zC|?KOZ&>fAdo8A(Kc539oPHeZkW)Qa%t(??k~6Zs@o5H&lx+} ze_i!%JW`EsXe0Mf*c^V6^rBX)n0vu%rjNHWovZB%jmLSD_I!L&56eQ{Upu#w1T194 zsIpP2JfIFkIU+sDjlEf{JCJ2PIkiQ_1Iz1ik-E8mwzq_sTM$!E6U&hcyu_0H&Ni4Bzz0R@gR6L=5QfgOpuWkqy+&N=7!Mp$Ok zG@m~#fY(Iz=<$ZFfbT^5$g*bOHf9a75*AcW3%sZN0Q6&Pd`B<0e)){&tWF<&wONaU z%o@8ZuI2p5?cmDVf3R2s7h~#7 zLO+e74^IOQ;v|jdOC4A1oB-CJ-<+D>5#Gyox^Am>3p4w0@p`p zI*FFo_knYWQRKa}2S-(xyn9&(Pi~5wn0qi@eOFIeJGbeeD6e>MKNlEbIo868Do%V; zC~$or;v9OC_Wp(L@X%3f0UuQ>2coS-oMYdxGB?R8vDJ+T>E$DJ*NKbB(=WQ`?@jT zo7MOlg;>;nZLjsvqv^GF*olbhPEN~fW7RagcHPNn_q6BJrP)*Z`n9^&_T6c8?sMuj L5mBG6yxac*Hdvg4 literal 0 HcmV?d00001 diff --git a/workloop_diff.txt b/workloop_diff.txt new file mode 100644 index 000000000000..e69de29bb2d1 From 34c7c6221ee7554ccbecc23708818e795631ba07 Mon Sep 17 00:00:00 2001 From: subhamkumarr Date: Tue, 10 Feb 2026 23:35:15 +0530 Subject: [PATCH 3/3] Remove temporary debug files and revert unrelated version bump --- final_verification_diff.txt | 421 ----------- git_status.txt | Bin 2406 -> 0 bytes lint_output_3.txt | Bin 7236 -> 0 bytes lint_output_4.txt | Bin 3440 -> 0 bytes packages/shared/ReactVersion.js | 16 +- perf_test_output.txt | 20 - pr_diff_check.txt | Bin 53696 -> 0 bytes pr_diff_check_v2.txt | 617 ---------------- profiler_cached_diff.txt | Bin 26208 -> 0 bytes profiler_diff.txt | 0 profiler_pr_diff.txt | Bin 26208 -> 0 bytes profiler_pr_diff_v2.txt | 351 --------- test_output.txt | 1234 ------------------------------- test_output_2.txt | 36 - test_output_react_profiler.txt | Bin 2792 -> 0 bytes verification_diff.txt | Bin 77356 -> 0 bytes verification_diff_v2.txt | 924 ----------------------- workloop_cached_diff.txt | Bin 53696 -> 0 bytes workloop_diff.txt | 0 19 files changed, 15 insertions(+), 3604 deletions(-) delete mode 100644 final_verification_diff.txt delete mode 100644 git_status.txt delete mode 100644 lint_output_3.txt delete mode 100644 lint_output_4.txt delete mode 100644 perf_test_output.txt delete mode 100644 pr_diff_check.txt delete mode 100644 pr_diff_check_v2.txt delete mode 100644 profiler_cached_diff.txt delete mode 100644 profiler_diff.txt delete mode 100644 profiler_pr_diff.txt delete mode 100644 profiler_pr_diff_v2.txt delete mode 100644 test_output.txt delete mode 100644 test_output_2.txt delete mode 100644 test_output_react_profiler.txt delete mode 100644 verification_diff.txt delete mode 100644 verification_diff_v2.txt delete mode 100644 workloop_cached_diff.txt delete mode 100644 workloop_diff.txt diff --git a/final_verification_diff.txt b/final_verification_diff.txt deleted file mode 100644 index 5193d38faa16..000000000000 --- a/final_verification_diff.txt +++ /dev/null @@ -1,421 +0,0 @@ -warning: in the working copy of 'packages/react-reconciler/src/ReactFiberWorkLoop.js', LF will be replaced by CRLF the next time Git touches it -warning: in the working copy of 'packages/react-reconciler/src/ReactProfilerTimer.js', LF will be replaced by CRLF the next time Git touches it -diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js -index 555a75dacf..ca4d1929f3 100644 ---- a/packages/react-reconciler/src/ReactFiberWorkLoop.js -+++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js -@@ -2137,56 +2137,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { - clearBlockingTimers(); - } - if (includesTransitionLane(lanes)) { -- workInProgressUpdateTask = transitionUpdateTask; -- const clampedStartTime = -- transitionStartTime >= 0 && transitionStartTime < transitionClampTime -- ? transitionClampTime -- : transitionStartTime; -- const clampedUpdateTime = -- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime -- ? transitionClampTime -- : transitionUpdateTime; -- const clampedEventTime = -- transitionEventTime >= 0 && transitionEventTime < transitionClampTime -- ? transitionClampTime -- : transitionEventTime; -- const clampedRenderStartTime = -- // Clamp the suspended time to the first event/update. -- clampedEventTime >= 0 -- ? clampedEventTime -- : clampedUpdateTime >= 0 -- ? clampedUpdateTime -- : renderStartTime; -- if (transitionSuspendedTime >= 0) { -- setCurrentTrackFromLanes(SomeTransitionLane); -- logSuspendedWithDelayPhase( -- transitionSuspendedTime, -- clampedRenderStartTime, -- lanes, -- workInProgressUpdateTask, -- ); -- } else if (includesTransitionLane(animatingLanes)) { -- // If this lane is still animating, log the time from previous render finishing to now as animating. -- setCurrentTrackFromLanes(SomeTransitionLane); -- logAnimatingPhase( -- transitionClampTime, -- clampedRenderStartTime, -- animatingTask, -- ); -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ const timers = getTransitionTimers(lane); -+ if (timers !== null) { -+ workInProgressUpdateTask = timers.updateTask; -+ const clampedStartTime = -+ timers.startTime >= 0 && timers.startTime < timers.clampTime -+ ? timers.clampTime -+ : timers.startTime; -+ const clampedUpdateTime = -+ timers.updateTime >= 0 && timers.updateTime < timers.clampTime -+ ? timers.clampTime -+ : timers.updateTime; -+ const clampedEventTime = -+ timers.eventTime >= 0 && timers.eventTime < timers.clampTime -+ ? timers.clampTime -+ : timers.eventTime; -+ const clampedRenderStartTime = -+ // Clamp the suspended time to the first event/update. -+ clampedEventTime >= 0 -+ ? clampedEventTime -+ : clampedUpdateTime >= 0 -+ ? clampedUpdateTime -+ : renderStartTime; -+ if (timers.suspendedTime >= 0) { -+ setCurrentTrackFromLanes(lane); -+ logSuspendedWithDelayPhase( -+ timers.suspendedTime, -+ clampedRenderStartTime, -+ lanes, -+ workInProgressUpdateTask, -+ ); -+ } else if (includesTransitionLane(animatingLanes)) { -+ // If this lane is still animating, log the time from previous render finishing to now as animating. -+ setCurrentTrackFromLanes(SomeTransitionLane); -+ logAnimatingPhase( -+ timers.clampTime, -+ clampedRenderStartTime, -+ animatingTask, -+ ); -+ } -+ logTransitionStart( -+ clampedStartTime, -+ clampedUpdateTime, -+ clampedEventTime, -+ timers.eventType, -+ timers.eventRepeatTime > 0, -+ timers.updateType === PINGED_UPDATE, -+ renderStartTime, -+ timers.updateTask, -+ timers.updateMethodName, -+ timers.updateComponentName, -+ ); -+ clearTransitionTimer(lane); -+ } -+ } -+ remainingLanes &= ~lane; - } -- logTransitionStart( -- clampedStartTime, -- clampedUpdateTime, -- clampedEventTime, -- transitionEventType, -- transitionEventRepeatTime > 0, -- transitionUpdateType === PINGED_UPDATE, -- renderStartTime, -- transitionUpdateTask, -- transitionUpdateMethodName, -- transitionUpdateComponentName, -- ); -- clearTransitionTimers(); - } - if (includesRetryLane(lanes)) { - if (includesRetryLane(animatingLanes)) { -diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js -index 42289ea30a..b289de2231 100644 ---- a/packages/react-reconciler/src/ReactProfilerTimer.js -+++ b/packages/react-reconciler/src/ReactProfilerTimer.js -@@ -34,6 +34,7 @@ import { - } from 'shared/ReactFeatureFlags'; - - import getComponentNameFromFiber from './getComponentNameFromFiber'; -+import {requestCurrentTransition} from './ReactFiberTransition'; - import {isAlreadyRendering} from './ReactFiberWorkLoop'; - - // Intentionally not named imports because Rollup would use dynamic dispatch for -@@ -89,17 +90,35 @@ export let gestureEventRepeatTime: number = -1.1; - export let gestureSuspendedTime: number = -1.1; - - // TODO: This should really be one per Transition lane. --export let transitionClampTime: number = -0; --export let transitionStartTime: number = -1.1; // First startTransition call before setState. --export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. --export let transitionUpdateType: UpdateType = 0; --export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. --export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. --export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. --export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. --export let transitionEventType: null | string = null; // Event type of the first transition. --export let transitionEventRepeatTime: number = -1.1; --export let transitionSuspendedTime: number = -1.1; -+export const transitionTimers: Map = new Map(); -+const pendingTransitionStartTimes: WeakMap = new WeakMap(); -+const pendingTransitionEventInfo: WeakMap< -+ Transition, -+ { -+ time: number, -+ type: null | string, -+ }, -+> = new WeakMap(); -+const pendingActionUpdateTimes: WeakMap = new WeakMap(); -+ -+export function getTransitionTimers(lane: Lane): TransitionTimers | null { -+ const timers = transitionTimers.get(lane); -+ return timers !== undefined ? timers : null; -+} -+ -+type TransitionTimers = { -+ clampTime: number, -+ startTime: number, -+ updateTime: number, -+ updateType: UpdateType, -+ updateTask: null | ConsoleTask, -+ updateMethodName: null | string, -+ updateComponentName: null | string, -+ eventTime: number, -+ eventType: null | string, -+ eventRepeatTime: number, -+ suspendedTime: number, -+}; - - export let retryClampTime: number = -0; - export let idleClampTime: number = -0; -@@ -174,24 +193,65 @@ export function startUpdateTimerByLane( - blockingEventType = newEventType; - } - } else if (isTransitionLane(lane)) { -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = createTask(method); -- transitionUpdateMethodName = method; -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ const pendingUpdateTime = -+ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; -+ timers.updateTime = -+ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); -+ timers.updateTask = createTask(method); -+ timers.updateMethodName = method; - if (__DEV__ && fiber != null) { -- transitionUpdateComponentName = getComponentNameFromFiber(fiber); -+ timers.updateComponentName = getComponentNameFromFiber(fiber); - } -- if (transitionStartTime < 0) { -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -+ if (timers.startTime < 0) { -+ const transition = requestCurrentTransition(); -+ const pendingStartTime = -+ transition !== null -+ ? pendingTransitionStartTimes.get(transition) -+ : undefined; -+ if (pendingStartTime !== undefined) { -+ timers.startTime = pendingStartTime; -+ } -+ -+ let newEventTime = -1.1; -+ let newEventType = null; -+ const pendingEventInfo = -+ transition !== null -+ ? pendingTransitionEventInfo.get(transition) -+ : undefined; -+ if (pendingEventInfo !== undefined) { -+ newEventTime = pendingEventInfo.time; -+ newEventType = pendingEventInfo.type; -+ } else { -+ newEventTime = resolveEventTimeStamp(); -+ newEventType = resolveEventType(); -+ } -+ - if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -+ newEventTime !== timers.eventRepeatTime || -+ newEventType !== timers.eventType - ) { -- transitionEventRepeatTime = -1.1; -+ timers.eventRepeatTime = -1.1; - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ timers.eventTime = newEventTime; -+ timers.eventType = newEventType; - } - } - } -@@ -226,21 +286,18 @@ export function startHostActionTimer(fiber: Fiber): void { - blockingEventTime = newEventTime; - blockingEventType = newEventType; - } -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = -- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; -- if (transitionStartTime < 0) { -+ pendingActionUpdateTimes.set(fiber, now()); -+ -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); - const newEventTime = resolveEventTimeStamp(); - const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -- } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } - } - } -@@ -265,10 +322,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { - blockingUpdateType = PINGED_UPDATE; - } - } else if (includesTransitionLane(lanes)) { -- if (transitionUpdateTime < 0) { -- transitionClampTime = transitionUpdateTime = now(); -- transitionUpdateTask = createTask('Promise Resolved'); -- transitionUpdateType = PINGED_UPDATE; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ timers.clampTime = timers.updateTime = now(); -+ timers.updateTask = createTask('Promise Resolved'); -+ timers.updateType = PINGED_UPDATE; -+ } -+ } -+ remainingLanes &= ~lane; - } - } - } -@@ -282,7 +363,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { - } else if (includesBlockingLane(lanes)) { - blockingSuspendedTime = renderEndTime; - } else if (includesTransitionLane(lanes)) { -- transitionSuspendedTime = renderEndTime; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers !== undefined) { -+ timers.suspendedTime = renderEndTime; -+ } -+ } -+ remainingLanes &= ~lane; -+ } - } - } - -@@ -301,38 +392,38 @@ export function startAsyncTransitionTimer(): void { - if (!enableProfilerTimer || !enableComponentPerformanceTrack) { - return; - } -- if (transitionStartTime < 0 && transitionUpdateTime < 0) { -- transitionStartTime = now(); -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); -+ const newEventTime = resolveEventTimeStamp(); -+ const newEventType = resolveEventType(); -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; - } - } - - export function hasScheduledTransitionWork(): boolean { - // If we have setState on a transition or scheduled useActionState update. -- return transitionUpdateTime > -1; -+ for (const timers of transitionTimers.values()) { -+ if (timers.updateTime > -1) { -+ return true; -+ } -+ } -+ return false; - } - - export function clearAsyncTransitionTimer(): void { -- transitionStartTime = -1.1; -+ // This is a global clear. We probably shouldn't use it or it should be -+ // updated to clear pending weak maps? -+ // For now, removing the global write. - } - --export function clearTransitionTimers(): void { -- transitionStartTime = -1.1; -- transitionUpdateTime = -1.1; -- transitionUpdateType = 0; -- transitionSuspendedTime = -1.1; -- transitionEventRepeatTime = transitionEventTime; -- transitionEventTime = -1.1; -- transitionClampTime = now(); -+export function clearTransitionTimer(lane: Lane): void { -+ transitionTimers.delete(lane); - } - - export function hasScheduledGestureTransitionWork(): boolean { -@@ -386,7 +477,9 @@ export function clampTransitionTimers(finalTime: number): void { - // If we had new updates come in while we were still rendering or committing, we don't want - // those update times to create overlapping tracks in the performance timeline so we clamp - // them to the end of the commit phase. -- transitionClampTime = finalTime; -+ for (const timers of transitionTimers.values()) { -+ timers.clampTime = finalTime; -+ } - } - - export function clampRetryTimers(finalTime: number): void { diff --git a/git_status.txt b/git_status.txt deleted file mode 100644 index 249a106162ee091be773d5e87dd4f9dd0ffaae91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2406 zcmc(hL2uJQ5QXO&B>sby6C6S$%BezJDj^O?ASmT%g*c%GC$_R%O8-3V_r?yf6O*P? zYPE`EkKeqReY-Q>>pvfCX^DNal})&t+Br{i%k8&~tioFQQ(-giM;04g01^3>_{f^u z!V$rq+7mm0MQq=(1^AZWBL9Kw#I2b}DPc>9S>nBL#$)$Sus*X3@H6g)cqm$eZ^lUM z_1~P{*b5&+tP!3BuL{hBC;47_Ci1<6qhM&Rdee?7Y-Z2*#$JI@{>oYY`*O&L6^Jka zt9+$uTaO$?l##f8f|XJU$lST7O_Zx9qXF8K{#NUvOpifpRIpBAs5K2Xc7NF-tD-zL zORcKrt`!`U*NW${ed4)BzU8enS+Q;fw!k>SZvnr&XZ#{6|G=)*eYkwy5x-=9;ZdSX zp>6#hLxrzspndY*)ud?0jKeNkJG0{%Bs$SY%=KmrFuRK*k z*4guCzTd^K9lqh#{{G_oT^Xph9vo8%Y5=}s z6n154)3Y}-8MtK$rr_-_pKtCq^`&+1PRT*mIT}QIerzhd?zk!Q)tW@_#a%?m32*Q;OC?XPKyX6;$r#@a>q<$s8B{g`w|i@WZa+wpxFufKss)7uVHeAlZ_an-3# o9=qS)`W#VLc71ASp9c1wJ#@}cXHqv&S8kt9x*Q{L!{!Tq1G-A39RL6T diff --git a/lint_output_3.txt b/lint_output_3.txt deleted file mode 100644 index d1a24ec18ef1b487e77c8171ad9169134b2b66ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7236 zcmds++io015Qa?ke;?VBEm)Z=o?qDKHb;5S z`c}6FsRdiKfz@cywgVfIUgTNf{n67M@_Upo*spx6{f_4h{n?_2n(b4+XD#}x^WCJR zLwZ0PU25|U`7QE?yi>}Kti)(SJ8%>wzT2er?D1|px{@7(GX+VBmTK2H*ISpo)Wh4|^3>;96m@c&TnT-bD6denL8?!>V<+SMtX63}tD%qfHGOZ{YkO<& zZP&h~Zq3#hy^5UmZrW2@=Bn8$^Vnbw*2#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pH%D&sKR`T9m07*j9`= zSPOij%pdT(aLgNKGVpJ}rD{{gYsaicF7EdaRc8)oamAhczKT?Xw{MTZdrb_CruE*_L@_$18MjfOYRNOmcq3)RxYxnH|lI2ys zXiX;Nf={D4v=w`mDXNykVG?Ljlt^OkQYwG8uw$6hscEum7hb}?GxtG_!#OQU1I8{)B{!ZIj*i^ueR%+ zOWel!7F0sBaUZI)OnAENF3&eJ(O+s$;o0NebdPOxzuEsigfIC@$d2)`PL>(AR#^BF zyVS8Hp7vXr@C|Eg`mMN|)rHQH9($JDhidwwf14+5MDNR)BQ!>@q#$bdnfrNu-JXU!bm*y^2;cn( zt?o)$e#Ud{8GJ;>G&yt5KLgz!s*WY|6VIqIUn69@JcX_cs`xh)ePjkUacq#0gzkZ4 Wt$Mg2tI@Zq3ZvHx4XI+I0{;edvmSo{ diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index 9afcc7b4d1d4..bd5fa23ca26b 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -1 +1,15 @@ -export default '19.3.0-canary-8ed1e6e8-20260210'; +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// TODO: this is special because it gets imported during build. +// +// It exists as a placeholder so that DevTools can support work tag changes between releases. +// When we next publish a release, update the matching TODO in backend/renderer.js +// TODO: This module is used both by the release scripts and to expose a version +// at runtime. We should instead inject the version number as part of the build +// process, and use the ReactVersions.js module as the single source of truth. +export default '19.3.0'; diff --git a/perf_test_output.txt b/perf_test_output.txt deleted file mode 100644 index fe33377e600e..000000000000 --- a/perf_test_output.txt +++ /dev/null @@ -1,20 +0,0 @@ -yarn run v1.22.22 -$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js --no-color -$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js --no-color - -Running tests for default (experimental)... -PASS packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js - ReactPerformanceTracks - √ shows a hint if an update is triggered by a deeply equal object (549 ms) - √ bails out of diffing wide arrays (148 ms) - √ does not show all properties of wide objects (129 ms) - √ includes console.timeStamp spans for Components with no prop changes (123 ms) - √ can handle bigint in arrays (113 ms) - √ diffs HTML-like objects (117 ms) - -Test Suites: 1 passed, 1 total -Tests: 6 passed, 6 total -Snapshots: 0 total -Time: 3.438 s -Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactPerformanceTrack-test.js/i. -Done in 5.72s. diff --git a/pr_diff_check.txt b/pr_diff_check.txt deleted file mode 100644 index 2f460d167853f78e29d379485dd5fe01e72bacf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53696 zcmeI5dvjLDk;c#8TeaWejjIwV!N|s3jFZhp!8oQ08y1vMsogEdAi#ucB-w;@ydQmc z`!|nTJ#)^SIr9nu^469L-rJd(o}Ruu-P3c<|NQsv@Mw5of2-lF{XMi#2loE!;e+9Y z{eN$GZ2vzT?hpI+&7QsT-GN=n`+LLl;hFvaXn10u_Uwv%`~RN3-a5MSGyC;!`t^=o zy=VPhx7X*^`_}MRyMATAzOAwTdH5%z=Gm}o^!(jM-W@(1F52JS;iKW>;hfEF*QnYW z&Kp1U?WN%pyXHgter3P&?$U6<{^$vQoqemkV$?I~?`?DKcf;>&re}>y?;Ec!+WRxv zdwzwsmHqv~{{7DQ_r%utW%lg{hwsI?N5fN-0OSE_``+Z`>aaar8Fq%RhTHc4t>N0? zr!R&Z!>9J^SN83nhnx292W#=bT0XZvR>OwL&^NYn$m4DydAEmGcEw%0?ulKqG5jh~ zaK4k9ZdlI;HfwZsKWXOQ?3YJ}9P>VVxw>;mX>j!Hh@<&jLi^vhxy7ejM$L1h zYCP&zv4Yo(;scw@UYh30d9mK2Or~*yh;7l^v5GBw;_Tj`UzW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EN~fW7RagcHPNn_q6BJrP)*Z`n9^&_T6c8?sMuj L5mBG6yxac*Hdvg4 diff --git a/pr_diff_check_v2.txt b/pr_diff_check_v2.txt deleted file mode 100644 index 25f9bbf90dd2..000000000000 --- a/pr_diff_check_v2.txt +++ /dev/null @@ -1,617 +0,0 @@ -diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js -index d055b271ad..3f5b26900d 100644 ---- a/packages/react-reconciler/src/ReactFiberWorkLoop.js -+++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js -@@ -7,25 +7,25 @@ - * @flow - */ - --import {REACT_STRICT_MODE_TYPE} from 'shared/ReactSymbols'; -+import { REACT_STRICT_MODE_TYPE } from 'shared/ReactSymbols'; - - import type { - Wakeable, - Thenable, - GestureOptionsRequired, - } from 'shared/ReactTypes'; --import type {Fiber, FiberRoot} from './ReactInternalTypes'; --import type {Lanes, Lane} from './ReactFiberLane'; --import type {ActivityState} from './ReactFiberActivityComponent'; --import type {SuspenseState} from './ReactFiberSuspenseComponent'; --import type {FunctionComponentUpdateQueue} from './ReactFiberHooks'; --import type {Transition} from 'react/src/ReactStartTransition'; -+import type { Fiber, FiberRoot } from './ReactInternalTypes'; -+import type { Lanes, Lane } from './ReactFiberLane'; -+import type { ActivityState } from './ReactFiberActivityComponent'; -+import type { SuspenseState } from './ReactFiberSuspenseComponent'; -+import type { FunctionComponentUpdateQueue } from './ReactFiberHooks'; -+import type { Transition } from 'react/src/ReactStartTransition'; - import type { - PendingTransitionCallbacks, - PendingBoundaries, - TransitionAbort, - } from './ReactFiberTracingMarkerComponent'; --import type {OffscreenInstance} from './ReactFiberOffscreenComponent'; -+import type { OffscreenInstance } from './ReactFiberOffscreenComponent'; - import type { - Resource, - ViewTransitionInstance, -@@ -33,12 +33,12 @@ import type { - GestureTimeline, - SuspendedState, - } from './ReactFiberConfig'; --import type {RootState} from './ReactFiberRoot'; -+import type { RootState } from './ReactFiberRoot'; - import { - getViewTransitionName, - type ViewTransitionState, - } from './ReactFiberViewTransitionComponent'; --import type {TransitionTypes} from 'react/src/ReactTransitionType'; -+import type { TransitionTypes } from 'react/src/ReactTransitionType'; - - import { - enableCreateEventHandleAPI, -@@ -60,7 +60,7 @@ import { - enableDefaultTransitionIndicator, - enableParallelTransitions, - } from 'shared/ReactFeatureFlags'; --import {resetOwnerStackLimit} from 'shared/ReactOwnerStackReset'; -+import { resetOwnerStackLimit } from 'shared/ReactOwnerStackReset'; - import ReactSharedInternals from 'shared/ReactSharedInternals'; - import is from 'shared/objectIs'; - -@@ -126,8 +126,8 @@ import { - flushHydrationEvents, - } from './ReactFiberConfig'; - --import {createWorkInProgress, resetWorkInProgress} from './ReactFiber'; --import {isRootDehydrated} from './ReactFiberShellHydration'; -+import { createWorkInProgress, resetWorkInProgress } from './ReactFiber'; -+import { isRootDehydrated } from './ReactFiberShellHydration'; - import { - getIsHydrating, - popHydrationStateOnInterruptedWork, -@@ -154,8 +154,8 @@ import { - HostHoistable, - HostSingleton, - } from './ReactWorkTags'; --import {ConcurrentRoot, LegacyRoot} from './ReactRootTags'; --import type {Flags} from './ReactFiberFlags'; -+import { ConcurrentRoot, LegacyRoot } from './ReactRootTags'; -+import type { Flags } from './ReactFiberFlags'; - import { - NoFlags, - Incomplete, -@@ -226,14 +226,14 @@ import { - lanesToEventPriority, - eventPriorityToLane, - } from './ReactEventPriorities'; --import {requestCurrentTransition} from './ReactFiberTransition'; -+import { requestCurrentTransition } from './ReactFiberTransition'; - import { - SelectiveHydrationException, - beginWork, - replayFunctionComponent, - } from './ReactFiberBeginWork'; --import {completeWork} from './ReactFiberCompleteWork'; --import {unwindWork, unwindInterruptedWork} from './ReactFiberUnwindWork'; -+import { completeWork } from './ReactFiberCompleteWork'; -+import { unwindWork, unwindInterruptedWork } from './ReactFiberUnwindWork'; - import { - throwException, - createRootErrorUpdate, -@@ -258,21 +258,21 @@ import { - invokePassiveEffectUnmountInDEV, - accumulateSuspenseyCommit, - } from './ReactFiberCommitWork'; --import {resetShouldStartViewTransition} from './ReactFiberCommitViewTransitions'; --import {shouldStartViewTransition} from './ReactFiberCommitViewTransitions'; -+import { resetShouldStartViewTransition } from './ReactFiberCommitViewTransitions'; -+import { shouldStartViewTransition } from './ReactFiberCommitViewTransitions'; - import { - insertDestinationClones, - applyDepartureTransitions, - startGestureAnimations, - } from './ReactFiberApplyGesture'; --import {enqueueUpdate} from './ReactFiberClassUpdateQueue'; --import {resetContextDependencies} from './ReactFiberNewContext'; -+import { enqueueUpdate } from './ReactFiberClassUpdateQueue'; -+import { resetContextDependencies } from './ReactFiberNewContext'; - import { - resetHooksAfterThrow, - resetHooksOnUnwind, - ContextOnlyDispatcher, - } from './ReactFiberHooks'; --import {DefaultAsyncDispatcher} from './ReactFiberAsyncDispatcher'; -+import { DefaultAsyncDispatcher } from './ReactFiberAsyncDispatcher'; - import { - createCapturedValueAtFiber, - type CapturedValue, -@@ -304,21 +304,12 @@ import { - gestureEventType, - gestureEventRepeatTime, - gestureSuspendedTime, -- transitionClampTime, -- transitionStartTime, -- transitionUpdateTime, -- transitionUpdateTask, -- transitionUpdateType, -- transitionUpdateMethodName, -- transitionUpdateComponentName, -- transitionEventTime, -- transitionEventType, -- transitionEventRepeatTime, - transitionSuspendedTime, - clearBlockingTimers, - clearGestureTimers, - clearGestureUpdates, -- clearTransitionTimers, -+ getTransitionTimers, -+ clearTransitionTimer, - clampBlockingTimers, - clampGestureTimers, - clampTransitionTimers, -@@ -378,13 +369,13 @@ import { - onPostCommitRoot as onPostCommitRootDevTools, - setIsStrictModeForDevtools, - } from './ReactFiberDevToolsHook'; --import {onCommitRoot as onCommitRootTestSelector} from './ReactTestSelectors'; --import {releaseCache} from './ReactFiberCacheComponent'; -+import { onCommitRoot as onCommitRootTestSelector } from './ReactTestSelectors'; -+import { releaseCache } from './ReactFiberCacheComponent'; - import { - isLegacyActEnvironment, - isConcurrentActEnvironment, - } from './ReactFiberAct'; --import {processTransitionCallbacks} from './ReactFiberTracingMarkerComponent'; -+import { processTransitionCallbacks } from './ReactFiberTracingMarkerComponent'; - import { - SuspenseException, - SuspenseActionException, -@@ -392,25 +383,25 @@ import { - getSuspendedThenable, - isThenableResolved, - } from './ReactFiberThenable'; --import {schedulePostPaintCallback} from './ReactPostPaintCallback'; -+import { schedulePostPaintCallback } from './ReactPostPaintCallback'; - import { - getSuspenseHandler, - getShellBoundary, - } from './ReactFiberSuspenseContext'; --import {resetChildReconcilerOnUnwind} from './ReactChildFiber'; -+import { resetChildReconcilerOnUnwind } from './ReactChildFiber'; - import { - ensureRootIsScheduled, - flushSyncWorkOnAllRoots, - flushSyncWorkOnLegacyRootsOnly, - requestTransitionLane, - } from './ReactFiberRootScheduler'; --import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext'; --import {logUncaughtError} from './ReactFiberErrorLogger'; -+import { getMaskedContext, getUnmaskedContext } from './ReactFiberLegacyContext'; -+import { logUncaughtError } from './ReactFiberErrorLogger'; - import { - scheduleGestureCommit, - stopCommittedGesture, - } from './ReactFiberGestureScheduler'; --import {claimQueuedTransitionTypes} from './ReactFiberTransitionTypes'; -+import { claimQueuedTransitionTypes } from './ReactFiberTransitionTypes'; - - const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - -@@ -559,7 +550,7 @@ export function addTransitionStartCallbackToPendingTransition( - - if (currentPendingTransitionCallbacks.transitionStart === null) { - currentPendingTransitionCallbacks.transitionStart = -- ([]: Array); -+ ([]: Array < Transition >); - } - - currentPendingTransitionCallbacks.transitionStart.push(transition); -@@ -693,7 +684,7 @@ export function addTransitionCompleteCallbackToPendingTransition( - - if (currentPendingTransitionCallbacks.transitionComplete === null) { - currentPendingTransitionCallbacks.transitionComplete = -- ([]: Array); -+ ([]: Array < Transition >); - } - - currentPendingTransitionCallbacks.transitionComplete.push(transition); -@@ -828,9 +819,9 @@ export function requestUpdateLane(fiber: Fiber): Lane { - if (transition.gesture) { - throw new Error( - 'Cannot setState on regular state inside a startGestureTransition. ' + -- 'Gestures can only update the useOptimistic() hook. There should be no ' + -- 'side-effects associated with starting a Gesture until its Action is ' + -- 'invoked. Move side-effects to the Action instead.', -+ 'Gestures can only update the useOptimistic() hook. There should be no ' + -+ 'side-effects associated with starting a Gesture until its Action is ' + -+ 'invoked. Move side-effects to the Action instead.', - ); - } - } -@@ -1036,10 +1027,6 @@ export function scheduleUpdateOnFiber( - if (enableTransitionTracing) { - const transition = ReactSharedInternals.T; - if (transition !== null && transition.name != null) { -- if (transition.startTime === -1) { -- transition.startTime = now(); -- } -- - addTransitionToLanesMap(root, transition, lane); - } - } -@@ -1576,7 +1563,7 @@ function completeRootWhenReady( - const maySuspendCommit = - subtreeFlags & ShouldSuspendCommit || - (subtreeFlags & BothVisibilityAndMaySuspendCommit) === -- BothVisibilityAndMaySuspendCommit; -+ BothVisibilityAndMaySuspendCommit; - let suspendedState: null | SuspendedState = null; - if (isViewTransitionEligible || maySuspendCommit || isGestureTransition) { - // Before committing, ask the renderer whether the host tree is ready. -@@ -2141,56 +2128,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { - clearBlockingTimers(); - } - if (includesTransitionLane(lanes)) { -- workInProgressUpdateTask = transitionUpdateTask; -- const clampedStartTime = -- transitionStartTime >= 0 && transitionStartTime < transitionClampTime -- ? transitionClampTime -- : transitionStartTime; -- const clampedUpdateTime = -- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime -- ? transitionClampTime -- : transitionUpdateTime; -- const clampedEventTime = -- transitionEventTime >= 0 && transitionEventTime < transitionClampTime -- ? transitionClampTime -- : transitionEventTime; -- const clampedRenderStartTime = -- // Clamp the suspended time to the first event/update. -- clampedEventTime >= 0 -- ? clampedEventTime -- : clampedUpdateTime >= 0 -- ? clampedUpdateTime -- : renderStartTime; -- if (transitionSuspendedTime >= 0) { -- setCurrentTrackFromLanes(SomeTransitionLane); -- logSuspendedWithDelayPhase( -- transitionSuspendedTime, -- clampedRenderStartTime, -- lanes, -- workInProgressUpdateTask, -- ); -- } else if (includesTransitionLane(animatingLanes)) { -- // If this lane is still animating, log the time from previous render finishing to now as animating. -- setCurrentTrackFromLanes(SomeTransitionLane); -- logAnimatingPhase( -- transitionClampTime, -- clampedRenderStartTime, -- animatingTask, -- ); -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ const timers = getTransitionTimers(lane); -+ if (timers !== null) { -+ workInProgressUpdateTask = timers.updateTask; -+ const clampedStartTime = -+ timers.startTime >= 0 && timers.startTime < timers.clampTime -+ ? timers.clampTime -+ : timers.startTime; -+ const clampedUpdateTime = -+ timers.updateTime >= 0 && timers.updateTime < timers.clampTime -+ ? timers.clampTime -+ : timers.updateTime; -+ const clampedEventTime = -+ timers.eventTime >= 0 && timers.eventTime < timers.clampTime -+ ? timers.clampTime -+ : timers.eventTime; -+ const clampedRenderStartTime = -+ // Clamp the suspended time to the first event/update. -+ clampedEventTime >= 0 -+ ? clampedEventTime -+ : clampedUpdateTime >= 0 -+ ? clampedUpdateTime -+ : renderStartTime; -+ if (timers.suspendedTime >= 0) { -+ setCurrentTrackFromLanes(lane); -+ logSuspendedWithDelayPhase( -+ timers.suspendedTime, -+ clampedRenderStartTime, -+ lanes, -+ workInProgressUpdateTask, -+ ); -+ } else if (includesTransitionLane(animatingLanes)) { -+ // If this lane is still animating, log the time from previous render finishing to now as animating. -+ setCurrentTrackFromLanes(SomeTransitionLane); -+ logAnimatingPhase( -+ timers.clampTime, -+ clampedRenderStartTime, -+ animatingTask, -+ ); -+ } -+ logTransitionStart( -+ clampedStartTime, -+ clampedUpdateTime, -+ clampedEventTime, -+ timers.eventType, -+ timers.eventRepeatTime > 0, -+ timers.updateType === PINGED_UPDATE, -+ renderStartTime, -+ timers.updateTask, -+ timers.updateMethodName, -+ timers.updateComponentName, -+ ); -+ clearTransitionTimer(lane); -+ } -+ } -+ remainingLanes &= ~lane; - } -- logTransitionStart( -- clampedStartTime, -- clampedUpdateTime, -- clampedEventTime, -- transitionEventType, -- transitionEventRepeatTime > 0, -- transitionUpdateType === PINGED_UPDATE, -- renderStartTime, -- transitionUpdateTask, -- transitionUpdateMethodName, -- transitionUpdateComponentName, -- ); -- clearTransitionTimers(); - } - if (includesRetryLane(lanes)) { - if (includesRetryLane(animatingLanes)) { -@@ -2333,11 +2330,11 @@ function handleThrow(root: FiberRoot, thrownValue: any): void { - - workInProgressSuspendedReason = isWakeable - ? // A wakeable object was thrown by a legacy Suspense implementation. -- // This has slightly different behavior than suspending with `use`. -- SuspendedOnDeprecatedThrowPromise -+ // This has slightly different behavior than suspending with `use`. -+ SuspendedOnDeprecatedThrowPromise - : // This is a regular error. If something earlier in the component already -- // suspended, we must clear the thenable state to unblock the work loop. -- SuspendedOnError; -+ // suspended, we must clear the thenable state to unblock the work loop. -+ SuspendedOnError; - } - - workInProgressThrownValue = thrownValue; -@@ -2929,7 +2926,7 @@ function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus { - if (__DEV__) { - console.error( - 'Unexpected type of fiber triggered a suspensey commit. ' + -- 'This is a bug in React.', -+ 'This is a bug in React.', - ); - } - break; -@@ -3540,7 +3537,7 @@ function completeRoot( - finishedWork !== null && - finishedWork.alternate !== null && - (finishedWork.alternate.memoizedState: RootState).isDehydrated && -- (finishedWork.flags & ForceClientRender) !== NoFlags; -+ (finishedWork.flags & ForceClientRender) !== NoFlags; - logRecoveredRenderPhase( - completedRenderStartTime, - completedRenderEndTime, -@@ -3579,7 +3576,7 @@ function completeRoot( - if (lanes === NoLanes) { - console.error( - 'finishedLanes should not be empty during a commit. This is a ' + -- 'bug in React.', -+ 'bug in React.', - ); - } - } -@@ -3588,7 +3585,7 @@ function completeRoot( - if (finishedWork === root.current) { - throw new Error( - 'Cannot commit the same tree as before. This error is likely caused by ' + -- 'a bug in React. Please file an issue.', -+ 'a bug in React. Please file an issue.', - ); - } - -@@ -3882,7 +3879,7 @@ function commitRoot( - enableProfilerTimer ? suspendedViewTransition : (null: any), - enableProfilerTimer - ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. -- finishedViewTransition.bind(null, lanes) -+ finishedViewTransition.bind(null, lanes) - : (null: any), - ); - } else { -@@ -4441,7 +4438,7 @@ function applyGestureOnRoot( - reportViewTransitionError, - enableProfilerTimer - ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. -- finishedViewTransition.bind(null, pendingEffectsLanes) -+ finishedViewTransition.bind(null, pendingEffectsLanes) - : (null: any), - ); - } -@@ -4582,8 +4579,8 @@ function makeErrorInfo(componentStack: ?string) { - get() { - console.error( - 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + -- ' This property is no longer provided as part of errorInfo but can be accessed as a property' + -- ' of the Error instance itself.', -+ ' This property is no longer provided as part of errorInfo but can be accessed as a property' + -+ ' of the Error instance itself.', - ); - }, - }); -@@ -4624,9 +4621,9 @@ export function flushPendingEffects(): boolean { - didWarnAboutInterruptedViewTransitions = true; - console.warn( - 'A flushSync update cancelled a View Transition because it was called ' + -- 'while the View Transition was still preparing. To preserve the synchronous ' + -- 'semantics, React had to skip the View Transition. If you can, try to avoid ' + -- "flushSync() in a scenario that's likely to interfere.", -+ 'while the View Transition was still preparing. To preserve the synchronous ' + -+ 'semantics, React had to skip the View Transition. If you can, try to avoid ' + -+ "flushSync() in a scenario that's likely to interfere.", - ); - } - } -@@ -4912,10 +4909,10 @@ export function captureCommitPhaseError( - if (__DEV__) { - console.error( - 'Internal React error: Attempted to capture a commit phase error ' + -- 'inside a detached tree. This indicates a bug in React. Potential ' + -- 'causes include deleting the same fiber more than once, committing an ' + -- 'already-finished tree, or an inconsistent return pointer.\n\n' + -- 'Error message:\n\n%s', -+ 'inside a detached tree. This indicates a bug in React. Potential ' + -+ 'causes include deleting the same fiber more than once, committing an ' + -+ 'already-finished tree, or an inconsistent return pointer.\n\n' + -+ 'Error message:\n\n%s', - error, - ); - } -@@ -4942,7 +4939,7 @@ export function attachPingListener( - let threadIDs; - if (pingCache === null) { - pingCache = root.pingCache = new PossiblyWeakMap(); -- threadIDs = new Set(); -+ threadIDs = new Set < mixed > (); - pingCache.set(wakeable, threadIDs); - } else { - threadIDs = pingCache.get(wakeable); -@@ -5132,7 +5129,7 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) { - default: - throw new Error( - 'Pinged unknown suspense boundary type. ' + -- 'This is probably a bug in React.', -+ 'This is probably a bug in React.', - ); - } - -@@ -5167,9 +5164,9 @@ export function throwIfInfiniteUpdateLoopDetected() { - - throw new Error( - 'Maximum update depth exceeded. This can happen when a component ' + -- 'repeatedly calls setState inside componentWillUpdate or ' + -- 'componentDidUpdate. React limits the number of nested updates to ' + -- 'prevent infinite loops.', -+ 'repeatedly calls setState inside componentWillUpdate or ' + -+ 'componentDidUpdate. React limits the number of nested updates to ' + -+ 'prevent infinite loops.', - ); - } - -@@ -5180,9 +5177,9 @@ export function throwIfInfiniteUpdateLoopDetected() { - - console.error( - 'Maximum update depth exceeded. This can happen when a component ' + -- "calls setState inside useEffect, but useEffect either doesn't " + -- 'have a dependency array, or one of the dependencies changes on ' + -- 'every render.', -+ "calls setState inside useEffect, but useEffect either doesn't " + -+ 'have a dependency array, or one of the dependencies changes on ' + -+ 'every render.', - ); - } - } -@@ -5393,9 +5390,9 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { - runWithFiberInDEV(fiber, () => { - console.error( - "Can't perform a React state update on a component that hasn't mounted yet. " + -- 'This indicates that you have a side-effect in your render function that ' + -- 'asynchronously tries to update the component. Move this work to ' + -- 'useEffect instead.', -+ 'This indicates that you have a side-effect in your render function that ' + -+ 'asynchronously tries to update the component. Move this work to ' + -+ 'useEffect instead.', - ); - }); - } -@@ -5404,7 +5401,7 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { - let didWarnAboutUpdateInRender = false; - let didWarnAboutUpdateInRenderForAnotherComponent; - if (__DEV__) { -- didWarnAboutUpdateInRenderForAnotherComponent = new Set(); -+ didWarnAboutUpdateInRenderForAnotherComponent = new Set < string > (); - } - - function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { -@@ -5425,8 +5422,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { - getComponentNameFromFiber(fiber) || 'Unknown'; - console.error( - 'Cannot update a component (`%s`) while rendering a ' + -- 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + -- 'follow the stack trace as described in https://react.dev/link/setstate-in-render', -+ 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + -+ 'follow the stack trace as described in https://react.dev/link/setstate-in-render', - setStateComponentName, - renderingComponentName, - renderingComponentName, -@@ -5438,8 +5435,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { - if (!didWarnAboutUpdateInRender) { - console.error( - 'Cannot update during an existing state transition (such as ' + -- 'within `render`). Render methods should be a pure ' + -- 'function of props and state.', -+ 'within `render`). Render methods should be a pure ' + -+ 'function of props and state.', - ); - didWarnAboutUpdateInRender = true; - } -@@ -5522,15 +5519,15 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { - runWithFiberInDEV(fiber, () => { - console.error( - 'An update to %s inside a test was not wrapped in act(...).\n\n' + -- 'When testing, code that causes React state updates should be ' + -- 'wrapped into act(...):\n\n' + -- 'act(() => {\n' + -- ' /* fire events that update state */\n' + -- '});\n' + -- '/* assert on the output */\n\n' + -- "This ensures that you're testing the behavior the user would see " + -- 'in the browser.' + -- ' Learn more at https://react.dev/link/wrap-tests-with-act', -+ 'When testing, code that causes React state updates should be ' + -+ 'wrapped into act(...):\n\n' + -+ 'act(() => {\n' + -+ ' /* fire events that update state */\n' + -+ '});\n' + -+ '/* assert on the output */\n\n' + -+ "This ensures that you're testing the behavior the user would see " + -+ 'in the browser.' + -+ ' Learn more at https://react.dev/link/wrap-tests-with-act', - getComponentNameFromFiber(fiber), - ); - }); -@@ -5547,16 +5544,16 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { - ) { - console.error( - 'A suspended resource finished loading inside a test, but the event ' + -- 'was not wrapped in act(...).\n\n' + -- 'When testing, code that resolves suspended data should be wrapped ' + -- 'into act(...):\n\n' + -- 'act(() => {\n' + -- ' /* finish loading suspended data */\n' + -- '});\n' + -- '/* assert on the output */\n\n' + -- "This ensures that you're testing the behavior the user would see " + -- 'in the browser.' + -- ' Learn more at https://react.dev/link/wrap-tests-with-act', -+ 'was not wrapped in act(...).\n\n' + -+ 'When testing, code that resolves suspended data should be wrapped ' + -+ 'into act(...):\n\n' + -+ 'act(() => {\n' + -+ ' /* finish loading suspended data */\n' + -+ '});\n' + -+ '/* assert on the output */\n\n' + -+ "This ensures that you're testing the behavior the user would see " + -+ 'in the browser.' + -+ ' Learn more at https://react.dev/link/wrap-tests-with-act', - ); - } - } diff --git a/profiler_cached_diff.txt b/profiler_cached_diff.txt deleted file mode 100644 index 77b215d4c49154bc61e4149e5b19cb602b0b3924..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26208 zcmeHPYjYIG6`jwi%70jYu^~b-HrR&5jtw$kr))xjus>2l5*VWg(XJpaS^4Qn&Y8PM zw|n~bJXV-WC8;fGcXqq)`_;E+`d|OtZC*6b@R~L2cs<9}0-v{=51Uu`ztgLx~igx{|=pJLYa zhL9+)^>->OVqI%r?^mh~w7U7R@iX+QZD#<}Nh!w6%{jTt92A=K!BRfL>C&`WAXzwBrt;pZ#WQ z31g0te`;~9wU!oRnI(8;%|$WIT72t0_#QPUuyyii*0;O#ka_Dt{rFuXKeiHk*?foh zBS0I+X+Q2E?uW4tbN?MQbO_$BK#%%7ACS7^)r@i6YIKfkJeQg;Y{T4bg1c9+#S_@- z9wNpMtv#OLbH85e^Mt$Kg6s2#xUJ6=X5)I+vFOvKozu@>z@E3jF*Q5K)dGLa29n>E zr4Mo}^T(pO*ZT4aWOX02m;?R_|NaK^o;N??YK}3?7KFq9j0$yV`ehDJW`;Rv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e%U^X(B%5dM32cbr%1IMqvOUFqti?lm?l^3Ex^WXb)JpzEPIhX3Ub zzWZ)u{T^?W;mqS|Iyc`P4>Q$X3DbTpGo4mmcG}U}@`R|z$O62R#X6Q-Z6@VOTz*!k zc(9%z*EZ~hF^1}739f$3|JB=a>=!rcu(~VB27^=))Lk8SGVFf@b_r>NEL#>}8dLuZo9EdyR zj-%2FI{nO8sQQg(p^$cJLl&Oa#KV@zz7cKr7}~s8rE3-#`M=pldg_z;f0V0rI+jkv zvU9O$qt8L<5%$=~FLQ_J-oO=4f8bpTJY9|>xD&_o4Ab+p4zXLqb9Bsh*?s4g*|>d9 zN88y^thg-78(pbo^S-AA=BKoD@08%VHI(j4jADKM3KV^r-0Nyk?=GpZvjWwDIl#BC zK_&MqiOEh4%BAoI9FumPWhJZ8IfX-U$fYzj*ey*@vV1!avl7DAdO{OmG% zT5PlZtK{5v>oj=oi)(H26XExH$~WfUV=!q(*ec6IBWjJU#JEVRli-`nGpABr@cc$yXhlJb)&|keUtTODB%`K5+XX(w`ZwT{r^Ygl z)6;bZn>}f7m0lXt>5C>4Qm*JuO6)8E<_lI+$F011rkE%*%Vf`mGmTTlY_1H-E{)^z zGgR4u5Ff77h null; - - export const REGULAR_UPDATE: UpdateType = 0; -@@ -89,17 +92,35 @@ export let gestureEventRepeatTime: number = -1.1; - export let gestureSuspendedTime: number = -1.1; - - // TODO: This should really be one per Transition lane. --export let transitionClampTime: number = -0; --export let transitionStartTime: number = -1.1; // First startTransition call before setState. --export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. --export let transitionUpdateType: UpdateType = 0; --export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. --export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. --export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. --export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. --export let transitionEventType: null | string = null; // Event type of the first transition. --export let transitionEventRepeatTime: number = -1.1; --export let transitionSuspendedTime: number = -1.1; -+export const transitionTimers: Map = new Map(); -+const pendingTransitionStartTimes: WeakMap = new WeakMap(); -+const pendingTransitionEventInfo: WeakMap< -+ Transition, -+ { -+ time: number, -+ type: null | string, -+ }, -+> = new WeakMap(); -+const pendingActionUpdateTimes: WeakMap = new WeakMap(); -+ -+export function getTransitionTimers(lane: Lane): TransitionTimers | null { -+ const timers = transitionTimers.get(lane); -+ return timers !== undefined ? timers : null; -+} -+ -+type TransitionTimers = { -+ clampTime: number, -+ startTime: number, -+ updateTime: number, -+ updateType: UpdateType, -+ updateTask: null | ConsoleTask, -+ updateMethodName: null | string, -+ updateComponentName: null | string, -+ eventTime: number, -+ eventType: null | string, -+ eventRepeatTime: number, -+ suspendedTime: number, -+}; - - export let retryClampTime: number = -0; - export let idleClampTime: number = -0; -@@ -174,24 +195,65 @@ export function startUpdateTimerByLane( - blockingEventType = newEventType; - } - } else if (isTransitionLane(lane)) { -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = createTask(method); -- transitionUpdateMethodName = method; -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ const pendingUpdateTime = -+ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; -+ timers.updateTime = -+ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); -+ timers.updateTask = createTask(method); -+ timers.updateMethodName = method; - if (__DEV__ && fiber != null) { -- transitionUpdateComponentName = getComponentNameFromFiber(fiber); -+ timers.updateComponentName = getComponentNameFromFiber(fiber); - } -- if (transitionStartTime < 0) { -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -+ if (timers.startTime < 0) { -+ const transition = requestCurrentTransition(); -+ const pendingStartTime = -+ transition !== null -+ ? pendingTransitionStartTimes.get(transition) -+ : undefined; -+ if (pendingStartTime !== undefined) { -+ timers.startTime = pendingStartTime; -+ } -+ -+ let newEventTime = -1.1; -+ let newEventType = null; -+ const pendingEventInfo = -+ transition !== null -+ ? pendingTransitionEventInfo.get(transition) -+ : undefined; -+ if (pendingEventInfo !== undefined) { -+ newEventTime = pendingEventInfo.time; -+ newEventType = pendingEventInfo.type; -+ } else { -+ newEventTime = resolveEventTimeStamp(); -+ newEventType = resolveEventType(); -+ } -+ - if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -+ newEventTime !== timers.eventRepeatTime || -+ newEventType !== timers.eventType - ) { -- transitionEventRepeatTime = -1.1; -+ timers.eventRepeatTime = -1.1; - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ timers.eventTime = newEventTime; -+ timers.eventType = newEventType; - } - } - } -@@ -226,21 +288,18 @@ export function startHostActionTimer(fiber: Fiber): void { - blockingEventTime = newEventTime; - blockingEventType = newEventType; - } -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = -- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; -- if (transitionStartTime < 0) { -+ pendingActionUpdateTimes.set(fiber, now()); -+ -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); - const newEventTime = resolveEventTimeStamp(); - const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -- } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } - } - } -@@ -265,10 +324,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { - blockingUpdateType = PINGED_UPDATE; - } - } else if (includesTransitionLane(lanes)) { -- if (transitionUpdateTime < 0) { -- transitionClampTime = transitionUpdateTime = now(); -- transitionUpdateTask = createTask('Promise Resolved'); -- transitionUpdateType = PINGED_UPDATE; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ timers.clampTime = timers.updateTime = now(); -+ timers.updateTask = createTask('Promise Resolved'); -+ timers.updateType = PINGED_UPDATE; -+ } -+ } -+ remainingLanes &= ~lane; - } - } - } -@@ -282,7 +365,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { - } else if (includesBlockingLane(lanes)) { - blockingSuspendedTime = renderEndTime; - } else if (includesTransitionLane(lanes)) { -- transitionSuspendedTime = renderEndTime; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers !== undefined) { -+ timers.suspendedTime = renderEndTime; -+ } -+ } -+ remainingLanes &= ~lane; -+ } - } - } - -@@ -301,38 +394,38 @@ export function startAsyncTransitionTimer(): void { - if (!enableProfilerTimer || !enableComponentPerformanceTrack) { - return; - } -- if (transitionStartTime < 0 && transitionUpdateTime < 0) { -- transitionStartTime = now(); -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); -+ const newEventTime = resolveEventTimeStamp(); -+ const newEventType = resolveEventType(); -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; - } - } - -+// Use getTransitionTimers instead. - export function hasScheduledTransitionWork(): boolean { -- // If we have setState on a transition or scheduled useActionState update. -- return transitionUpdateTime > -1; -+ for (const timers of transitionTimers.values()) { -+ if (timers.updateTime > -1) { -+ return true; -+ } -+ } -+ return false; - } - - export function clearAsyncTransitionTimer(): void { -- transitionStartTime = -1.1; -+ // This is a global clear. We probably shouldn't use it or it should be -+ // updated to clear pending weak maps? -+ // For now, removing the global write. - } - --export function clearTransitionTimers(): void { -- transitionStartTime = -1.1; -- transitionUpdateTime = -1.1; -- transitionUpdateType = 0; -- transitionSuspendedTime = -1.1; -- transitionEventRepeatTime = transitionEventTime; -- transitionEventTime = -1.1; -- transitionClampTime = now(); -+export function clearTransitionTimer(lane: Lane): void { -+ transitionTimers.delete(lane); - } - - export function hasScheduledGestureTransitionWork(): boolean { -@@ -386,7 +479,9 @@ export function clampTransitionTimers(finalTime: number): void { - // If we had new updates come in while we were still rendering or committing, we don't want - // those update times to create overlapping tracks in the performance timeline so we clamp - // them to the end of the commit phase. -- transitionClampTime = finalTime; -+ for (const timers of transitionTimers.values()) { -+ timers.clampTime = finalTime; -+ } - } - - export function clampRetryTimers(finalTime: number): void { diff --git a/test_output.txt b/test_output.txt deleted file mode 100644 index 68e16e295ec6..000000000000 --- a/test_output.txt +++ /dev/null @@ -1,1234 +0,0 @@ -yarn run v1.22.22 -$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color -$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color - -Running tests for default (experimental)... -FAIL packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js - ReactInteractionTracing - × [GATED, SHOULD FAIL] should not call callbacks when transition is not defined (318 ms) - × [GATED, SHOULD FAIL] should correctly trace basic interaction (47 ms) - × [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call (62 ms) - × [GATED, SHOULD FAIL] should correctly trace interactions for async roots (47 ms) - × [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions (181 ms) - × [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions (92 ms) - × [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries (60 ms) - × [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries (63 ms) - × [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers (53 ms) - × [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers (52 ms) - × [GATED, SHOULD FAIL] trace interaction with multiple tracing markers (74 ms) - × [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers (56 ms) - × [GATED, SHOULD FAIL] marker gets deleted (56 ms) - × [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted (62 ms) - × [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted (53 ms) - × [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it (58 ms) - × [GATED, SHOULD FAIL] warns when marker name changes (51 ms) - × [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing (51 ms) - × [GATED, SHOULD FAIL] discrete events (60 ms) - × [GATED, SHOULD FAIL] multiple commits happen before a paint (51 ms) - × [GATED, SHOULD FAIL] transition callbacks work for multiple roots (46 ms) - ○ skipped warn and calls marker incomplete if name changes before transition completes - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should not call callbacks when transition is not defined - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace basic interaction - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace interactions for async roots - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] trace interaction with multiple tracing markers - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker gets deleted - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] warns when marker name changes - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] discrete events - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] multiple commits happen before a paint - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - - ● ReactInteractionTracing › [GATED, SHOULD FAIL] transition callbacks work for multiple roots - - Jest encountered an unexpected token - - Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. - - Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. - - By default "node_modules" folder is ignored by transformers. - - Here's what you can do: - • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. - • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript - • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. - • If you need a custom transformation specify a "transform" option in your config. - • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. - - You'll find more details and examples of these config options in the docs: - https://jestjs.io/docs/configuration - For information about custom transformations, see: - https://jestjs.io/docs/code-transformation - - Details: - - SyntaxError: invalid expression (26:0) - } from './ReactFiberLane'; - ^ - - 106 | plugins.push(pathToTransformLazyJSXImport); - 107 | - > 108 | let sourceAst = hermesParser.parse(src, {babel: true}); - | ^ - 109 | return { - 110 | code: babel.transformFromAstSync( - 111 | sourceAst, - - at Object.parse (node_modules/hermes-parser/dist/HermesParser.js:91:29) - at Object.parse (node_modules/hermes-parser/dist/index.js:135:28) - at Object.process (scripts/jest/preprocessor.js:108:36) - at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31) - at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40) - at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19) - at Object. (packages/react-reconciler/src/ReactFiberRootScheduler.js:80:27) - at Object. (packages/react-reconciler/src/ReactFiberAsyncAction.js:18:32) - at Object. (packages/react-reconciler/src/ReactFiberTransition.js:45:30) - at Object. (packages/react-reconciler/src/ReactFiberWorkLoop.js:229:29) - at Object. (packages/react-reconciler/src/ReactFiberHotReloading.js:16:27) - at Object. (packages/react-reconciler/src/ReactFiber.js:82:31) - at Object. (packages/react-reconciler/src/ReactFiberRoot.js:21:19) - at Object. (packages/react-reconciler/src/ReactFiberReconciler.js:60:23) - at Object. (packages/react-reconciler/index.js:10:29) - at scripts/jest/setupHostConfigs.js:141:17 - at createReactNoop (packages/react-noop-renderer/src/createReactNoop.js:988:22) - at Object. (packages/react-noop-renderer/src/ReactNoop.js:56:33) - at Object. (packages/react-noop-renderer/index.js:10:18) - at Object. (packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js:44:17) - -Test Suites: 1 failed, 1 total -Tests: 21 failed, 1 skipped, 22 total -Snapshots: 0 total -Time: 2.725 s, estimated 3 s -Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactTransitionTracing-test.js/i. -error Command failed with exit code 1. -info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. diff --git a/test_output_2.txt b/test_output_2.txt deleted file mode 100644 index 1e9bfd92b083..000000000000 --- a/test_output_2.txt +++ /dev/null @@ -1,36 +0,0 @@ -yarn run v1.22.22 -$ node ./scripts/jest/jest-cli.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color -$ NODE_ENV=development RELEASE_CHANNEL=experimental compactConsole=false node ./scripts/jest/jest.js --config ./scripts/jest/config.source.js packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js --no-color - -Running tests for default (experimental)... -PASS packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js (6.332 s) - ReactInteractionTracing - √ [GATED, SHOULD FAIL] should not call callbacks when transition is not defined (3164 ms) - √ [GATED, SHOULD FAIL] should correctly trace basic interaction (106 ms) - √ [GATED, SHOULD FAIL] multiple updates in transition callback should only result in one transitionStart/transitionComplete call (141 ms) - √ [GATED, SHOULD FAIL] should correctly trace interactions for async roots (120 ms) - √ [GATED, SHOULD FAIL] should correctly trace multiple separate root interactions (96 ms) - √ [GATED, SHOULD FAIL] should correctly trace multiple intertwined root interactions (81 ms) - √ [GATED, SHOULD FAIL] trace interaction with nested and sibling suspense boundaries (87 ms) - √ [GATED, SHOULD FAIL] trace interactions with the same child suspense boundaries (111 ms) - √ [GATED, SHOULD FAIL] should correctly trace basic interaction with tracing markers (113 ms) - √ [GATED, SHOULD FAIL] should correctly trace interactions for tracing markers (92 ms) - √ [GATED, SHOULD FAIL] trace interaction with multiple tracing markers (85 ms) - √ [GATED, SHOULD FAIL] marker incomplete for tree with parent and sibling tracing markers (110 ms) - √ [GATED, SHOULD FAIL] marker gets deleted (142 ms) - √ [GATED, SHOULD FAIL] Suspense boundary added by the transition is deleted (137 ms) - √ [GATED, SHOULD FAIL] Suspense boundary not added by the transition is deleted (104 ms) - √ [GATED, SHOULD FAIL] marker incomplete gets called properly if child suspense marker is not part of it (86 ms) - √ [GATED, SHOULD FAIL] warns when marker name changes (88 ms) - √ [GATED, SHOULD FAIL] offscreen trees should not stop transition from completing (76 ms) - √ [GATED, SHOULD FAIL] discrete events (82 ms) - √ [GATED, SHOULD FAIL] multiple commits happen before a paint (85 ms) - √ [GATED, SHOULD FAIL] transition callbacks work for multiple roots (115 ms) - ○ skipped warn and calls marker incomplete if name changes before transition completes - -Test Suites: 1 passed, 1 total -Tests: 1 skipped, 21 passed, 22 total -Snapshots: 0 total -Time: 6.494 s -Ran all test suites matching /packages\\react-reconciler\\src\\__tests__\\ReactTransitionTracing-test.js/i. -Done in 9.42s. diff --git a/test_output_react_profiler.txt b/test_output_react_profiler.txt deleted file mode 100644 index fb6c41ca7d4ba9eb6acc1ccff069fc40591ded33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2792 zcmd6pTTc@~6vxlAiQ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W* zYn1o8X0GmD(#`I-_I{Q&&LwJKjH+EfG=$14mnpYyUf&%^Kz!^&sJ}PA;&^3RI+0DsWk;tw zgq*woi3`!#T<(Iu&Lih@ZhPI%j-|u3Mz+^0Bzy+yNS2;zz9RC2XRl^xRr2@g%$O@R zJ6Zc|S~}~tGkQ~tnhAgH|FNWQK{@@7XSnfvSyo7RuB#UIMTD-^UB@buz;*s;i zI@U7;KBK=#metSE7@jK>@}kvQ<{V4x*N-vc9s53>_=3TS6^TCd~t2=8QnT` zBMTm5ga` z&rf1=RPey!9i4fCkM_Krthk@b#vZ(vW{-7V1t&PxPK4q76n{R#xL;0W;8dXTxiRG2 z$YJLz=<;doaVs-&e#!*&p$(1}>Q=e#+1dS%Eza$*PU2ywVXpZlme#Z2YEtB~BQ*Vk zp(55i@Y-;B%AV#uv~n&^Z>^m=AL40nVFz;5o4+o(IDTq%j$?6v-KSg9}_G^|W*Allr!C4k%fqd@9wB#I89VU5zCli_2cJ`r; zFtCL}OQrW`1sVU$u2ynU;Eg;tD2&2iyqflA^GpORJfC>JRqN7@NYo-L={!qZ-(fY? z+P?MYww|XoamE-HH%Ca?d9QW&+@_<8iWQ*Ttvi%xJs%1{Q-_J)FU+1hWs*$tB;2Wy zy3Gd7k25RLSDbrF*1*RRb6TUGHG8Mf`w_o}Cu!x}!aqr--D51b2h>8A^7A%vna`KB jKX~RcFB>>bvm++|FMjvq0zNY;@T|_A7 diff --git a/verification_diff_v2.txt b/verification_diff_v2.txt deleted file mode 100644 index 75944b19ddc0..000000000000 --- a/verification_diff_v2.txt +++ /dev/null @@ -1,924 +0,0 @@ -diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js -index 555a75dacf..2c9a48aae6 100644 ---- a/packages/react-reconciler/src/ReactFiberWorkLoop.js -+++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js -@@ -7,25 +7,25 @@ - * @flow - */ - --import {REACT_STRICT_MODE_TYPE} from 'shared/ReactSymbols'; -+import { REACT_STRICT_MODE_TYPE } from 'shared/ReactSymbols'; - - import type { - Wakeable, - Thenable, - GestureOptionsRequired, - } from 'shared/ReactTypes'; --import type {Fiber, FiberRoot} from './ReactInternalTypes'; --import type {Lanes, Lane} from './ReactFiberLane'; --import type {ActivityState} from './ReactFiberActivityComponent'; --import type {SuspenseState} from './ReactFiberSuspenseComponent'; --import type {FunctionComponentUpdateQueue} from './ReactFiberHooks'; --import type {Transition} from 'react/src/ReactStartTransition'; -+import type { Fiber, FiberRoot } from './ReactInternalTypes'; -+import type { Lanes, Lane } from './ReactFiberLane'; -+import type { ActivityState } from './ReactFiberActivityComponent'; -+import type { SuspenseState } from './ReactFiberSuspenseComponent'; -+import type { FunctionComponentUpdateQueue } from './ReactFiberHooks'; -+import type { Transition } from 'react/src/ReactStartTransition'; - import type { - PendingTransitionCallbacks, - PendingBoundaries, - TransitionAbort, - } from './ReactFiberTracingMarkerComponent'; --import type {OffscreenInstance} from './ReactFiberOffscreenComponent'; -+import type { OffscreenInstance } from './ReactFiberOffscreenComponent'; - import type { - Resource, - ViewTransitionInstance, -@@ -33,12 +33,12 @@ import type { - GestureTimeline, - SuspendedState, - } from './ReactFiberConfig'; --import type {RootState} from './ReactFiberRoot'; -+import type { RootState } from './ReactFiberRoot'; - import { - getViewTransitionName, - type ViewTransitionState, - } from './ReactFiberViewTransitionComponent'; --import type {TransitionTypes} from 'react/src/ReactTransitionType'; -+import type { TransitionTypes } from 'react/src/ReactTransitionType'; - - import { - enableCreateEventHandleAPI, -@@ -60,7 +60,7 @@ import { - enableDefaultTransitionIndicator, - enableParallelTransitions, - } from 'shared/ReactFeatureFlags'; --import {resetOwnerStackLimit} from 'shared/ReactOwnerStackReset'; -+import { resetOwnerStackLimit } from 'shared/ReactOwnerStackReset'; - import ReactSharedInternals from 'shared/ReactSharedInternals'; - import is from 'shared/objectIs'; - -@@ -126,8 +126,8 @@ import { - flushHydrationEvents, - } from './ReactFiberConfig'; - --import {createWorkInProgress, resetWorkInProgress} from './ReactFiber'; --import {isRootDehydrated} from './ReactFiberShellHydration'; -+import { createWorkInProgress, resetWorkInProgress } from './ReactFiber'; -+import { isRootDehydrated } from './ReactFiberShellHydration'; - import { - getIsHydrating, - popHydrationStateOnInterruptedWork, -@@ -154,8 +154,8 @@ import { - HostHoistable, - HostSingleton, - } from './ReactWorkTags'; --import {ConcurrentRoot, LegacyRoot} from './ReactRootTags'; --import type {Flags} from './ReactFiberFlags'; -+import { ConcurrentRoot, LegacyRoot } from './ReactRootTags'; -+import type { Flags } from './ReactFiberFlags'; - import { - NoFlags, - Incomplete, -@@ -226,14 +226,14 @@ import { - lanesToEventPriority, - eventPriorityToLane, - } from './ReactEventPriorities'; --import {requestCurrentTransition} from './ReactFiberTransition'; -+import { requestCurrentTransition } from './ReactFiberTransition'; - import { - SelectiveHydrationException, - beginWork, - replayFunctionComponent, - } from './ReactFiberBeginWork'; --import {completeWork} from './ReactFiberCompleteWork'; --import {unwindWork, unwindInterruptedWork} from './ReactFiberUnwindWork'; -+import { completeWork } from './ReactFiberCompleteWork'; -+import { unwindWork, unwindInterruptedWork } from './ReactFiberUnwindWork'; - import { - throwException, - createRootErrorUpdate, -@@ -258,21 +258,21 @@ import { - invokePassiveEffectUnmountInDEV, - accumulateSuspenseyCommit, - } from './ReactFiberCommitWork'; --import {resetShouldStartViewTransition} from './ReactFiberCommitViewTransitions'; --import {shouldStartViewTransition} from './ReactFiberCommitViewTransitions'; -+import { resetShouldStartViewTransition } from './ReactFiberCommitViewTransitions'; -+import { shouldStartViewTransition } from './ReactFiberCommitViewTransitions'; - import { - insertDestinationClones, - applyDepartureTransitions, - startGestureAnimations, - } from './ReactFiberApplyGesture'; --import {enqueueUpdate} from './ReactFiberClassUpdateQueue'; --import {resetContextDependencies} from './ReactFiberNewContext'; -+import { enqueueUpdate } from './ReactFiberClassUpdateQueue'; -+import { resetContextDependencies } from './ReactFiberNewContext'; - import { - resetHooksAfterThrow, - resetHooksOnUnwind, - ContextOnlyDispatcher, - } from './ReactFiberHooks'; --import {DefaultAsyncDispatcher} from './ReactFiberAsyncDispatcher'; -+import { DefaultAsyncDispatcher } from './ReactFiberAsyncDispatcher'; - import { - createCapturedValueAtFiber, - type CapturedValue, -@@ -378,13 +378,13 @@ import { - onPostCommitRoot as onPostCommitRootDevTools, - setIsStrictModeForDevtools, - } from './ReactFiberDevToolsHook'; --import {onCommitRoot as onCommitRootTestSelector} from './ReactTestSelectors'; --import {releaseCache} from './ReactFiberCacheComponent'; -+import { onCommitRoot as onCommitRootTestSelector } from './ReactTestSelectors'; -+import { releaseCache } from './ReactFiberCacheComponent'; - import { - isLegacyActEnvironment, - isConcurrentActEnvironment, - } from './ReactFiberAct'; --import {processTransitionCallbacks} from './ReactFiberTracingMarkerComponent'; -+import { processTransitionCallbacks } from './ReactFiberTracingMarkerComponent'; - import { - SuspenseException, - SuspenseActionException, -@@ -392,25 +392,25 @@ import { - getSuspendedThenable, - isThenableResolved, - } from './ReactFiberThenable'; --import {schedulePostPaintCallback} from './ReactPostPaintCallback'; -+import { schedulePostPaintCallback } from './ReactPostPaintCallback'; - import { - getSuspenseHandler, - getShellBoundary, - } from './ReactFiberSuspenseContext'; --import {resetChildReconcilerOnUnwind} from './ReactChildFiber'; -+import { resetChildReconcilerOnUnwind } from './ReactChildFiber'; - import { - ensureRootIsScheduled, - flushSyncWorkOnAllRoots, - flushSyncWorkOnLegacyRootsOnly, - requestTransitionLane, - } from './ReactFiberRootScheduler'; --import {getMaskedContext, getUnmaskedContext} from './ReactFiberLegacyContext'; --import {logUncaughtError} from './ReactFiberErrorLogger'; -+import { getMaskedContext, getUnmaskedContext } from './ReactFiberLegacyContext'; -+import { logUncaughtError } from './ReactFiberErrorLogger'; - import { - scheduleGestureCommit, - stopCommittedGesture, - } from './ReactFiberGestureScheduler'; --import {claimQueuedTransitionTypes} from './ReactFiberTransitionTypes'; -+import { claimQueuedTransitionTypes } from './ReactFiberTransitionTypes'; - - const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - -@@ -559,7 +559,7 @@ export function addTransitionStartCallbackToPendingTransition( - - if (currentPendingTransitionCallbacks.transitionStart === null) { - currentPendingTransitionCallbacks.transitionStart = -- ([]: Array); -+ ([]: Array < Transition >); - } - - currentPendingTransitionCallbacks.transitionStart.push(transition); -@@ -693,7 +693,7 @@ export function addTransitionCompleteCallbackToPendingTransition( - - if (currentPendingTransitionCallbacks.transitionComplete === null) { - currentPendingTransitionCallbacks.transitionComplete = -- ([]: Array); -+ ([]: Array < Transition >); - } - - currentPendingTransitionCallbacks.transitionComplete.push(transition); -@@ -828,9 +828,9 @@ export function requestUpdateLane(fiber: Fiber): Lane { - if (transition.gesture) { - throw new Error( - 'Cannot setState on regular state inside a startGestureTransition. ' + -- 'Gestures can only update the useOptimistic() hook. There should be no ' + -- 'side-effects associated with starting a Gesture until its Action is ' + -- 'invoked. Move side-effects to the Action instead.', -+ 'Gestures can only update the useOptimistic() hook. There should be no ' + -+ 'side-effects associated with starting a Gesture until its Action is ' + -+ 'invoked. Move side-effects to the Action instead.', - ); - } - } -@@ -1572,7 +1572,7 @@ function completeRootWhenReady( - const maySuspendCommit = - subtreeFlags & ShouldSuspendCommit || - (subtreeFlags & BothVisibilityAndMaySuspendCommit) === -- BothVisibilityAndMaySuspendCommit; -+ BothVisibilityAndMaySuspendCommit; - let suspendedState: null | SuspendedState = null; - if (isViewTransitionEligible || maySuspendCommit || isGestureTransition) { - // Before committing, ask the renderer whether the host tree is ready. -@@ -2137,56 +2137,66 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber { - clearBlockingTimers(); - } - if (includesTransitionLane(lanes)) { -- workInProgressUpdateTask = transitionUpdateTask; -- const clampedStartTime = -- transitionStartTime >= 0 && transitionStartTime < transitionClampTime -- ? transitionClampTime -- : transitionStartTime; -- const clampedUpdateTime = -- transitionUpdateTime >= 0 && transitionUpdateTime < transitionClampTime -- ? transitionClampTime -- : transitionUpdateTime; -- const clampedEventTime = -- transitionEventTime >= 0 && transitionEventTime < transitionClampTime -- ? transitionClampTime -- : transitionEventTime; -- const clampedRenderStartTime = -- // Clamp the suspended time to the first event/update. -- clampedEventTime >= 0 -- ? clampedEventTime -- : clampedUpdateTime >= 0 -- ? clampedUpdateTime -- : renderStartTime; -- if (transitionSuspendedTime >= 0) { -- setCurrentTrackFromLanes(SomeTransitionLane); -- logSuspendedWithDelayPhase( -- transitionSuspendedTime, -- clampedRenderStartTime, -- lanes, -- workInProgressUpdateTask, -- ); -- } else if (includesTransitionLane(animatingLanes)) { -- // If this lane is still animating, log the time from previous render finishing to now as animating. -- setCurrentTrackFromLanes(SomeTransitionLane); -- logAnimatingPhase( -- transitionClampTime, -- clampedRenderStartTime, -- animatingTask, -- ); -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ const timers = getTransitionTimers(lane); -+ if (timers !== null) { -+ workInProgressUpdateTask = timers.updateTask; -+ const clampedStartTime = -+ timers.startTime >= 0 && timers.startTime < timers.clampTime -+ ? timers.clampTime -+ : timers.startTime; -+ const clampedUpdateTime = -+ timers.updateTime >= 0 && timers.updateTime < timers.clampTime -+ ? timers.clampTime -+ : timers.updateTime; -+ const clampedEventTime = -+ timers.eventTime >= 0 && timers.eventTime < timers.clampTime -+ ? timers.clampTime -+ : timers.eventTime; -+ const clampedRenderStartTime = -+ // Clamp the suspended time to the first event/update. -+ clampedEventTime >= 0 -+ ? clampedEventTime -+ : clampedUpdateTime >= 0 -+ ? clampedUpdateTime -+ : renderStartTime; -+ if (timers.suspendedTime >= 0) { -+ setCurrentTrackFromLanes(lane); -+ logSuspendedWithDelayPhase( -+ timers.suspendedTime, -+ clampedRenderStartTime, -+ lanes, -+ workInProgressUpdateTask, -+ ); -+ } else if (includesTransitionLane(animatingLanes)) { -+ // If this lane is still animating, log the time from previous render finishing to now as animating. -+ setCurrentTrackFromLanes(SomeTransitionLane); -+ logAnimatingPhase( -+ timers.clampTime, -+ clampedRenderStartTime, -+ animatingTask, -+ ); -+ } -+ logTransitionStart( -+ clampedStartTime, -+ clampedUpdateTime, -+ clampedEventTime, -+ timers.eventType, -+ timers.eventRepeatTime > 0, -+ timers.updateType === PINGED_UPDATE, -+ renderStartTime, -+ timers.updateTask, -+ timers.updateMethodName, -+ timers.updateComponentName, -+ ); -+ clearTransitionTimer(lane); -+ } -+ } -+ remainingLanes &= ~lane; - } -- logTransitionStart( -- clampedStartTime, -- clampedUpdateTime, -- clampedEventTime, -- transitionEventType, -- transitionEventRepeatTime > 0, -- transitionUpdateType === PINGED_UPDATE, -- renderStartTime, -- transitionUpdateTask, -- transitionUpdateMethodName, -- transitionUpdateComponentName, -- ); -- clearTransitionTimers(); - } - if (includesRetryLane(lanes)) { - if (includesRetryLane(animatingLanes)) { -@@ -2329,11 +2339,11 @@ function handleThrow(root: FiberRoot, thrownValue: any): void { - - workInProgressSuspendedReason = isWakeable - ? // A wakeable object was thrown by a legacy Suspense implementation. -- // This has slightly different behavior than suspending with `use`. -- SuspendedOnDeprecatedThrowPromise -+ // This has slightly different behavior than suspending with `use`. -+ SuspendedOnDeprecatedThrowPromise - : // This is a regular error. If something earlier in the component already -- // suspended, we must clear the thenable state to unblock the work loop. -- SuspendedOnError; -+ // suspended, we must clear the thenable state to unblock the work loop. -+ SuspendedOnError; - } - - workInProgressThrownValue = thrownValue; -@@ -2925,7 +2935,7 @@ function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus { - if (__DEV__) { - console.error( - 'Unexpected type of fiber triggered a suspensey commit. ' + -- 'This is a bug in React.', -+ 'This is a bug in React.', - ); - } - break; -@@ -3536,7 +3546,7 @@ function completeRoot( - finishedWork !== null && - finishedWork.alternate !== null && - (finishedWork.alternate.memoizedState: RootState).isDehydrated && -- (finishedWork.flags & ForceClientRender) !== NoFlags; -+ (finishedWork.flags & ForceClientRender) !== NoFlags; - logRecoveredRenderPhase( - completedRenderStartTime, - completedRenderEndTime, -@@ -3575,7 +3585,7 @@ function completeRoot( - if (lanes === NoLanes) { - console.error( - 'finishedLanes should not be empty during a commit. This is a ' + -- 'bug in React.', -+ 'bug in React.', - ); - } - } -@@ -3584,7 +3594,7 @@ function completeRoot( - if (finishedWork === root.current) { - throw new Error( - 'Cannot commit the same tree as before. This error is likely caused by ' + -- 'a bug in React. Please file an issue.', -+ 'a bug in React. Please file an issue.', - ); - } - -@@ -3878,7 +3888,7 @@ function commitRoot( - enableProfilerTimer ? suspendedViewTransition : (null: any), - enableProfilerTimer - ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. -- finishedViewTransition.bind(null, lanes) -+ finishedViewTransition.bind(null, lanes) - : (null: any), - ); - } else { -@@ -4437,7 +4447,7 @@ function applyGestureOnRoot( - reportViewTransitionError, - enableProfilerTimer - ? // This callback fires after "pendingEffects" so we need to snapshot the arguments. -- finishedViewTransition.bind(null, pendingEffectsLanes) -+ finishedViewTransition.bind(null, pendingEffectsLanes) - : (null: any), - ); - } -@@ -4578,8 +4588,8 @@ function makeErrorInfo(componentStack: ?string) { - get() { - console.error( - 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + -- ' This property is no longer provided as part of errorInfo but can be accessed as a property' + -- ' of the Error instance itself.', -+ ' This property is no longer provided as part of errorInfo but can be accessed as a property' + -+ ' of the Error instance itself.', - ); - }, - }); -@@ -4620,9 +4630,9 @@ export function flushPendingEffects(): boolean { - didWarnAboutInterruptedViewTransitions = true; - console.warn( - 'A flushSync update cancelled a View Transition because it was called ' + -- 'while the View Transition was still preparing. To preserve the synchronous ' + -- 'semantics, React had to skip the View Transition. If you can, try to avoid ' + -- "flushSync() in a scenario that's likely to interfere.", -+ 'while the View Transition was still preparing. To preserve the synchronous ' + -+ 'semantics, React had to skip the View Transition. If you can, try to avoid ' + -+ "flushSync() in a scenario that's likely to interfere.", - ); - } - } -@@ -4908,10 +4918,10 @@ export function captureCommitPhaseError( - if (__DEV__) { - console.error( - 'Internal React error: Attempted to capture a commit phase error ' + -- 'inside a detached tree. This indicates a bug in React. Potential ' + -- 'causes include deleting the same fiber more than once, committing an ' + -- 'already-finished tree, or an inconsistent return pointer.\n\n' + -- 'Error message:\n\n%s', -+ 'inside a detached tree. This indicates a bug in React. Potential ' + -+ 'causes include deleting the same fiber more than once, committing an ' + -+ 'already-finished tree, or an inconsistent return pointer.\n\n' + -+ 'Error message:\n\n%s', - error, - ); - } -@@ -4938,7 +4948,7 @@ export function attachPingListener( - let threadIDs; - if (pingCache === null) { - pingCache = root.pingCache = new PossiblyWeakMap(); -- threadIDs = new Set(); -+ threadIDs = new Set < mixed > (); - pingCache.set(wakeable, threadIDs); - } else { - threadIDs = pingCache.get(wakeable); -@@ -5128,7 +5138,7 @@ export function resolveRetryWakeable(boundaryFiber: Fiber, wakeable: Wakeable) { - default: - throw new Error( - 'Pinged unknown suspense boundary type. ' + -- 'This is probably a bug in React.', -+ 'This is probably a bug in React.', - ); - } - -@@ -5163,9 +5173,9 @@ export function throwIfInfiniteUpdateLoopDetected() { - - throw new Error( - 'Maximum update depth exceeded. This can happen when a component ' + -- 'repeatedly calls setState inside componentWillUpdate or ' + -- 'componentDidUpdate. React limits the number of nested updates to ' + -- 'prevent infinite loops.', -+ 'repeatedly calls setState inside componentWillUpdate or ' + -+ 'componentDidUpdate. React limits the number of nested updates to ' + -+ 'prevent infinite loops.', - ); - } - -@@ -5176,9 +5186,9 @@ export function throwIfInfiniteUpdateLoopDetected() { - - console.error( - 'Maximum update depth exceeded. This can happen when a component ' + -- "calls setState inside useEffect, but useEffect either doesn't " + -- 'have a dependency array, or one of the dependencies changes on ' + -- 'every render.', -+ "calls setState inside useEffect, but useEffect either doesn't " + -+ 'have a dependency array, or one of the dependencies changes on ' + -+ 'every render.', - ); - } - } -@@ -5389,9 +5399,9 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { - runWithFiberInDEV(fiber, () => { - console.error( - "Can't perform a React state update on a component that hasn't mounted yet. " + -- 'This indicates that you have a side-effect in your render function that ' + -- 'asynchronously tries to update the component. Move this work to ' + -- 'useEffect instead.', -+ 'This indicates that you have a side-effect in your render function that ' + -+ 'asynchronously tries to update the component. Move this work to ' + -+ 'useEffect instead.', - ); - }); - } -@@ -5400,7 +5410,7 @@ export function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber: Fiber) { - let didWarnAboutUpdateInRender = false; - let didWarnAboutUpdateInRenderForAnotherComponent; - if (__DEV__) { -- didWarnAboutUpdateInRenderForAnotherComponent = new Set(); -+ didWarnAboutUpdateInRenderForAnotherComponent = new Set < string > (); - } - - function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { -@@ -5421,8 +5431,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { - getComponentNameFromFiber(fiber) || 'Unknown'; - console.error( - 'Cannot update a component (`%s`) while rendering a ' + -- 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + -- 'follow the stack trace as described in https://react.dev/link/setstate-in-render', -+ 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + -+ 'follow the stack trace as described in https://react.dev/link/setstate-in-render', - setStateComponentName, - renderingComponentName, - renderingComponentName, -@@ -5434,8 +5444,8 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber: Fiber) { - if (!didWarnAboutUpdateInRender) { - console.error( - 'Cannot update during an existing state transition (such as ' + -- 'within `render`). Render methods should be a pure ' + -- 'function of props and state.', -+ 'within `render`). Render methods should be a pure ' + -+ 'function of props and state.', - ); - didWarnAboutUpdateInRender = true; - } -@@ -5518,15 +5528,15 @@ function warnIfUpdatesNotWrappedWithActDEV(fiber: Fiber): void { - runWithFiberInDEV(fiber, () => { - console.error( - 'An update to %s inside a test was not wrapped in act(...).\n\n' + -- 'When testing, code that causes React state updates should be ' + -- 'wrapped into act(...):\n\n' + -- 'act(() => {\n' + -- ' /* fire events that update state */\n' + -- '});\n' + -- '/* assert on the output */\n\n' + -- "This ensures that you're testing the behavior the user would see " + -- 'in the browser.' + -- ' Learn more at https://react.dev/link/wrap-tests-with-act', -+ 'When testing, code that causes React state updates should be ' + -+ 'wrapped into act(...):\n\n' + -+ 'act(() => {\n' + -+ ' /* fire events that update state */\n' + -+ '});\n' + -+ '/* assert on the output */\n\n' + -+ "This ensures that you're testing the behavior the user would see " + -+ 'in the browser.' + -+ ' Learn more at https://react.dev/link/wrap-tests-with-act', - getComponentNameFromFiber(fiber), - ); - }); -@@ -5543,16 +5553,16 @@ function warnIfSuspenseResolutionNotWrappedWithActDEV(root: FiberRoot): void { - ) { - console.error( - 'A suspended resource finished loading inside a test, but the event ' + -- 'was not wrapped in act(...).\n\n' + -- 'When testing, code that resolves suspended data should be wrapped ' + -- 'into act(...):\n\n' + -- 'act(() => {\n' + -- ' /* finish loading suspended data */\n' + -- '});\n' + -- '/* assert on the output */\n\n' + -- "This ensures that you're testing the behavior the user would see " + -- 'in the browser.' + -- ' Learn more at https://react.dev/link/wrap-tests-with-act', -+ 'was not wrapped in act(...).\n\n' + -+ 'When testing, code that resolves suspended data should be wrapped ' + -+ 'into act(...):\n\n' + -+ 'act(() => {\n' + -+ ' /* finish loading suspended data */\n' + -+ '});\n' + -+ '/* assert on the output */\n\n' + -+ "This ensures that you're testing the behavior the user would see " + -+ 'in the browser.' + -+ ' Learn more at https://react.dev/link/wrap-tests-with-act', - ); - } - } -diff --git a/packages/react-reconciler/src/ReactProfilerTimer.js b/packages/react-reconciler/src/ReactProfilerTimer.js -index 42289ea30a..77121babd3 100644 ---- a/packages/react-reconciler/src/ReactProfilerTimer.js -+++ b/packages/react-reconciler/src/ReactProfilerTimer.js -@@ -7,13 +7,13 @@ - * @flow - */ - --import type {Fiber} from './ReactInternalTypes'; -+import type { Fiber } from './ReactInternalTypes'; - --import type {SuspendedReason} from './ReactFiberWorkLoop'; -+import type { SuspendedReason } from './ReactFiberWorkLoop'; - --import type {Lane, Lanes} from './ReactFiberLane'; -+import type { Lane, Lanes } from './ReactFiberLane'; - --import type {CapturedValue} from './ReactCapturedValue'; -+import type { CapturedValue } from './ReactCapturedValue'; - - import { - isTransitionLane, -@@ -24,7 +24,7 @@ import { - NoLanes, - } from './ReactFiberLane'; - --import {resolveEventType, resolveEventTimeStamp} from './ReactFiberConfig'; -+import { resolveEventType, resolveEventTimeStamp } from './ReactFiberConfig'; - - import { - enableProfilerCommitHooks, -@@ -34,19 +34,20 @@ import { - } from 'shared/ReactFeatureFlags'; - - import getComponentNameFromFiber from './getComponentNameFromFiber'; --import {isAlreadyRendering} from './ReactFiberWorkLoop'; -+import { requestCurrentTransition } from './ReactFiberTransition'; -+import { isAlreadyRendering } from './ReactFiberWorkLoop'; - - // Intentionally not named imports because Rollup would use dynamic dispatch for - // CommonJS interop named imports. - import * as Scheduler from 'scheduler'; - --const {unstable_now: now} = Scheduler; -+const { unstable_now: now } = Scheduler; - - const createTask = - // eslint-disable-next-line react-internal/no-production-logging - __DEV__ && console.createTask - ? // eslint-disable-next-line react-internal/no-production-logging -- console.createTask -+ console.createTask - : (name: string) => null; - - export const REGULAR_UPDATE: UpdateType = 0; -@@ -89,17 +90,35 @@ export let gestureEventRepeatTime: number = -1.1; - export let gestureSuspendedTime: number = -1.1; - - // TODO: This should really be one per Transition lane. --export let transitionClampTime: number = -0; --export let transitionStartTime: number = -1.1; // First startTransition call before setState. --export let transitionUpdateTime: number = -1.1; // First transition setState scheduled. --export let transitionUpdateType: UpdateType = 0; --export let transitionUpdateTask: null | ConsoleTask = null; // First transition setState's stack trace. --export let transitionUpdateMethodName: null | string = null; // The name of the method that caused first transition update. --export let transitionUpdateComponentName: null | string = null; // The name of the component where first transition update happened. --export let transitionEventTime: number = -1.1; // Event timeStamp of the first transition. --export let transitionEventType: null | string = null; // Event type of the first transition. --export let transitionEventRepeatTime: number = -1.1; --export let transitionSuspendedTime: number = -1.1; -+export const transitionTimers: Map = new Map(); -+const pendingTransitionStartTimes: WeakMap = new WeakMap(); -+const pendingTransitionEventInfo: WeakMap< -+ Transition, -+ { -+ time: number, -+ type: null | string, -+ }, -+> = new WeakMap(); -+const pendingActionUpdateTimes: WeakMap = new WeakMap(); -+ -+export function getTransitionTimers(lane: Lane): TransitionTimers | null { -+ const timers = transitionTimers.get(lane); -+ return timers !== undefined ? timers : null; -+} -+ -+type TransitionTimers = { -+ clampTime: number, -+ startTime: number, -+ updateTime: number, -+ updateType: UpdateType, -+ updateTask: null | ConsoleTask, -+ updateMethodName: null | string, -+ updateComponentName: null | string, -+ eventTime: number, -+ eventType: null | string, -+ eventRepeatTime: number, -+ suspendedTime: number, -+}; - - export let retryClampTime: number = -0; - export let idleClampTime: number = -0; -@@ -174,24 +193,65 @@ export function startUpdateTimerByLane( - blockingEventType = newEventType; - } - } else if (isTransitionLane(lane)) { -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = createTask(method); -- transitionUpdateMethodName = method; -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ const pendingUpdateTime = -+ fiber !== null ? pendingActionUpdateTimes.get(fiber) : undefined; -+ timers.updateTime = -+ pendingUpdateTime !== undefined ? pendingUpdateTime : now(); -+ timers.updateTask = createTask(method); -+ timers.updateMethodName = method; - if (__DEV__ && fiber != null) { -- transitionUpdateComponentName = getComponentNameFromFiber(fiber); -+ timers.updateComponentName = getComponentNameFromFiber(fiber); - } -- if (transitionStartTime < 0) { -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -+ if (timers.startTime < 0) { -+ const transition = requestCurrentTransition(); -+ const pendingStartTime = -+ transition !== null -+ ? pendingTransitionStartTimes.get(transition) -+ : undefined; -+ if (pendingStartTime !== undefined) { -+ timers.startTime = pendingStartTime; -+ } -+ -+ let newEventTime = -1.1; -+ let newEventType = null; -+ const pendingEventInfo = -+ transition !== null -+ ? pendingTransitionEventInfo.get(transition) -+ : undefined; -+ if (pendingEventInfo !== undefined) { -+ newEventTime = pendingEventInfo.time; -+ newEventType = pendingEventInfo.type; -+ } else { -+ newEventTime = resolveEventTimeStamp(); -+ newEventType = resolveEventType(); -+ } -+ - if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -+ newEventTime !== timers.eventRepeatTime || -+ newEventType !== timers.eventType - ) { -- transitionEventRepeatTime = -1.1; -+ timers.eventRepeatTime = -1.1; - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ timers.eventTime = newEventTime; -+ timers.eventType = newEventType; - } - } - } -@@ -226,21 +286,18 @@ export function startHostActionTimer(fiber: Fiber): void { - blockingEventTime = newEventTime; - blockingEventType = newEventType; - } -- if (transitionUpdateTime < 0) { -- transitionUpdateTime = now(); -- transitionUpdateTask = -- __DEV__ && fiber._debugTask != null ? fiber._debugTask : null; -- if (transitionStartTime < 0) { -+ pendingActionUpdateTimes.set(fiber, now()); -+ -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); - const newEventTime = resolveEventTimeStamp(); - const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -- } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } - } - } -@@ -265,10 +322,34 @@ export function startPingTimerByLanes(lanes: Lanes): void { - blockingUpdateType = PINGED_UPDATE; - } - } else if (includesTransitionLane(lanes)) { -- if (transitionUpdateTime < 0) { -- transitionClampTime = transitionUpdateTime = now(); -- transitionUpdateTask = createTask('Promise Resolved'); -- transitionUpdateType = PINGED_UPDATE; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers === undefined) { -+ timers = { -+ clampTime: -0, -+ startTime: -1.1, -+ updateTime: -1.1, -+ updateType: 0, -+ updateTask: null, -+ updateMethodName: null, -+ updateComponentName: null, -+ eventTime: -1.1, -+ eventType: null, -+ eventRepeatTime: -1.1, -+ suspendedTime: -1.1, -+ }; -+ transitionTimers.set(lane, timers); -+ } -+ if (timers.updateTime < 0) { -+ timers.clampTime = timers.updateTime = now(); -+ timers.updateTask = createTask('Promise Resolved'); -+ timers.updateType = PINGED_UPDATE; -+ } -+ } -+ remainingLanes &= ~lane; - } - } - } -@@ -282,7 +363,17 @@ export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) { - } else if (includesBlockingLane(lanes)) { - blockingSuspendedTime = renderEndTime; - } else if (includesTransitionLane(lanes)) { -- transitionSuspendedTime = renderEndTime; -+ let remainingLanes = lanes; -+ while (remainingLanes !== NoLanes) { -+ const lane = getHighestPriorityLane(remainingLanes); -+ if (isTransitionLane(lane)) { -+ let timers = transitionTimers.get(lane); -+ if (timers !== undefined) { -+ timers.suspendedTime = renderEndTime; -+ } -+ } -+ remainingLanes &= ~lane; -+ } - } - } - -@@ -301,38 +392,38 @@ export function startAsyncTransitionTimer(): void { - if (!enableProfilerTimer || !enableComponentPerformanceTrack) { - return; - } -- if (transitionStartTime < 0 && transitionUpdateTime < 0) { -- transitionStartTime = now(); -- const newEventTime = resolveEventTimeStamp(); -- const newEventType = resolveEventType(); -- if ( -- newEventTime !== transitionEventRepeatTime || -- newEventType !== transitionEventType -- ) { -- transitionEventRepeatTime = -1.1; -+ const transition = requestCurrentTransition(); -+ if (transition !== null) { -+ if (!pendingTransitionStartTimes.has(transition)) { -+ pendingTransitionStartTimes.set(transition, now()); -+ const newEventTime = resolveEventTimeStamp(); -+ const newEventType = resolveEventType(); -+ pendingTransitionEventInfo.set(transition, { -+ time: newEventTime, -+ type: newEventType, -+ }); - } -- transitionEventTime = newEventTime; -- transitionEventType = newEventType; - } - } - - export function hasScheduledTransitionWork(): boolean { - // If we have setState on a transition or scheduled useActionState update. -- return transitionUpdateTime > -1; -+ for (const timers of transitionTimers.values()) { -+ if (timers.updateTime > -1) { -+ return true; -+ } -+ } -+ return false; - } - - export function clearAsyncTransitionTimer(): void { -- transitionStartTime = -1.1; -+ // This is a global clear. We probably shouldn't use it or it should be -+ // updated to clear pending weak maps? -+ // For now, removing the global write. - } - --export function clearTransitionTimers(): void { -- transitionStartTime = -1.1; -- transitionUpdateTime = -1.1; -- transitionUpdateType = 0; -- transitionSuspendedTime = -1.1; -- transitionEventRepeatTime = transitionEventTime; -- transitionEventTime = -1.1; -- transitionClampTime = now(); -+export function clearTransitionTimer(lane: Lane): void { -+ transitionTimers.delete(lane); - } - - export function hasScheduledGestureTransitionWork(): boolean { -@@ -386,7 +477,9 @@ export function clampTransitionTimers(finalTime: number): void { - // If we had new updates come in while we were still rendering or committing, we don't want - // those update times to create overlapping tracks in the performance timeline so we clamp - // them to the end of the commit phase. -- transitionClampTime = finalTime; -+ for (const timers of transitionTimers.values()) { -+ timers.clampTime = finalTime; -+ } - } - - export function clampRetryTimers(finalTime: number): void { diff --git a/workloop_cached_diff.txt b/workloop_cached_diff.txt deleted file mode 100644 index 2f460d167853f78e29d379485dd5fe01e72bacf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53696 zcmeI5dvjLDk;c#8TeaWejjIwV!N|s3jFZhp!8oQ08y1vMsogEdAi#ucB-w;@ydQmc z`!|nTJ#)^SIr9nu^469L-rJd(o}Ruu-P3c<|NQsv@Mw5of2-lF{XMi#2loE!;e+9Y z{eN$GZ2vzT?hpI+&7QsT-GN=n`+LLl;hFvaXn10u_Uwv%`~RN3-a5MSGyC;!`t^=o zy=VPhx7X*^`_}MRyMATAzOAwTdH5%z=Gm}o^!(jM-W@(1F52J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