Skip to content

[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

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented May 10, 2019

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 and yarn flow-check-android

@ide ide requested a review from cpojer May 10, 2019 22:34
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner labels May 10, 2019
@ide ide force-pushed the standard-paths-flow branch from 99440e6 to 8325708 Compare May 31, 2019 19:30
@ide ide marked this pull request as ready for review May 31, 2019 19:33
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.
@ide ide force-pushed the standard-paths-flow branch from 8325708 to f0fe640 Compare June 4, 2019 22:56
Copy link
Contributor

@cpojer cpojer left a 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.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @ide in bf8d918.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jun 5, 2019
@ide ide deleted the standard-paths-flow branch June 6, 2019 00:04
vovkasm pushed a commit to vovkasm/react-native that referenced this pull request Aug 7, 2019
…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)
M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this pull request Mar 10, 2020
…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
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. Flow Merged This PR has been merged. p: Expo Partner: Expo Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants