-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[blog] Announcement of react-native-git-upgrade #11263
Conversation
@facebook-github-bot import |
@mkonicek has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Hi Nicolas, I've done a pass at the blogpost:
|
|
||
The standalone package is a temporary situation for a few months, it would probably never see the _1.0.0_ release: when most users will have migrated their projects to the _post-Yeoman era_ using this package, it will replace the actual `react-native upgrade` and the global package `react-native-git-upgrade` will be deprecated. |
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.
Rather than talk about deprecation of this new tool when it's announced, mention how this new hotness is going to be integrated the React Native CLI.
(Positive wording)
|
||
As a conclusion, I would say, enjoy the feature and feel free [to suggest improvements, report issues and send pull requests](https://github.com/facebook/react-native/issues). Each user has its own runtime environment, each React Native project is different, so we need you to make this process completely reliable and universal ! |
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.
Changed the wording slightly to specify what we mean by "User has their own runtime environment".
|
||
## Why a separated package ? |
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.
Kept this, just changed the wording.
$ react-native-git-upgrade 0.38.0 | ||
``` | ||
|
||
> Note: Do **not** run 'npm install' to install a new version of `react-native`. The tool needs to be able to compare the old and new project template to work correctly. Simply run it inside your app folder as shown above, while still on the old version. |
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.
Made this a bit shorter without going to the details (leaving details for the How it works section).
a) overwrite this and all others | ||
x) abort | ||
d) show the differences between the old and the new | ||
h) Help, list all options |
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.
Explain what problem react-native-git-upgrade
solves using an example, inspired by the original blogpost: https://medium.com/@ncuillery/easier-react-native-upgrades-with-rn-diff-5020b5c3de2d#.wuv996x14
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.
|
||
None of the options is what we want. By overwriting the file we lose changes we've made locally. What if we tried to resolve the conflicts automatically instead? | ||
|
||
Today I am proud to introduce a new tool which makes upgrading easier. The tool is called `react-native-git-upgrade` and uses Git behind the scenes. |
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.
Leave out the part Git is the most popular. It probably is but I'm not 100% sure and it's not important in this blogpost.
category: announcements | ||
--- | ||
|
||
Upgrading to each new version of React Native has been painful. You might have seen something like this before: |
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.
I've noted that the first sentence is actually the teaser seen on the home page. That's why I went with a long sentence introducing the blog post and encouraging people to read it:
Each release of React Native may come with changes inside the iOS and Android sub-projects that you have to report in your project. This synchronisation has always been a major pain point because of the poor changes detection within your source files. Today, I'm proud to announce a new upgrading process relying on the most popular version control system: Git.
seems like this has been published already. is the date wrong or is it mistakenly published? |
|
||
## Usage | ||
|
||
Requirements: Git has to be available in the `PATH`. Your project doesn't have to be managed by Git. |
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.
|
||
![](/react-native/blog/img/git-upgrade-output.png) | ||
|
||
You can also run `react-native-git-upgrade` with no arguments to upgrade to the latest version. |
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.
no argument
singular
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.
The word after "no" doesn't always have to be singular. Google returns a similar number of results for "no argument" and "no arguments".
|
||
React Native comes with a global CLI (the [react-native-cli](https://www.npmjs.com/package/react-native-cli) package) which delegates commands to the local CLI embedded in the `node_modules/react-native/local-cli` directory. | ||
|
||
As we mentioned above, the process has to be started from your current React Native version. If we had embedded the implementation in the local-cli, you wouldn't have been able to enjoy this feature until when using old versions of React Native. For example, you wouldn't be able to upgrade from 0.29.2 to 0.38.0 if this new upgrade code was only released in 0.38.0. |
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.
you wouldn't have been able to enjoy this feature until when using old versions of React Native
I'm not 100% sure but... I understood the opposite because of "until". Shouldn't we say "you wouldn't have been able to enjoy this feature when using old versions of React Native" ?
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.
Good catch, thanks!
|
||
## Looking ahead | ||
|
||
The logic behind `react-native-git-upgrade` described above is going to power the standard `react-native upgrade` starting with React Native version 0.40.0. |
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.
I didn't know that \o/ 🎉
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.
Oops, sorry I didn't explain that clearly!
|
||
The logic behind `react-native-git-upgrade` described above is going to power the standard `react-native upgrade` starting with React Native version 0.40.0. | ||
|
||
This means that if you are upgrading __from version 0.40.0 or higher__, you will be able to simply run `react-native upgrade` in your project without having to install anything globally. The `react-native-git-upgrade` is provided so anyone can have this improved experience now while using an older version of React Native. |
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.
Suggestion:
so anyone can have this improved experience now while using an older version of React Native.
👉 so anyone can enjoy this improved experience from today while using an older version of React Native.
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.
Nice! Thank you.
|
||
## Please try it out and provide feedback | ||
|
||
As a conclusion, I would say, enjoy the feature and feel free [to suggest improvements, report issues](https://github.com/facebook/react-native/issues) and especially [send pull requests](https://github.com/facebook/react-native/pulls). There are many configurations of operating system and Node version, each React Native project is different, and we need your feedback to make this work well for everyone. |
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.
"to make this working well for everyone" ?
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.
I believe "make sth work" is more common?
http://www.phrasemix.com/phrases/make-something-work
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.
It sounds strange to me at first, because I asked myself if "work" was a noun or a verb... but it is not really important, move forward with "make this work". 👍
Summary: Ping mkonicek ![fireshot capture 4 - easy upgrades relying on git_ - http___localhost_8079_react-native_](https://cloud.githubusercontent.com/assets/4425455/20825225/fe93bcb2-b862-11e6-8f0d-123ef2c9071f.png) Closes facebook#11263 Differential Revision: D4265603 Pulled By: mkonicek fbshipit-source-id: 8e496f0d76536744f2b25848a974f240bb5fae3e
Summary: Ping mkonicek ![fireshot capture 4 - easy upgrades relying on git_ - http___localhost_8079_react-native_](https://cloud.githubusercontent.com/assets/4425455/20825225/fe93bcb2-b862-11e6-8f0d-123ef2c9071f.png) Closes #11263 Differential Revision: D4265603 Pulled By: mkonicek fbshipit-source-id: 8e496f0d76536744f2b25848a974f240bb5fae3e
Summary: Ping mkonicek ![fireshot capture 4 - easy upgrades relying on git_ - http___localhost_8079_react-native_](https://cloud.githubusercontent.com/assets/4425455/20825225/fe93bcb2-b862-11e6-8f0d-123ef2c9071f.png) Closes facebook#11263 Differential Revision: D4265603 Pulled By: mkonicek fbshipit-source-id: 8e496f0d76536744f2b25848a974f240bb5fae3e
Ping @mkonicek