Skip to content

Conversation

@aswinandro
Copy link
Contributor

fixes #40314 - index.flow.js - Added Index.flow.js for MacOS Systems

Summary:

Changelog:

Add index.js.flow to npm package files for Flow support

Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects.

FIXED - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Test Plan:

fixes facebook#40314 - index.flow.js - Added Index.flow.js for MacOS Systems
@facebook-github-bot
Copy link
Contributor

Hi @aswinandro!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@react-native-bot
Copy link
Collaborator

react-native-bot commented Jun 8, 2025

Fails
🚫

📋 Verify Changelog Format - See Changelog format

Generated by 🚫 dangerJS against 5b44afd

@facebook-github-bot facebook-github-bot 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 Jun 8, 2025
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 8, 2025
@huntie
Copy link
Member

huntie commented Jun 9, 2025

@aswinandro Hey! Happy to accept this. But what I would say too is we haven't been considering our open source support for React Native + Flow as supported for a couple of years 😅

  • This does mean that on upgrading to 0.79 and 0.80, we made quite a lot of internal type changes — including the new index.js.flow entry point, but also many changes to our Flow type shapes to align better with TypeScript/source. So, you'll need to keep up with these and there were several breaking changes 🙏🏻
  • Do consider migrating projects to TypeScript for long term support.

See also #51556 recently.

@facebook-github-bot
Copy link
Contributor

@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Member

@huntie huntie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, we cannot accept any of the file changes to index.js.flow itself — please update to include only the package.json change.

Preserved Original index.flow.js
@huntie
Copy link
Member

huntie commented Jun 9, 2025

Replaced by #51908.

@huntie huntie closed this Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants