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

fix: remove useless check in upgrade command #1968

Merged

Conversation

szymonrybczak
Copy link
Collaborator

@szymonrybczak szymonrybczak commented Jun 15, 2023

Summary:

This PR removes useless check which actually caused error when the version was released less than week ago, and if yes it returns nothing - what caused strange situation. For example if I were on 0.71.11 (latest release) and I ran upgrade command I had an error "Cannot figure out your...", from this line:

const update = await version.latest(projectDir);
if (!update?.current) {
logger.error(
`Cannot figure out your version of React Native, use: ${chalk.dim(
url.toString(),
)}`,
);

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Create app with npx react-native@latest init --version 0.71.10
  3. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js upgrade

This command should give this output:

To upgrade React Native please follow the instructions here:

  https://react-native-community.github.io/upgrade-helper?from=0.71.10&to=0.71.11

@thymikee thymikee merged commit 3b3b497 into react-native-community:main Jun 22, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants