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

[blog] Announcement of react-native-git-upgrade #11263

Closed
wants to merge 2 commits into from

Conversation

ncuillery
Copy link
Contributor

Ping @mkonicek

fireshot capture 4 - easy upgrades relying on git_ - http___localhost_8079_react-native_

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved. labels Dec 2, 2016
@mkonicek
Copy link
Contributor

mkonicek commented Dec 2, 2016

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

@mkonicek has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mkonicek
Copy link
Contributor

mkonicek commented Dec 2, 2016

Hi Nicolas, I've done a pass at the blogpost:

  • Added an introduction to the current state of upgrading, inspired by your original blogpost, I think this can be useful to se the context so everyone knows what exact problem react-native-git-upgrade is solving
  • Moved the Usage section closer to the beginning as this will likely be the most interesting section to people (copy&paste ftw), after which they can decide to immediately go and try it, or continue reading
  • Made wording and grammar changes


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.
Copy link
Contributor

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 !
Copy link
Contributor

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 ?
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

I think we could have a better looking with a colorful screenshot rather than the code snippet. What do you think ?
yeoman_output


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.
Copy link
Contributor

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:
Copy link
Contributor Author

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.

At the current time, the home page looks like this:
capture d ecran 2016-12-03 a 13 53 46

@edvinerikson
Copy link

seems like this has been published already. is the date wrong or is it mistakenly published?
https://facebook.github.io/react-native/blog/2016/12/05/easy-upgrades-processed-by-git.html


## Usage

Requirements: Git has to be available in the `PATH`. Your project doesn't have to be managed by Git.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Quote character to wrap this in a orange block ?

Requirement should be singular, this is the only one 💪

Preview (with "requirement:" bold):
capture d ecran 2016-12-03 a 14 31 49


![](/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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no argument

singular

Copy link
Contributor

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.
Copy link
Contributor Author

@ncuillery ncuillery Dec 3, 2016

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" ?

Copy link
Contributor

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.
Copy link
Contributor Author

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/ 🎉

Copy link
Contributor

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.
Copy link
Contributor Author

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.

Copy link
Contributor

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.
Copy link
Contributor Author

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" ?

Copy link
Contributor

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

Copy link
Contributor Author

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". 👍

robclouth pushed a commit to robclouth/react-native that referenced this pull request Dec 7, 2016
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
mkonicek pushed a commit that referenced this pull request Dec 12, 2016
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
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this pull request Jan 4, 2017
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
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. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants