diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap index 74f0e533357b01..e989a3b2ecabf1 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateComponentDescriptorH-test.js.snap @@ -17,13 +17,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -45,13 +43,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using BooleanPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -73,13 +69,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ColorPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -101,13 +95,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using DimensionPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -129,13 +121,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EdgeInsetsPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -157,13 +147,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EnumPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -185,13 +173,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EventNestedObjectPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -213,13 +199,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EventPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -241,13 +225,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using FloatPropsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -269,13 +251,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ImagePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -297,13 +277,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using IntegerPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -325,13 +303,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -353,13 +329,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using MixedPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -381,13 +355,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using MultiNativePropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -409,13 +381,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using NoPropsNoEventsNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -437,13 +407,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ObjectPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -465,13 +433,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using PointPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -493,13 +459,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using StringPropNativeComponentViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap index 433dcad81d4097..bccda779f83e92 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterCpp-test.js.snap @@ -15,11 +15,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,11 +37,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -63,11 +59,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -87,11 +81,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -111,11 +103,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -135,11 +125,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -159,8 +147,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventNestedObjectPropsNativeComponentViewEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -180,8 +167,7 @@ void EventNestedObjectPropsNativeComponentViewEventEmitter::onChange(OnChange $e }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -201,8 +187,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventPropsNativeComponentViewEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -260,8 +245,7 @@ void EventPropsNativeComponentViewEventEmitter::onEventBubblingWithPaperName(OnE }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -281,11 +265,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -305,11 +287,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -329,11 +309,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -353,8 +331,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -364,8 +341,7 @@ void InterfaceOnlyNativeComponentViewEventEmitter::onChange(OnChange $event) con }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -385,11 +361,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -409,11 +383,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -433,11 +405,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -457,11 +427,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -481,11 +449,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -505,11 +471,9 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap index 57f16617fe96be..9ae54de91b3069 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -16,8 +16,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -25,8 +24,7 @@ class ArrayPropsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -47,8 +45,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -56,8 +53,7 @@ class BooleanPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -78,8 +74,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -87,8 +82,7 @@ class ColorPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,8 +103,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -118,8 +111,7 @@ class DimensionPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +132,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EdgeInsetsPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -149,8 +140,7 @@ class EdgeInsetsPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -171,8 +161,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EnumPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -180,8 +169,7 @@ class EnumPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -202,8 +190,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventNestedObjectPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -223,8 +210,7 @@ class EventNestedObjectPropsNativeComponentViewEventEmitter : public ViewEventEm }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -245,8 +231,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -301,8 +286,7 @@ class EventPropsNativeComponentViewEventEmitter : public ViewEventEmitter { void onEventBubblingWithPaperName(OnEventBubblingWithPaperName value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -323,8 +307,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -332,8 +315,7 @@ class FloatPropsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -354,8 +336,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -363,8 +344,7 @@ class ImagePropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -385,8 +365,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -394,8 +373,7 @@ class IntegerPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -416,8 +394,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -427,8 +404,7 @@ class InterfaceOnlyNativeComponentViewEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -449,8 +425,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -458,8 +433,7 @@ class MixedPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -480,8 +454,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiNativePropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -489,8 +462,7 @@ class MultiNativePropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -511,8 +483,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -520,8 +491,7 @@ class NoPropsNoEventsNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +512,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -551,8 +520,7 @@ class ObjectPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -573,8 +541,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -582,8 +549,7 @@ class PointPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -604,8 +570,7 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropNativeComponentViewEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -613,8 +578,7 @@ class StringPropNativeComponentViewEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap index bcb7abfc4404e6..84ae14b514f519 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap @@ -18,8 +18,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps( const PropsParserContext &context, @@ -40,8 +39,7 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps( arrayOfObjects(convertRawProp(context, rawProps, \\"arrayOfObjects\\", sourceProps.arrayOfObjects, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -62,8 +60,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps( const PropsParserContext &context, @@ -74,8 +71,7 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps( disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -96,8 +92,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps( const PropsParserContext &context, @@ -107,8 +102,7 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps( tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -130,8 +124,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps( const PropsParserContext &context, @@ -141,8 +134,7 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps( marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -163,8 +155,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps( const PropsParserContext &context, @@ -174,8 +165,7 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -196,8 +186,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps( const PropsParserContext &context, @@ -208,8 +197,7 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps( intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -230,8 +218,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComponentViewProps( const PropsParserContext &context, @@ -241,8 +228,7 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -263,8 +249,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps( const PropsParserContext &context, @@ -274,8 +259,7 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -296,8 +280,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps( const PropsParserContext &context, @@ -313,8 +296,7 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps( blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -336,8 +318,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps( const PropsParserContext &context, @@ -347,8 +328,7 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps( thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -369,8 +349,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps( const PropsParserContext &context, @@ -382,8 +361,7 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps( progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -404,8 +382,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps( const PropsParserContext &context, @@ -415,8 +392,7 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps( title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -438,8 +414,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps( const PropsParserContext &context, @@ -449,8 +424,7 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps( mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -472,8 +446,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps( const PropsParserContext &context, @@ -486,8 +459,7 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -508,8 +480,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps( const PropsParserContext &context, @@ -519,8 +490,7 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +512,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps( const PropsParserContext &context, @@ -555,8 +524,7 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps( objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -577,8 +545,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { PointPropNativeComponentViewProps::PointPropNativeComponentViewProps( const PropsParserContext &context, @@ -588,8 +555,7 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps( startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -610,8 +576,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringPropNativeComponentViewProps::StringPropNativeComponentViewProps( const PropsParserContext &context, @@ -622,8 +587,7 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps( defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap index 83866b74863dfb..aaf1c130eafba2 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GeneratePropsH-test.js.snap @@ -24,8 +24,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentViewSizesMask = uint32_t; @@ -161,8 +160,7 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps { std::vector arrayOfObjects{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -183,8 +181,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentViewProps final : public ViewProps { public: @@ -197,8 +194,7 @@ class BooleanPropNativeComponentViewProps final : public ViewProps { bool disabledNullable{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +216,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentViewProps final : public ViewProps { public: @@ -233,8 +228,7 @@ class ColorPropNativeComponentViewProps final : public ViewProps { SharedColor tintColor{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -256,8 +250,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentViewProps final : public ViewProps { public: @@ -269,8 +262,7 @@ class DimensionPropNativeComponentViewProps final : public ViewProps { YGValue marginBack{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -291,8 +283,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EdgeInsetsPropNativeComponentViewProps final : public ViewProps { public: @@ -304,8 +295,7 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -326,8 +316,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class EnumPropNativeComponentViewAlignment { Top, Center, BottomRight }; @@ -388,8 +377,7 @@ class EnumPropNativeComponentViewProps final : public ViewProps { EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -410,8 +398,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps { public: @@ -423,8 +410,7 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -445,8 +431,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventPropsNativeComponentViewProps final : public ViewProps { public: @@ -458,8 +443,7 @@ class EventPropsNativeComponentViewProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -480,8 +464,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropsNativeComponentViewProps final : public ViewProps { public: @@ -499,8 +482,7 @@ class FloatPropsNativeComponentViewProps final : public ViewProps { Float blurRadiusNullable{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -522,8 +504,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentViewProps final : public ViewProps { public: @@ -535,8 +516,7 @@ class ImagePropNativeComponentViewProps final : public ViewProps { ImageSource thumbImage{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -557,8 +537,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentViewProps final : public ViewProps { public: @@ -572,8 +551,7 @@ class IntegerPropNativeComponentViewProps final : public ViewProps { int progress3{10}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -594,8 +572,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyNativeComponentViewProps final : public ViewProps { public: @@ -607,8 +584,7 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps { std::string title{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -629,8 +605,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentViewProps final : public ViewProps { public: @@ -642,8 +617,7 @@ class MixedPropNativeComponentViewProps final : public ViewProps { folly::dynamic mixedProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -667,8 +641,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiNativePropNativeComponentViewProps final : public ViewProps { public: @@ -683,8 +656,7 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps { Point point{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -705,8 +677,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsNativeComponentViewProps final : public ViewProps { public: @@ -718,8 +689,7 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -746,8 +716,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ObjectPropsNativeComponentStringEnumProp { Small, Large }; @@ -883,8 +852,7 @@ class ObjectPropsNativeComponentProps final : public ViewProps { ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -906,8 +874,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentViewProps final : public ViewProps { public: @@ -919,8 +886,7 @@ class PointPropNativeComponentViewProps final : public ViewProps { Point startPoint{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -941,8 +907,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropNativeComponentViewProps final : public ViewProps { public: @@ -955,8 +920,7 @@ class StringPropNativeComponentViewProps final : public ViewProps { std::string defaultValue{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap index 224a02cc2ca754..71b984b27fe467 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeCpp-test.js.snap @@ -14,13 +14,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentViewComponentName[] = \\"ArrayPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,13 +37,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char BooleanPropNativeComponentViewComponentName[] = \\"BooleanPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -64,13 +60,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ColorPropNativeComponentViewComponentName[] = \\"ColorPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -89,13 +83,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DimensionPropNativeComponentViewComponentName[] = \\"DimensionPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -114,13 +106,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EdgeInsetsPropNativeComponentViewComponentName[] = \\"EdgeInsetsPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -139,13 +129,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EnumPropNativeComponentViewComponentName[] = \\"EnumPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -164,13 +152,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventNestedObjectPropsNativeComponentViewComponentName[] = \\"EventNestedObjectPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -189,13 +175,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventPropsNativeComponentViewComponentName[] = \\"EventPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -214,13 +198,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char FloatPropsNativeComponentViewComponentName[] = \\"FloatPropsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -239,13 +221,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImagePropNativeComponentViewComponentName[] = \\"ImagePropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,13 +244,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char IntegerPropNativeComponentViewComponentName[] = \\"IntegerPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -289,13 +267,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -314,13 +290,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MixedPropNativeComponentViewComponentName[] = \\"MixedPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -339,13 +313,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiNativePropNativeComponentViewComponentName[] = \\"MultiNativePropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -364,13 +336,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char NoPropsNoEventsNativeComponentViewComponentName[] = \\"NoPropsNoEventsNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -389,13 +359,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ObjectPropsNativeComponentComponentName[] = \\"ObjectPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -414,13 +382,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char PointPropNativeComponentViewComponentName[] = \\"PointPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -439,13 +405,11 @@ Object { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringPropNativeComponentViewComponentName[] = \\"StringPropNativeComponentView\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap index d4d33cc34ad983..0d9839e13568ea 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -20,8 +20,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentViewComponentName[]; @@ -34,8 +33,7 @@ using ArrayPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentViewEventEmitter, ArrayPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -60,8 +58,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char BooleanPropNativeComponentViewComponentName[]; @@ -74,8 +71,7 @@ using BooleanPropNativeComponentViewShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentViewEventEmitter, BooleanPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -100,8 +96,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ColorPropNativeComponentViewComponentName[]; @@ -114,8 +109,7 @@ using ColorPropNativeComponentViewShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentViewEventEmitter, ColorPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +134,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DimensionPropNativeComponentViewComponentName[]; @@ -154,8 +147,7 @@ using DimensionPropNativeComponentViewShadowNode = ConcreteViewShadowNode< DimensionPropNativeComponentViewEventEmitter, DimensionPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -180,8 +172,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EdgeInsetsPropNativeComponentViewComponentName[]; @@ -194,8 +185,7 @@ using EdgeInsetsPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EdgeInsetsPropNativeComponentViewEventEmitter, EdgeInsetsPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +210,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EnumPropNativeComponentViewComponentName[]; @@ -234,8 +223,7 @@ using EnumPropNativeComponentViewShadowNode = ConcreteViewShadowNode< EnumPropNativeComponentViewEventEmitter, EnumPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -260,8 +248,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventNestedObjectPropsNativeComponentViewComponentName[]; @@ -274,8 +261,7 @@ using EventNestedObjectPropsNativeComponentViewShadowNode = ConcreteViewShadowNo EventNestedObjectPropsNativeComponentViewEventEmitter, EventNestedObjectPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -300,8 +286,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventPropsNativeComponentViewComponentName[]; @@ -314,8 +299,7 @@ using EventPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< EventPropsNativeComponentViewEventEmitter, EventPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -340,8 +324,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char FloatPropsNativeComponentViewComponentName[]; @@ -354,8 +337,7 @@ using FloatPropsNativeComponentViewShadowNode = ConcreteViewShadowNode< FloatPropsNativeComponentViewEventEmitter, FloatPropsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -380,8 +362,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImagePropNativeComponentViewComponentName[]; @@ -394,8 +375,7 @@ using ImagePropNativeComponentViewShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentViewEventEmitter, ImagePropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -420,8 +400,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char IntegerPropNativeComponentViewComponentName[]; @@ -434,8 +413,7 @@ using IntegerPropNativeComponentViewShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentViewEventEmitter, IntegerPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -460,13 +438,11 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -491,8 +467,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MixedPropNativeComponentViewComponentName[]; @@ -505,8 +480,7 @@ using MixedPropNativeComponentViewShadowNode = ConcreteViewShadowNode< MixedPropNativeComponentViewEventEmitter, MixedPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -531,8 +505,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiNativePropNativeComponentViewComponentName[]; @@ -545,8 +518,7 @@ using MultiNativePropNativeComponentViewShadowNode = ConcreteViewShadowNode< MultiNativePropNativeComponentViewEventEmitter, MultiNativePropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -571,8 +543,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char NoPropsNoEventsNativeComponentViewComponentName[]; @@ -585,8 +556,7 @@ using NoPropsNoEventsNativeComponentViewShadowNode = ConcreteViewShadowNode< NoPropsNoEventsNativeComponentViewEventEmitter, NoPropsNoEventsNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -611,8 +581,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ObjectPropsNativeComponentComponentName[]; @@ -625,8 +594,7 @@ using ObjectPropsNativeComponentShadowNode = ConcreteViewShadowNode< ObjectPropsNativeComponentEventEmitter, ObjectPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -651,8 +619,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char PointPropNativeComponentViewComponentName[]; @@ -665,8 +632,7 @@ using PointPropNativeComponentViewShadowNode = ConcreteViewShadowNode< PointPropNativeComponentViewEventEmitter, PointPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -691,8 +657,7 @@ Object { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringPropNativeComponentViewComponentName[]; @@ -705,8 +670,7 @@ using StringPropNativeComponentViewShadowNode = ConcreteViewShadowNode< StringPropNativeComponentViewEventEmitter, StringPropNativeComponentViewState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js index a7c795622f9082..542aac11fee046 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateComponentDescriptorH.js @@ -36,13 +36,11 @@ const FileTemplate = ({ #include #include -namespace facebook { -namespace react { +namespace facebook::react { ${componentDescriptors} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({className}: {className: string}) => diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js index db983558403aeb..49d877981a413e 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterCpp.js @@ -50,11 +50,9 @@ const FileTemplate = ({ #include ${[...extraIncludes].join('\n')} -namespace facebook { -namespace react { +namespace facebook::react { ${events} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ diff --git a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js index 5a1bf13b97b187..ca3f35f92da6af 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateEventEmitterH.js @@ -56,11 +56,9 @@ const FileTemplate = ({ #include ${[...extraIncludes].join('\n')} -namespace facebook { -namespace react { +namespace facebook::react { ${componentEmitters} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js b/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js index d809193a723c26..77e0b7deed5b7a 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsCpp.js @@ -38,13 +38,11 @@ const FileTemplate = ({ #include ${imports} -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ diff --git a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js index 0ec54ced1a48d1..f2a71e3ee84e61 100644 --- a/packages/react-native-codegen/src/generators/components/GeneratePropsH.js +++ b/packages/react-native-codegen/src/generators/components/GeneratePropsH.js @@ -52,13 +52,11 @@ const FileTemplate = ({ ${imports} -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ClassTemplate = ({ diff --git a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js index 82cb8ffd5ab559..8a595988309f4a 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeCpp.js @@ -33,13 +33,11 @@ const FileTemplate = ({ #include -namespace facebook { -namespace react { +namespace facebook::react { ${componentNames} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({className}: {className: string}) => diff --git a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js index 3e7cf71117ef22..b2d3c047c341a9 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateShadowNodeH.js @@ -40,13 +40,11 @@ ${imports}#include #include #include -namespace facebook { -namespace react { +namespace facebook::react { ${componentClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const ComponentTemplate = ({ diff --git a/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js b/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js index 36c84339819207..2c280eaf51b441 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js +++ b/packages/react-native-codegen/src/generators/components/GenerateStateCpp.js @@ -32,13 +32,11 @@ const FileTemplate = ({ */ #include -namespace facebook { -namespace react { +namespace facebook::react { ${stateClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `; const StateTemplate = ({stateName}: {stateName: string}) => ''; diff --git a/packages/react-native-codegen/src/generators/components/GenerateStateH.js b/packages/react-native-codegen/src/generators/components/GenerateStateH.js index 658142eaea04eb..9910c83aa05abc 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateStateH.js +++ b/packages/react-native-codegen/src/generators/components/GenerateStateH.js @@ -39,13 +39,11 @@ const FileTemplate = ({ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { ${stateClasses} -} // namespace react -} // namespace facebook +} // namespace facebook::react `.trim(); const StateTemplate = ({stateName}: {stateName: string}) => diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap index 72653d4c56f282..7f55bcf5d714e1 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap @@ -17,13 +17,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -45,13 +43,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -73,13 +69,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using BooleanPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -101,13 +95,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ColorPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -129,13 +121,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using CommandNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -157,13 +147,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using CommandNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -185,13 +173,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using DimensionPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -213,13 +199,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using DoublePropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -241,13 +225,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EventsNestedObjectNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -269,13 +251,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EventsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -297,13 +277,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -325,13 +303,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedAndroidComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -353,13 +329,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedAndroidIosComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -381,14 +355,12 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ExcludedIosComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiFileIncludedNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -410,13 +382,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using FloatPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -438,13 +408,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ImagePropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -466,13 +434,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using InsetsPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -494,13 +460,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using Int32EnumPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -522,13 +486,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using IntegerPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -550,13 +512,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -578,13 +538,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using MixedPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -606,13 +564,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ImageColorPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -634,13 +590,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using NoPropsNoEventsComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -662,13 +616,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ObjectPropsComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -690,13 +642,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using PointPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -718,13 +668,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using StringEnumPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -746,13 +694,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using StringPropComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -774,14 +720,12 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using MultiFile1NativeComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiFile2NativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -803,14 +747,12 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using MultiComponent1NativeComponentComponentDescriptor = ConcreteComponentDescriptor; using MultiComponent2NativeComponentComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap index 2ec6051506eab0..57a82be1187497 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap @@ -15,11 +15,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,11 +37,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -63,11 +59,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -87,11 +81,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -111,11 +103,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -135,11 +125,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -159,11 +147,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -183,11 +169,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -207,8 +191,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void EventsNestedObjectNativeComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -228,8 +211,7 @@ void EventsNestedObjectNativeComponentEventEmitter::onChange(OnChange $event) co }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -249,8 +231,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { void EventsNativeComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -357,8 +338,7 @@ void EventsNativeComponentEventEmitter::onEventWithMixedPropAttribute(OnEventWit }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -378,8 +358,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -398,8 +377,7 @@ void InterfaceOnlyComponentEventEmitter::onDirectChange(OnDirectChange $event) c }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -419,11 +397,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -443,11 +419,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -467,12 +441,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -492,11 +464,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -516,11 +486,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -540,11 +508,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -564,11 +530,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -588,11 +552,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -612,8 +574,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { dispatchEvent(\\"change\\", [$event=std::move($event)](jsi::Runtime &runtime) { @@ -623,8 +584,7 @@ void InterfaceOnlyComponentEventEmitter::onChange(OnChange $event) const { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -644,11 +604,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -668,11 +626,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -692,11 +648,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -716,11 +670,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -740,11 +692,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -764,11 +714,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -788,11 +736,9 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -812,12 +758,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -837,12 +781,10 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap index ca4237ab4d7474..b6de40820ccb6d 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap @@ -16,8 +16,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -25,8 +24,7 @@ class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -47,8 +45,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -56,8 +53,7 @@ class ArrayPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -78,8 +74,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -87,8 +82,7 @@ class BooleanPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,8 +103,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -118,8 +111,7 @@ class ColorPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +132,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -149,8 +140,7 @@ class CommandNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -171,8 +161,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -180,8 +169,7 @@ class CommandNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -202,8 +190,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -211,8 +198,7 @@ class DimensionPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -233,8 +219,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -242,8 +227,7 @@ class DoublePropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,8 +248,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -285,8 +268,7 @@ class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -307,8 +289,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -381,8 +362,7 @@ class EventsNativeComponentEventEmitter : public ViewEventEmitter { void onEventWithMixedPropAttribute(OnEventWithMixedPropAttribute value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -403,8 +383,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -420,8 +399,7 @@ class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { void onDirectChange(OnDirectChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -442,8 +420,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -451,8 +428,7 @@ class ExcludedAndroidComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -473,8 +449,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -482,8 +457,7 @@ class ExcludedAndroidIosComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -504,8 +478,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -520,8 +493,7 @@ class MultiFileIncludedNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -542,8 +514,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -551,8 +522,7 @@ class FloatPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -573,8 +543,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -582,8 +551,7 @@ class ImagePropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -604,8 +572,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -613,8 +580,7 @@ class InsetsPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -635,8 +601,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class Int32EnumPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -644,8 +609,7 @@ class Int32EnumPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -666,8 +630,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -675,8 +638,7 @@ class IntegerPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -697,8 +659,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -708,8 +669,7 @@ class InterfaceOnlyComponentEventEmitter : public ViewEventEmitter { }; void onChange(OnChange value) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -730,8 +690,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -739,8 +698,7 @@ class MixedPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -761,8 +719,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -770,8 +727,7 @@ class ImageColorPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -792,8 +748,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -801,8 +756,7 @@ class NoPropsNoEventsComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -823,8 +777,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -832,8 +785,7 @@ class ObjectPropsEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -854,8 +806,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -863,8 +814,7 @@ class PointPropNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -885,8 +835,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringEnumPropsNativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -894,8 +843,7 @@ class StringEnumPropsNativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -916,8 +864,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -925,8 +872,7 @@ class StringPropComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -947,8 +893,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -963,8 +908,7 @@ class MultiFile2NativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -985,8 +929,7 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentEventEmitter : public ViewEventEmitter { public: using ViewEventEmitter::ViewEventEmitter; @@ -1001,8 +944,7 @@ class MultiComponent2NativeComponentEventEmitter : public ViewEventEmitter { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap index 2dd8e73764b4c6..8d21560f105d53 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap @@ -18,8 +18,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( const PropsParserContext &context, @@ -40,8 +39,7 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( arrayOfArrayOfObject(convertRawProp(context, rawProps, \\"arrayOfArrayOfObject\\", sourceProps.arrayOfArrayOfObject, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -62,8 +60,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( const PropsParserContext &context, @@ -73,8 +70,7 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps( nativePrimitives(convertRawProp(context, rawProps, \\"nativePrimitives\\", sourceProps.nativePrimitives, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -95,8 +91,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { BooleanPropNativeComponentProps::BooleanPropNativeComponentProps( const PropsParserContext &context, @@ -106,8 +101,7 @@ BooleanPropNativeComponentProps::BooleanPropNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -128,8 +122,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ColorPropNativeComponentProps::ColorPropNativeComponentProps( const PropsParserContext &context, @@ -139,8 +132,7 @@ ColorPropNativeComponentProps::ColorPropNativeComponentProps( tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -161,8 +153,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { CommandNativeComponentProps::CommandNativeComponentProps( const PropsParserContext &context, @@ -172,8 +163,7 @@ CommandNativeComponentProps::CommandNativeComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -194,8 +184,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { CommandNativeComponentProps::CommandNativeComponentProps( const PropsParserContext &context, @@ -205,8 +194,7 @@ CommandNativeComponentProps::CommandNativeComponentProps( accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -228,8 +216,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DimensionPropNativeComponentProps::DimensionPropNativeComponentProps( const PropsParserContext &context, @@ -239,8 +226,7 @@ DimensionPropNativeComponentProps::DimensionPropNativeComponentProps( marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -261,8 +247,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { DoublePropNativeComponentProps::DoublePropNativeComponentProps( const PropsParserContext &context, @@ -277,8 +262,7 @@ DoublePropNativeComponentProps::DoublePropNativeComponentProps( blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -299,8 +283,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps( const PropsParserContext &context, @@ -310,8 +293,7 @@ EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -332,8 +314,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { EventsNativeComponentProps::EventsNativeComponentProps( const PropsParserContext &context, @@ -343,8 +324,7 @@ EventsNativeComponentProps::EventsNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -365,8 +345,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( const PropsParserContext &context, @@ -376,8 +355,7 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -398,8 +376,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedAndroidComponentProps::ExcludedAndroidComponentProps( const PropsParserContext &context, @@ -409,8 +386,7 @@ ExcludedAndroidComponentProps::ExcludedAndroidComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -431,8 +407,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps( const PropsParserContext &context, @@ -442,8 +417,7 @@ ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -464,8 +438,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ExcludedIosComponentProps::ExcludedIosComponentProps( const PropsParserContext &context, @@ -482,8 +455,7 @@ MultiFileIncludedNativeComponentProps::MultiFileIncludedNativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -504,8 +476,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { FloatPropNativeComponentProps::FloatPropNativeComponentProps( const PropsParserContext &context, @@ -520,8 +491,7 @@ FloatPropNativeComponentProps::FloatPropNativeComponentProps( blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -543,8 +513,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImagePropNativeComponentProps::ImagePropNativeComponentProps( const PropsParserContext &context, @@ -554,8 +523,7 @@ ImagePropNativeComponentProps::ImagePropNativeComponentProps( thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -576,8 +544,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InsetsPropNativeComponentProps::InsetsPropNativeComponentProps( const PropsParserContext &context, @@ -587,8 +554,7 @@ InsetsPropNativeComponentProps::InsetsPropNativeComponentProps( contentInset(convertRawProp(context, rawProps, \\"contentInset\\", sourceProps.contentInset, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -609,8 +575,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps( const PropsParserContext &context, @@ -620,8 +585,7 @@ Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps( maxInterval(convertRawProp(context, rawProps, \\"maxInterval\\", sourceProps.maxInterval, {Int32EnumPropsNativeComponentMaxInterval::MaxInterval0})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -642,8 +606,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { IntegerPropNativeComponentProps::IntegerPropNativeComponentProps( const PropsParserContext &context, @@ -655,8 +618,7 @@ IntegerPropNativeComponentProps::IntegerPropNativeComponentProps( progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -677,8 +639,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( const PropsParserContext &context, @@ -688,8 +649,7 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps( accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -711,8 +671,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MixedPropNativeComponentProps::MixedPropNativeComponentProps( const PropsParserContext &context, @@ -722,8 +681,7 @@ MixedPropNativeComponentProps::MixedPropNativeComponentProps( mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -745,8 +703,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps( const PropsParserContext &context, @@ -759,8 +716,7 @@ ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps( point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -781,8 +737,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps( const PropsParserContext &context, @@ -792,8 +747,7 @@ NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps( {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -815,8 +769,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { ObjectPropsProps::ObjectPropsProps( const PropsParserContext &context, @@ -826,8 +779,7 @@ ObjectPropsProps::ObjectPropsProps( objectProp(convertRawProp(context, rawProps, \\"objectProp\\", sourceProps.objectProp, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -848,8 +800,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { PointPropNativeComponentProps::PointPropNativeComponentProps( const PropsParserContext &context, @@ -859,8 +810,7 @@ PointPropNativeComponentProps::PointPropNativeComponentProps( startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -881,8 +831,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps( const PropsParserContext &context, @@ -892,8 +841,7 @@ StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps( alignment(convertRawProp(context, rawProps, \\"alignment\\", sourceProps.alignment, {StringEnumPropsNativeComponentAlignment::Center})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -914,8 +862,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { StringPropComponentProps::StringPropComponentProps( const PropsParserContext &context, @@ -926,8 +873,7 @@ StringPropComponentProps::StringPropComponentProps( accessibilityRole(convertRawProp(context, rawProps, \\"accessibilityRole\\", sourceProps.accessibilityRole, {})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -948,8 +894,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiFile1NativeComponentProps::MultiFile1NativeComponentProps( const PropsParserContext &context, @@ -966,8 +911,7 @@ MultiFile2NativeComponentProps::MultiFile2NativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -988,8 +932,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { MultiComponent1NativeComponentProps::MultiComponent1NativeComponentProps( const PropsParserContext &context, @@ -1006,8 +949,7 @@ MultiComponent2NativeComponentProps::MultiComponent2NativeComponentProps( disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {} -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap index d22ef6b85965ab..de244b9f33b380 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap @@ -23,8 +23,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ArrayPropsNativeComponentSizesMask = uint32_t; @@ -213,8 +212,7 @@ class ArrayPropsNativeComponentProps final : public ViewProps { std::vector> arrayOfArrayOfObject{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -241,8 +239,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct ArrayPropsNativeComponentNativePrimitivesStruct { std::vector colors; @@ -290,8 +287,7 @@ class ArrayPropsNativeComponentProps final : public ViewProps { std::vector nativePrimitives{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -312,8 +308,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentProps final : public ViewProps { public: @@ -325,8 +320,7 @@ class BooleanPropNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -348,8 +342,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentProps final : public ViewProps { public: @@ -361,8 +354,7 @@ class ColorPropNativeComponentProps final : public ViewProps { SharedColor tintColor{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -383,8 +375,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentProps final : public ViewProps { public: @@ -396,8 +387,7 @@ class CommandNativeComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -418,8 +408,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentProps final : public ViewProps { public: @@ -431,8 +420,7 @@ class CommandNativeComponentProps final : public ViewProps { std::string accessibilityHint{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -454,8 +442,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentProps final : public ViewProps { public: @@ -467,8 +454,7 @@ class DimensionPropNativeComponentProps final : public ViewProps { YGValue marginBack{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -489,8 +475,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentProps final : public ViewProps { public: @@ -507,8 +492,7 @@ class DoublePropNativeComponentProps final : public ViewProps { double blurRadius6{0.0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -529,8 +513,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentProps final : public ViewProps { public: @@ -542,8 +525,7 @@ class EventsNestedObjectNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -564,8 +546,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentProps final : public ViewProps { public: @@ -577,8 +558,7 @@ class EventsNativeComponentProps final : public ViewProps { bool disabled{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -599,8 +579,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentProps final : public ViewProps { public: @@ -612,8 +591,7 @@ class InterfaceOnlyComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -634,8 +612,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentProps final : public ViewProps { public: @@ -647,8 +624,7 @@ class ExcludedAndroidComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -669,8 +645,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentProps final : public ViewProps { public: @@ -682,8 +657,7 @@ class ExcludedAndroidIosComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -704,8 +678,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentProps final : public ViewProps { public: @@ -727,8 +700,7 @@ class MultiFileIncludedNativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -749,8 +721,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentProps final : public ViewProps { public: @@ -767,8 +738,7 @@ class FloatPropNativeComponentProps final : public ViewProps { Float blurRadius6{0.0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -790,8 +760,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentProps final : public ViewProps { public: @@ -803,8 +772,7 @@ class ImagePropNativeComponentProps final : public ViewProps { ImageSource thumbImage{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -826,8 +794,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentProps final : public ViewProps { public: @@ -839,8 +806,7 @@ class InsetsPropNativeComponentProps final : public ViewProps { EdgeInsets contentInset{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -861,8 +827,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class Int32EnumPropsNativeComponentMaxInterval { MaxInterval0 = 0, MaxInterval1 = 1, MaxInterval2 = 2 }; @@ -901,8 +866,7 @@ class Int32EnumPropsNativeComponentProps final : public ViewProps { Int32EnumPropsNativeComponentMaxInterval maxInterval{Int32EnumPropsNativeComponentMaxInterval::MaxInterval0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -923,8 +887,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentProps final : public ViewProps { public: @@ -938,8 +901,7 @@ class IntegerPropNativeComponentProps final : public ViewProps { int progress3{10}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -960,8 +922,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class InterfaceOnlyComponentProps final : public ViewProps { public: @@ -973,8 +934,7 @@ class InterfaceOnlyComponentProps final : public ViewProps { std::string accessibilityHint{\\"\\"}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -995,8 +955,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentProps final : public ViewProps { public: @@ -1008,8 +967,7 @@ class MixedPropNativeComponentProps final : public ViewProps { folly::dynamic mixedProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1033,8 +991,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentProps final : public ViewProps { public: @@ -1049,8 +1006,7 @@ class ImageColorPropNativeComponentProps final : public ViewProps { Point point{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1071,8 +1027,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentProps final : public ViewProps { public: @@ -1084,8 +1039,7 @@ class NoPropsNoEventsComponentProps final : public ViewProps { }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1112,8 +1066,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ObjectPropsStringEnumProp { Option1 }; @@ -1339,8 +1292,7 @@ class ObjectPropsProps final : public ViewProps { ObjectPropsObjectPropStruct objectProp{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1362,8 +1314,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentProps final : public ViewProps { public: @@ -1375,8 +1326,7 @@ class PointPropNativeComponentProps final : public ViewProps { Point startPoint{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1397,8 +1347,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class StringEnumPropsNativeComponentAlignment { Top, Center, BottomRight }; @@ -1428,8 +1377,7 @@ class StringEnumPropsNativeComponentProps final : public ViewProps { StringEnumPropsNativeComponentAlignment alignment{StringEnumPropsNativeComponentAlignment::Center}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1450,8 +1398,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentProps final : public ViewProps { public: @@ -1464,8 +1411,7 @@ class StringPropComponentProps final : public ViewProps { std::string accessibilityRole{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1486,8 +1432,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentProps final : public ViewProps { public: @@ -1509,8 +1454,7 @@ class MultiFile2NativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1531,8 +1475,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentProps final : public ViewProps { public: @@ -1554,8 +1497,7 @@ class MultiComponent2NativeComponentProps final : public ViewProps { bool disabled{true}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap index 6172d9ae625739..fb6c6404a1ee45 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap @@ -14,13 +14,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentComponentName[] = \\"ArrayPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -39,13 +37,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ArrayPropsNativeComponentComponentName[] = \\"ArrayPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -64,13 +60,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char BooleanPropNativeComponentComponentName[] = \\"BooleanPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -89,13 +83,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ColorPropNativeComponentComponentName[] = \\"ColorPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -114,13 +106,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char CommandNativeComponentComponentName[] = \\"CommandNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -139,13 +129,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char CommandNativeComponentComponentName[] = \\"CommandNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -164,13 +152,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DimensionPropNativeComponentComponentName[] = \\"DimensionPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -189,13 +175,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char DoublePropNativeComponentComponentName[] = \\"DoublePropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -214,13 +198,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventsNestedObjectNativeComponentComponentName[] = \\"EventsNestedObjectNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -239,13 +221,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char EventsNativeComponentComponentName[] = \\"EventsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -264,13 +244,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -289,13 +267,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedAndroidComponentComponentName[] = \\"ExcludedAndroidComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -314,13 +290,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedAndroidIosComponentComponentName[] = \\"ExcludedAndroidIosComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -339,14 +313,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ExcludedIosComponentComponentName[] = \\"ExcludedIosComponent\\"; extern const char MultiFileIncludedNativeComponentComponentName[] = \\"MultiFileIncludedNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -365,13 +337,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char FloatPropNativeComponentComponentName[] = \\"FloatPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -390,13 +360,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImagePropNativeComponentComponentName[] = \\"ImagePropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -415,13 +383,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char InsetsPropNativeComponentComponentName[] = \\"InsetsPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -440,13 +406,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char Int32EnumPropsNativeComponentComponentName[] = \\"Int32EnumPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -465,13 +429,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char IntegerPropNativeComponentComponentName[] = \\"IntegerPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -490,13 +452,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -515,13 +475,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MixedPropNativeComponentComponentName[] = \\"MixedPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -540,13 +498,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImageColorPropNativeComponentComponentName[] = \\"ImageColorPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -565,13 +521,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char NoPropsNoEventsComponentComponentName[] = \\"NoPropsNoEventsComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -590,13 +544,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ObjectPropsComponentName[] = \\"ObjectProps\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -615,13 +567,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char PointPropNativeComponentComponentName[] = \\"PointPropNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -640,13 +590,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringEnumPropsNativeComponentComponentName[] = \\"StringEnumPropsNativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -665,13 +613,11 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char StringPropComponentComponentName[] = \\"StringPropComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -690,14 +636,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiFile1NativeComponentComponentName[] = \\"MultiFile1NativeComponent\\"; extern const char MultiFile2NativeComponentComponentName[] = \\"MultiFile2NativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -716,14 +660,12 @@ Map { #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char MultiComponent1NativeComponentComponentName[] = \\"MultiComponent1NativeComponent\\"; extern const char MultiComponent2NativeComponentComponentName[] = \\"MultiComponent2NativeComponent\\"; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap index f8e76bfa9e41d2..00c65ca1865cbc 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap @@ -20,8 +20,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; @@ -34,8 +33,7 @@ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentEventEmitter, ArrayPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -60,8 +58,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ArrayPropsNativeComponentComponentName[]; @@ -74,8 +71,7 @@ using ArrayPropsNativeComponentShadowNode = ConcreteViewShadowNode< ArrayPropsNativeComponentEventEmitter, ArrayPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -100,8 +96,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char BooleanPropNativeComponentComponentName[]; @@ -114,8 +109,7 @@ using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode< BooleanPropNativeComponentEventEmitter, BooleanPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -140,8 +134,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ColorPropNativeComponentComponentName[]; @@ -154,8 +147,7 @@ using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ColorPropNativeComponentEventEmitter, ColorPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -180,8 +172,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char CommandNativeComponentComponentName[]; @@ -194,8 +185,7 @@ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentEventEmitter, CommandNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -220,8 +210,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char CommandNativeComponentComponentName[]; @@ -234,8 +223,7 @@ using CommandNativeComponentShadowNode = ConcreteViewShadowNode< CommandNativeComponentEventEmitter, CommandNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -260,8 +248,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DimensionPropNativeComponentComponentName[]; @@ -274,8 +261,7 @@ using DimensionPropNativeComponentShadowNode = ConcreteViewShadowNode< DimensionPropNativeComponentEventEmitter, DimensionPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -300,8 +286,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char DoublePropNativeComponentComponentName[]; @@ -314,8 +299,7 @@ using DoublePropNativeComponentShadowNode = ConcreteViewShadowNode< DoublePropNativeComponentEventEmitter, DoublePropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -340,8 +324,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventsNestedObjectNativeComponentComponentName[]; @@ -354,8 +337,7 @@ using EventsNestedObjectNativeComponentShadowNode = ConcreteViewShadowNode< EventsNestedObjectNativeComponentEventEmitter, EventsNestedObjectNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -380,8 +362,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char EventsNativeComponentComponentName[]; @@ -394,8 +375,7 @@ using EventsNativeComponentShadowNode = ConcreteViewShadowNode< EventsNativeComponentEventEmitter, EventsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -420,13 +400,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -451,8 +429,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedAndroidComponentComponentName[]; @@ -465,8 +442,7 @@ using ExcludedAndroidComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidComponentEventEmitter, ExcludedAndroidComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -491,8 +467,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedAndroidIosComponentComponentName[]; @@ -505,8 +480,7 @@ using ExcludedAndroidIosComponentShadowNode = ConcreteViewShadowNode< ExcludedAndroidIosComponentEventEmitter, ExcludedAndroidIosComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -531,8 +505,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ExcludedIosComponentComponentName[]; @@ -556,8 +529,7 @@ using MultiFileIncludedNativeComponentShadowNode = ConcreteViewShadowNode< MultiFileIncludedNativeComponentEventEmitter, MultiFileIncludedNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -582,8 +554,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char FloatPropNativeComponentComponentName[]; @@ -596,8 +567,7 @@ using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode< FloatPropNativeComponentEventEmitter, FloatPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -622,8 +592,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImagePropNativeComponentComponentName[]; @@ -636,8 +605,7 @@ using ImagePropNativeComponentShadowNode = ConcreteViewShadowNode< ImagePropNativeComponentEventEmitter, ImagePropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -662,8 +630,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char InsetsPropNativeComponentComponentName[]; @@ -676,8 +643,7 @@ using InsetsPropNativeComponentShadowNode = ConcreteViewShadowNode< InsetsPropNativeComponentEventEmitter, InsetsPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -702,8 +668,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char Int32EnumPropsNativeComponentComponentName[]; @@ -716,8 +681,7 @@ using Int32EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< Int32EnumPropsNativeComponentEventEmitter, Int32EnumPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -742,8 +706,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char IntegerPropNativeComponentComponentName[]; @@ -756,8 +719,7 @@ using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode< IntegerPropNativeComponentEventEmitter, IntegerPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -782,13 +744,11 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -813,8 +773,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MixedPropNativeComponentComponentName[]; @@ -827,8 +786,7 @@ using MixedPropNativeComponentShadowNode = ConcreteViewShadowNode< MixedPropNativeComponentEventEmitter, MixedPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -853,8 +811,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ImageColorPropNativeComponentComponentName[]; @@ -867,8 +824,7 @@ using ImageColorPropNativeComponentShadowNode = ConcreteViewShadowNode< ImageColorPropNativeComponentEventEmitter, ImageColorPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -893,8 +849,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char NoPropsNoEventsComponentComponentName[]; @@ -907,8 +862,7 @@ using NoPropsNoEventsComponentShadowNode = ConcreteViewShadowNode< NoPropsNoEventsComponentEventEmitter, NoPropsNoEventsComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -933,8 +887,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char ObjectPropsComponentName[]; @@ -947,8 +900,7 @@ using ObjectPropsShadowNode = ConcreteViewShadowNode< ObjectPropsEventEmitter, ObjectPropsState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -973,8 +925,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char PointPropNativeComponentComponentName[]; @@ -987,8 +938,7 @@ using PointPropNativeComponentShadowNode = ConcreteViewShadowNode< PointPropNativeComponentEventEmitter, PointPropNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1013,8 +963,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringEnumPropsNativeComponentComponentName[]; @@ -1027,8 +976,7 @@ using StringEnumPropsNativeComponentShadowNode = ConcreteViewShadowNode< StringEnumPropsNativeComponentEventEmitter, StringEnumPropsNativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1053,8 +1001,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char StringPropComponentComponentName[]; @@ -1067,8 +1014,7 @@ using StringPropComponentShadowNode = ConcreteViewShadowNode< StringPropComponentEventEmitter, StringPropComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1093,8 +1039,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiFile1NativeComponentComponentName[]; @@ -1118,8 +1063,7 @@ using MultiFile2NativeComponentShadowNode = ConcreteViewShadowNode< MultiFile2NativeComponentEventEmitter, MultiFile2NativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -1144,8 +1088,7 @@ Map { #include #include -namespace facebook { -namespace react { +namespace facebook::react { JSI_EXPORT extern const char MultiComponent1NativeComponentComponentName[]; @@ -1169,8 +1112,7 @@ using MultiComponent2NativeComponentShadowNode = ConcreteViewShadowNode< MultiComponent2NativeComponentEventEmitter, MultiComponent2NativeComponentState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap index 81112bcefb78cf..0a4a8d39f1606e 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateCpp-test.js.snap @@ -13,13 +13,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -37,13 +35,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -61,13 +57,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -85,13 +79,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -109,13 +101,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -133,13 +123,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -157,13 +145,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -181,13 +167,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -205,13 +189,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -229,13 +211,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -253,13 +233,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -277,13 +255,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -301,13 +277,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -325,13 +299,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -349,13 +321,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -373,13 +343,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -397,13 +365,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -421,13 +387,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -445,13 +409,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -469,13 +431,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -493,13 +453,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -517,13 +475,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -541,13 +497,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -565,13 +519,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -589,13 +541,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -613,13 +563,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -637,13 +585,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -661,13 +607,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; @@ -685,13 +629,11 @@ Map { */ #include -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook +} // namespace facebook::react ", } `; diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap index c295dcfc57a1fb..58b9b1d9ca3d43 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateStateH-test.js.snap @@ -18,8 +18,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentState { public: @@ -36,8 +35,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -59,8 +57,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ArrayPropsNativeComponentState { public: @@ -77,8 +74,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -100,8 +96,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class BooleanPropNativeComponentState { public: @@ -118,8 +113,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -141,8 +135,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ColorPropNativeComponentState { public: @@ -159,8 +152,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -182,8 +174,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentState { public: @@ -200,8 +191,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -223,8 +213,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class CommandNativeComponentState { public: @@ -241,8 +230,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -264,8 +252,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class DimensionPropNativeComponentState { public: @@ -282,8 +269,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -305,8 +291,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class DoublePropNativeComponentState { public: @@ -323,8 +308,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -346,8 +330,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class EventsNestedObjectNativeComponentState { public: @@ -364,8 +347,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -387,8 +369,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class EventsNativeComponentState { public: @@ -405,8 +386,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -428,13 +408,11 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -456,8 +434,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidComponentState { public: @@ -474,8 +451,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -497,8 +473,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedAndroidIosComponentState { public: @@ -515,8 +490,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -538,8 +512,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ExcludedIosComponentState { public: @@ -571,8 +544,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -594,8 +566,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class FloatPropNativeComponentState { public: @@ -612,8 +583,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -635,8 +605,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ImagePropNativeComponentState { public: @@ -653,8 +622,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -676,8 +644,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class InsetsPropNativeComponentState { public: @@ -694,8 +661,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -717,8 +683,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class Int32EnumPropsNativeComponentState { public: @@ -735,8 +700,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -758,8 +722,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class IntegerPropNativeComponentState { public: @@ -776,8 +739,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -799,13 +761,11 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -827,8 +787,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MixedPropNativeComponentState { public: @@ -845,8 +804,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -868,8 +826,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ImageColorPropNativeComponentState { public: @@ -886,8 +843,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -909,8 +865,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class NoPropsNoEventsComponentState { public: @@ -927,8 +882,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -950,8 +904,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class ObjectPropsState { public: @@ -968,8 +921,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -991,8 +943,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class PointPropNativeComponentState { public: @@ -1009,8 +960,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1032,8 +982,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class StringEnumPropsNativeComponentState { public: @@ -1050,8 +999,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1073,8 +1021,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class StringPropComponentState { public: @@ -1091,8 +1038,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1114,8 +1060,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MultiFile1NativeComponentState { public: @@ -1147,8 +1092,7 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `; @@ -1170,8 +1114,7 @@ Map { #include #endif -namespace facebook { -namespace react { +namespace facebook::react { class MultiComponent1NativeComponentState { public: @@ -1203,7 +1146,6 @@ public: #endif }; -} // namespace react -} // namespace facebook", +} // namespace facebook::react", } `;