Skip to content
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

Sync React with Haste-style imports rewritten to use path-based imports instead #25100

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented May 31, 2019

Summary

This is a manual React sync to replace Haste names with paths so that the removal of Haste is not blocked on a normal React sync. This is a one-time special case; in the future, React will generate renderers that use paths instead of Haste.

This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer (61f62246c8cfb76a4a19d1661eeaa5822ec37b36) and a commit to make the shims import from implementations (facebook/react#15786).

I built React in the React repo with yarn build and copied over the oss directory into one called implementations and removed the *.fb.js files.

Changelog

[General] [Changed] - Sync React with Haste-style imports rewritten to use path-based imports instead

Test Plan

Run unit tests, RNTester, CI. Also verified that we can make Metro pick up .fb.js files with:

resolver: {
  sourceExts: ['fb.js', 'js', 'json', ...],
}

…ts instead

This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer and a commit to make the shims import from `implementations` (facebook/react#15786).

I built React in the React repo with `yarn build` and copied over the `oss` directory into one called `implementations` and removed the `*.fb.js` files.

Test plan: run unit tests, RNTester, CI. Also verified that we can make Metro pick up `.fb.js` files with:

```js
resolver: {
  sourceExts: ['fb.js', 'js', 'json', ...],
}
```
@ide ide requested a review from cpojer May 31, 2019 03:48
@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 31, 2019
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.

Let me import it.

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 has imported 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 69d1ed7.

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
pull bot pushed a commit to senseobservationsystems/react-native that referenced this pull request Jun 5, 2019
…facebook#24811)

Summary:
**Depends on facebook#25100

This commit depends on having migrated all of RN away from Haste. With 100% standard path-based requires, the key foundation is set and we no longer need `hasteImpl` and related settings in the Jest configuration.

This commit deletes the `hasteImpl` file and setting as well as `providesModuleNodeModules` and `modulePathNameMapper`, removing most of the dependency graph overriding performed by Jest.

## Changelog

[General] [Changed] - Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper from Jest config
Pull Request resolved: facebook#24811

Differential Revision: D15659274

Pulled By: cpojer

fbshipit-source-id: 8a4a3b97ddf7e38fbe62c6d3cc9c98248bfca343
facebook-github-bot pushed a commit that referenced this pull request Jun 5, 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
Pull Request resolved: #24812

Differential Revision: D15659189

Pulled By: cpojer

fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566
vovkasm pushed a commit to vovkasm/react-native that referenced this pull request Aug 7, 2019
…ts instead (facebook#25100)

Summary:
**This is a manual React sync to replace Haste names with paths so that the removal of Haste is not blocked on a normal React sync. This is a one-time special case; in the future, React will generate renderers that use paths instead of Haste.**

This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer (61f62246c8cfb76a4a19d1661eeaa5822ec37b36) and a commit to make the shims import from `implementations` (facebook/react#15786).

I built React in the React repo with `yarn build` and copied over the `oss` directory into one called `implementations` and removed the `*.fb.js` files.

## Changelog

[General] [Changed] - Sync React with Haste-style imports rewritten to use path-based imports instead
Pull Request resolved: facebook#25100

Reviewed By: yungsters

Differential Revision: D15575646

Pulled By: cpojer

fbshipit-source-id: adf25f9826b71729043b65ba1afd20d14d8c19c4
(cherry picked from commit 69d1ed7)
vovkasm pushed a commit to vovkasm/react-native that referenced this pull request Aug 7, 2019
…facebook#24811)

Summary:
**Depends on facebook#25100

This commit depends on having migrated all of RN away from Haste. With 100% standard path-based requires, the key foundation is set and we no longer need `hasteImpl` and related settings in the Jest configuration.

This commit deletes the `hasteImpl` file and setting as well as `providesModuleNodeModules` and `modulePathNameMapper`, removing most of the dependency graph overriding performed by Jest.

## Changelog

[General] [Changed] - Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper from Jest config
Pull Request resolved: facebook#24811

Differential Revision: D15659274

Pulled By: cpojer

fbshipit-source-id: 8a4a3b97ddf7e38fbe62c6d3cc9c98248bfca343
(cherry picked from commit 7a2463e)
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)
aleclarson pushed a commit to alloc/react-native-macos that referenced this pull request Nov 2, 2019
…ts instead (#25100)

Summary:
**This is a manual React sync to replace Haste names with paths so that the removal of Haste is not blocked on a normal React sync. This is a one-time special case; in the future, React will generate renderers that use paths instead of Haste.**

This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer (61f62246c8cfb76a4a19d1661eeaa5822ec37b36) and a commit to make the shims import from `implementations` (facebook/react#15786).

I built React in the React repo with `yarn build` and copied over the `oss` directory into one called `implementations` and removed the `*.fb.js` files.

## Changelog

[General] [Changed] - Sync React with Haste-style imports rewritten to use path-based imports instead
Pull Request resolved: facebook/react-native#25100

Reviewed By: yungsters

Differential Revision: D15575646

Pulled By: cpojer

fbshipit-source-id: adf25f9826b71729043b65ba1afd20d14d8c19c4
M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this pull request Mar 10, 2020
…ts instead (facebook#25100)

Summary:
**This is a manual React sync to replace Haste names with paths so that the removal of Haste is not blocked on a normal React sync. This is a one-time special case; in the future, React will generate renderers that use paths instead of Haste.**

This commit uses the same base commit of React that's currently in RN (React ec6691a68716bc59291746fc62f374a56fb435c9) plus a commit in the React repo that removes Haste-style imports from the renderer (61f62246c8cfb76a4a19d1661eeaa5822ec37b36) and a commit to make the shims import from `implementations` (facebook/react#15786).

I built React in the React repo with `yarn build` and copied over the `oss` directory into one called `implementations` and removed the `*.fb.js` files.

## Changelog

[General] [Changed] - Sync React with Haste-style imports rewritten to use path-based imports instead
Pull Request resolved: facebook#25100

Reviewed By: yungsters

Differential Revision: D15575646

Pulled By: cpojer

fbshipit-source-id: adf25f9826b71729043b65ba1afd20d14d8c19c4
M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this pull request Mar 10, 2020
…facebook#24811)

Summary:
**Depends on facebook#25100

This commit depends on having migrated all of RN away from Haste. With 100% standard path-based requires, the key foundation is set and we no longer need `hasteImpl` and related settings in the Jest configuration.

This commit deletes the `hasteImpl` file and setting as well as `providesModuleNodeModules` and `modulePathNameMapper`, removing most of the dependency graph overriding performed by Jest.

## Changelog

[General] [Changed] - Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper from Jest config
Pull Request resolved: facebook#24811

Differential Revision: D15659274

Pulled By: cpojer

fbshipit-source-id: 8a4a3b97ddf7e38fbe62c6d3cc9c98248bfca343
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
@ide ide deleted the standard-paths-renderer branch April 25, 2020 08:29
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jun 11, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jun 12, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 8, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 9, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 9, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 10, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 11, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 11, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
gnprice pushed a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 13, 2020
Part of the RN v0.60 -> v0.61 changes to the template app [1],
corresponding to facebook/react-native@bf8d91868 and a correction in
facebook/react-native@732ded7f7. This must happen at or after the
main upgrade commit because the former declares that it depends on
facebook/react-native#25100, which landed in
facebook/react-native@69d1ed731 and was released in v0.61.0.

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.60.6&to=0.61.5
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. 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