From 982cc89a080921a5c1edebd04ef1fcee75eb1a74 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Fri, 14 Dec 2018 07:54:46 -0800 Subject: [PATCH] Removed Fabric-specific feature flag files and updated Rollup to use the (non-Fabric) React Native flag files. (#14437) --- .../__tests__/ReactFabric-test.internal.js | 2 +- .../ReactFabricAndNative-test.internal.js | 2 +- .../ReactFeatureFlags.native-fabric-fb.js | 38 ------------------- .../ReactFeatureFlags.native-fabric-oss.js | 38 ------------------- scripts/rollup/forks.js | 4 +- 5 files changed, 4 insertions(+), 80 deletions(-) delete mode 100644 packages/shared/forks/ReactFeatureFlags.native-fabric-fb.js delete mode 100644 packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js diff --git a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js index 8281020d4884a..536bb128e0f65 100644 --- a/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js @@ -18,7 +18,7 @@ let FabricUIManager; let StrictMode; jest.mock('shared/ReactFeatureFlags', () => - require('shared/forks/ReactFeatureFlags.native-fabric-oss'), + require('shared/forks/ReactFeatureFlags.native-oss'), ); describe('ReactFabric', () => { diff --git a/packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js b/packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js index b2d67765ddb5a..6381235257e2a 100644 --- a/packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js +++ b/packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js @@ -21,7 +21,7 @@ describe('ReactFabric', () => { ReactNative = require('react-native-renderer'); jest.resetModules(); jest.mock('shared/ReactFeatureFlags', () => - require('shared/forks/ReactFeatureFlags.native-fabric-oss'), + require('shared/forks/ReactFeatureFlags.native-oss'), ); React = require('react'); diff --git a/packages/shared/forks/ReactFeatureFlags.native-fabric-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fabric-fb.js deleted file mode 100644 index b049c09112368..0000000000000 --- a/packages/shared/forks/ReactFeatureFlags.native-fabric-fb.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its 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 invariant from 'shared/invariant'; - -import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; -import typeof * as FabricFeatureFlagsType from './ReactFeatureFlags.native-fabric-fb'; - -export const debugRenderPhaseSideEffects = false; -export const debugRenderPhaseSideEffectsForStrictMode = false; -export const enableUserTimingAPI = __DEV__; -export const enableHooks = true; -export const warnAboutDeprecatedLifecycles = false; -export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; -export const enableProfilerTimer = __PROFILE__; -export const enableSchedulerTracing = __PROFILE__; -export const enableSuspenseServerRenderer = false; -export const disableInputAttributeSyncing = false; -export const enableStableConcurrentModeAPIs = false; -export const warnAboutShorthandPropertyCollision = false; -export const enableSchedulerDebugging = false; - -// Only used in www builds. -export function addUserTimingListener() { - invariant(false, 'Not implemented.'); -} - -// Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); diff --git a/packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js b/packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js deleted file mode 100644 index ac9f5e1b93258..0000000000000 --- a/packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its 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 invariant from 'shared/invariant'; - -import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; -import typeof * as FabricFeatureFlagsType from './ReactFeatureFlags.native-fabric-oss'; - -export const debugRenderPhaseSideEffects = false; -export const debugRenderPhaseSideEffectsForStrictMode = false; -export const enableUserTimingAPI = __DEV__; -export const enableHooks = false; -export const warnAboutDeprecatedLifecycles = false; -export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; -export const enableProfilerTimer = __PROFILE__; -export const enableSchedulerTracing = __PROFILE__; -export const enableSuspenseServerRenderer = false; -export const disableInputAttributeSyncing = false; -export const enableStableConcurrentModeAPIs = false; -export const warnAboutShorthandPropertyCollision = false; -export const enableSchedulerDebugging = false; - -// Only used in www builds. -export function addUserTimingListener() { - invariant(false, 'Not implemented.'); -} - -// Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index a6fa873078eb4..5ea01f96a9c49 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -88,11 +88,11 @@ const forks = Object.freeze({ case RN_FB_DEV: case RN_FB_PROD: case RN_FB_PROFILING: - return 'shared/forks/ReactFeatureFlags.native-fabric-fb.js'; + return 'shared/forks/ReactFeatureFlags.native-fb.js'; case RN_OSS_DEV: case RN_OSS_PROD: case RN_OSS_PROFILING: - return 'shared/forks/ReactFeatureFlags.native-fabric-oss.js'; + return 'shared/forks/ReactFeatureFlags.native-oss.js'; default: throw Error( `Unexpected entry (${entry}) and bundleType (${bundleType})`