expo-modules-core 2.1.0 → 2.1.1

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,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 2.1.1 — 2024-12-02
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 2.1.0 — 2024-11-29
14
18
 
15
19
  ### 🎉 New features
@@ -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.1.0'
6
+ version = '2.1.1'
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.1.0"
70
+ versionName "2.1.1"
71
71
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
72
72
 
73
73
  testInstrumentationRunner "expo.modules.TestRunner"
@@ -211,7 +211,12 @@ void installClass(jsi::Runtime &runtime) {
211
211
  // To provide backwards compatibility with the old EventEmitter where the native module object was passed as an argument.
212
212
  // We're checking if the argument is already an instance of the new emitter and if so, just return it without unnecessarily wrapping it.
213
213
  if (count > 0) {
214
- const jsi::Object &firstArg = LazyObject::unwrapObjectIfNecessary(runtime, args[0].asObject(runtime));
214
+ // We need the tmp object to correctly unwrap the lazy object.
215
+ // For some reason, if we inline the retrieval of the first argument, the instanceOf check fails on Android.
216
+ // This is probably because the object is copied somewhere in the process.
217
+ const jsi::Object &tmp = args[0].asObject(runtime);
218
+ const jsi::Object &firstArg = LazyObject::unwrapObjectIfNecessary(runtime, tmp);
219
+
215
220
  jsi::Function constructor = thisValue.getObject(runtime).getPropertyAsFunction(runtime, "constructor");
216
221
 
217
222
  if (firstArg.instanceOf(runtime, constructor)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
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": "728158f99d680cf64fb06f08301d3806c18c6f63"
47
+ "gitHead": "bc1fea6bcab47889e2922d543920397691b200f3"
48
48
  }