From fa440a7eb71920b439911fc8b48f964d4e7ab882 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 13 Mar 2023 18:34:05 -0400 Subject: [PATCH] Remove FeatureFlags fork for `react-dom/unstable_testing` This doesn't need its own set of flags. We use things like __PROFILE__ to fork for the `react-dom/profiling` build so we can do the same here if needed but I don't think we actually need to fork this anywhere as far as I can tell. --- .../shared/forks/ReactFeatureFlags.testing.js | 78 ------------------ .../forks/ReactFeatureFlags.testing.www.js | 79 ------------------- scripts/rollup/forks.js | 8 -- 3 files changed, 165 deletions(-) delete mode 100644 packages/shared/forks/ReactFeatureFlags.testing.js delete mode 100644 packages/shared/forks/ReactFeatureFlags.testing.www.js diff --git a/packages/shared/forks/ReactFeatureFlags.testing.js b/packages/shared/forks/ReactFeatureFlags.testing.js deleted file mode 100644 index ee17c5053ef86..0000000000000 --- a/packages/shared/forks/ReactFeatureFlags.testing.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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. - * - * @flow - */ - -import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; -import typeof * as ExportsType from './ReactFeatureFlags.testing'; - -export const debugRenderPhaseSideEffectsForStrictMode = false; -export const enableDebugTracing = false; -export const enableSchedulingProfiler = __PROFILE__; -export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false; -export const enableProfilerTimer = __PROFILE__; -export const enableProfilerCommitHooks = __PROFILE__; -export const enableProfilerNestedUpdatePhase = __PROFILE__; -export const enableProfilerNestedUpdateScheduledHook = false; -export const enableUpdaterTracking = false; -export const enableCache = __EXPERIMENTAL__; -export const enableLegacyCache = __EXPERIMENTAL__; -export const enableCacheElement = __EXPERIMENTAL__; -export const enableFetchInstrumentation = __EXPERIMENTAL__; -export const disableJavaScriptURLs = false; -export const disableCommentsAsDOMContainers = true; -export const disableInputAttributeSyncing = false; -export const enableSchedulerDebugging = false; -export const enableScopeAPI = false; -export const enableCreateEventHandleAPI = false; -export const enableSuspenseCallback = false; -export const disableLegacyContext = false; -export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; -export const enableTrustedTypesIntegration = false; -export const disableTextareaChildren = false; -export const disableModulePatternComponents = false; -export const enableSuspenseAvoidThisFallback = false; -export const enableSuspenseAvoidThisFallbackFizz = false; -export const enableCPUSuspense = false; -export const enableUseHook = true; -export const enableUseMemoCacheHook = false; -export const enableUseEffectEventHook = false; -export const enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay = - true; -export const enableClientRenderFallbackOnTextMismatch = true; -export const enableComponentStackLocations = true; -export const enableLegacyFBSupport = false; -export const enableFilterEmptyStringAttributesDOM = false; -export const disableNativeComponentFrames = false; -export const skipUnmountedBoundaries = false; -export const enableGetInspectorDataForInstanceInProduction = false; -export const deferRenderPhaseUpdateToNextBatch = false; - -export const createRootStrictEffectsByDefault = false; -export const enableUseRefAccessWarning = false; - -export const disableSchedulerTimeoutInWorkLoop = false; -export const enableLazyContextPropagation = false; -export const enableLegacyHidden = false; -export const enableUnifiedSyncLane = __EXPERIMENTAL__; -export const allowConcurrentByDefault = false; -export const enableCustomElementPropertySupport = false; - -export const consoleManagedByDevToolsDuringStrictMode = false; -export const enableServerContext = true; -export const enableUseMutableSource = false; - -export const enableTransitionTracing = false; - -export const enableFloat = true; -export const enableHostSingletons = true; - -export const useModernStrictMode = false; -export const enableFizzExternalRuntime = false; - -// Flow magic to verify the exports of this file match the original version. -((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.testing.www.js b/packages/shared/forks/ReactFeatureFlags.testing.www.js deleted file mode 100644 index 9cbb2929c1a81..0000000000000 --- a/packages/shared/forks/ReactFeatureFlags.testing.www.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * 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. - * - * @flow - */ - -import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; -import typeof * as ExportsType from './ReactFeatureFlags.testing.www'; - -export const debugRenderPhaseSideEffectsForStrictMode = false; -export const enableDebugTracing = false; -export const enableSchedulingProfiler = false; -export const replayFailedUnitOfWorkWithInvokeGuardedCallback = false; -export const enableProfilerTimer = false; -export const enableProfilerCommitHooks = false; -export const enableProfilerNestedUpdatePhase = false; -export const enableProfilerNestedUpdateScheduledHook = false; -export const enableUpdaterTracking = false; -export const enableCache = true; -export const enableLegacyCache = true; -export const enableCacheElement = true; -export const enableFetchInstrumentation = false; -export const disableJavaScriptURLs = true; -export const disableCommentsAsDOMContainers = true; -export const disableInputAttributeSyncing = false; -export const enableSchedulerDebugging = false; -export const enableScopeAPI = true; -export const enableCreateEventHandleAPI = true; -export const enableSuspenseCallback = true; -export const disableLegacyContext = __EXPERIMENTAL__; -export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; -export const enableTrustedTypesIntegration = false; -export const disableTextareaChildren = __EXPERIMENTAL__; -export const disableModulePatternComponents = true; -export const enableSuspenseAvoidThisFallback = true; -export const enableSuspenseAvoidThisFallbackFizz = false; -export const enableCPUSuspense = true; -export const enableUseHook = true; -export const enableUseMemoCacheHook = false; -export const enableUseEffectEventHook = false; -export const enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay = - true; -export const enableClientRenderFallbackOnTextMismatch = true; -export const enableComponentStackLocations = true; -export const enableLegacyFBSupport = !__EXPERIMENTAL__; -export const enableFilterEmptyStringAttributesDOM = false; -export const disableNativeComponentFrames = false; -export const skipUnmountedBoundaries = true; -export const enableGetInspectorDataForInstanceInProduction = false; -export const deferRenderPhaseUpdateToNextBatch = false; - -export const createRootStrictEffectsByDefault = false; -export const enableUseRefAccessWarning = false; - -export const disableSchedulerTimeoutInWorkLoop = false; -export const enableLazyContextPropagation = false; -export const enableLegacyHidden = false; -export const enableUnifiedSyncLane = __EXPERIMENTAL__; -export const allowConcurrentByDefault = true; -export const enableCustomElementPropertySupport = false; - -export const consoleManagedByDevToolsDuringStrictMode = false; -export const enableServerContext = true; -// Some www surfaces are still using this. Remove once they have been migrated. -export const enableUseMutableSource = true; - -export const enableTransitionTracing = false; - -export const enableFloat = true; -export const enableHostSingletons = true; - -export const useModernStrictMode = false; -export const enableFizzExternalRuntime = false; - -// Flow magic to verify the exports of this file match the original version. -((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index 93833be1467b4..21217ec50a377 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -135,14 +135,6 @@ const forks = Object.freeze({ return './packages/shared/forks/ReactFeatureFlags.test-renderer.www.js'; } return './packages/shared/forks/ReactFeatureFlags.test-renderer.js'; - case 'react-dom/unstable_testing': - switch (bundleType) { - case FB_WWW_DEV: - case FB_WWW_PROD: - case FB_WWW_PROFILING: - return './packages/shared/forks/ReactFeatureFlags.testing.www.js'; - } - return './packages/shared/forks/ReactFeatureFlags.testing.js'; default: switch (bundleType) { case FB_WWW_DEV: