expo-modules-core 58.0.28 → 58.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 58.0.29
4
+
5
+ ### Patch Changes
6
+
7
+ - [Android] Fix `Enum` to JS conversion failing in minified builds when constructor parameter names are not kept. ([#51677](https://github.com/expo/expo/pull/51677) by [@sergeich](https://github.com/sergeich))
8
+ - [iOS] Fix a Swift 6.4.2 compiler crash when building `ExpoModulesCore` from source. ([#52631](https://github.com/expo/expo/pull/52631) by [@ramonclaudio](https://github.com/ramonclaudio))
9
+
3
10
  ## 58.0.28
4
11
 
5
12
  ### Patch Changes
@@ -46,7 +46,7 @@ if (shouldIncludeCompose) {
46
46
  }
47
47
 
48
48
  group = 'host.exp.exponent'
49
- version = '58.0.28'
49
+ version = '58.0.29'
50
50
 
51
51
  def isExpoModulesCoreTests = {
52
52
  Gradle gradle = getGradle()
@@ -97,7 +97,7 @@ if (workletsProject != null) {
97
97
 
98
98
  def reactNativeWorkletsRootDir = workletsProject?.projectDir?.parentFile
99
99
 
100
- def expoModulesV2Version = "0.2.6"
100
+ def expoModulesV2Version = "0.2.7"
101
101
 
102
102
  configurations {
103
103
  // Artifact-only: the C++ sources, not something to put on any classpath.
@@ -175,7 +175,7 @@ android {
175
175
  defaultConfig {
176
176
  consumerProguardFiles 'proguard-rules.pro'
177
177
  versionCode 1
178
- versionName "58.0.28"
178
+ versionName "58.0.29"
179
179
  buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
180
180
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true"
181
181
 
@@ -16,5 +16,5 @@
16
16
  "libexpo-modules-jsi.so"
17
17
  ],
18
18
  "stripped": true,
19
- "createdAt": "2026-10-28T14:36:11.677615Z"
19
+ "createdAt": "2026-10-31T09:58:28.402034468Z"
20
20
  }
Binary file
@@ -14,6 +14,7 @@ import io.github.expo.pika.PIntrospectionData
14
14
  import io.github.expo.pika.PIntrospectionProvider
15
15
  import io.github.expo.pika.PProperty
16
16
  import java.io.File
17
+ import java.lang.reflect.Modifier
17
18
  import java.net.URI
18
19
  import java.net.URL
19
20
  import kotlin.reflect.KProperty1
@@ -274,7 +275,18 @@ fun Enum<*>.toJSValue(): Any? {
274
275
 
275
276
  @Suppress("UNCHECKED_CAST")
276
277
  val parameterProperty = this::class.declaredMemberProperties
277
- .find { it.name == parameterName } as KProperty1<Enum<*>, *>
278
+ .find { it.name == parameterName } as? KProperty1<Enum<*>, *>
279
+
280
+ // Minifiers can rename the parameter in the Kotlin metadata (for example, to `p0`) and keep the property name.
281
+ if (parameterProperty == null) {
282
+ val fields = declaringJavaClass.declaredFields
283
+ .filter { !Modifier.isStatic(it.modifiers) && !it.isSynthetic }
284
+ return when (fields.size) {
285
+ 0 -> name
286
+ 1 -> fields.first().apply { isAccessible = true }.get(this)
287
+ else -> throw IllegalStateException("Enum '$javaClass' cannot be used as return type (incompatible with JS)")
288
+ }
289
+ }
278
290
 
279
291
  return parameterProperty.get(this)
280
292
  }
@@ -33,7 +33,7 @@ dependencies {
33
33
  implementation("com.facebook.react:react-native-gradle-plugin")
34
34
  implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
35
35
  implementation("io.github.expo.pika:pika-gradle:1.1.0")
36
- implementation("io.github.expo:expo-modules-v2-gradle-plugin:0.2.6")
36
+ implementation("io.github.expo:expo-modules-v2-gradle-plugin:0.2.7")
37
37
 
38
38
  if (isExpoAutolinkingSettingsPluginAvailable) {
39
39
  implementation("expo.modules:expo-autolinking-plugin-shared")
@@ -197,7 +197,7 @@ public class AsyncFunctionDefinition<Args, FirstArgType, ReturnType>: AnyAsyncFu
197
197
  switch consume result {
198
198
  case .success(let value):
199
199
  promise.resolve(value)
200
- case .failure(let error as any Error):
200
+ case .failure(let error):
201
201
  promise.reject(error)
202
202
  }
203
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "58.0.28",
3
+ "version": "58.0.29",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "keywords": [
6
6
  "expo",