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

[eas-cli] rework expected bundle format for eas publish #196

Merged
merged 4 commits into from
Jan 18, 2021

Conversation

jkhales
Copy link
Contributor

@jkhales jkhales commented Jan 11, 2021

Why

Previously we were relying on expo export to build the bundles published by eas publish. expo export turns out to do a lot of unrelated stuff with the assumption the developer is going to use the output for privately hosted static endpoints. The core elements of expo export were factored out and put into a new command expo bundle expo/expo-cli#3074.

expo bundle outputs the bundle in a new format. This PR updates eas publish to expect this new format.

How

Rewrote collectAssets.

Test Plan

Confirmed the collectAssets output test still passed after updating it to the new formate.

Made a test publish after building the bundle in the new format.

@github-actions
Copy link

github-actions bot commented Jan 11, 2021

Size Change: -2.92 kB (0%)

Total Size: 35.8 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 35.8 MB -2.92 kB (0%)

compressed-size-action

@jkhales jkhales requested a review from fson January 11, 2021 21:57
@jkhales jkhales marked this pull request as ready for review January 11, 2021 21:57
Copy link
Contributor

@fson fson left a comment

Choose a reason for hiding this comment

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

Added a few comments below, nothing major – the PR looks pretty good!

packages/eas-cli/src/project/__tests__/publish-test.ts Outdated Show resolved Hide resolved
packages/eas-cli/src/project/__tests__/publish-test.ts Outdated Show resolved Hide resolved
packages/eas-cli/src/project/publish.ts Outdated Show resolved Hide resolved
launchAsset: {
type: 'bundle',
contentType: 'application/javascript',
path: path.resolve(distRoot, metadata.fileMetadata[platform].bundle),
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this might result in Cannot read property 'bundle' of undefined, if the bundle doesn't include all platforms? I wonder if we should check that the key exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, added validation with @hapi/joi

jkh and others added 2 commits January 12, 2021 16:35
Co-authored-by: Ville Immonen <ville.immonen@iki.fi>
@jkhales jkhales requested a review from fson January 12, 2021 22:13
@jkhales jkhales merged commit 3f1a7a0 into main Jan 18, 2021
@jkhales jkhales deleted the @jkhales/rework-eas-bundles branch January 18, 2021 21:00
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