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

refactor(cli-platform-apple): move installing and launching app logic to separate function #2234

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

Moves installing and launching app logic to separate function, so that adding additional logic for another platforms will be fairly easy.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js run-ios

Works same as before.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@github-actions github-actions bot added the infra Internal work not facing public APIs label Dec 22, 2023
buildOutput: string,
scheme: string,
target: string | undefined,
buildSettings: any,
Copy link
Member

Choose a reason for hiding this comment

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

can we refine that type?

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be of type BuildSettings from here

}

type Options = {
buildOutput: any;
Copy link
Member

@thymikee thymikee Dec 27, 2023

Choose a reason for hiding this comment

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

Let's add some basic type. According to data flow this can be undefined and I'm not sure if it's handled properly

@szymonrybczak szymonrybczak force-pushed the chore/refactor-install-app branch 2 times, most recently from c7efeca to 140c015 Compare January 2, 2024 16:54
Comment on lines +54 to +60
if (!buildSettings) {
throw new CLIError('Failed to get build settings for your project');
}
Copy link
Collaborator Author

@szymonrybczak szymonrybczak Jan 2, 2024

Choose a reason for hiding this comment

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

That's also not the most informative error ever, soon in a separate PR I'll fix all errors in this place :)

buildOutput: string,
scheme: string,
target: string | undefined,
buildSettings: any,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be of type BuildSettings from here

@thymikee thymikee merged commit 296e640 into main Jan 3, 2024
10 checks passed
@thymikee thymikee deleted the chore/refactor-install-app branch January 3, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Internal work not facing public APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants