eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

[eas-json] Allow a string of 1-50 characters as a track name

Open algoORgoal opened this issue 7 months ago • 5 comments

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.

  1. When textfield is empty Empty Trackname textfield
  2. When textfield has an input within 50 characters Track name textfield within 50 characters
  3. When textfied has an input over 50 characters Track name textfield over 50 characters

How

  • Updated the Joi runtime schema in packages/eas-json/src/submit/schema.ts to allow any string of 1-50 characters for the Android submit track property.
  • Updated the JSON schema in packages/eas-json/schema/eas.schema.json to add minLength and maxLength for the track property, ensuring IDE and documentation support matches runtime validation.
  • Added and updated tests in packages/eas-json/src/__tests__/submitProfiles-test.ts to 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.

If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. Test results on terminal

algoORgoal avatar May 25 '25 18:05 algoORgoal

Subscribed to pull request

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

Generated by CodeMention

github-actions[bot] avatar May 25 '25 18:05 github-actions[bot]

/changelog-entry [bug-fix] [Allow a string of 1-50 characters as a track name]

algoORgoal avatar May 25 '25 18:05 algoORgoal

@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.

algoORgoal avatar May 25 '25 18:05 algoORgoal

/changelog-entry bug-fix Allow a string of 1-50 characters as a track name

algoORgoal avatar May 25 '25 18:05 algoORgoal

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)

kadikraman avatar May 29 '25 16:05 kadikraman