expo-modules-core 2.0.4 → 2.0.6
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 +19 -0
- package/ExpoModulesCore.podspec +4 -1
- package/android/ExpoModulesCorePlugin.gradle +9 -1
- package/android/build.gradle +14 -2
- package/android/src/main/java/expo/modules/adapters/react/apploader/RNHeadlessAppLoader.kt +6 -1
- package/android/src/main/java/expo/modules/kotlin/views/FilteredReadableMap.kt +1 -1
- package/android/src/rn74/expo/modules/rncompatibility/ReactNativeFeatureFlags.kt +14 -0
- package/android/src/rn77/expo/modules/rncompatibility/ReactNativeFeatureFlags.kt +12 -0
- package/build/ts-declarations/global.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ts-declarations/global.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 2.0.6 — 2024-11-22
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [Android] Fixed issue with RNHeadlessAppLoader destroying the reactHost instance in the new architecture. ([#33176](https://github.com/expo/expo/pull/33176) by [@chrfalch](https://github.com/chrfalch))
|
|
18
|
+
|
|
19
|
+
## 2.0.5 — 2024-11-22
|
|
20
|
+
|
|
21
|
+
### 🐛 Bug fixes
|
|
22
|
+
|
|
23
|
+
- [iOS] Fixed build error when using jsEngine=jsc. ([#33130](https://github.com/expo/expo/pull/33130) by [@kudo](https://github.com/kudo))
|
|
24
|
+
- Fixed TypeScript incompatible `process` type error when including `@types/node`. ([#33155](https://github.com/expo/expo/pull/33155) by [@kudo](https://github.com/kudo))
|
|
25
|
+
|
|
26
|
+
### 💡 Others
|
|
27
|
+
|
|
28
|
+
- [Android] Introduced `applyKspJvmToolchain()` gradle helper to enforce JVM Toolchain version for KSP. ([#33148](https://github.com/expo/expo/pull/33148) by [@kudo](https://github.com/kudo))
|
|
29
|
+
|
|
13
30
|
## 2.0.4 — 2024-11-19
|
|
14
31
|
|
|
15
32
|
### 🎉 New features
|
|
@@ -24,6 +41,8 @@
|
|
|
24
41
|
### 💡 Others
|
|
25
42
|
|
|
26
43
|
- Use `findNodeHandle` with a native ref instead of a class component instance to avoid expensive calls to `findCurrentFiberUsingSlowPath`. ([#33016](https://github.com/expo/expo/pull/33016) by [@tsapeta](https://github.com/tsapeta))
|
|
44
|
+
- Introduced `ReactNativeFeatureFlags` compat to fix React Native 0.77 breaking changes. ([#33077](https://github.com/expo/expo/pull/33077) by [@kudo](https://github.com/kudo))
|
|
45
|
+
- Fixed compatibility for React Native 0.77. ([#33079](https://github.com/expo/expo/pull/33079) by [@kudo](https://github.com/kudo))
|
|
27
46
|
|
|
28
47
|
## 2.0.3 — 2024-11-14
|
|
29
48
|
|
package/ExpoModulesCore.podspec
CHANGED
|
@@ -47,13 +47,16 @@ Pod::Spec.new do |s|
|
|
|
47
47
|
s.static_framework = true
|
|
48
48
|
s.header_dir = 'ExpoModulesCore'
|
|
49
49
|
|
|
50
|
-
header_search_paths = [
|
|
50
|
+
header_search_paths = [
|
|
51
|
+
'"$(PODS_ROOT)/Headers/Private/React-Core"', # as React-RCTAppDelegate.podspec to access JSCExecutorFactory.h
|
|
52
|
+
]
|
|
51
53
|
if ENV['USE_FRAMEWORKS']
|
|
52
54
|
header_search_paths.concat([
|
|
53
55
|
# [begin] transitive dependencies of React-RCTAppDelegate that are not defined modules
|
|
54
56
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-RuntimeApple/React_RuntimeApple.framework/Headers"',
|
|
55
57
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-RuntimeCore/React_RuntimeCore.framework/Headers"',
|
|
56
58
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-jserrorhandler/React_jserrorhandler.framework/Headers"',
|
|
59
|
+
'"${PODS_CONFIGURATION_BUILD_DIR}/React-jsinspector/jsinspector_modern.framework/Headers"',
|
|
57
60
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimescheduler/React_runtimescheduler.framework/Headers"',
|
|
58
61
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-performancetimeline/React_performancetimeline.framework/Headers"',
|
|
59
62
|
'"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererconsistency/React_rendererconsistency.framework/Headers"',
|
|
@@ -26,7 +26,8 @@ class KotlinExpoModulesCorePlugin implements Plugin<Project> {
|
|
|
26
26
|
"1.8.10": "1.8.10-1.0.9",
|
|
27
27
|
"1.8.22": "1.8.22-1.0.11",
|
|
28
28
|
"1.9.23": "1.9.23-1.0.20",
|
|
29
|
-
"1.9.24": "1.9.24-1.0.20"
|
|
29
|
+
"1.9.24": "1.9.24-1.0.20",
|
|
30
|
+
"2.0.21": "2.0.21-1.0.27"
|
|
30
31
|
]
|
|
31
32
|
|
|
32
33
|
project.rootProject.ext.has("kspVersion")
|
|
@@ -50,6 +51,13 @@ ext.applyKotlinExpoModulesCorePlugin = {
|
|
|
50
51
|
apply plugin: KotlinExpoModulesCorePlugin
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
// Apply JVM Toolchain version for KSP
|
|
55
|
+
ext.applyKspJvmToolchain = {
|
|
56
|
+
project.ksp {
|
|
57
|
+
kotlin.jvmToolchain(17)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
// Setup build options that are common for all modules
|
|
54
62
|
ext.useDefaultAndroidSdkVersions = {
|
|
55
63
|
project.android {
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
3
3
|
apply plugin: 'com.android.library'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '2.0.
|
|
6
|
+
version = '2.0.6'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
apply from: expoModulesCorePlugin
|
|
@@ -67,7 +67,7 @@ android {
|
|
|
67
67
|
defaultConfig {
|
|
68
68
|
consumerProguardFiles 'proguard-rules.pro'
|
|
69
69
|
versionCode 1
|
|
70
|
-
versionName "2.0.
|
|
70
|
+
versionName "2.0.6"
|
|
71
71
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
72
72
|
|
|
73
73
|
testInstrumentationRunner "expo.modules.TestRunner"
|
|
@@ -141,6 +141,18 @@ android {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
sourceSets {
|
|
145
|
+
main {
|
|
146
|
+
java {
|
|
147
|
+
if (REACT_NATIVE_TARGET_VERSION >= 77) {
|
|
148
|
+
srcDirs += 'src/rn77'
|
|
149
|
+
} else {
|
|
150
|
+
// TODO(kudo,20241112): Remove this when we drop react-native 0.76 support
|
|
151
|
+
srcDirs += 'src/rn74'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
144
156
|
|
|
145
157
|
testOptions {
|
|
146
158
|
unitTests.includeAndroidResources = true
|
|
@@ -77,7 +77,12 @@ class RNHeadlessAppLoader @DoNotStrip constructor(private val context: Context)
|
|
|
77
77
|
// New architecture
|
|
78
78
|
val reactHost = (reactContext.applicationContext as ReactApplication).reactHost ?: throw IllegalStateException("Your application does not have a valid reactHost")
|
|
79
79
|
android.os.Handler(reactContext.mainLooper).post {
|
|
80
|
-
|
|
80
|
+
// Only destroy the `ReactInstanceManager` if it does not bind with an Activity.
|
|
81
|
+
// And The Activity would take over the ownership of `ReactInstanceManager`.
|
|
82
|
+
// This case happens when a user clicks a background task triggered notification immediately.
|
|
83
|
+
if (reactHost.lifecycleState == LifecycleState.BEFORE_CREATE) {
|
|
84
|
+
reactHost.destroy("Closing headless task app", null)
|
|
85
|
+
}
|
|
81
86
|
HeadlessAppLoaderNotifier.notifyAppDestroyed(appScopeKey)
|
|
82
87
|
appRecords.remove(appScopeKey)
|
|
83
88
|
}
|
|
@@ -41,7 +41,7 @@ class FilteredReadableMap(
|
|
|
41
41
|
private val backingMap: ReadableMap,
|
|
42
42
|
private val filteredKeys: List<String>
|
|
43
43
|
) : ReadableMap by backingMap {
|
|
44
|
-
override val entryIterator
|
|
44
|
+
override val entryIterator =
|
|
45
45
|
FilteredIterator(backingMap.entryIterator) {
|
|
46
46
|
!filteredKeys.contains(it.key)
|
|
47
47
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@file:Suppress("DEPRECATION")
|
|
2
|
+
|
|
3
|
+
package expo.modules.rncompatibility
|
|
4
|
+
|
|
5
|
+
import com.facebook.react.config.ReactFeatureFlags
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A compatibility helper of
|
|
9
|
+
* `com.facebook.react.config.ReactFeatureFlags` and
|
|
10
|
+
* `com.facebook.react.internal.featureflags.ReactNativeFeatureFlags`
|
|
11
|
+
*/
|
|
12
|
+
object ReactNativeFeatureFlags {
|
|
13
|
+
val enableBridgelessArchitecture = ReactFeatureFlags.enableBridgelessArchitecture
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
package expo.modules.rncompatibility
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A compatibility helper of
|
|
7
|
+
* `com.facebook.react.config.ReactFeatureFlags` and
|
|
8
|
+
* `com.facebook.react.internal.featureflags.ReactNativeFeatureFlags`
|
|
9
|
+
*/
|
|
10
|
+
object ReactNativeFeatureFlags {
|
|
11
|
+
val enableBridgelessArchitecture = ReactNativeFeatureFlags.enableBridgelessArchitecture()
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/ts-declarations/global.ts"],"names":[],"mappings":"AAAA,O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,UAAU,GAAG;IAChB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,qCAAqC;QACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAEhC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAE9B,gKAAgK;QAChK,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB,sKAAsK;QACtK,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAID,OAAO,CAAC,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,IAAI,EAAE,UAAU,CAAC;IAGrB,IAAI,OAAO,EAAE,WAAW,CAAC;IAEzB;;OAEG;IACH,IAAI,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;CACrD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@testing-library/react-native": "^12.5.2",
|
|
45
45
|
"expo-module-scripts": "^4.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "65ae6fda78837f77eea5a2107066fc545a211804"
|
|
48
48
|
}
|