From 70b01d0ea8b217eb9b3a1293e5d221bfb09aec33 Mon Sep 17 00:00:00 2001 From: noahlemen Date: Wed, 5 Jul 2023 21:28:29 +0000 Subject: [PATCH] Cleanup unused unstable_startTransition, unstable_useTransition, unstable_useDeferredValue exports from fb packages (#27056) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary came across these TODOs – an internal grep indicated that remaining callsites have been cleaned up, so these can now be removed. ## How did you test this change? ``` yarn flow dom-browser yarn test ``` DiffTrain build for commit https://github.com/facebook/react/commit/e91142dd69b0454e0d4e934c55dd541344fe32ca. --- .../cjs/ReactTestRenderer-dev.js | 2 +- .../cjs/ReactTestRenderer-prod.js | 4 +- .../cjs/ReactTestRenderer-profiling.js | 4 +- .../RKJSModules/vendor/react/cjs/React-dev.js | 7 +-- .../vendor/react/cjs/React-prod.js | 48 ++++++++----------- .../vendor/react/cjs/React-profiling.js | 48 ++++++++----------- .../Libraries/Renderer/REVISION | 2 +- 7 files changed, 50 insertions(+), 65 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index a86c612784..a4a626a5d2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -23982,7 +23982,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-canary-7118f5dd7-20230705"; +var ReactVersion = "18.3.0-canary-e91142dd6-20230705"; // Might add PROFILE later. diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index 4dd1930ebc..bfcdf307e4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -8630,7 +8630,7 @@ var devToolsConfig$jscomp$inline_1032 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-7118f5dd7-20230705", + version: "18.3.0-canary-e91142dd6-20230705", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1231 = { @@ -8661,7 +8661,7 @@ var internals$jscomp$inline_1231 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-7118f5dd7-20230705" + reconcilerVersion: "18.3.0-canary-e91142dd6-20230705" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1232 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index dac73f40d1..ee310f7ab5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -9056,7 +9056,7 @@ var devToolsConfig$jscomp$inline_1074 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-canary-7118f5dd7-20230705", + version: "18.3.0-canary-e91142dd6-20230705", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1272 = { @@ -9087,7 +9087,7 @@ var internals$jscomp$inline_1272 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-canary-7118f5dd7-20230705" + reconcilerVersion: "18.3.0-canary-e91142dd6-20230705" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1273 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index e04caf61e9..bf0c02a126 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<85cf0b54e8f0b417c4ef6e8f35c5a677>> + * @generated SignedSource<> */ 'use strict'; @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-canary-7118f5dd7-20230705"; +var ReactVersion = "18.3.0-canary-e91142dd6-20230705"; // ATTENTION // When adding new symbols to this file, @@ -3928,11 +3928,8 @@ exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE; exports.unstable_act = act; exports.unstable_getCacheForType = getCacheForType; exports.unstable_getCacheSignal = getCacheSignal; -exports.unstable_startTransition = startTransition; exports.unstable_useCacheRefresh = useCacheRefresh; -exports.unstable_useDeferredValue = useDeferredValue; exports.unstable_useMemoCache = useMemoCache; -exports.unstable_useTransition = useTransition; exports.use = use; exports.useCallback = useCallback; exports.useContext = useContext; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index d99cbea239..c9c71bc4a9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<53c40bb7dda9ed688253fda038bc98ac>> + * @generated SignedSource<> */ "use strict"; @@ -280,14 +280,8 @@ function createCacheRoot() { function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } -var ReactCurrentDispatcher = { current: null }; -function useTransition() { - return ReactCurrentDispatcher.current.useTransition(); -} -function useDeferredValue(value) { - return ReactCurrentDispatcher.current.useDeferredValue(value); -} -var ReactCurrentBatchConfig = { transition: null }, +var ReactCurrentDispatcher = { current: null }, + ReactCurrentBatchConfig = { transition: null }, ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentCache: ReactCurrentCache, @@ -295,17 +289,8 @@ var ReactCurrentBatchConfig = { transition: null }, ReactCurrentOwner: ReactCurrentOwner$1, ContextRegistry: {} }, - ContextRegistry = ReactSharedInternals.ContextRegistry; -function startTransition(scope) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = {}; - try { - scope(); - } finally { - ReactCurrentBatchConfig.transition = prevTransition; - } -} -var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, + ContextRegistry = ReactSharedInternals.ContextRegistry, + ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 }; function jsx$1(type, config, maybeKey) { var propName, @@ -537,7 +522,15 @@ exports.memo = function (type, compare) { compare: void 0 === compare ? null : compare }; }; -exports.startTransition = startTransition; +exports.startTransition = function (scope) { + var prevTransition = ReactCurrentBatchConfig.transition; + ReactCurrentBatchConfig.transition = {}; + try { + scope(); + } finally { + ReactCurrentBatchConfig.transition = prevTransition; + } +}; exports.unstable_Cache = REACT_CACHE_TYPE; exports.unstable_DebugTracingMode = REACT_DEBUG_TRACING_MODE_TYPE; exports.unstable_LegacyHidden = REACT_LEGACY_HIDDEN_TYPE; @@ -564,15 +557,12 @@ exports.unstable_getCacheSignal = function () { ), dispatcher.signal); }; -exports.unstable_startTransition = startTransition; exports.unstable_useCacheRefresh = function () { return ReactCurrentDispatcher.current.useCacheRefresh(); }; -exports.unstable_useDeferredValue = useDeferredValue; exports.unstable_useMemoCache = function (size) { return ReactCurrentDispatcher.current.useMemoCache(size); }; -exports.unstable_useTransition = useTransition; exports.use = function (usable) { return ReactCurrentDispatcher.current.use(usable); }; @@ -583,7 +573,9 @@ exports.useContext = function (Context) { return ReactCurrentDispatcher.current.useContext(Context); }; exports.useDebugValue = function () {}; -exports.useDeferredValue = useDeferredValue; +exports.useDeferredValue = function (value) { + return ReactCurrentDispatcher.current.useDeferredValue(value); +}; exports.useEffect = function (create, deps) { return ReactCurrentDispatcher.current.useEffect(create, deps); }; @@ -622,5 +614,7 @@ exports.useSyncExternalStore = function ( getServerSnapshot ); }; -exports.useTransition = useTransition; -exports.version = "18.3.0-canary-7118f5dd7-20230705"; +exports.useTransition = function () { + return ReactCurrentDispatcher.current.useTransition(); +}; +exports.version = "18.3.0-canary-e91142dd6-20230705"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index 7bb37e834f..293f78b5a9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<23eeabb4d0c92eafb27fe3cdffcaf299>> + * @generated SignedSource<<70baf3b541539dca5899f9c542f152f7>> */ @@ -258,14 +258,8 @@ function createCacheRoot() { function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } -var ReactCurrentDispatcher = { current: null }; -function useTransition() { - return ReactCurrentDispatcher.current.useTransition(); -} -function useDeferredValue(value) { - return ReactCurrentDispatcher.current.useDeferredValue(value); -} -var ReactCurrentBatchConfig = { transition: null }, +var ReactCurrentDispatcher = { current: null }, + ReactCurrentBatchConfig = { transition: null }, ReactSharedInternals = { ReactCurrentDispatcher: ReactCurrentDispatcher, ReactCurrentCache: ReactCurrentCache, @@ -273,17 +267,8 @@ var ReactCurrentBatchConfig = { transition: null }, ReactCurrentOwner: ReactCurrentOwner$1, ContextRegistry: {} }, - ContextRegistry = ReactSharedInternals.ContextRegistry; -function startTransition(scope) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = {}; - try { - scope(); - } finally { - ReactCurrentBatchConfig.transition = prevTransition; - } -} -var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, + ContextRegistry = ReactSharedInternals.ContextRegistry, + ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 }; function jsx$1(type, config, maybeKey) { var propName, @@ -541,7 +526,15 @@ exports.memo = function (type, compare) { compare: void 0 === compare ? null : compare }; }; -exports.startTransition = startTransition; +exports.startTransition = function (scope) { + var prevTransition = ReactCurrentBatchConfig.transition; + ReactCurrentBatchConfig.transition = {}; + try { + scope(); + } finally { + ReactCurrentBatchConfig.transition = prevTransition; + } +}; exports.unstable_Cache = REACT_CACHE_TYPE; exports.unstable_DebugTracingMode = REACT_DEBUG_TRACING_MODE_TYPE; exports.unstable_LegacyHidden = REACT_LEGACY_HIDDEN_TYPE; @@ -567,15 +560,12 @@ exports.unstable_getCacheSignal = function () { ), dispatcher.signal); }; -exports.unstable_startTransition = startTransition; exports.unstable_useCacheRefresh = function () { return ReactCurrentDispatcher.current.useCacheRefresh(); }; -exports.unstable_useDeferredValue = useDeferredValue; exports.unstable_useMemoCache = function (size) { return ReactCurrentDispatcher.current.useMemoCache(size); }; -exports.unstable_useTransition = useTransition; exports.use = function (usable) { return ReactCurrentDispatcher.current.use(usable); }; @@ -586,7 +576,9 @@ exports.useContext = function (Context) { return ReactCurrentDispatcher.current.useContext(Context); }; exports.useDebugValue = function () {}; -exports.useDeferredValue = useDeferredValue; +exports.useDeferredValue = function (value) { + return ReactCurrentDispatcher.current.useDeferredValue(value); +}; exports.useEffect = function (create, deps) { return ReactCurrentDispatcher.current.useEffect(create, deps); }; @@ -625,8 +617,10 @@ exports.useSyncExternalStore = function ( getServerSnapshot ); }; -exports.useTransition = useTransition; -exports.version = "18.3.0-canary-7118f5dd7-20230705"; +exports.useTransition = function () { + return ReactCurrentDispatcher.current.useTransition(); +}; +exports.version = "18.3.0-canary-e91142dd6-20230705"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 1a2009d3cf..8f743e3b57 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -7118f5dd7bf5f1c44d0d2944ef8ad58e423909ad +e91142dd69b0454e0d4e934c55dd541344fe32ca