expo-updates 1.0.0-canary-20250131-5c4e588 → 1.0.0-canary-20250207-8bc5146

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
@@ -16,6 +16,8 @@
16
16
  - Fix an issue where `launchFallbackUpdateFromDisk` is called from a foreground thread leading to ANRs. ([#33693](https://github.com/expo/expo/pull/33693) by [@alanjhughes](https://github.com/alanjhughes))
17
17
  - [android] Use more robust mechanism for determining empty multipart bodies. ([#33977](https://github.com/expo/expo/pull/33977) by [@wschurman](https://github.com/wschurman))
18
18
  - fix E2E tests in Detox debug build ([#32951](https://github.com/expo/expo/pull/32951) by [@matejkriz](https://github.com/matejkriz))
19
+ - Fix issue where syncing codesigning config for bare projects would clobber existing Expo.plist config ([#34597](https://github.com/expo/expo/pull/34597) by [@brentvatne](https://github.com/brentvatne))
20
+ - 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))
19
21
 
20
22
  ### 💡 Others
21
23
 
@@ -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,
@@ -215,7 +213,7 @@ data class UpdatesConfiguration(
215
213
 
216
214
  if (context != null && runtimeVersion == UPDATES_CONFIGURATION_RUNTIME_VERSION_READ_FINGERPRINT_FILE_SENTINEL) {
217
215
  return context.assets.open(FINGERPRINT_FILE_NAME).use { stream ->
218
- IOUtils.toString(stream, StandardCharsets.UTF_8)
216
+ stream.bufferedReader(Charsets.UTF_8).use { it.readText() }
219
217
  }
220
218
  }
221
219
 
@@ -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
- FileUtils.copyInputStreamToFile(digestInputStream, tmpFile)
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
- FileUtils.writeStringToFile(errorLogFile, exceptionString, "UTF-8", true)
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 = FileUtils.readFileToString(errorLogFile, "UTF-8")
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 = IOUtils.toString(stream, StandardCharsets.UTF_8)
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)
@@ -29,7 +29,7 @@ async function syncConfigurationToNativeAsync(options) {
29
29
  exports.syncConfigurationToNativeAsync = syncConfigurationToNativeAsync;
30
30
  async function syncConfigurationToNativeAndroidAsync(options) {
31
31
  const { exp } = (0, config_1.getConfig)(options.projectRoot, {
32
- isPublicConfig: true,
32
+ isPublicConfig: false,
33
33
  skipSDKVersionRequirement: true,
34
34
  });
35
35
  // sync AndroidManifest.xml
@@ -50,7 +50,7 @@ async function syncConfigurationToNativeAndroidAsync(options) {
50
50
  }
51
51
  async function syncConfigurationToNativeIosAsync(options) {
52
52
  const { exp } = (0, config_1.getConfig)(options.projectRoot, {
53
- isPublicConfig: true,
53
+ isPublicConfig: false,
54
54
  skipSDKVersionRequirement: true,
55
55
  });
56
56
  const expoPlist = await readExpoPlistAsync(options.projectRoot);
@@ -37,7 +37,7 @@ async function syncConfigurationToNativeAndroidAsync(
37
37
  options: SyncConfigurationToNativeOptions
38
38
  ): Promise<void> {
39
39
  const { exp } = getConfig(options.projectRoot, {
40
- isPublicConfig: true,
40
+ isPublicConfig: false, // This must be false or it will drop codesigning config
41
41
  skipSDKVersionRequirement: true,
42
42
  });
43
43
 
@@ -84,7 +84,7 @@ async function syncConfigurationToNativeIosAsync(
84
84
  options: SyncConfigurationToNativeOptions
85
85
  ): Promise<void> {
86
86
  const { exp } = getConfig(options.projectRoot, {
87
- isPublicConfig: true,
87
+ isPublicConfig: false, // This must be false or it will drop codesigning config
88
88
  skipSDKVersionRequirement: true,
89
89
  });
90
90
 
@@ -54,11 +54,11 @@ function getExpoDependencyChunks({
54
54
  'expo-audio',
55
55
  'expo-av',
56
56
  'expo-blur',
57
+ 'expo-crypto',
57
58
  'expo-image',
58
59
  'expo-linear-gradient',
59
60
  'expo-linking',
60
61
  'expo-localization',
61
- 'expo-crypto',
62
62
  'expo-network',
63
63
  'expo-secure-store',
64
64
  'expo-symbols',
@@ -314,10 +314,10 @@ async function preparePackageJson(
314
314
 
315
315
  const extraDevDependencies = configureE2E
316
316
  ? {
317
- '@config-plugins/detox': '^5.0.1',
317
+ '@config-plugins/detox': '^9.0.0',
318
318
  '@types/express': '^4.17.17',
319
319
  '@types/jest': '^29.4.0',
320
- detox: '^20.4.0',
320
+ detox: '^20.33.0',
321
321
  express: '^4.18.2',
322
322
  'form-data': '^4.0.0',
323
323
  jest: '^29.3.1',
@@ -367,7 +367,7 @@ async function preparePackageJson(
367
367
  ...packageJson,
368
368
  dependencies: {
369
369
  ...packageJson.dependencies,
370
- 'react-native': 'npm:react-native-tvos@~0.76.6-0',
370
+ 'react-native': 'npm:react-native-tvos@~0.77.0-0',
371
371
  '@react-native-tvos/config-tv': '^0.1.1',
372
372
  },
373
373
  expo: {
@@ -460,7 +460,15 @@ function transformAppJsonForE2E(
460
460
  runtimeVersion: string,
461
461
  isTV: boolean
462
462
  ) {
463
- const plugins: any[] = ['expo-updates', '@config-plugins/detox'];
463
+ const plugins: any[] = [
464
+ 'expo-updates',
465
+ [
466
+ '@config-plugins/detox',
467
+ {
468
+ subdomains: Array.from(new Set(['10.0.2.2', 'localhost', process.env.UPDATES_HOST])),
469
+ },
470
+ ],
471
+ ];
464
472
  if (isTV) {
465
473
  plugins.push([
466
474
  '@react-native-tvos/config-tv',
@@ -576,7 +584,15 @@ export function transformAppJsonForUpdatesDisabledE2E(
576
584
  projectName: string,
577
585
  runtimeVersion: string
578
586
  ) {
579
- const plugins: any[] = ['expo-updates', '@config-plugins/detox'];
587
+ const plugins: any[] = [
588
+ 'expo-updates',
589
+ [
590
+ '@config-plugins/detox',
591
+ {
592
+ subdomains: Array.from(new Set(['10.0.2.2', 'localhost', process.env.UPDATES_HOST])),
593
+ },
594
+ ],
595
+ ];
580
596
  return {
581
597
  ...appJson,
582
598
  expo: {
@@ -770,7 +786,7 @@ export async function initAsync(
770
786
  // enable proguard on Android
771
787
  await fs.appendFile(
772
788
  path.join(projectRoot, 'android', 'gradle.properties'),
773
- '\nandroid.enableProguardInReleaseBuilds=true\nandroid.kotlinVersion=1.9.24\nEXPO_UPDATES_NATIVE_DEBUG=true',
789
+ '\nandroid.enableProguardInReleaseBuilds=true\nEXPO_UPDATES_NATIVE_DEBUG=true',
774
790
  'utf-8'
775
791
  );
776
792
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-updates",
3
- "version": "1.0.0-canary-20250131-5c4e588",
3
+ "version": "1.0.0-canary-20250207-8bc5146",
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",
@@ -39,15 +39,15 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@expo/code-signing-certificates": "0.0.5",
42
- "@expo/config": "11.0.0-canary-20250131-5c4e588",
43
- "@expo/config-plugins": "9.0.15-canary-20250131-5c4e588",
42
+ "@expo/config": "11.0.0-canary-20250207-8bc5146",
43
+ "@expo/config-plugins": "9.0.16-canary-20250207-8bc5146",
44
44
  "@expo/spawn-async": "^1.7.2",
45
45
  "arg": "4.1.0",
46
46
  "chalk": "^4.1.2",
47
- "expo-eas-client": "0.13.3-canary-20250131-5c4e588",
48
- "expo-manifests": "0.15.6-canary-20250131-5c4e588",
49
- "expo-structured-headers": "4.0.1-canary-20250131-5c4e588",
50
- "expo-updates-interface": "1.0.1-canary-20250131-5c4e588",
47
+ "expo-eas-client": "0.13.3-canary-20250207-8bc5146",
48
+ "expo-manifests": "0.15.6-canary-20250207-8bc5146",
49
+ "expo-structured-headers": "4.0.1-canary-20250207-8bc5146",
50
+ "expo-updates-interface": "1.0.1-canary-20250207-8bc5146",
51
51
  "fast-glob": "^3.3.2",
52
52
  "fbemitter": "^3.0.0",
53
53
  "ignore": "^5.3.1",
@@ -57,7 +57,7 @@
57
57
  "@types/jest": "^29.2.1",
58
58
  "@types/node": "^18.19.34",
59
59
  "@types/node-forge": "^1.0.0",
60
- "expo-module-scripts": "4.0.4-canary-20250131-5c4e588",
60
+ "expo-module-scripts": "4.0.4-canary-20250207-8bc5146",
61
61
  "express": "^4.21.1",
62
62
  "form-data": "^4.0.0",
63
63
  "fs-extra": "~8.1.0",
@@ -65,7 +65,8 @@
65
65
  "xstate": "^4.37.2"
66
66
  },
67
67
  "peerDependencies": {
68
- "expo": "53.0.0-canary-20250131-5c4e588",
68
+ "expo": "53.0.0-canary-20250207-8bc5146",
69
69
  "react": "*"
70
- }
70
+ },
71
+ "gitHead": "8bc5146852ccd7033138bac9ef8d3c41ae85a211"
71
72
  }