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

feat(eas-cli): Use a fallback generated name during EAS Submit #2842

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Jan 28, 2025

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!

Screenshot 2025-01-27 at 4 56 31 PM

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.

Copy link

github-actions bot commented Jan 28, 2025

Size Change: +574 B (0%)

Total Size: 53.4 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53.4 MB +574 B (0%)

compressed-size-action

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 52.68%. Comparing base (b31ddee) to head (4fc9676).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...li/src/credentials/ios/appstore/ensureAppExists.ts 81.82% 5 Missing and 1 partial ⚠️
packages/eas-cli/src/submit/ios/AppProduce.ts 50.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@EvanBacon EvanBacon marked this pull request as ready for review January 28, 2025 00:52
Copy link

✅ Thank you for adding the changelog entry!

Copy link

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela, @radoslawkrzemien

Generated by CodeMention

@EvanBacon EvanBacon requested a review from szdziedzic January 28, 2025 00:57
Copy link
Member

@szdziedzic szdziedzic left a 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);
Copy link
Member

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

@EvanBacon EvanBacon merged commit ab507d0 into main Jan 29, 2025
11 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/eas-cli/generated-name-fallback branch January 29, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants