microsoft / react-native-test-app

react-native-test-app provides an app for all supported platforms as a package
MIT License
595 stars 91 forks source link

fix: fix `configure-test-app` crashing on 0.75 #2190

Closed tido64 closed 2 months ago

tido64 commented 2 months ago

Description

Fixes configure-test-app crashing on 0.75

Resolves #2187

Platforms affected

Test plan

npm run set-react-version 0.75 -- --core-only
yarn
cd example
yarn configure-test-app -p android -p ios -p macos -p visionos -p windows

Expected output:

Downloading template-0.75.1.tgz...
[!] react-native-macos@0.75 cannot be added because it does not exist or is unsupported
[!] The following files will be overwritten:
     .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
     metro.config.js
     react-native.config.js
     visionos/Podfile
     windows/.gitignore
[!] The following files will be removed:
     ios/Podfile.lock
     visionos/Podfile.lock
[!] Destructive file operations are required.
Re-run with --force if you're fine with this.

If you run the last command again, we should no longer download the template.