expo-modules-core 2.0.4 → 2.0.5

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
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 2.0.5 — 2024-11-22
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Fixed build error when using jsEngine=jsc. ([#33130](https://github.com/expo/expo/pull/33130) by [@kudo](https://github.com/kudo))
18
+
19
+ ### 💡 Others
20
+
21
+ - [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))
22
+
13
23
  ## 2.0.4 — 2024-11-19
14
24
 
15
25
  ### 🎉 New features
@@ -24,6 +34,8 @@
24
34
  ### 💡 Others
25
35
 
26
36
  - 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))
37
+ - 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))
38
+ - Fixed compatibility for React Native 0.77. ([#33079](https://github.com/expo/expo/pull/33079) by [@kudo](https://github.com/kudo))
27
39
 
28
40
  ## 2.0.3 — 2024-11-14
29
41
 
@@ -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 {
@@ -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.4'
6
+ version = '2.0.5'
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.4"
70
+ versionName "2.0.5"
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
@@ -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: Iterator<Map.Entry<String, Any>> =
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
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": "128718d43bac2eaed764b3551469b95400f2363e"
47
+ "gitHead": "6cbc7c671f769d36e4294f25a9445281912e45fd"
48
48
  }