From 7532f89ed468b09101da4d3063422bf723236f4a Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 18 Jun 2026 06:35:06 -0700 Subject: [PATCH 1/2] Delete interface.js (Flow) Summary: This appears to be a legacy, dangling, Flow-only entry point which we can remove. Changelog: [Internal] Differential Revision: D109018822 --- packages/react-native/interface.js | 21 --------------------- packages/react-native/package.json | 1 - 2 files changed, 22 deletions(-) delete mode 100644 packages/react-native/interface.js diff --git a/packages/react-native/interface.js b/packages/react-native/interface.js deleted file mode 100644 index b17169a6b153..000000000000 --- a/packages/react-native/interface.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - */ - -'use strict'; - -// NOTE: Hmm... I don't think declaring variables within this module actually -// accomplishes anything besides documenting that these globals are expected to -// exist. So I think the correct "fix" to this lint warning is to delete this -// entire file. But in lieu of doing that... no harm for now in keeping this -// file around, even if it is only for documentation purposes. ¯\_(ツ)_/¯ - -/* eslint-disable no-unused-vars */ - -declare var __DEV__: boolean; diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 6ea146756613..01ad9377f2c3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -80,7 +80,6 @@ "gradle/libs.versions.toml", "index.js", "index.js.flow", - "interface.js", "jest-preset.js", "Libraries", "LICENSE", From 4a0187e8bce667be25edaeb5abf37da24f2113d4 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Thu, 18 Jun 2026 06:35:06 -0700 Subject: [PATCH 2/2] Narrow root wildcard entry point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Simplify `"exports"` mapping on the `react-native` package by replacing the `"./*"` wildcard export with explicit listed subpaths. These changes are **non-breaking** — the net accessible exports subpaths before/after are equivalent. Changelog: [Internal] Differential Revision: D109018823 --- packages/react-native/package.json | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 01ad9377f2c3..ce52edc09e9a 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -34,14 +34,14 @@ "types": "./types/index.d.ts", "default": "./index.js" }, - "./*": { + "./Libraries/*": { "react-native-strict-api": null, - "types": "./*.d.ts", - "default": "./*.js" + "types": "./Libraries/*.d.ts", + "default": "./Libraries/*.js" }, - "./*.js": { + "./Libraries/*.js": { "react-native-strict-api": null, - "default": "./*.js" + "default": "./Libraries/*.js" }, "./Libraries/*.d.ts": { "react-native-strict-api": null, @@ -56,16 +56,9 @@ "react-native-strict-api": null, "default": "./types/*.d.ts" }, - "./gradle/*": null, - "./React/*": null, - "./ReactAndroid/*": null, - "./ReactApple/*": null, - "./ReactCommon/*": null, - "./sdks/*": null, + "./jest-preset": "./jest-preset.js", + "./rn-get-polyfills": "./rn-get-polyfills.js", "./src/fb_internal/*": "./src/fb_internal/*", - "./third-party-podspecs/*": null, - "./types/*": null, - "./types_generated/*": null, "./package.json": "./package.json" }, "jest-junit": {