Migrate all feature flags to pragmas (#48098)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48098

Changelog: [internal]

TSIA. No more manual feature flag overrides in Fantom tests :D

Reviewed By: sammy-SC

Differential Revision: D66760120

fbshipit-source-id: a0493d6ca57f4fdad33a0667e3af99ed0f0b66ca
This commit is contained in:
Rubén Norte
2024-12-05 17:06:11 -08:00
committed by Facebook GitHub Bot
parent be9b076087
commit 7a81fd7a8a
7 changed files with 4 additions and 51 deletions
@@ -7,6 +7,7 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags enableAccessToHostTreeInFabric:false
*/
import setUpReactFabricPublicInstanceFantomTests from './setUpReactFabricPublicInstanceFantomTests';
@@ -7,9 +7,9 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags enableAccessToHostTreeInFabric:true
*/
import './setUpFeatureFlags';
import setUpReactFabricPublicInstanceFantomTests from './setUpReactFabricPublicInstanceFantomTests';
setUpReactFabricPublicInstanceFantomTests({isModern: true});
@@ -1,16 +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 strict-local
* @format
* @oncall react_native
*/
import * as ReactNativeFeatureFlags from '../../../../src/private/featureflags/ReactNativeFeatureFlags';
ReactNativeFeatureFlags.override({
enableAccessToHostTreeInFabric: () => true,
});
@@ -7,6 +7,7 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags enableAccessToHostTreeInFabric:true
*/
/* eslint-disable lint/sort-imports */
@@ -19,7 +20,6 @@ import ReactNativeElement from '../../dom/nodes/ReactNativeElement';
import IntersectionObserverEntry from '../IntersectionObserverEntry';
import * as React from 'react';
import './setUpFeatureFlags';
import '../../../../../Libraries/Core/InitializeCore.js';
import ScrollView from '../../../../../Libraries/Components/ScrollView/ScrollView';
@@ -1,16 +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 strict-local
* @format
* @oncall react_native
*/
import * as ReactNativeFeatureFlags from '../../../featureflags/ReactNativeFeatureFlags';
ReactNativeFeatureFlags.override({
enableAccessToHostTreeInFabric: () => true,
});
@@ -7,6 +7,7 @@
* @flow strict-local
* @format
* @oncall react_native
* @fantom_flags enableAccessToHostTreeInFabric:true
*/
import type MutationObserverType from '../MutationObserver';
@@ -18,7 +19,6 @@ import ReactNativeElement from '../../dom/nodes/ReactNativeElement';
import nullthrows from 'nullthrows';
import * as React from 'react';
import './setUpFeatureFlags';
import '../../../../../Libraries/Core/InitializeCore.js';
declare const MutationObserver: Class<MutationObserverType>;
@@ -1,16 +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 strict-local
* @format
* @oncall react_native
*/
import * as ReactNativeFeatureFlags from '../../../featureflags/ReactNativeFeatureFlags';
ReactNativeFeatureFlags.override({
enableAccessToHostTreeInFabric: () => true,
});