react-native-community / upgrade-helper

⚛️ A web tool to support React Native developers in upgrading their apps.
https://react-native-community.github.io/upgrade-helper
MIT License
3.67k stars 112 forks source link

Fix issue with AppName stripping incorrectly. #379

Open blakef opened 9 months ago

blakef commented 9 months ago

Handles cases where appName wasn't playing nicely with it's default value.

Summary

The appName is meant to be stripped off in various places. When setting the default, the actual value passed around is ''. This change does 2 things:

  1. makes regex stricter to only match against prefixes, and
  2. passes the default appName down the tree when an empty string is inputted.

Before

CleanShot 2024-02-26 at 16 05 45@2x

After

https://github.com/react-native-community/upgrade-helper/assets/49578/5b467ea7-2415-4879-a40b-4bf4cbeb701d

Test Plan

yarn start

What are the steps to reproduce?

You can see it live.

Checklist

blakef commented 9 months ago

~Well that's note entirely working 😉... BRB.~ Fixed.

frankcalise commented 7 months ago

Should close #381 and #382