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

ignore babelrc in git-upgrade #20790

Closed
wants to merge 1 commit into from
Closed

ignore babelrc in git-upgrade #20790

wants to merge 1 commit into from

Conversation

ngraef
Copy link
Contributor

@ngraef ngraef commented Aug 22, 2018

Per this comment on the issue:

Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes #20710

Test Plan:

$ react-native init TestUpgrade
$ cd TestUpgrade
$ react-native-git-upgrade next

Output from react-native-git-upgrade:

git-upgrade info Generate new version template 
git-upgrade info Add updated files to commit 
git-upgrade info Commit new version template 
git-upgrade info Generate the patch between the 2 versions 
git-upgrade info Save the patch in temp directory 
git-upgrade info Reset the 2 temporary commits 
git-upgrade info Apply the patch 
git-upgrade info Upgrade done

Release Notes:

[INTERNAL] [BUGFIX] [react-native-git-upgrade/cli.js] - Prevent react-native-git-upgrade from using project's Babel 7 .babelrc

Per [this comment on the issue](facebook#20710 (comment)):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes facebook#20710
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up 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 the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@ngraef
Copy link
Contributor Author

ngraef commented Aug 22, 2018

@facebook-github-bot CLA signed

@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 Aug 22, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@kelset
Copy link
Contributor

kelset commented Aug 22, 2018

👋 thanks for submitting!
I'll try to get this merged asap :)

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Aug 22, 2018
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.

hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ngraef
Copy link
Contributor Author

ngraef commented Aug 22, 2018

I originally marked this as [INTERNAL], but I'm now realizing this will require a new version of react-native-git-upgrade because it doesn't delegate to the local package like react-native-cli does, right? If that's the case, this should probably have some release note visibility.

@hramos
Copy link
Contributor

hramos commented Aug 22, 2018

I've edited the imported diff to use CLI instead of INTERNAL in the release notes.

hramos pushed a commit that referenced this pull request Aug 22, 2018
Summary:
Per [this comment on the issue](#20710 (comment)):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes #20710
Pull Request resolved: #20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
@react-native-bot
Copy link
Collaborator

This pull request was closed by @ngraef in b4a8630.

Once this commit is added to a release, you will see the corresponding version tag below the description at b4a8630. If the commit has a single master tag, it is not yet part of a release.

@facebook facebook locked as resolved and limited conversation to collaborators Aug 22, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Aug 22, 2018
aleclarson pushed a commit to aleclarson/react-native that referenced this pull request Sep 16, 2018
Summary:
Per [this comment on the issue](facebook#20710 (comment)):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes facebook#20710
Pull Request resolved: facebook#20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
Per [this comment on the issue](facebook#20710 (comment)):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes facebook#20710
Pull Request resolved: facebook#20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
Per [this comment on the issue](facebook#20710 (comment)):

> Babel by default tries to find .babelrc files to configure itself, and once it finds the one from the RN app (which links to the RN preset that only works on Babel 7) it fails.
> The easiest patch to fix this issue is to add babelrc: false to the babel-register method, so Babel does not read any additional .babelrc file.

Fixes facebook#20710
Pull Request resolved: facebook#20790

Differential Revision: D9458502

Pulled By: hramos

fbshipit-source-id: 3a0ed7261322fdd9e0c0840f8a3944974f38b233
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.57.0-rc.0] react-native-git-upgrade and old school upgrade are broken
5 participants