mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Disable warnings for mismatched SVC processor when enableNativeCSSParsing() (#49313)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49313 When the flag is enabled, we expect legacy native viewconfigs to add processor, where SVCs do not, and instead parse in native. Don't emit warnings in this case. Changelog: [Internal] Reviewed By: rshest Differential Revision: D69337802 fbshipit-source-id: f4c354c3b7b6ecbe4a8a72a37ea6d60dcc336b67
This commit is contained in:
1 parent
69c3c55ddb
commit
c37a2e9aa8
2 files changed
+11
-1
No files matched your search
+5
-1
@@ -8,6 +8,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes';
|
||||
|
||||
export type Difference =
|
||||
@@ -128,7 +129,10 @@ function accumulateDifferences(
|
||||
}
|
||||
}
|
||||
|
||||
if (nativeValue !== staticValue) {
|
||||
if (
|
||||
nativeValue !== staticValue &&
|
||||
!ReactNativeFeatureFlags.enableNativeCSSParsing()
|
||||
) {
|
||||
differences.push({
|
||||
path: [...path, nativeKey],
|
||||
type: 'unequal',
|
||||
|
||||
Vendored
+6
@@ -9,8 +9,14 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import * as StaticViewConfigValidator from '../StaticViewConfigValidator';
|
||||
|
||||
beforeAll(() => {
|
||||
// $FlowExpectedError[cannot-write]
|
||||
ReactNativeFeatureFlags.enableNativeCSSParsing = () => false;
|
||||
});
|
||||
|
||||
test('passes for identical configs', () => {
|
||||
const name = 'RCTView';
|
||||
const nativeViewConfig = {
|
||||
|
||||
Reference in new issue
Block a user