expo-modules-core 1.0.3 → 1.0.4

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,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 1.0.4 — 2022-12-21
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fixed views are not correctly initialized after reloading on Android. ([#20063](https://github.com/expo/expo/pull/20063) by [@lukmccall](https://github.com/lukmccall))
18
+ - Fixed threading crash issue when running with Hermes on iOS. ([#20506](https://github.com/expo/expo/pull/20506) by [@kudo](https://github.com/kudo))
19
+
13
20
  ## 1.0.3 — 2022-11-14
14
21
 
15
22
  ### 🐛 Bug fixes
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
6
6
  apply plugin: "de.undercouch.download"
7
7
 
8
8
  group = 'host.exp.exponent'
9
- version = '1.0.3'
9
+ version = '1.0.4'
10
10
 
11
11
  buildscript {
12
12
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -191,7 +191,7 @@ android {
191
191
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
192
192
  consumerProguardFiles 'proguard-rules.pro'
193
193
  versionCode 1
194
- versionName "1.0.3"
194
+ versionName "1.0.4"
195
195
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
196
196
 
197
197
  testInstrumentationRunner "expo.modules.TestRunner"
@@ -118,7 +118,6 @@ public class ModuleRegistryAdapter implements ReactPackage {
118
118
  ) {
119
119
  if (mModulesProxy != null && mModulesProxy.getReactContext() != reactContext) {
120
120
  mModulesProxy = null;
121
- mWrapperDelegateHolders = null;
122
121
  }
123
122
  if (mModulesProxy == null) {
124
123
  ModuleRegistry registry = moduleRegistry != null ? moduleRegistry : mModuleRegistryProvider.get(reactContext);
@@ -22,12 +22,6 @@ public final class ExpoBridgeModule: NSObject, RCTBridgeModule {
22
22
  override init() {
23
23
  appContext = AppContext()
24
24
  super.init()
25
-
26
- // Listen to React Native notifications posted just before the JS is executed.
27
- NotificationCenter.default.addObserver(self,
28
- selector: #selector(javaScriptWillStartExecutingNotification(_:)),
29
- name: NSNotification.Name.RCTJavaScriptWillStartExecuting,
30
- object: nil)
31
25
  }
32
26
 
33
27
  deinit {
@@ -47,6 +41,12 @@ public final class ExpoBridgeModule: NSObject, RCTBridgeModule {
47
41
  public var bridge: RCTBridge! {
48
42
  didSet {
49
43
  appContext.reactBridge = bridge
44
+ bridge.dispatchBlock({ [weak self] in
45
+ guard let self = self, let bridge = self.appContext.reactBridge else {
46
+ return
47
+ }
48
+ self.appContext.runtime = EXJavaScriptRuntimeManager.runtime(fromBridge: bridge)
49
+ }, queue: RCTJSThread)
50
50
  }
51
51
  }
52
52
 
@@ -64,16 +64,4 @@ public final class ExpoBridgeModule: NSObject, RCTBridgeModule {
64
64
  appContext.useModulesProvider("ExpoModulesProvider")
65
65
  appContext.moduleRegistry.register(moduleType: NativeModulesProxyModule.self)
66
66
  }
67
-
68
- // MARK: - Notifications
69
-
70
- @objc
71
- public func javaScriptWillStartExecutingNotification(_ notification: Notification) {
72
- if (notification.object as? RCTBridge)?.batched == bridge {
73
- // The JavaScript bundle will start executing in a moment,
74
- // so the runtime is already initialized and we can get it from the bridge.
75
- // This should automatically install the ExpoModules host object.
76
- appContext.runtime = EXJavaScriptRuntimeManager.runtime(fromBridge: bridge)
77
- }
78
- }
79
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "@testing-library/react-hooks": "^7.0.1",
43
43
  "expo-module-scripts": "^3.0.0"
44
44
  },
45
- "gitHead": "764c38217ab6bda6d6fe32858cef1a13b89a20a6"
45
+ "gitHead": "a4a37bbc631362ec2a6d83eb6361d5059bbc67da"
46
46
  }