Narrow root wildcard entry point - #57276
Closed
huntie wants to merge 2 commits into
Closed
Conversation
Summary: This appears to be a legacy, dangling, Flow-only entry point which we can remove. Changelog: [Internal] Differential Revision: D109018822
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
|
@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109018823. |
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 18, 2026
Summary: Simplify `"exports"` mapping on the `react-native` package by replacing the `"./*"` wildcard export with explicit listed subpaths (invert from blocklist to allowlist). These changes are **non-breaking** — the net accessible exports subpaths before/after are equivalent. Changelog: [Internal] Differential Revision: D109018823
huntie
added a commit
to huntie/react-native
that referenced
this pull request
Jun 18, 2026
Summary: Simplify `"exports"` mapping on the `react-native` package by replacing the `"./*"` wildcard export with explicit listed subpaths (invert from blocklist to allowlist). These changes are **non-breaking** — the net accessible exports subpaths before/after are equivalent. Changelog: [Internal] Differential Revision: D109018823
|
This pull request has been merged in cd0d93a. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jun 29, 2026
Summary: Pull Request resolved: #57362 The `"./types/*.d.ts"` entry was an overly defensive addition during our non-breaking `"exports"` field addition back in 0.80. In reality, this subpath has no real consumers: the legacy types entry point (`.`) resolves its own declaration files through relative references, and the supported deep-import surface is `react-native/Libraries/*`, not `react-native/types/*`. Type resolution of the main entry point and of `react-native/Libraries/*` deep imports is unaffected, and there is no runtime impact (these are declaration files). Follows the exports-map cleanup in #57276. Changelog: [Internal] Reviewed By: javache Differential Revision: D110044754 fbshipit-source-id: 0ddea81417e765503de01c8c43800f4114c81eb3
meta-codesync Bot
pushed a commit
that referenced
this pull request
Jul 28, 2026
Summary: Pull Request resolved: #57718 **Context** Replaces #57709, which identified a real bug in 0.87 from the combination of: - #57276 - #57652 ``` $ npx react-native spm add error Cannot find module '.../node_modules/react-native/scripts/setup-apple-spm' $ npx react-native codegen error Cannot find module '.../node_modules/react-native/scripts/codegen/generate-artifacts-executor' ``` **This diff** - Fix — and exclusively switch to — extensionless imports rather than requiring `.js`. - Update in-repo consumers. The previous single mapping is now an extension-aware mapping: - `./scripts/*` now appends `.js`, so `react-native/scripts/foo` resolves to `foo.js`. - `.sh` and `.rb` stay reachable via explicit `./scripts/*.sh` and `./scripts/*.rb` passthrough patterns. **Impact** - Explicit `react-native/scripts/*.js` specifiers no longer resolve, so JavaScript paths must be imported without an extension. - Files under `scripts/` with extensions other than `.js`, `.sh`, or `.rb` are no longer exposed through `./scripts/*`. - These have no open source consumers. Changelog: [General][Fixed] - (RC4 only, drop for main changelog): `react-native/scripts/*` imports once again expand `.js` extensions [General][Breaking] - Extensionless `react-native/scripts/*` imports are now **mandated**; explicit `.js` import specifiers are rejected. Reviewed By: rubennorte Differential Revision: D113898792 fbshipit-source-id: d72f60be2c08ab97871e336645856c9029e74ae2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Simplify
"exports"mapping on thereact-nativepackage by replacing the"./*"wildcard export with explicit listed subpaths (invert from blocklist to allowlist).These changes are non-breaking — the net accessible exports subpaths before/after are equivalent.
Changelog: [Internal]
Differential Revision: D109018823