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] Fix metro asset call in embedded manifest creation step #26307

Merged
merged 3 commits into from Jan 8, 2024

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Jan 8, 2024

Why

The metro asset collection step in @expo/cli has evolved and diverged from the way that the expo-updates asset collection step was written. This causes nonstandard metro configs to not be respected by expo-updates, and assets to be missing.

We didn't notice this for a while because until #25613 landed a lot of common assets were present in the CDN and would resolve and be downloaded instead of getting the embedded ones. (they'd still present on screen, just erroneously download).

Closes #26195.
Closes ENG-11025.

How

This fix is done in two commits. The first commit is sufficient to fix the issue (it copy/pastes the code from CLI into createManifest but still leaves the root issue open as it could diverge again in the future). The second commit tries to future-proof this by factoring out the functions into common functions used by both the CLI export and the expo-updates export.

Test Plan

copy-paste the built JS for createManifest and exportEmbedAsync into a sample app that this repro's in. the repro is this comment: #26195 (comment)

Inspect the output of createManifest and see the image in a release build.

Checklist

@wschurman wschurman requested review from brentvatne and removed request for byCedric January 8, 2024 18:48
Copy link

linear bot commented Jan 8, 2024

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jan 8, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jan 8, 2024
@wschurman wschurman merged commit a2fa1fa into main Jan 8, 2024
10 of 13 checks passed
@wschurman wschurman deleted the @wschurman/fix-metro-call branch January 8, 2024 21:28
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Jan 10, 2024
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 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.

[SDK 50] expo-updates + src dir breaks assets
5 participants