expo-updates 57.0.27 → 57.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.28 — 2026-11-12
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Send download progress to JavaScript in 1% steps, so updates with many assets no longer use a large amount of memory while they download. ([#53250](https://github.com/expo/expo/pull/53250) by [@alanjhughes](https://github.com/alanjhughes))
18
+
13
19
  ## 57.0.27 — 2026-11-05
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -42,7 +42,7 @@ expoModule {
42
42
  }
43
43
 
44
44
  group = 'host.exp.exponent'
45
- version = '57.0.27'
45
+ version = '57.0.28'
46
46
 
47
47
  // Utility method to derive boolean values from the environment or from Java properties,
48
48
  // and return them as strings to be used in BuildConfig fields
@@ -94,7 +94,7 @@ android {
94
94
  namespace "expo.modules.updates"
95
95
  defaultConfig {
96
96
  versionCode 31
97
- versionName '57.0.27'
97
+ versionName '57.0.28'
98
98
  consumerProguardFiles("proguard-rules.pro")
99
99
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
100
100
 
@@ -10,6 +10,7 @@ import expo.modules.updatesinterface.UpdatesControllerRegistry
10
10
  import kotlinx.coroutines.CoroutineScope
11
11
  import kotlinx.coroutines.Dispatchers
12
12
  import java.util.Date
13
+ import kotlin.math.floor
13
14
 
14
15
  /**
15
16
  * The Updates state machine class. There should be only one instance of this class
@@ -92,6 +93,7 @@ class UpdatesStateMachine(
92
93
  */
93
94
  private fun processEvent(event: UpdatesStateEvent) {
94
95
  if (transition(event)) {
96
+ val previousProgress = context.downloadProgress
95
97
  context = reduceContext(context, event)
96
98
  if (event !is UpdatesStateEvent.DownloadProgress) {
97
99
  logger.info("Updates state change: ${event.type}, context = ${context.json}")
@@ -104,7 +106,9 @@ class UpdatesStateMachine(
104
106
  }
105
107
  }
106
108
  }
107
- sendContextToJS()
109
+ if (event !is UpdatesStateEvent.DownloadProgress || floor(context.downloadProgress * 100) != floor(previousProgress * 100)) {
110
+ sendContextToJS()
111
+ }
108
112
  }
109
113
  }
110
114
 
@@ -224,12 +228,14 @@ class UpdatesStateMachine(
224
228
  isDownloading = false,
225
229
  downloadError = null,
226
230
  isUpdatePending = true,
231
+ downloadProgress = 1.0,
227
232
  downloadStartTime = null,
228
233
  downloadFinishTime = null
229
234
  )
230
235
  is UpdatesStateEvent.DownloadCompleteWithUpdate -> context.copyAndIncrementSequenceNumber(
231
236
  isDownloading = false,
232
237
  downloadError = null,
238
+ downloadProgress = 1.0,
233
239
  latestManifest = event.manifest,
234
240
  downloadedManifest = event.manifest,
235
241
  rollback = null,
@@ -393,6 +393,7 @@ internal class UpdatesStateMachine {
393
393
  private func processEvent(_ event: UpdatesStateEvent) {
394
394
  // Execute state transition
395
395
  if transition(event) {
396
+ let previousProgress = context.downloadProgress
396
397
  // Only change context if transition succeeds
397
398
  context = reducedContext(context, event)
398
399
  if event.type != .downloadProgress {
@@ -406,7 +407,9 @@ internal class UpdatesStateMachine {
406
407
  }
407
408
  }
408
409
  }
409
- sendContextToJS()
410
+ if event.type != .downloadProgress || (context.downloadProgress * 100).rounded(.down) != (previousProgress * 100).rounded(.down) {
411
+ sendContextToJS()
412
+ }
410
413
  }
411
414
  }
412
415
  internal func processEventForTesting(_ event: UpdatesStateEvent) {
@@ -510,6 +513,7 @@ internal class UpdatesStateMachine {
510
513
  $0.isDownloading = false
511
514
  $0.downloadError = nil
512
515
  $0.isUpdatePending = true
516
+ $0.downloadProgress = 1.0
513
517
  $0.downloadStartTime = nil
514
518
  $0.downloadFinishTime = nil
515
519
  }
@@ -517,6 +521,7 @@ internal class UpdatesStateMachine {
517
521
  return context.copyAndIncrementSequenceNumber {
518
522
  $0.isDownloading = false
519
523
  $0.downloadError = nil
524
+ $0.downloadProgress = 1.0
520
525
  $0.latestManifest = manifest
521
526
  $0.downloadedManifest = manifest
522
527
  $0.rollback = nil
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-updates",
3
- "version": "57.0.27",
3
+ "version": "57.0.28",
4
4
  "description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -60,10 +60,10 @@
60
60
  "picomatch": "^4.0.4",
61
61
  "ts-node": "^10.9.2",
62
62
  "xstate": "^4.37.2",
63
- "expo-module-scripts": "56.0.3",
63
+ "@expo/metro-config": "57.0.14",
64
64
  "expo-dev-client": "57.0.21",
65
- "expo": "57.0.32",
66
- "@expo/metro-config": "57.0.14"
65
+ "expo": "57.0.33",
66
+ "expo-module-scripts": "56.0.3"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "expo": "*",
@@ -82,7 +82,7 @@
82
82
  "./scripts/with-node.sh"
83
83
  ]
84
84
  },
85
- "gitHead": "d525588681ae2ac2863deff25d35daa39ede8ac1",
85
+ "gitHead": "968a9dcec304789b2ccc1a41ef5d301938e91478",
86
86
  "scripts": {
87
87
  "build": "expo-module build",
88
88
  "clean": "expo-module clean",