mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove index.js.flow shim from Node packages (#49461)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49461 Flow now supports Package Exports 🎉. This means we can delete the compatiblity pattern in each of our build-enabled Node.js packages. This simplifies the internal package structure needed to support Flow while developing from source in the monorepo — no prod impact. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D69741143 fbshipit-source-id: 070715cb6beb00eb393186dbf95856ceb87fabef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d41f56176c
commit
f940be1caa
@@ -1,12 +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
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
export * from './src';
|
||||
@@ -1,12 +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
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
export * from './src';
|
||||
@@ -1,12 +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
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
export * from './src';
|
||||
@@ -72,13 +72,11 @@ packages/
|
||||
index.js # Entry point wrapper file (calls babel-register.js) (compiled away)
|
||||
index.flow.js # Entry point implementation in Flow
|
||||
[other files]
|
||||
index.js.flow # Shim for the Flow typechecker
|
||||
package.json # Includes "exports" field, ideally only src/index.js
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- The additional root `index.js.flow` shim is needed due to Flow itself not supporting Package Exports.
|
||||
- To minimize complexity, prefer only a single entry of `{".": "src/index.js"}` in `"exports"` for new packages.
|
||||
|
||||
## Build behavior
|
||||
|
||||
Reference in New Issue
Block a user