-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[standards] Make Flow configs use path-based imports instead of Haste #24812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options. Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste. Test plan: `yarn flow-check-ios` and `yarn flow-check-android`. Verified the template `_flowconfig` is the same as this repo's `.flowconfig` aside from some small changes to paths and repo-specific files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a day to be alive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @ide in bf8d918. When will my fix make it into a release? | Upcoming Releases |
…4812) Summary: **Depends on facebook#25100 This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options. Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste. ## Changelog [General] [Changed] - Make Flow configs use path-based imports instead of Haste Pull Request resolved: facebook#24812 Differential Revision: D15659189 Pulled By: cpojer fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566 (cherry picked from commit bf8d918)
…4812) Summary: **Depends on facebook#25100 This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options. Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste. ## Changelog [General] [Changed] - Make Flow configs use path-based imports instead of Haste Pull Request resolved: facebook#24812 Differential Revision: D15659189 Pulled By: cpojer fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566
Summary
Depends on #25100
This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options.
Additionally, it maps
react-native
to import from within this module to match Node's module resolution behavior. It also adds<PROJECT_ROOT>
to the image name mapper so that the mapped name doesn't rely on Haste.Changelog
[General] [Changed] - Make Flow configs use path-based imports instead of Haste
Test Plan
yarn flow-check-ios
andyarn flow-check-android