forked from facebook/react
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fork React Native renderer into FB and OSS bundles (facebook#12625)
* Added new "native-fb" and "native-fabric-fb" bundles. * Split RN_DEV and RN_PROD bundle types into RN_OSS_DEV, RN_OSS_PROD, RN_FB_DEV, and RN_FB_PROD. (This is a bit redundant but it seemed the least intrusive way of supporting a forked feature flags file for these bundles.) * Renamed FB_DEV and FB_PROD bundle types to be more explicitly for www (FB_WWW_DEV and FB_WWW_PROD) * Removed Haste @providesModule headers from the RB-specific RN renderer bundles to avoid a duplicate name conflicts. * Remove dynamic values from OSS RN feature flags. (Leave them in FB RN feature flags.) * Updated the sync script(s) to account for new renderer type. * Move ReactFeatureFlags.js shim to FB bundle only (since OSS bundle no longer needs dynamic values).
- Loading branch information
Showing
14 changed files
with
349 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/shared/forks/ReactFeatureFlags.native-fabric-oss.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* 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 'fbjs/lib/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 enableGetDerivedStateFromCatch = false; | ||
export const warnAboutDeprecatedLifecycles = false; | ||
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; | ||
|
||
// React Fabric uses persistent reconciler. | ||
export const enableMutatingReconciler = false; | ||
export const enableNoopReconciler = false; | ||
export const enablePersistentReconciler = true; | ||
export const alwaysUseRequestIdleCallbackPolyfill = 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<FabricFeatureFlagsType, FeatureFlagsType>); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
* | ||
* 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 'fbjs/lib/invariant'; | ||
|
||
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags'; | ||
import typeof * as FeatureFlagsShimType from './ReactFeatureFlags.native-oss'; | ||
|
||
export const alwaysUseRequestIdleCallbackPolyfill = false; | ||
export const debugRenderPhaseSideEffects = false; | ||
export const debugRenderPhaseSideEffectsForStrictMode = false; | ||
export const enableGetDerivedStateFromCatch = false; | ||
export const enableMutatingReconciler = true; | ||
export const enableNoopReconciler = false; | ||
export const enablePersistentReconciler = false; | ||
export const enableUserTimingAPI = __DEV__; | ||
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; | ||
export const warnAboutDeprecatedLifecycles = 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<FeatureFlagsShimType, FeatureFlagsType>); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.