Skip to content

Expose 'react-native/setup-env' to replace InitializeCore (#57461) - #57461

Closed
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D110890810
Closed

Expose 'react-native/setup-env' to replace InitializeCore (#57461)#57461
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D110890810

Conversation

@huntie

@huntiehuntie commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary:

Replace 'react-native/Libraries/Core/InitializeCore' with an explicit 'react-native/setup-env' secondary export.

This was previously a special-case path excluded from our ESLint warnings. It is now formalised.

Changes

  • Add new src/setup-env.js entry point and package.json mapping.
  • Replace references in packages/metro-config/ and packages/community-cli-plugin/.
  • Update warn-on-deep-imports ESLint rule.

Changelog:
[General][Added] - Add 'react-native/setup-env' entry point. This replaces the previous side-effectful 'react-native/Libraries/Core/InitializeCore'.
[General][Deprecated] - Deprecate 'react-native/Libraries/Core/InitializeCore'. Use 'react-native/setup-env' instead.

Reviewed By: rubennorte

Differential Revision: D110890810

@meta-clameta-claBot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 7, 2026
@meta-codesync

Copy link
Copy Markdown

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110890810.

@huntiehuntie added the JS API stabilization (1.0) Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API) label Jul 7, 2026
@meta-codesyncmeta-codesyncBot changed the title Expose 'react-native/setup-env' to replace InitializeCoreExpose 'react-native/setup-env' to replace InitializeCore (#57461)Jul 7, 2026
@huntie
huntieforce-pushed the export-D110890810 branch from 62e271c to 07c29e3CompareJuly 7, 2026 16:35
huntie added a commit to huntie/react-native that referenced this pull request Jul 7, 2026
Summary:
Replace `'react-native/Libraries/Core/InitializeCore'` with an explicit `'react-native/setup-env'` secondary export.
This was previously a special-case path excluded from our ESLint warnings. It is now formalised.
**Changes**
- Add new `src/setup-env.js` entry point and `package.json` mapping.
- Replace references in `packages/metro-config/` and `packages/community-cli-plugin/`.
- Update `warn-on-deep-imports` ESLint rule.
Changelog: [General][Added] - Add `'react-native/setup-env'` entry point. This replaces the previous side-effectful `'react-native/Libraries/Core/InitializeCore'`. [General][Deprecated] - Deprecate `'react-native/Libraries/Core/InitializeCore'`. Use `'react-native/setup-env'` instead.
Reviewed By: rubennorte
Differential Revision: D110890810
Summary:
Replace `'react-native/Libraries/Core/InitializeCore'` with an explicit `'react-native/setup-env'` secondary export.
This was previously a special-case path excluded from our ESLint warnings. It is now formalised.
**Changes**
- Add new `src/setup-env.js` entry point and `package.json` mapping.
- Replace references in `packages/metro-config/` and `packages/community-cli-plugin/`.
- Update `warn-on-deep-imports` ESLint rule.
Changelog: [General][Added] - Add `'react-native/setup-env'` entry point. This replaces the previous side-effectful `'react-native/Libraries/Core/InitializeCore'`. [General][Deprecated] - Deprecate `'react-native/Libraries/Core/InitializeCore'`. Use `'react-native/setup-env'` instead.
Reviewed By: rubennorte
Differential Revision: D110890810
@huntie
huntieforce-pushed the export-D110890810 branch from 07c29e3 to 5f5edfdCompareJuly 7, 2026 17:33
@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Jul 7, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in 554baba.

@facebook-github-tools

Copy link
Copy Markdown

This pull request has been reverted by 904f0ae.

@huntie
huntie deleted the export-D110890810 branch July 8, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.JS API stabilization (1.0)Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API)MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartnerReverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@huntie