From 0968707ef7be95d7f797fbc4544f4f2cf0fce7c7 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 29 Apr 2025 07:52:24 -0700 Subject: [PATCH] Create src/fb_internal/ directory, initially migrate VirtualView (#50965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50965 While D72228547 has recently disallowed all `./src/*` subpath imports from React Native (functionally, `./src/private/*`), we have a number of APIs that are imported from Meta product code legitimately — e.g. as part of validating under-development React Native features internally in real Meta apps. This diff defines a new, exported `./src/fb_internal/*` subpath via `package.json#exports`, which will allow us to expose select entry points for this purpose. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D73770609 fbshipit-source-id: 397019669e565b95a86302ef30f80b65a17dcc0d --- .flowconfig | 3 +++ packages/react-native/package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/.flowconfig b/.flowconfig index 136363175f7..9daf294a30e 100644 --- a/.flowconfig +++ b/.flowconfig @@ -2,6 +2,9 @@ ; Ignore build cache folder /packages/react-native/sdks/.* +; Ignore fb_internal modules +/packages/react-native/src/fb_internal/.* + ; Ignore the codegen e2e tests /packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 4da1e5441b0..6b0698bfbeb 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -60,6 +60,7 @@ "./ReactApple/*": null, "./ReactCommon/*": null, "./sdks/*": null, + "./src/fb_internal/*": "./src/fb_internal/*", "./src/*": null, "./third-party-podspecs/*": null, "./types/*": null,