-
Notifications
You must be signed in to change notification settings - Fork 93
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(eas-cli): Use a fallback generated name during EAS Submit #2842
Conversation
Size Change: +574 B (0%) Total Size: 53.4 MB
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2842 +/- ##
==========================================
+ Coverage 52.62% 52.68% +0.07%
==========================================
Files 584 584
Lines 22638 22659 +21
Branches 4707 4716 +9
==========================================
+ Hits 11910 11935 +25
+ Misses 9800 9796 -4
Partials 928 928 ☔ View full report in Codecov by Sentry. |
✅ Thank you for adding the changelog entry! |
Subscribed to pull request
Generated by CodeMention |
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.
awesome
}[]; | ||
}; | ||
} { | ||
return 'data' in error && 'errors' in error.data && Array.isArray(error.data.errors); |
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.
We can try to validate this data against a scheme by using zod
or joi
instead of writing if statements manually
Why
If the name you selected was taken, it's a bit of a hassle to pick a new one. We had a fallback error message that said to use
--app-name
but this isn't a real flag afaict, and the fallback was never called!How
This change catches the duplicate name error and warns that a generated name will be used instead. This name can be instantly changed from the App Store Connect website later so it seems like a better default to ensure complex commands like
eas build --auto-submit
are less prone to failure.Test Plan
Added some unit tests to emulate the responses of invalid fixtures.
Create a project with the name
expo
Run
eas submit
Observe a warning log like
App name "expo" is already taken. Using generated name "expo (6eb7d6)" which can be changed later from https://appstoreconnect.apple.com.
Submit works as expected.
Name can be manually changed from the website.
Same process but with
expo🚀
will warn:App name "expo🚀" contains invalid characters. Using sanitized name "expo-" which can be changed later from https://appstoreconnect.apple.com.