From 0c9ef9ccc433b12a2288baecbeb09ae1166bb64b Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Wed, 2 Oct 2024 14:36:02 +0200 Subject: [PATCH 1/2] Refactor new arch ifdefs (#507) --- RNLiveMarkdown.podspec | 8 +++++--- .../RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.cpp | 4 ---- .../RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.h | 3 --- .../MarkdownTextInputDecoratorShadowNode.cpp | 4 ---- .../MarkdownTextInputDecoratorShadowNode.h | 3 --- .../RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h | 3 --- .../MarkdownTextInputDecoratorViewComponentDescriptor.h | 3 --- .../RNLiveMarkdownSpec/OwningShadowNodeFragment.h | 3 --- example/ios/Podfile.lock | 8 ++++---- 9 files changed, 9 insertions(+), 30 deletions(-) diff --git a/RNLiveMarkdown.podspec b/RNLiveMarkdown.podspec index f2601e76..a7f13894 100644 --- a/RNLiveMarkdown.podspec +++ b/RNLiveMarkdown.podspec @@ -37,8 +37,10 @@ Pod::Spec.new do |s| ]) end - s.subspec "common" do |ss| - ss.source_files = "cpp/**/*.{cpp,h}" - ss.header_dir = "RNLiveMarkdown" + if ENV['RCT_NEW_ARCH_ENABLED'] == '1' + s.subspec "newarch" do |ss| + ss.source_files = "cpp/**/*.{cpp,h}" + ss.header_dir = "RNLiveMarkdown" + end end end diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.cpp b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.cpp index de564b32..897a3f59 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.cpp +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.cpp @@ -1,5 +1,3 @@ -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) - #include "MarkdownShadowFamilyRegistry.h" namespace expensify { @@ -60,5 +58,3 @@ bool MarkdownShadowFamilyRegistry::shouldForceUpdate(facebook::react::Tag tag) { } // namespace livemarkdown } // namespace expensify - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.h index 4e9431b5..d61ea773 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownShadowFamilyRegistry.h @@ -1,5 +1,4 @@ #pragma once -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include @@ -37,5 +36,3 @@ class MarkdownShadowFamilyRegistry { } // namespace livemarkdown } // namespace expensify - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp index 7d38ec2a..941d30b7 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp @@ -1,5 +1,3 @@ -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) - #include "MarkdownTextInputDecoratorShadowNode.h" using namespace expensify::livemarkdown; @@ -33,5 +31,3 @@ MarkdownTextInputDecoratorShadowNode::updateFragmentState( } // namespace react } // namespace facebook - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.h index 611294ab..6f2423e5 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.h @@ -1,5 +1,4 @@ #pragma once -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include "MarkdownShadowFamilyRegistry.h" #include "MarkdownTextInputDecoratorState.h" @@ -45,5 +44,3 @@ class JSI_EXPORT MarkdownTextInputDecoratorShadowNode final } // namespace react } // namespace facebook - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h index 169990d7..7590b996 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h @@ -1,5 +1,4 @@ #pragma once -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include @@ -33,5 +32,3 @@ class JSI_EXPORT MarkdownTextInputDecoratorState final { } // namespace react } // namespace facebook - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h index 8eaa1b01..c145e45c 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h @@ -1,5 +1,4 @@ #pragma once -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include "MarkdownTextInputDecoratorShadowNode.h" #include @@ -16,5 +15,3 @@ class MarkdownTextInputDecoratorViewComponentDescriptor final } // namespace react } // namespace facebook - -#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/OwningShadowNodeFragment.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/OwningShadowNodeFragment.h index 80233f99..601187c2 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/OwningShadowNodeFragment.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/OwningShadowNodeFragment.h @@ -1,5 +1,4 @@ #pragma once -#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include #include @@ -27,5 +26,3 @@ struct OwningShadowNodeFragment { } // namespace livemarkdown } // namespace expensify - -#endif diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 41b50600..60627abb 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1497,7 +1497,7 @@ PODS: - React-logger (= 0.75.2) - React-perflogger (= 0.75.2) - React-utils (= 0.75.2) - - RNLiveMarkdown (0.1.143): + - RNLiveMarkdown (0.1.160): - DoubleConversion - glog - hermes-engine @@ -1517,9 +1517,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNLiveMarkdown/common (= 0.1.143) + - RNLiveMarkdown/newarch (= 0.1.160) - Yoga - - RNLiveMarkdown/common (0.1.143): + - RNLiveMarkdown/newarch (0.1.160): - DoubleConversion - glog - hermes-engine @@ -1805,7 +1805,7 @@ SPEC CHECKSUMS: React-utils: 81a715d9c0a2a49047e77a86f3a2247408540deb ReactCodegen: 60973d382704c793c605b9be0fc7f31cb279442f ReactCommon: 6ef348087d250257c44c0204461c03f036650e9b - RNLiveMarkdown: e44918843c2638692348f39eafc275698baf0444 + RNLiveMarkdown: 201e1457f83d07376ae08c918c8ad14e3078d5a0 SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: 2a45d7e59592db061217551fd3bbe2dd993817ae From 2252f70858719af82d552aec5a6dc3835f808eb0 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Wed, 2 Oct 2024 12:37:38 +0000 Subject: [PATCH 2/2] Bump version to 0.1.162 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 89ea8a56..c5a381ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@expensify/react-native-live-markdown", - "version": "0.1.161", + "version": "0.1.162", "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.", "main": "lib/commonjs/index", "module": "lib/module/index",