[eas-json] Allow a string of 1-50 characters as a track name
Why
Previously, the Android submit track in eas.json only allowed a fixed set of values ("beta", "alpha", "internal", "production"). However, Google Play supports custom track names, and users may need to specify arbitrary track names for advanced workflows. This PR enables more flexible usage by allowing any string of 1-50 characters as a track name. Track name follows the rule defined by Google textfield. See the image below.
- When textfield is empty
- When textfield has an input within 50 characters
- When textfied has an input over 50 characters
How
- Updated the Joi runtime schema in
packages/eas-json/src/submit/schema.tsto allow any string of 1-50 characters for the Android submit track property. - Updated the JSON schema in
packages/eas-json/schema/eas.schema.jsonto addminLengthandmaxLengthfor the track property, ensuring IDE and documentation support matches runtime validation. - Added and updated tests in
packages/eas-json/src/__tests__/submitProfiles-test.tsto cover:- Valid custom track names within 50 characters
- Invalid track names (empty string, over 50 characters)
- Default value behavior when track is omitted
Test Plan
- Ran the test suite to ensure all new and existing tests pass.
- Verified that:
- A custom track name (e.g.,
my-custom-track) is accepted. - An empty string or a string longer than 50 characters is rejected.
- Omitting the track property defaults to
internal.
- A custom track name (e.g.,
If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction.
Subscribed to pull request
| File Patterns | Mentions |
|---|---|
| **/* | @khamilowicz, @sjchmiela |
Generated by CodeMention
/changelog-entry [bug-fix] [Allow a string of 1-50 characters as a track name]
@quinlanj I tried to follow the pr description to update the changelog, but it seems like it's not working. Can you help me? Thank you.
/changelog-entry bug-fix Allow a string of 1-50 characters as a track name
Thanks for the PR. This also requires some API schema changes on our part so we'll need to tackle those first.
In the meanwhile since the actual change is quite small, you can unblock yourself by adding the change on your local project with patch-package (or yarn patch if you're using yarn, bun patch if you're using bun etc)