Skip to content

[build-tools] Upload embedded bundle by default on SDK 58+ and rename env var - #4433

Open
brentvatne wants to merge 3 commits into
mainfrom
@brent/upload-embedded-bundle-default
Open

brentvatne wants to merge 3 commits into
mainfrom
@brent/upload-embedded-bundle-default

Conversation

@brentvatne

@brentvatne brentvatne commented Sep 17, 2026

Copy link
Copy Markdown
Member

Why

Uploading the embedded bundle after an EAS Build lets EAS Update serve bsdiff patches to fresh installs on their very first update check. It has been opt-in behind EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE. This makes it the default for projects on SDK 58 and later, controlled by a non-experimental env var, while keeping it experimental and opt-in on SDK 57 and below.

How

  • When no env var is set, shouldUploadEmbeddedBundle falls back to metadata.sdkVersion and enables the upload only for SDK >=58. An unknown SDK version leaves it off.
  • SDK 58 and later: set EAS_UPDATE_UPLOAD_EMBEDDED_BUNDLE to 0 (or false) to disable the upload.
  • SDK 57 and below: the feature is still experimental. EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE=1 remains the supported opt-in, with no deprecation warning.
  • Both the Android and iOS builders call the new helper instead of checking the env var directly.

Docs: expo/expo#50307

Test Plan

Unit tests in packages/build-tools/src/builders/__tests__/android.test.ts cover: default on for SDK 58, default off for SDK 57 and for unknown SDK, explicit 1 on SDK 57, explicit 0 on SDK 58, and the experimental var on SDK 57.

yarn jest-unit src/builders/__tests__/android.test.ts src/utils/__tests__/expoUpdatesEmbedded.test.ts
Test Suites: 2 passed, 2 total
Tests:       27 passed, 27 total

yarn lint and tsc pass.

Checklist

  • I added a changelog.md entry
  • Tests added / updated

🤖 Generated with Claude Code

… env var

Rename EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE to
EAS_UPDATE_UPLOAD_EMBEDDED_BUNDLE and enable the upload by default for
projects on SDK 58 and later. Set it to 0 to disable, or 1 to opt in on
earlier SDKs. The old name is still honored with a deprecation warning.
@brentvatne

Copy link
Copy Markdown
Member Author

Docs: expo/expo#50307

EAS_UPDATE_EXPERIMENTAL_UPLOAD_EMBEDDED_BUNDLE stays the supported way to
opt in on SDK 57 and below, where the feature is still experimental.
Drop the deprecation warning.
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@brentvatne
brentvatne marked this pull request as ready for review September 17, 2026 17:12
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.30%. Comparing base (c7b3105) to head (2a5f042).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4433      +/-   ##
==========================================
+ Coverage   72.29%   72.30%   +0.01%     
==========================================
  Files         970      970              
  Lines       46133    46145      +12     
  Branches     9903     9909       +6     
==========================================
+ Hits        33349    33361      +12     
  Misses      11789    11789              
  Partials      995      995              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brentvatne
brentvatne requested a review from gwdp September 17, 2026 17:12

@gwdp gwdp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, Thank you for doing it!

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