-
-
Notifications
You must be signed in to change notification settings - Fork 13
fix(ios): improve bundle identifier detection and replacement #87
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
base: main
Are you sure you want to change the base?
Conversation
smithemely
commented
Apr 22, 2025
- fix: handle both quoted and unquoted bundle identifiers
- feat: implement smarter base identifier detection logic
- fix: properly preserve extensions with multiple segments
…edGuy#86) * fix: handle both quoted and unquoted bundle identifiers * feat: implement smarter base identifier detection logic * fix: properly preserve extensions with multiple segments
I tested the updated implementation with various bundle identifier patterns in real projects, and it works correctly. The solution now handles:
This fix ensures bundle identifiers are consistently renamed throughout the project file while maintaining the structure of complex extension identifiers. It's more robust than the previous implementation. |
I'll test this once I get some free time. Although I was thinking of adding an additional property where users can provide the old package name, so no need for any complex logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to be. Just few questions and changes.
* fix: use RegExp.escape to safely handle special characters * perf: deduplicate identifiers upfront with Set * feat: smart base detection by counting extensions * fix: correct character class with dash at end [A-Za-z0-9._-] * refactor: single replaceAllMapped for all identifier patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Can you write one test that uses the updated logic to test around 20-30 different bundle ids, with/without quotes, extension, special characters, etc.