From f7173f143ae63d7c1efe410ea0e85523752dcbb8 Mon Sep 17 00:00:00 2001 From: kassens Date: Thu, 5 Jan 2023 20:50:52 +0000 Subject: [PATCH] Transform updates to support Flow this annotation syntax (#25918) Flow introduced a new syntax to annotated the context type of a function, this tries to update the rest and add 1 example usage. - 2b1fb91a55deb9b7b60452cb57184c2f182a42fd already added the changes required for eslint. - Jest transform is updated to use the recommended `hermes-parser` which can parse current and Flow syntax and will be updated in the future. - Rollup uses a new plugin to strip the flow types. This isn't ideal as the npm module is deprecated in favor of using `hermes-parser`, but I couldn't figure out how to integrate that with Rollup. DiffTrain build for [b83baf63f71669ca7bf222afec305b7a6fd782b7](https://github.com/facebook/react/commit/b83baf63f71669ca7bf222afec305b7a6fd782b7) [View git log for this commit](https://github.com/facebook/react/commits/b83baf63f71669ca7bf222afec305b7a6fd782b7) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 6 +- compiled/facebook-www/React-dev.modern.js | 6 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 66 +++++---- compiled/facebook-www/ReactART-dev.modern.js | 66 +++++---- .../facebook-www/ReactART-prod.classic.js | 4 +- compiled/facebook-www/ReactART-prod.modern.js | 4 +- compiled/facebook-www/ReactDOM-dev.classic.js | 140 ++++++++++-------- compiled/facebook-www/ReactDOM-dev.modern.js | 140 ++++++++++-------- .../facebook-www/ReactDOM-prod.classic.js | 20 +-- compiled/facebook-www/ReactDOM-prod.modern.js | 20 +-- .../ReactDOM-profiling.classic.js | 6 +- .../facebook-www/ReactDOM-profiling.modern.js | 6 +- .../ReactDOMServer-dev.classic.js | 31 ++-- .../facebook-www/ReactDOMServer-dev.modern.js | 31 ++-- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMServerStreaming-dev.modern.js | 29 ++-- .../ReactDOMTesting-dev.classic.js | 122 ++++++++------- .../ReactDOMTesting-dev.modern.js | 122 ++++++++------- .../ReactDOMTesting-prod.classic.js | 20 +-- .../ReactDOMTesting-prod.modern.js | 20 +-- .../ReactFlightDOMRelayClient-dev.classic.js | 13 +- .../ReactFlightDOMRelayClient-dev.modern.js | 13 +- .../ReactFlightDOMRelayServer-dev.classic.js | 76 +++++----- .../ReactFlightDOMRelayServer-dev.modern.js | 76 +++++----- .../ReactTestRenderer-dev.classic.js | 66 +++++---- .../ReactTestRenderer-dev.modern.js | 66 +++++---- .../ReactTestUtils-dev.classic.js | 11 +- .../facebook-www/ReactTestUtils-dev.modern.js | 11 +- .../facebook-www/Scheduler-dev.classic.js | 9 +- compiled/facebook-www/Scheduler-dev.modern.js | 9 +- .../facebook-www/SchedulerMock-dev.classic.js | 2 +- .../facebook-www/SchedulerMock-dev.modern.js | 2 +- .../SchedulerPostTask-dev.classic.js | 4 +- .../SchedulerPostTask-dev.modern.js | 4 +- 41 files changed, 658 insertions(+), 579 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index d7ea576d2c..a86fbccc14 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -2619886ac0f1d41c9b361d82f069f9ed682321ff +b83baf63f71669ca7bf222afec305b7a6fd782b7 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index d7ea576d2c..a86fbccc14 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -2619886ac0f1d41c9b361d82f069f9ed682321ff +b83baf63f71669ca7bf222afec305b7a6fd782b7 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 231b41278f..e3a5aa8ef4 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-2619886ac-20230105"; +var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105"; // ATTENTION // When adding new symbols to this file, @@ -1252,7 +1252,6 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { return subtreeCount; } - /** * Maps children that are typically specified as `props.children`. * @@ -1266,6 +1265,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ + function mapChildren(children, func, context) { if (children == null) { return children; @@ -1295,7 +1295,6 @@ function countChildren(children) { }); return n; } - /** * Iterates through children that are typically specified as `props.children`. * @@ -1308,6 +1307,7 @@ function countChildren(children) { * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ + function forEachChildren(children, forEachFunc, forEachContext) { mapChildren( children, diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 7f59a9fa28..0c7b0c995d 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-2619886ac-20230105"; +var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105"; // ATTENTION // When adding new symbols to this file, @@ -1252,7 +1252,6 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { return subtreeCount; } - /** * Maps children that are typically specified as `props.children`. * @@ -1266,6 +1265,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { * @param {*} context Context for mapFunction. * @return {object} Object containing the ordered map of results. */ + function mapChildren(children, func, context) { if (children == null) { return children; @@ -1295,7 +1295,6 @@ function countChildren(children) { }); return n; } - /** * Iterates through children that are typically specified as `props.children`. * @@ -1308,6 +1307,7 @@ function countChildren(children) { * @param {function(*, int)} forEachFunc * @param {*} forEachContext Context for forEachContext. */ + function forEachChildren(children, forEachFunc, forEachContext) { mapChildren( children, diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 5905bf966c..2baefd7b54 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -643,4 +643,4 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-2619886ac-20230105"; +exports.version = "18.3.0-www-classic-b83baf63f-20230105"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 15d6b6ed29..92452d1d2b 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -635,4 +635,4 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-2619886ac-20230105"; +exports.version = "18.3.0-www-modern-b83baf63f-20230105"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 9535fb80f6..1743b11ec0 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -654,7 +654,7 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-2619886ac-20230105"; +exports.version = "18.3.0-www-classic-b83baf63f-20230105"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index edd4caefe1..556d2987d0 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -646,7 +646,7 @@ exports.useSyncExternalStore = function( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-2619886ac-20230105"; +exports.version = "18.3.0-www-modern-b83baf63f-20230105"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 6a29deba91..c94c592d08 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-classic-2619886ac-20230105"; +var ReactVersion = "18.3.0-www-classic-b83baf63f-20230105"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -505,7 +505,6 @@ function getComponentNameFromFiber(fiber) { return null; } -// Don't change these values. They're used by React Dev Tools. var NoFlags = /* */ 0; @@ -968,9 +967,9 @@ var now = Scheduler.unstable_now; var ImmediatePriority = Scheduler.unstable_ImmediatePriority; var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; var NormalPriority = Scheduler.unstable_NormalPriority; -var IdlePriority = Scheduler.unstable_IdlePriority; -// this doesn't actually exist on the scheduler, but it *does* +var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does* // on scheduler/unstable_mock, which we'll need for internal testing + var unstable_yieldValue = Scheduler.unstable_yieldValue; var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue; @@ -3930,10 +3929,10 @@ function isRootDehydrated(root) { return currentState.isDehydrated; } -// TODO: Use the unified fiber stack module instead of this local one? // Intentionally not using it yet to derisk the initial implementation, because // the way we push/pop these values is a bit unusual. If there's a mistake, I'd // rather the ids be wrong than crash the whole reconciler. + var forkStack = []; var forkStackIndex = 0; var treeForkProvider = null; @@ -4121,10 +4120,10 @@ function queueHydrationError(error) { } } -// If a render is in progress, and we receive an update from a concurrent event, // we wait until the current render is over (either finished or interrupted) // before adding it to the fiber/hook queue. Push to this array so we can // access the queue, fiber, update, et al later. + var concurrentQueues = []; var concurrentQueuesIndex = 0; var concurrentlyUpdatedLanes = NoLanes; @@ -5700,12 +5699,11 @@ function resolveLazy(lazyType) { var payload = lazyType._payload; var init = lazyType._init; return init(payload); -} - -// This wrapper function exists because I expect to clone the code in each path +} // This wrapper function exists because I expect to clone the code in each path // to be able to optimize each path individually by branching early. This needs // a compiler or we can do it manually. Helpers that don't need this branching // live outside of this function. + function createChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { @@ -6829,6 +6827,7 @@ function resetChildFibers(workInProgress, lanes) { // TODO: This isn't being used yet, but it's intended to replace the // InvisibleParentContext that is currently managed by SuspenseContext. + var currentTreeHiddenStackCursor = createCursor(null); var prevRenderLanesStackCursor = createCursor(NoLanes); function pushHiddenContext(fiber, context) { @@ -6996,6 +6995,13 @@ function popSuspenseListContext(fiber) { pop(suspenseStackCursor, fiber); } +// A non-null SuspenseState means that it is blocked for one reason or another. +// - A non-null dehydrated field means it's blocked pending hydration. +// - A non-null dehydrated field can use isSuspenseInstancePending or +// isSuspenseInstanceFallback to query the reason for being dehydrated. +// - A null dehydrated field means it's blocked by something suspending and +// we're currently showing a fallback instead. + function findFirstSuspended(row) { var node = row; @@ -7119,9 +7125,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) { } } // Eager reads the version of a mutable source and stores it on the root. -var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; -// An error that is thrown (e.g. by `use`) to trigger Suspense. If we +var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we // detect this is caught by userspace, we'll log a warning in development. + var SuspenseException = new Error( "Suspense Exception: This is not a real error! It's an implementation " + "detail of `use` to interrupt the current render. You must either " + @@ -7279,9 +7285,8 @@ var didWarnAboutUseWrappedInTryCatch; { didWarnAboutMismatchedHooksForComponent = new Set(); didWarnAboutUseWrappedInTryCatch = new Set(); -} +} // These are set right before calling the component. -// These are set right before calling the component. var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from // the work-in-progress hook. @@ -9011,10 +9016,8 @@ function updateLayoutEffect(create, deps) { function imperativeHandleEffect(create, ref) { if (typeof ref === "function") { var refCallback = ref; - - var _inst = create(); - - refCallback(_inst); + var inst = create(); + refCallback(inst); return function() { refCallback(null); }; @@ -9031,9 +9034,9 @@ function imperativeHandleEffect(create, ref) { } } - var _inst2 = create(); + var _inst = create(); - refObject.current = _inst2; + refObject.current = _inst; return function() { refObject.current = null; }; @@ -11312,9 +11315,9 @@ function checkClassInstance(workInProgress, ctor, newProps) { ); } - var _state = instance.state; + var state = instance.state; - if (_state && (typeof _state !== "object" || isArray(_state))) { + if (state && (typeof state !== "object" || isArray(state))) { error("%s.state: must be set to an object or null", name); } @@ -16968,9 +16971,9 @@ var AbortControllerLocal = return listener(); }); }; - }; -// Intentionally not named imports because Rollup would + }; // Intentionally not named imports because Rollup would // use dynamic dispatch for CommonJS interop named imports. + var scheduleCallback$1 = Scheduler.unstable_scheduleCallback, NormalPriority$1 = Scheduler.unstable_NormalPriority; var CacheContext = { @@ -24118,8 +24121,9 @@ function getExecutionContext() { } // Warning, this opts-out of checking the function body. // eslint-disable-next-line no-unused-vars - // eslint-disable-next-line no-redeclare +// eslint-disable-next-line no-redeclare + function flushSync(fn) { // In legacy mode, we flush pending passive effects at the beginning of the // next event, not at the end of the previous one. @@ -25534,8 +25538,8 @@ function flushPassiveEffectsImpl() { pendingPassiveProfilerEffects = []; for (var i = 0; i < profilerEffects.length; i++) { - var _fiber = profilerEffects[i]; - commitPassiveEffectDurations(root, _fiber); + var fiber = profilerEffects[i]; + commitPassiveEffectDurations(root, fiber); } } @@ -26314,6 +26318,8 @@ function setIsRunningInsertionEffect(isRunning) { } /* eslint-disable react-internal/prod-error-codes */ +// Used by React Refresh runtime through DevTools Global Hook. + var resolveFamily = null; var failedBoundaries = null; var setRefreshHandler = function(handler) { @@ -26579,10 +26585,10 @@ function scheduleFibersWithFamiliesRecursively( } if (needsRemount || needsRender) { - var _root = enqueueConcurrentRenderForLane(fiber, SyncLane); + var root = enqueueConcurrentRenderForLane(fiber, SyncLane); - if (_root !== null) { - scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp); + if (root !== null) { + scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } @@ -27601,6 +27607,8 @@ function createFiberRoot( return root; } +// Might add PROFILE later. + var didWarnAboutNestedUpdates; { diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 950b3310e0..fd50e41b5b 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-modern-2619886ac-20230105"; +var ReactVersion = "18.3.0-www-modern-b83baf63f-20230105"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -505,7 +505,6 @@ function getComponentNameFromFiber(fiber) { return null; } -// Don't change these values. They're used by React Dev Tools. var NoFlags = /* */ 0; @@ -965,9 +964,9 @@ var now = Scheduler.unstable_now; var ImmediatePriority = Scheduler.unstable_ImmediatePriority; var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority; var NormalPriority = Scheduler.unstable_NormalPriority; -var IdlePriority = Scheduler.unstable_IdlePriority; -// this doesn't actually exist on the scheduler, but it *does* +var IdlePriority = Scheduler.unstable_IdlePriority; // this doesn't actually exist on the scheduler, but it *does* // on scheduler/unstable_mock, which we'll need for internal testing + var unstable_yieldValue = Scheduler.unstable_yieldValue; var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue; @@ -3692,10 +3691,10 @@ function isRootDehydrated(root) { return currentState.isDehydrated; } -// TODO: Use the unified fiber stack module instead of this local one? // Intentionally not using it yet to derisk the initial implementation, because // the way we push/pop these values is a bit unusual. If there's a mistake, I'd // rather the ids be wrong than crash the whole reconciler. + var forkStack = []; var forkStackIndex = 0; var treeForkProvider = null; @@ -3883,10 +3882,10 @@ function queueHydrationError(error) { } } -// If a render is in progress, and we receive an update from a concurrent event, // we wait until the current render is over (either finished or interrupted) // before adding it to the fiber/hook queue. Push to this array so we can // access the queue, fiber, update, et al later. + var concurrentQueues = []; var concurrentQueuesIndex = 0; var concurrentlyUpdatedLanes = NoLanes; @@ -5462,12 +5461,11 @@ function resolveLazy(lazyType) { var payload = lazyType._payload; var init = lazyType._init; return init(payload); -} - -// This wrapper function exists because I expect to clone the code in each path +} // This wrapper function exists because I expect to clone the code in each path // to be able to optimize each path individually by branching early. This needs // a compiler or we can do it manually. Helpers that don't need this branching // live outside of this function. + function createChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { @@ -6591,6 +6589,7 @@ function resetChildFibers(workInProgress, lanes) { // TODO: This isn't being used yet, but it's intended to replace the // InvisibleParentContext that is currently managed by SuspenseContext. + var currentTreeHiddenStackCursor = createCursor(null); var prevRenderLanesStackCursor = createCursor(NoLanes); function pushHiddenContext(fiber, context) { @@ -6758,6 +6757,13 @@ function popSuspenseListContext(fiber) { pop(suspenseStackCursor, fiber); } +// A non-null SuspenseState means that it is blocked for one reason or another. +// - A non-null dehydrated field means it's blocked pending hydration. +// - A non-null dehydrated field can use isSuspenseInstancePending or +// isSuspenseInstanceFallback to query the reason for being dehydrated. +// - A null dehydrated field means it's blocked by something suspending and +// we're currently showing a fallback instead. + function findFirstSuspended(row) { var node = row; @@ -6881,9 +6887,9 @@ function warnAboutMultipleRenderersDEV(mutableSource) { } } // Eager reads the version of a mutable source and stores it on the root. -var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; -// An error that is thrown (e.g. by `use`) to trigger Suspense. If we +var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; // An error that is thrown (e.g. by `use`) to trigger Suspense. If we // detect this is caught by userspace, we'll log a warning in development. + var SuspenseException = new Error( "Suspense Exception: This is not a real error! It's an implementation " + "detail of `use` to interrupt the current render. You must either " + @@ -7041,9 +7047,8 @@ var didWarnAboutUseWrappedInTryCatch; { didWarnAboutMismatchedHooksForComponent = new Set(); didWarnAboutUseWrappedInTryCatch = new Set(); -} +} // These are set right before calling the component. -// These are set right before calling the component. var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from // the work-in-progress hook. @@ -8773,10 +8778,8 @@ function updateLayoutEffect(create, deps) { function imperativeHandleEffect(create, ref) { if (typeof ref === "function") { var refCallback = ref; - - var _inst = create(); - - refCallback(_inst); + var inst = create(); + refCallback(inst); return function() { refCallback(null); }; @@ -8793,9 +8796,9 @@ function imperativeHandleEffect(create, ref) { } } - var _inst2 = create(); + var _inst = create(); - refObject.current = _inst2; + refObject.current = _inst; return function() { refObject.current = null; }; @@ -11066,9 +11069,9 @@ function checkClassInstance(workInProgress, ctor, newProps) { ); } - var _state = instance.state; + var state = instance.state; - if (_state && (typeof _state !== "object" || isArray(_state))) { + if (state && (typeof state !== "object" || isArray(state))) { error("%s.state: must be set to an object or null", name); } @@ -16676,9 +16679,9 @@ var AbortControllerLocal = return listener(); }); }; - }; -// Intentionally not named imports because Rollup would + }; // Intentionally not named imports because Rollup would // use dynamic dispatch for CommonJS interop named imports. + var scheduleCallback$1 = Scheduler.unstable_scheduleCallback, NormalPriority$1 = Scheduler.unstable_NormalPriority; var CacheContext = { @@ -23807,8 +23810,9 @@ function getExecutionContext() { } // Warning, this opts-out of checking the function body. // eslint-disable-next-line no-unused-vars - // eslint-disable-next-line no-redeclare +// eslint-disable-next-line no-redeclare + function flushSync(fn) { // In legacy mode, we flush pending passive effects at the beginning of the // next event, not at the end of the previous one. @@ -25223,8 +25227,8 @@ function flushPassiveEffectsImpl() { pendingPassiveProfilerEffects = []; for (var i = 0; i < profilerEffects.length; i++) { - var _fiber = profilerEffects[i]; - commitPassiveEffectDurations(root, _fiber); + var fiber = profilerEffects[i]; + commitPassiveEffectDurations(root, fiber); } } @@ -26003,6 +26007,8 @@ function setIsRunningInsertionEffect(isRunning) { } /* eslint-disable react-internal/prod-error-codes */ +// Used by React Refresh runtime through DevTools Global Hook. + var resolveFamily = null; var failedBoundaries = null; var setRefreshHandler = function(handler) { @@ -26268,10 +26274,10 @@ function scheduleFibersWithFamiliesRecursively( } if (needsRemount || needsRender) { - var _root = enqueueConcurrentRenderForLane(fiber, SyncLane); + var root = enqueueConcurrentRenderForLane(fiber, SyncLane); - if (_root !== null) { - scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp); + if (root !== null) { + scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); } } @@ -27290,6 +27296,8 @@ function createFiberRoot( return root; } +// Might add PROFILE later. + var didWarnAboutNestedUpdates; { diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 0dfb02bf1c..f1c60bb5f8 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -9796,7 +9796,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-classic-2619886ac-20230105", + version: "18.3.0-www-classic-b83baf63f-20230105", rendererPackageName: "react-art" }; var internals$jscomp$inline_1319 = { @@ -9827,7 +9827,7 @@ var internals$jscomp$inline_1319 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-2619886ac-20230105" + reconcilerVersion: "18.3.0-next-b83baf63f-20230105" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1320 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index cf90afb42b..2a8db12866 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -9463,7 +9463,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-modern-2619886ac-20230105", + version: "18.3.0-www-modern-b83baf63f-20230105", rendererPackageName: "react-art" }; var internals$jscomp$inline_1310 = { @@ -9494,7 +9494,7 @@ var internals$jscomp$inline_1310 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-2619886ac-20230105" + reconcilerVersion: "18.3.0-next-b83baf63f-20230105" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1311 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 2aa3f312ca..2889af34a3 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -466,7 +466,6 @@ function getComponentNameFromFiber(fiber) { return null; } -// Don't change these values. They're used by React Dev Tools. var NoFlags = /* */ 0; @@ -1016,9 +1015,8 @@ function registerDirectEvent(registrationName, dependencies) { registrationNameDependencies[registrationName] = dependencies; { - var _lowerCasedName = registrationName.toLowerCase(); - - possibleRegistrationNames[_lowerCasedName] = registrationName; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; if (registrationName === "onDoubleClick") { possibleRegistrationNames.ondblclick = registrationName; @@ -1228,8 +1226,8 @@ function checkFormFieldValueStringCoercion(value) { } } -// A reserved attribute. // It is handled by React separately and shouldn't be written to the DOM. + var RESERVED = 0; // A simple string attribute. // Attributes that aren't in the filter are presumed to have this type. @@ -1254,8 +1252,8 @@ var NUMERIC = 5; // An attribute that must be positive numeric or parse as a pos // When falsy, it should be removed. var POSITIVE_NUMERIC = 6; - /* eslint-disable max-len */ + var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; /* eslint-enable max-len */ @@ -1845,6 +1843,7 @@ function sanitizeURL(url) { * The "expected" argument is used as a hint of what the expected value is. * Some properties have multiple equivalent values. */ + function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { @@ -2489,9 +2488,9 @@ function setIsRendering(rendering) { } } -// Flow does not allow string concatenation of most non-string types. To work // around this limitation, we use an opaque type that can only be obtained by // passing the value through getToStringValue first. + function toString(value) { // The coercion safety check is performed in getToStringValue(). // eslint-disable-next-line react-internal/safe-string-coercion @@ -3350,7 +3349,6 @@ function restoreControlledState$1(element, props) { } var didWarnValDefaultVal = false; - /** * Implements a