expo-updates 0.26.15 → 0.26.16
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 -3
- package/android/src/main/java/expo/modules/updates/UpdatesConfiguration.kt +1 -3
- package/android/src/main/java/expo/modules/updates/UpdatesUtils.kt +6 -2
- package/android/src/main/java/expo/modules/updates/launcher/NoDatabaseLauncher.kt +2 -3
- package/android/src/main/java/expo/modules/updates/manifest/EmbeddedManifestUtils.kt +1 -3
- package/e2e/fixtures/Updates-fingerprint.e2e.ts +0 -38
- package/e2e/fixtures/project_files/.fingerprintignore +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.26.16 — 2025-02-04
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Removed Apache Commons IO dependency and fixed crash issue on Android 7. ([#34638](https://github.com/expo/expo/pull/34638) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
13
19
|
## 0.26.15 — 2025-01-31
|
|
14
20
|
|
|
15
21
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -16,7 +16,7 @@ apply plugin: 'com.android.library'
|
|
|
16
16
|
apply plugin: 'com.google.devtools.ksp'
|
|
17
17
|
|
|
18
18
|
group = 'host.exp.exponent'
|
|
19
|
-
version = '0.26.
|
|
19
|
+
version = '0.26.16'
|
|
20
20
|
|
|
21
21
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
22
22
|
apply from: expoModulesCorePlugin
|
|
@@ -63,7 +63,7 @@ android {
|
|
|
63
63
|
namespace "expo.modules.updates"
|
|
64
64
|
defaultConfig {
|
|
65
65
|
versionCode 31
|
|
66
|
-
versionName '0.26.
|
|
66
|
+
versionName '0.26.16'
|
|
67
67
|
consumerProguardFiles("proguard-rules.pro")
|
|
68
68
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
69
69
|
|
|
@@ -112,7 +112,6 @@ dependencies {
|
|
|
112
112
|
implementation("com.squareup.okhttp3:okhttp:4.9.2")
|
|
113
113
|
implementation("com.squareup.okhttp3:okhttp-urlconnection:4.9.2")
|
|
114
114
|
implementation("com.squareup.okhttp3:okhttp-brotli:4.9.2")
|
|
115
|
-
implementation("commons-io:commons-io:2.16.1")
|
|
116
115
|
implementation("org.bouncycastle:bcutil-jdk15to18:1.78.1")
|
|
117
116
|
|
|
118
117
|
testImplementation 'junit:junit:4.13.2'
|
|
@@ -6,8 +6,6 @@ import android.net.Uri
|
|
|
6
6
|
import android.util.Log
|
|
7
7
|
import expo.modules.core.errors.InvalidArgumentException
|
|
8
8
|
import expo.modules.updates.codesigning.CodeSigningConfiguration
|
|
9
|
-
import org.apache.commons.io.IOUtils
|
|
10
|
-
import java.nio.charset.StandardCharsets
|
|
11
9
|
|
|
12
10
|
enum class UpdatesConfigurationValidationResult {
|
|
13
11
|
VALID,
|
|
@@ -154,7 +152,7 @@ data class UpdatesConfiguration(
|
|
|
154
152
|
|
|
155
153
|
if (context != null && runtimeVersion == UPDATES_CONFIGURATION_RUNTIME_VERSION_READ_FINGERPRINT_FILE_SENTINEL) {
|
|
156
154
|
return context.assets.open(FINGERPRINT_FILE_NAME).use { stream ->
|
|
157
|
-
|
|
155
|
+
stream.bufferedReader(Charsets.UTF_8).use { it.readText() }
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
158
|
|
|
@@ -8,7 +8,6 @@ import expo.modules.updates.UpdatesConfiguration.CheckAutomaticallyConfiguration
|
|
|
8
8
|
import expo.modules.updates.db.entity.AssetEntity
|
|
9
9
|
import expo.modules.updates.logging.UpdatesErrorCode
|
|
10
10
|
import expo.modules.updates.logging.UpdatesLogger
|
|
11
|
-
import org.apache.commons.io.FileUtils
|
|
12
11
|
import org.json.JSONArray
|
|
13
12
|
import org.json.JSONObject
|
|
14
13
|
import java.io.*
|
|
@@ -112,7 +111,12 @@ object UpdatesUtils {
|
|
|
112
111
|
// write file atomically by writing it to a temporary path and then renaming
|
|
113
112
|
// this protects us against partially written files if the process is interrupted
|
|
114
113
|
val tmpFile = File(destination.absolutePath + ".tmp")
|
|
115
|
-
|
|
114
|
+
tmpFile.parentFile?.mkdirs()
|
|
115
|
+
digestInputStream.use { input ->
|
|
116
|
+
tmpFile.outputStream().use { output ->
|
|
117
|
+
input.copyTo(output)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
116
120
|
|
|
117
121
|
// this message digest must be read after the input stream has been consumed in order to get the hash correctly
|
|
118
122
|
val md = digestInputStream.messageDigest
|
|
@@ -4,7 +4,6 @@ import android.content.Context
|
|
|
4
4
|
import android.os.AsyncTask
|
|
5
5
|
import expo.modules.updates.loader.EmbeddedLoader
|
|
6
6
|
import expo.modules.updates.logging.UpdatesLogger
|
|
7
|
-
import org.apache.commons.io.FileUtils
|
|
8
7
|
import java.io.File
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -30,7 +29,7 @@ class NoDatabaseLauncher @JvmOverloads constructor(
|
|
|
30
29
|
try {
|
|
31
30
|
val errorLogFile = File(context.filesDir, ERROR_LOG_FILENAME)
|
|
32
31
|
val exceptionString = fatalException.toString()
|
|
33
|
-
|
|
32
|
+
errorLogFile.appendText(exceptionString, Charsets.UTF_8)
|
|
34
33
|
} catch (e: Exception) {
|
|
35
34
|
logger.error("Failed to write fatal error to log", e)
|
|
36
35
|
}
|
|
@@ -47,7 +46,7 @@ class NoDatabaseLauncher @JvmOverloads constructor(
|
|
|
47
46
|
if (!errorLogFile.exists()) {
|
|
48
47
|
return null
|
|
49
48
|
}
|
|
50
|
-
val logContents =
|
|
49
|
+
val logContents = errorLogFile.readText(Charsets.UTF_8)
|
|
51
50
|
errorLogFile.delete()
|
|
52
51
|
logContents
|
|
53
52
|
} catch (e: Exception) {
|
|
@@ -3,9 +3,7 @@ package expo.modules.updates.manifest
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.util.Log
|
|
5
5
|
import expo.modules.updates.UpdatesConfiguration
|
|
6
|
-
import org.apache.commons.io.IOUtils
|
|
7
6
|
import org.json.JSONObject
|
|
8
|
-
import java.nio.charset.StandardCharsets
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Helper object for accessing and memoizing the manifest embedded in the application package.
|
|
@@ -24,7 +22,7 @@ object EmbeddedManifestUtils {
|
|
|
24
22
|
if (sEmbeddedUpdate == null) {
|
|
25
23
|
try {
|
|
26
24
|
context.assets.open(MANIFEST_FILENAME).use { stream ->
|
|
27
|
-
val manifestString =
|
|
25
|
+
val manifestString = stream.bufferedReader(Charsets.UTF_8).use { it.readText() }
|
|
28
26
|
val manifestJson = JSONObject(manifestString)
|
|
29
27
|
// automatically verify embedded manifest since it was already codesigned
|
|
30
28
|
manifestJson.put("isVerified", true)
|
|
@@ -70,42 +70,4 @@ describe('Basic tests', () => {
|
|
|
70
70
|
|
|
71
71
|
await device.terminateApp();
|
|
72
72
|
});
|
|
73
|
-
|
|
74
|
-
it('does not download new update when it takes longer than timeout', async () => {
|
|
75
|
-
const bundleFilename = 'bundle1.js';
|
|
76
|
-
const newNotifyString = 'test-update-1';
|
|
77
|
-
const hash = await Update.copyBundleToStaticFolder(
|
|
78
|
-
projectRoot,
|
|
79
|
-
bundleFilename,
|
|
80
|
-
newNotifyString,
|
|
81
|
-
platform
|
|
82
|
-
);
|
|
83
|
-
const manifest =
|
|
84
|
-
await Update.getUpdateManifestForBundleFilenameWithFingerprintRuntimeVersionAsync(
|
|
85
|
-
new Date(),
|
|
86
|
-
hash,
|
|
87
|
-
'test-update-1-key',
|
|
88
|
-
bundleFilename,
|
|
89
|
-
[],
|
|
90
|
-
projectRoot,
|
|
91
|
-
platform
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
Server.start(Update.serverPort, protocolVersion, 7000);
|
|
95
|
-
await Server.serveSignedManifest(manifest, projectRoot);
|
|
96
|
-
await device.installApp();
|
|
97
|
-
await device.launchApp({
|
|
98
|
-
newInstance: true,
|
|
99
|
-
});
|
|
100
|
-
await waitForAppToBecomeVisible();
|
|
101
|
-
const message = await testElementValueAsync('updateString');
|
|
102
|
-
|
|
103
|
-
if (message !== 'test') {
|
|
104
|
-
console.log(debugInstructions);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
jestExpect(message).toBe('test');
|
|
108
|
-
|
|
109
|
-
await device.terminateApp();
|
|
110
|
-
});
|
|
111
73
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-updates",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.16",
|
|
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",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"expo": "*",
|
|
68
68
|
"react": "*"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "8f3a4fbdc77662f80d30cf3ea0d3f1887b6209c2"
|
|
71
71
|
}
|