expo-modules-core 1.12.20 → 1.12.22
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 +15 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/kotlin/AppContext.kt +13 -1
- package/android/src/main/java/expo/modules/kotlin/defaultmodules/CoreModule.kt +9 -2
- package/android/src/main/java/expo/modules/kotlin/views/FilteredReadableMap.kt +8 -1
- package/ios/FileSystemUtilities/FileSystemLegacyUtilities.swift +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.12.22 — 2024-08-20
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 1.12.21 — 2024-08-14
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- [iOS] Fix getExternalPathPermissions returns no read/write permissions. ([#30540](https://github.com/expo/expo/pull/30540) by [@dispelpowerone](https://github.com/dispelpowerone))
|
|
22
|
+
- [android] Fix accessing the `runtimeExecutor` from kotlin when the new arch is enabled. ([#31058](https://github.com/expo/expo/pull/31058) by [@alanjhughes](https://github.com/alanjhughes))
|
|
23
|
+
|
|
24
|
+
### ⚠️ Notices
|
|
25
|
+
|
|
26
|
+
- Added support for React Native 0.75.x. ([#30902](https://github.com/expo/expo/pull/30902) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
27
|
+
|
|
13
28
|
## 1.12.20 — 2024-07-29
|
|
14
29
|
|
|
15
30
|
### 💡 Others
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '1.12.
|
|
4
|
+
version = '1.12.22'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -63,7 +63,7 @@ android {
|
|
|
63
63
|
defaultConfig {
|
|
64
64
|
consumerProguardFiles 'proguard-rules.pro'
|
|
65
65
|
versionCode 1
|
|
66
|
-
versionName "1.12.
|
|
66
|
+
versionName "1.12.22"
|
|
67
67
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
68
68
|
|
|
69
69
|
testInstrumentationRunner "expo.modules.TestRunner"
|
|
@@ -9,6 +9,7 @@ import android.view.View
|
|
|
9
9
|
import androidx.annotation.UiThread
|
|
10
10
|
import androidx.appcompat.app.AppCompatActivity
|
|
11
11
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
12
|
+
import com.facebook.react.bridge.RuntimeExecutor
|
|
12
13
|
import com.facebook.react.common.annotations.FrameworkAPI
|
|
13
14
|
import com.facebook.react.turbomodule.core.CallInvokerHolderImpl
|
|
14
15
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
@@ -166,11 +167,22 @@ class AppContext(
|
|
|
166
167
|
|
|
167
168
|
@Suppress("DEPRECATION")
|
|
168
169
|
if (reactContext.isBridgeless) {
|
|
170
|
+
val runtimeExecutor: RuntimeExecutor = try {
|
|
171
|
+
// When react-native version >= 0.75.0 get runtimeExecutor from catalystInstance
|
|
172
|
+
val catalystInstanceField = reactContext.javaClass.getDeclaredField("catalystInstance")
|
|
173
|
+
val catalystInstance = catalystInstanceField.get(reactContext)
|
|
174
|
+
val runtimeExecutorField = catalystInstance.javaClass.getDeclaredField("runtimeExecutor")
|
|
175
|
+
runtimeExecutorField.get(catalystInstance) as RuntimeExecutor
|
|
176
|
+
} catch (e: NoSuchFieldException) {
|
|
177
|
+
val method = reactContext.javaClass.getMethod("getRuntimeExecutor")
|
|
178
|
+
method.invoke(reactContext) as RuntimeExecutor
|
|
179
|
+
}
|
|
180
|
+
|
|
169
181
|
jsiInterop.installJSIForBridgeless(
|
|
170
182
|
this,
|
|
171
183
|
jsRuntimePointer,
|
|
172
184
|
jniDeallocator,
|
|
173
|
-
|
|
185
|
+
runtimeExecutor
|
|
174
186
|
)
|
|
175
187
|
} else {
|
|
176
188
|
jsiInterop.installJSI(
|
|
@@ -4,7 +4,6 @@ import com.facebook.react.ReactActivity
|
|
|
4
4
|
import com.facebook.react.ReactDelegate
|
|
5
5
|
import com.facebook.react.bridge.UiThreadUtil
|
|
6
6
|
import com.facebook.react.config.ReactFeatureFlags
|
|
7
|
-
import com.facebook.react.devsupport.DisabledDevSupportManager
|
|
8
7
|
import expo.modules.kotlin.events.normalizeEventName
|
|
9
8
|
import expo.modules.kotlin.modules.Module
|
|
10
9
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
@@ -70,7 +69,15 @@ class CoreModule : Module() {
|
|
|
70
69
|
?: return@AsyncFunction
|
|
71
70
|
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
|
|
72
71
|
val reactInstanceManager = reactDelegate.reactInstanceManager
|
|
73
|
-
|
|
72
|
+
|
|
73
|
+
var devSupportManagerClass: Class<*>
|
|
74
|
+
try {
|
|
75
|
+
// react-native version 0.75.0 renamed DisabledDevSupportManager to ReleaseDevSupportManager
|
|
76
|
+
devSupportManagerClass = Class.forName("com.facebook.react.devsupport.ReleaseDevSupportManager")
|
|
77
|
+
} catch (e: ClassNotFoundException) {
|
|
78
|
+
devSupportManagerClass = Class.forName("com.facebook.react.devsupport.DisabledDevSupportManager")
|
|
79
|
+
}
|
|
80
|
+
if (devSupportManagerClass.isInstance(reactInstanceManager.devSupportManager)) {
|
|
74
81
|
UiThreadUtil.runOnUiThread {
|
|
75
82
|
reactInstanceManager.recreateReactContextInBackground()
|
|
76
83
|
}
|
|
@@ -41,7 +41,14 @@ class FilteredReadableMap(
|
|
|
41
41
|
private val backingMap: ReadableMap,
|
|
42
42
|
private val filteredKeys: List<String>
|
|
43
43
|
) : ReadableMap by backingMap {
|
|
44
|
-
|
|
44
|
+
@Suppress("NOTHING_TO_OVERRIDE", "INAPPLICABLE_JVM_NAME")
|
|
45
|
+
@JvmName("getEntryIteratorFromFunction")
|
|
46
|
+
override fun getEntryIterator(): Iterator<Map.Entry<String, Any>> = entryIterator
|
|
47
|
+
|
|
48
|
+
// Fallback for react-native 0.75.0 compatibility
|
|
49
|
+
@Suppress("NOTHING_TO_OVERRIDE", "INAPPLICABLE_JVM_NAME")
|
|
50
|
+
@get:JvmName("getEntryIteratorFromProperty")
|
|
51
|
+
override val entryIterator: Iterator<Map.Entry<String, Any>> =
|
|
45
52
|
FilteredIterator(backingMap.entryIterator) {
|
|
46
53
|
!filteredKeys.contains(it.key)
|
|
47
54
|
}
|
|
@@ -110,10 +110,10 @@ public class FileSystemLegacyUtilities: NSObject, EXInternalModule, EXFileSystem
|
|
|
110
110
|
return []
|
|
111
111
|
}
|
|
112
112
|
var filePermissions: EXFileSystemPermissionFlags = []
|
|
113
|
-
if FileManager.default.isReadableFile(atPath: url.
|
|
113
|
+
if FileManager.default.isReadableFile(atPath: url.path) {
|
|
114
114
|
filePermissions.insert(.read)
|
|
115
115
|
}
|
|
116
|
-
if FileManager.default.isWritableFile(atPath: url.
|
|
116
|
+
if FileManager.default.isWritableFile(atPath: url.path) {
|
|
117
117
|
filePermissions.insert(.write)
|
|
118
118
|
}
|
|
119
119
|
return filePermissions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.22",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@testing-library/react-hooks": "^7.0.1",
|
|
45
45
|
"expo-module-scripts": "^3.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "80d038d11d216793d00fa5b4607a2c6169cee814"
|
|
48
48
|
}
|