From 911e8fc29354d2d19522a01cf967b353600dea5c Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 2 Sep 2026 09:36:51 -0700 Subject: [PATCH] Cover `react/nativemodule/dom` with Stable API guards (#58127) Summary: Pull Request resolved: https://github.com/react/react-native/pull/58127 Classifies `react/nativemodule/dom:dom` as a private target under the C++ stable API three-tier visibility model. Adds `#include ` to the module's single exported header (`NativeDOM.h`), and wires the guard dependency into BUCK, CMake, and the podspec. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D117326651 fbshipit-source-id: 79129bbb1747dff2e9511809c2c54a646d0041c4 --- .../ReactCommon/react/nativemodule/dom/CMakeLists.txt | 1 + .../react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h | 2 ++ .../react/nativemodule/dom/React-domnativemodule.podspec | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/react-native/ReactCommon/react/nativemodule/dom/CMakeLists.txt b/packages/react-native/ReactCommon/react/nativemodule/dom/CMakeLists.txt index 8837fb0a66a..0138641408d 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/dom/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/nativemodule/dom/CMakeLists.txt @@ -18,6 +18,7 @@ add_library(react_nativemodule_dom target_include_directories(react_nativemodule_dom PUBLIC ${REACT_COMMON_DIR}) target_link_libraries(react_nativemodule_dom + react_cxxstableapi rrc_root react_codegen_rncore react_cxxreact diff --git a/packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h b/packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h index 19157a9cd9d..2c239875e6c 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h +++ b/packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h @@ -7,6 +7,8 @@ #pragma once +#include + #include #if __has_include("FBReactNativeSpecJSI.h") // CocoaPod headers on Apple diff --git a/packages/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec b/packages/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec index c76d33856ea..03c9a882f6a 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec @@ -55,6 +55,7 @@ Pod::Spec.new do |s| s.dependency "React-Fabric" s.dependency "React-Fabric/bridging" s.dependency "React-FabricComponents" + s.dependency "React-cxxstableapi" add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"]) add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"]) add_dependency(s, "React-RCTFBReactNativeSpec")