expo-dev-launcher 4.0.9 → 4.0.11

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
+ ## 4.0.11 — 2024-05-04
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 4.0.10 — 2024-05-03
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - [Android] Fixed `LogBox` isn't working on the new architecture. ([#28602](https://github.com/expo/expo/pull/28602) by [@lukmccall](https://github.com/lukmccall))
22
+
13
23
  ## 4.0.9 — 2024-05-02
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -17,7 +17,7 @@ android {
17
17
  namespace "expo.modules.devlauncher"
18
18
  defaultConfig {
19
19
  versionCode 9
20
- versionName "4.0.9"
20
+ versionName "4.0.11"
21
21
  }
22
22
 
23
23
  buildTypes {
@@ -27,6 +27,9 @@ import com.facebook.react.devsupport.interfaces.DevSplitBundleCallback;
27
27
  import com.facebook.react.modules.core.DeviceEventManagerModule;
28
28
  import com.facebook.react.runtime.internal.bolts.Continuation;
29
29
  import com.facebook.react.runtime.internal.bolts.Task;
30
+
31
+ import java.lang.ref.WeakReference;
32
+
30
33
  import javax.annotation.Nullable;
31
34
 
32
35
  //
@@ -122,6 +125,8 @@ public class NonFinalBridgelessDevSupportManager extends DevSupportManagerBase {
122
125
 
123
126
  private static ReactInstanceDevHelper createInstanceDevHelper(final ReactHostImpl reactHost) {
124
127
  return new ReactInstanceDevHelper() {
128
+ private WeakReference<ReactSurfaceImpl> logBoxSurface = new WeakReference<>(null);
129
+
125
130
  @Override
126
131
  public void onReloadWithJSDebugger(JavaJSExecutor.Factory proxyExecutorFactory) {
127
132
  // Not implemented
@@ -160,6 +165,11 @@ public class NonFinalBridgelessDevSupportManager extends DevSupportManagerBase {
160
165
  if (currentActivity != null && !reactHost.isSurfaceWithModuleNameAttached(appKey)) {
161
166
  ReactSurfaceImpl reactSurface =
162
167
  ReactSurfaceImpl.createWithView(currentActivity, appKey, new Bundle());
168
+
169
+ if (appKey.equals("LogBox")) {
170
+ logBoxSurface = new WeakReference<>(reactSurface);
171
+ }
172
+
163
173
  reactSurface.attach(reactHost);
164
174
  reactSurface.start();
165
175
 
@@ -170,7 +180,15 @@ public class NonFinalBridgelessDevSupportManager extends DevSupportManagerBase {
170
180
 
171
181
  @Override
172
182
  public void destroyRootView(View rootView) {
173
- // Not implemented
183
+ // The log box surface is a special case and needs to be detached from the host.
184
+ // The detachment process should be handled by React Native, but it appears to be malfunctioning.
185
+ // This is a temporary solution and should be removed
186
+ // once we identify the root cause of the surface remaining attached after reloads.
187
+ ReactSurfaceImpl logBox = logBoxSurface.get();
188
+ if (logBox != null) {
189
+ reactHost.detachSurface(logBox);
190
+ logBoxSurface.clear();
191
+ }
174
192
  }
175
193
  };
176
194
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-dev-launcher",
3
3
  "title": "Expo Development Launcher",
4
- "version": "4.0.9",
4
+ "version": "4.0.11",
5
5
  "description": "Pre-release version of the Expo development launcher package for testing.",
6
6
  "main": "build/DevLauncher.js",
7
7
  "types": "build/DevLauncher.d.ts",
@@ -31,7 +31,7 @@
31
31
  "homepage": "https://docs.expo.dev",
32
32
  "dependencies": {
33
33
  "ajv": "8.11.0",
34
- "expo-dev-menu": "5.0.10",
34
+ "expo-dev-menu": "5.0.12",
35
35
  "expo-manifests": "~0.14.0",
36
36
  "resolve-from": "^5.0.0",
37
37
  "semver": "^7.6.0"
@@ -66,5 +66,5 @@
66
66
  "./setupTests.ts"
67
67
  ]
68
68
  },
69
- "gitHead": "71b2f4339ef7b5b42ce87c1d8c17fe41c60355e0"
69
+ "gitHead": "2d80ee3cc6b1703101e8fa2639474efa7dc75097"
70
70
  }