expo-updates 57.0.28 → 57.0.29
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 +6 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/updates/EnabledUpdatesController.kt +2 -2
- package/android/src/main/java/expo/modules/updates/procedures/CheckForUpdateProcedure.kt +9 -3
- package/android/src/main/java/expo/modules/updates/procedures/FetchUpdateProcedure.kt +6 -5
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 57.0.29 — 2026-11-23
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [Android] Fix `checkForUpdateAsync()` and `fetchUpdateAsync()` queued behind `reloadAsync()` comparing with the update that was running before the reload, so a check reported the running update as available. ([#53055](https://github.com/expo/expo/pull/53055) by [@douglowder](https://github.com/douglowder))
|
|
18
|
+
|
|
13
19
|
## 57.0.28 — 2026-11-12
|
|
14
20
|
|
|
15
21
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -42,7 +42,7 @@ expoModule {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
group = 'host.exp.exponent'
|
|
45
|
-
version = '57.0.
|
|
45
|
+
version = '57.0.29'
|
|
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.
|
|
97
|
+
versionName '57.0.29'
|
|
98
98
|
consumerProguardFiles("proguard-rules.pro")
|
|
99
99
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
100
100
|
|
|
@@ -255,14 +255,14 @@ class EnabledUpdatesController(
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
override suspend fun checkForUpdate() = suspendCancellableCoroutine { continuation ->
|
|
258
|
-
val procedure = CheckForUpdateProcedure(context, updatesConfiguration, databaseHolder, logger, fileDownloader, selectionPolicy, launchedUpdate) {
|
|
258
|
+
val procedure = CheckForUpdateProcedure(context, updatesConfiguration, databaseHolder, logger, fileDownloader, selectionPolicy, { launchedUpdate }) {
|
|
259
259
|
continuation.resume(it)
|
|
260
260
|
}
|
|
261
261
|
stateMachine.queueExecution(procedure)
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
override suspend fun fetchUpdate() = suspendCancellableCoroutine { continuation ->
|
|
265
|
-
val procedure = FetchUpdateProcedure(context, updatesConfiguration, logger, databaseHolder, updatesDirectory, fileDownloader, selectionPolicy, launchedUpdate, controllerScope) {
|
|
265
|
+
val procedure = FetchUpdateProcedure(context, updatesConfiguration, logger, databaseHolder, updatesDirectory, fileDownloader, selectionPolicy, { launchedUpdate }, controllerScope) {
|
|
266
266
|
continuation.resume(it)
|
|
267
267
|
}
|
|
268
268
|
stateMachine.queueExecution(procedure)
|
|
@@ -24,13 +24,14 @@ class CheckForUpdateProcedure(
|
|
|
24
24
|
private val updatesLogger: UpdatesLogger,
|
|
25
25
|
private val fileDownloader: FileDownloader,
|
|
26
26
|
private val selectionPolicy: SelectionPolicy,
|
|
27
|
-
private val
|
|
27
|
+
private val getLaunchedUpdate: () -> UpdateEntity?,
|
|
28
28
|
private val callback: (IUpdatesController.CheckForUpdateResult) -> Unit
|
|
29
29
|
) : StateMachineProcedure() {
|
|
30
30
|
override val loggerTimerLabel = "timer-check-for-update"
|
|
31
31
|
|
|
32
32
|
override suspend fun run(procedureContext: ProcedureContext) {
|
|
33
33
|
procedureContext.processStateEvent(UpdatesStateEvent.Check())
|
|
34
|
+
val launchedUpdate = getLaunchedUpdate()
|
|
34
35
|
|
|
35
36
|
val embeddedUpdate = EmbeddedManifestUtils.getEmbeddedUpdate(context, updatesConfiguration)?.updateEntity
|
|
36
37
|
val extraHeaders = FileDownloader.getExtraHeadersForRemoteUpdateRequest(
|
|
@@ -42,7 +43,7 @@ class CheckForUpdateProcedure(
|
|
|
42
43
|
|
|
43
44
|
try {
|
|
44
45
|
val updateResponse = downloadRemoteUpdate(extraHeaders)
|
|
45
|
-
processUpdatesResponse(updateResponse, procedureContext, embeddedUpdate)
|
|
46
|
+
processUpdatesResponse(updateResponse, procedureContext, embeddedUpdate, launchedUpdate)
|
|
46
47
|
} catch (e: CancellationException) {
|
|
47
48
|
throw e
|
|
48
49
|
} catch (e: Exception) {
|
|
@@ -61,7 +62,12 @@ class CheckForUpdateProcedure(
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
private fun processUpdatesResponse(
|
|
65
|
+
private fun processUpdatesResponse(
|
|
66
|
+
updateResponse: UpdateResponse,
|
|
67
|
+
procedureContext: ProcedureContext,
|
|
68
|
+
embeddedUpdate: UpdateEntity?,
|
|
69
|
+
launchedUpdate: UpdateEntity?
|
|
70
|
+
) {
|
|
65
71
|
val updateDirective = updateResponse.directiveUpdateResponsePart?.updateDirective
|
|
66
72
|
val update = updateResponse.manifestUpdateResponsePart?.update
|
|
67
73
|
|
|
@@ -25,7 +25,7 @@ class FetchUpdateProcedure(
|
|
|
25
25
|
private val updatesDirectory: File,
|
|
26
26
|
private val fileDownloader: FileDownloader,
|
|
27
27
|
private val selectionPolicy: SelectionPolicy,
|
|
28
|
-
private val
|
|
28
|
+
private val getLaunchedUpdate: () -> UpdateEntity?,
|
|
29
29
|
private val scope: CoroutineScope,
|
|
30
30
|
private val callback: (IUpdatesController.FetchUpdateResult) -> Unit
|
|
31
31
|
) : StateMachineProcedure() {
|
|
@@ -33,11 +33,12 @@ class FetchUpdateProcedure(
|
|
|
33
33
|
|
|
34
34
|
override suspend fun run(procedureContext: ProcedureContext) {
|
|
35
35
|
procedureContext.processStateEvent(UpdatesStateEvent.Download())
|
|
36
|
+
val launchedUpdate = getLaunchedUpdate()
|
|
36
37
|
|
|
37
38
|
val database = databaseHolder.database
|
|
38
39
|
try {
|
|
39
|
-
val loaderResult = startRemoteLoader(database, procedureContext)
|
|
40
|
-
processSuccessLoaderResult(loaderResult, procedureContext)
|
|
40
|
+
val loaderResult = startRemoteLoader(database, procedureContext, launchedUpdate)
|
|
41
|
+
processSuccessLoaderResult(loaderResult, procedureContext, launchedUpdate)
|
|
41
42
|
} catch (e: CancellationException) {
|
|
42
43
|
throw e
|
|
43
44
|
} catch (e: Exception) {
|
|
@@ -51,7 +52,7 @@ class FetchUpdateProcedure(
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
private suspend fun startRemoteLoader(database: UpdatesDatabase, procedureContext: ProcedureContext): Loader.LoaderResult {
|
|
55
|
+
private suspend fun startRemoteLoader(database: UpdatesDatabase, procedureContext: ProcedureContext, launchedUpdate: UpdateEntity?): Loader.LoaderResult {
|
|
55
56
|
val remoteLoader = RemoteLoader(
|
|
56
57
|
context,
|
|
57
58
|
updatesConfiguration,
|
|
@@ -98,7 +99,7 @@ class FetchUpdateProcedure(
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
private suspend fun processSuccessLoaderResult(loaderResult: Loader.LoaderResult, procedureContext: ProcedureContext) {
|
|
102
|
+
private suspend fun processSuccessLoaderResult(loaderResult: Loader.LoaderResult, procedureContext: ProcedureContext, launchedUpdate: UpdateEntity?) {
|
|
102
103
|
val result = RemoteLoader.processSuccessLoaderResult(
|
|
103
104
|
context,
|
|
104
105
|
updatesConfiguration,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.29",
|
|
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
|
-
"
|
|
64
|
-
"expo
|
|
65
|
-
"expo": "57.0.
|
|
66
|
-
"expo-
|
|
63
|
+
"expo-module-scripts": "56.0.3",
|
|
64
|
+
"expo": "57.0.34",
|
|
65
|
+
"expo-dev-client": "57.0.22",
|
|
66
|
+
"@expo/metro-config": "57.0.14"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"expo": "*",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"./scripts/with-node.sh"
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "14616b4ffe6167019952be745310f563d15bf68a",
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "expo-module build",
|
|
88
88
|
"clean": "expo-module clean",
|