forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added react native feature flags (facebook#22199)
lunaruan commented 3 days ago • This PR adds separate DevTools feature flag configurations for react-devtools-core. It also breaks the builds down into facebook specific and open source flags so we can experiment in React Native. Tested yarn build:standalone, yarn build:backend, yarn build:standalone:fb, and yarn build:backend:fb and inspected the output to make sure each package used the correct feature flags (the first two use core-oss and the latter two use fb-oss.
- Loading branch information
Showing
6 changed files
with
77 additions
and
4 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
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
30 changes: 30 additions & 0 deletions
30
packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.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,30 @@ | ||
/** | ||
* 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 | ||
*/ | ||
|
||
/************************************************************************ | ||
* This file is forked between different DevTools implementations. | ||
* It should never be imported directly! | ||
* It should always be imported from "react-devtools-feature-flags". | ||
************************************************************************/ | ||
|
||
export const enableProfilerChangedHookIndices = true; | ||
export const isInternalFacebookBuild = true; | ||
|
||
/************************************************************************ | ||
* Do not edit the code below. | ||
* It ensures this fork exports the same types as the default flags file. | ||
************************************************************************/ | ||
|
||
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; | ||
import typeof * as ExportsType from './DevToolsFeatureFlags.core-fb'; | ||
|
||
// 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<ExportsType, FeatureFlagsType>); |
30 changes: 30 additions & 0 deletions
30
packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-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,30 @@ | ||
/** | ||
* 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 | ||
*/ | ||
|
||
/************************************************************************ | ||
* This file is forked between different DevTools implementations. | ||
* It should never be imported directly! | ||
* It should always be imported from "react-devtools-feature-flags". | ||
************************************************************************/ | ||
|
||
export const enableProfilerChangedHookIndices = false; | ||
export const isInternalFacebookBuild = false; | ||
|
||
/************************************************************************ | ||
* Do not edit the code below. | ||
* It ensures this fork exports the same types as the default flags file. | ||
************************************************************************/ | ||
|
||
import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; | ||
import typeof * as ExportsType from './DevToolsFeatureFlags.core-oss'; | ||
|
||
// 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<ExportsType, FeatureFlagsType>); |