dillon1000/react

Commit

[RN] Update ReactPrivate and InitializeCore imports (0.87 Strict API) (#36986)

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](https://github.com/react-native-community/discussions-and-proposals/pull/894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react/react-native#57475](https://github.com/react/react-native/pull/57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react/react-native#57495](https://github.com/react/react-native/pull/57495)

## Test Plan

Flow
Browse files
Changed paths16 files
First-parent comparison
M packages/react-native-renderer/src/ReactFabric.js ModifiedM packages/react-native-renderer/src/ReactFabricEventEmitter.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigFabric.js ModifiedM packages/react-native-renderer/src/ReactNativeBridgeEventPlugin.js ModifiedM packages/react-native-renderer/src/ReactNativeFiberInspector.js ModifiedM packages/react-native-renderer/src/ReactNativeInjectionShared.js ModifiedM packages/react-native-renderer/src/ReactNativePublicCompat.js ModifiedA packages/react-native-renderer/src/__mocks__/react-native/react-private-interface.js AddedR packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js →packages/react-native-renderer/src/__mocks__/react-native/setup-env.js RenamedM packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js ModifiedM packages/react-native-renderer/src/__tests__/ReactFabricFragmentRefs-test.internal.js ModifiedM packages/react-native-renderer/src/__tests__/ReactNativeError-test.internal.js ModifiedM scripts/flow/react-native-host-hooks.js ModifiedM scripts/rollup/modules.js ModifiedM scripts/rollup/shims/react-native/ReactFabric.js ModifiedM scripts/rollup/shims/react-native/createReactNativeComponentClass.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…