expo-modules-core 56.0.10 → 56.0.12
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 +12 -0
- package/android/build.gradle +2 -2
- package/android/src/main/cpp/types/FrontendConverter.cpp +1 -1
- package/expo-module-gradle-plugin/src/main/kotlin/expo/modules/plugin/gradle/ExpoModuleExtension.kt +4 -2
- package/ios/Core/SharedObjects/SharedObject.swift +13 -10
- package/ios/Core/SharedObjects/SharedObjectRegistry.swift +11 -0
- package/package.json +3 -3
- package/prebuilds/output/debug/xcframeworks/ExpoModulesCore.tar.gz +0 -0
- package/prebuilds/output/debug/xcframeworks/ExpoModulesWorklets.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoModulesCore.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoModulesWorklets.tar.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.12 — 2026-05-21
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [Android] Suppress `-Wunused-result` compiler warning in `FrontendConverter.cpp`. ([#46073](https://github.com/expo/expo/pull/46073) by [@tomekzaw](https://github.com/tomekzaw))
|
|
18
|
+
|
|
19
|
+
## 56.0.11 — 2026-05-20
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- [iOS] Fix occasional `SharedObject.emit` crashes caused by an off-thread JSI lookup. ([#45986](https://github.com/expo/expo/pull/45986) by [@tsapeta](https://github.com/tsapeta))
|
|
24
|
+
|
|
13
25
|
## 56.0.10 — 2026-05-19
|
|
14
26
|
|
|
15
27
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -27,7 +27,7 @@ if (shouldIncludeCompose) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
group = 'host.exp.exponent'
|
|
30
|
-
version = '56.0.
|
|
30
|
+
version = '56.0.12'
|
|
31
31
|
|
|
32
32
|
def isExpoModulesCoreTests = {
|
|
33
33
|
Gradle gradle = getGradle()
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
defaultConfig {
|
|
95
95
|
consumerProguardFiles 'proguard-rules.pro'
|
|
96
96
|
versionCode 1
|
|
97
|
-
versionName "56.0.
|
|
97
|
+
versionName "56.0.12"
|
|
98
98
|
buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
|
|
99
99
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true"
|
|
100
100
|
|
|
@@ -775,7 +775,7 @@ jobject SynchronizableFrontendConverter::convert(
|
|
|
775
775
|
bool SynchronizableFrontendConverter::canConvert(jsi::Runtime &rt, const jsi::Value &value) const {
|
|
776
776
|
try {
|
|
777
777
|
// TODO(@lukmccall): find a better way to check this without throwing exception
|
|
778
|
-
worklets::extractSerializableOrThrow(rt, value);
|
|
778
|
+
(void)worklets::extractSerializableOrThrow(rt, value);
|
|
779
779
|
return true;
|
|
780
780
|
} catch (...) {
|
|
781
781
|
return false;
|
package/expo-module-gradle-plugin/src/main/kotlin/expo/modules/plugin/gradle/ExpoModuleExtension.kt
CHANGED
|
@@ -6,6 +6,7 @@ import expo.modules.plugin.Version
|
|
|
6
6
|
import expo.modules.plugin.safeGet
|
|
7
7
|
import org.gradle.api.Action
|
|
8
8
|
import org.gradle.api.Project
|
|
9
|
+
import org.gradle.api.artifacts.Dependency
|
|
9
10
|
import org.gradle.api.publish.maven.MavenPom
|
|
10
11
|
import org.gradle.internal.extensions.core.extra
|
|
11
12
|
import java.io.File
|
|
@@ -38,8 +39,9 @@ open class ExpoModuleExtension(val project: Project) {
|
|
|
38
39
|
return project.rootProject.extra.safeGet<Any>(name) ?: default
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
fun getExpoDependency(name: String):
|
|
42
|
-
|
|
42
|
+
fun getExpoDependency(name: String): Dependency {
|
|
43
|
+
val notation = autolinking.getExpoDependency(project, name)
|
|
44
|
+
return project.dependencies.create(notation)
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
var canBePublished: Boolean = true
|
|
@@ -77,11 +77,14 @@ open class SharedObject: AnySharedObject {
|
|
|
77
77
|
log.warn("Trying to send event '\(event)' to \(type(of: self)), but the JS runtime has been lost")
|
|
78
78
|
return
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
runtime.schedule { [weak appContext, sharedObjectId] in
|
|
81
|
+
guard let appContext else {
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
guard let jsValue = appContext.sharedObjectRegistry.toJavaScriptValue(sharedObjectId: sharedObjectId) else {
|
|
85
|
+
log.warn("Trying to send event '\(event)' to JS, but the JS object is no longer associated with the native instance")
|
|
86
|
+
return
|
|
87
|
+
}
|
|
85
88
|
dispatch(event: event, payload: payload, to: jsValue, in: runtime)
|
|
86
89
|
}
|
|
87
90
|
}
|
|
@@ -101,14 +104,14 @@ open class SharedObject: AnySharedObject {
|
|
|
101
104
|
log.warn("Trying to send event '\(event)' to \(type(of: self)), but the JS runtime has been lost")
|
|
102
105
|
return
|
|
103
106
|
}
|
|
104
|
-
|
|
105
|
-
log.warn("Trying to send event '\(event)' to JS, but the JS object is no longer associated with the native instance")
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
runtime.schedule { [weak appContext] in
|
|
107
|
+
runtime.schedule { [weak appContext, sharedObjectId] in
|
|
109
108
|
guard let appContext else {
|
|
110
109
|
return
|
|
111
110
|
}
|
|
111
|
+
guard let jsValue = appContext.sharedObjectRegistry.toJavaScriptValue(sharedObjectId: sharedObjectId) else {
|
|
112
|
+
log.warn("Trying to send event '\(event)' to JS, but the JS object is no longer associated with the native instance")
|
|
113
|
+
return
|
|
114
|
+
}
|
|
112
115
|
do {
|
|
113
116
|
let jsPayload = try (~P.self).castToJS(payload, appContext: appContext, in: runtime)
|
|
114
117
|
dispatch(event: event, payload: jsPayload, to: jsValue, in: runtime)
|
|
@@ -181,6 +181,17 @@ public final class SharedObjectRegistry: Sendable {
|
|
|
181
181
|
return toJavaScriptObject(nativeObject)?.asValue()
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
/**
|
|
185
|
+
Variant of `toJavaScriptValue(_:)` that looks up by id rather than by native object.
|
|
186
|
+
*/
|
|
187
|
+
@JavaScriptActor
|
|
188
|
+
internal func toJavaScriptValue(sharedObjectId id: SharedObjectId) -> JavaScriptValue? {
|
|
189
|
+
let pair = state.withLock { state in
|
|
190
|
+
return state.pairs[id]
|
|
191
|
+
}
|
|
192
|
+
return pair?.javaScript.lock()?.asValue()
|
|
193
|
+
}
|
|
194
|
+
|
|
184
195
|
/**
|
|
185
196
|
Gets the JS shared object that is paired with a given native object.
|
|
186
197
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.12",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@expo/expo-modules-macros-plugin": "~0.0.9",
|
|
50
|
-
"expo-modules-jsi": "~56.0.
|
|
50
|
+
"expo-modules-jsi": "~56.0.7",
|
|
51
51
|
"invariant": "^2.2.4"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/invariant": "^2.2.33",
|
|
67
67
|
"expo-module-scripts": "56.0.2"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "125e8225bf36a4b9b2a159441d9ea724bcf1110f",
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "expo-module build",
|
|
72
72
|
"clean": "expo-module clean",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|