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

feat: log files in selected directory and add option to replace them #2100

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

In this PR I added option to replace existing files in the selected directory.
Related #1591

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Create a directory hello with few files
  3. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js init hello
  1. Should ask do user want to replace existing files.
  2. If yes, it deletes directory.
  3. If not, it prints an error.

Checklist

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

@szymonrybczak szymonrybczak changed the title feat: log files in selected directory and option to replace them feat: log files in selected directory and add option to replace them Oct 6, 2023
@szymonrybczak
Copy link
Collaborator Author

szymonrybczak commented Oct 8, 2023

There's a problem with mocking prompts library when running CLI commands, if calling function directly from test - mocking works correctly if calling via runCLI then mocked values are not taken into account.

@github-actions github-actions bot added the docs Documentation change label Oct 9, 2023
@szymonrybczak szymonrybczak mentioned this pull request Oct 10, 2023
2 tasks
@szymonrybczak szymonrybczak force-pushed the feat/log-files-in-directory branch 6 times, most recently from bbe7b3b to 3532c73 Compare November 4, 2023 11:58
@szymonrybczak
Copy link
Collaborator Author

CI green, @thymikee mind going through changes?

Comment on lines 95 to 135
for (const conflict of conflicts) {
logger.log(` ${conflict}`);
}
Copy link
Member

Choose a reason for hiding this comment

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

this should be the part of the logger.warn so that the connected messages are kept together. In case someone wanted to only inspect "warn"s they wouldn't see relevant data for this message

@szymonrybczak szymonrybczak force-pushed the feat/log-files-in-directory branch 3 times, most recently from 101ec96 to 50a5627 Compare January 3, 2024 15:31
@szymonrybczak
Copy link
Collaborator Author

CI Green, good to merge!

@thymikee thymikee merged commit acf792c into main Jan 15, 2024
10 checks passed
@thymikee thymikee deleted the feat/log-files-in-directory branch January 15, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation change feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants