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

[expo-updates] Add cli to resolve runtime version #27263

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

wschurman
Copy link
Member

Why

In the same way that #27119 was added to resolve the fingerprint using the current version of fingerprint in the project's expo-updates dependencies (rather than eas-cli's dependencies), we need to do the same thing for general runtime version resolution since that can differ from version to version of expo-updates and @expo/config-plugins, ...

I noticed this because all of the Updates.getRuntimeVersionNullableAsync calls within eas-cli didn't resolve the correct runtime version (during builds for example: https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/build/metadata.ts#L41).

How

Add new command, npx expo-updates runtimeversion:resolve --platform <ios | android> that gets the final runtime version that will be used by the build/update.

Test Plan

In a project, run the command, see it works:

$ yarn expo-updates runtimeversion:resolve --platform android
yarn run v1.22.19
$ /Users/wschurman/expo/expo/bare-apps/testwat47/node_modules/.bin/expo-updates runtimeversion:resolve --platform android
"264f7759f8d8d1afe60f07244c2f563418d8ba78"
✨  Done in 9.56s.

Checklist

@wschurman wschurman requested review from quinlanj and removed request for brentvatne and EvanBacon February 23, 2024 19:34
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Feb 23, 2024
@douglowder douglowder self-requested a review February 23, 2024 21:35
Copy link
Contributor

@douglowder douglowder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates-test seems to be failing and causing check-packages CLI to fail....

Does the new resolveRuntimeVersion.ts need any unit tests of its own?

@wschurman
Copy link
Member Author

Does the new resolveRuntimeVersion.ts need any unit tests of its own?

For sure. I'll add some tests.

In general, we need tests for the CLI and createManifest too now that they're in more testable packages.

@wschurman wschurman force-pushed the @wschurman/runtime-version-cli branch from 8c7af55 to cde8e73 Compare February 27, 2024 16:34
@wschurman wschurman merged commit 1d6b4fa into main Feb 27, 2024
14 checks passed
@wschurman wschurman deleted the @wschurman/runtime-version-cli branch February 27, 2024 16:34
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Feb 27, 2024
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants