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(config): make it clear that configure-test-app performs a reset #2262

Merged
merged 8 commits into from
Sep 30, 2024

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Sep 26, 2024

Description

Change the messaging to make it clear that we're doing factory reset.

Resolves #2260.

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

cd example
yarn configure-test-app

Expected output:

% yarn configure-test-app
[!] The following files will be reset to their original state:
     .gitignore
     .watchmanconfig
     android/build.gradle
     android/gradle.properties
     android/gradle/wrapper/gradle-wrapper.jar
     android/gradle/wrapper/gradle-wrapper.properties
     android/gradlew
     android/gradlew.bat
     android/settings.gradle
     babel.config.js
     ios/Podfile
     macos/Podfile
     metro.config.js
     react-native.config.js
     windows/.gitignore
[!] The following files will be removed:
     ios/Podfile.lock
     macos/Podfile.lock
[!] Some files will be reset and/or removed: You may have to manually restore any customizations to get the app working again (for more details, see https://github.com/microsoft/react-native-test-app/wiki/Updating#reconfiguringresetting-rnta)
Re-run with --force if you're fine with this.

@github-actions github-actions bot added platform: Android This affects Android platform: iOS This affects iOS platform: macOS This affects macOS platform: Windows This affects Windows platform: visionOS labels Sep 26, 2024
Copy link

@JasonVMo JasonVMo left a comment

Choose a reason for hiding this comment

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

The one question here is how often this is run. If this is run all the time then I would warn when we do modify the config. If it is only when configuring a project then the existing behavior makes sense. I'm assuming that this runs as part of project configuration.

@tido64
Copy link
Member Author

tido64 commented Sep 27, 2024

The one question here is how often this is run. If this is run all the time then I would warn when we do modify the config. If it is only when configuring a project then the existing behavior makes sense. I'm assuming that this runs as part of project configuration.

On second thought, I think you're right. The warning should only appear when you explicitly run configure-test-app in an existing app. Since the command acts as a reset, it's reasonable that it overwrites your configs. I've changed the messaging to be clearer and updated the wiki about this.

@tido64 tido64 changed the title fix(config): don't overwrite react-native.config.js if it may be configured fix(config): make it clear that configure-test-app performs a reset Sep 27, 2024
@shamilovtim
Copy link

Consider adding very specific warnings for react-native-builder-bob users? Wouldn't hurt and might reduce some thrash / pain for maintainers of both repos

@tido64
Copy link
Member Author

tido64 commented Sep 30, 2024

Consider adding very specific warnings for react-native-builder-bob users? Wouldn't hurt and might reduce some thrash / pain for maintainers of both repos

I've changed the wording to include "template". I don't think we want to specifically call out react-native-builder-bob as there are other templates out there.

@tido64 tido64 enabled auto-merge (squash) September 30, 2024 08:36
@tido64 tido64 merged commit 1c7e998 into trunk Sep 30, 2024
27 checks passed
@tido64 tido64 deleted the tido/try-detect-react-native.config branch September 30, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android This affects Android platform: iOS This affects iOS platform: macOS This affects macOS platform: visionOS platform: Windows This affects Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running configure-test-app breaks react-native-builder-bob based projects
4 participants