@react-native/dev-middleware 0.88.0-nightly-20260722-eb4d3892a → 0.88.0-nightly-20260723-e46189e1e

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.
@@ -8,44 +8,29 @@ const {
8
8
  unstable_prepareDebuggerShell,
9
9
  unstable_spawnDebuggerShellWithArgs,
10
10
  } = require("@react-native/debugger-shell");
11
- const ChromeLauncher = require("chrome-launcher");
12
- const { Launcher: EdgeLauncher } = require("chromium-edge-launcher");
13
- const { spawn } = require("node:child_process");
14
11
  const open = require("open");
12
+ const { apps, openApp } = open;
15
13
  const DefaultToolLauncher = {
16
14
  launchDebuggerAppWindow: async (url) => {
17
15
  if (process.env.NODE_ENV === "test") {
18
16
  assertMockedInTests();
19
17
  }
20
- let chromePath;
21
18
  try {
22
- chromePath = ChromeLauncher.getChromePath();
19
+ const subprocess = await openApp(apps.chrome, {
20
+ arguments: [`--app=${url}`],
21
+ newInstance: true,
22
+ });
23
+ await new Promise((resolve, reject) => {
24
+ subprocess.once("error", reject);
25
+ subprocess.once("exit", (code) => {
26
+ code === 0
27
+ ? resolve()
28
+ : reject(new Error(`openApp exited with code ${code}`));
29
+ });
30
+ });
23
31
  } catch (e) {
24
- chromePath = EdgeLauncher.getFirstInstallation();
25
- }
26
- if (chromePath == null) {
27
32
  await open(url);
28
- return;
29
33
  }
30
- const chromeFlags = [`--app=${url}`, "--window-size=1200,600"];
31
- return new Promise((resolve, reject) => {
32
- const childProcess = spawn(chromePath, chromeFlags, {
33
- detached: true,
34
- stdio: "ignore",
35
- });
36
- childProcess.on("data", () => {
37
- resolve();
38
- });
39
- childProcess.on("close", (code) => {
40
- if (code !== 0) {
41
- reject(
42
- new Error(
43
- `Failed to launch debugger app window: ${chromePath} exited with code ${code}`,
44
- ),
45
- );
46
- }
47
- });
48
- });
49
34
  },
50
35
  async launchDebuggerShell(url, windowKey) {
51
36
  if (process.env.NODE_ENV === "test") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/dev-middleware",
3
- "version": "0.88.0-nightly-20260722-eb4d3892a",
3
+ "version": "0.88.0-nightly-20260723-e46189e1e",
4
4
  "description": "Dev server middleware for React Native",
5
5
  "keywords": [
6
6
  "react-native",
@@ -26,20 +26,18 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@isaacs/ttlcache": "^1.4.1",
29
- "@react-native/debugger-frontend": "0.88.0-nightly-20260722-eb4d3892a",
30
- "@react-native/debugger-shell": "0.88.0-nightly-20260722-eb4d3892a",
31
- "chrome-launcher": "^0.15.2",
32
- "chromium-edge-launcher": "^0.3.0",
29
+ "@react-native/debugger-frontend": "0.88.0-nightly-20260723-e46189e1e",
30
+ "@react-native/debugger-shell": "0.88.0-nightly-20260723-e46189e1e",
33
31
  "connect": "^3.6.5",
34
32
  "debug": "^4.4.0",
35
33
  "invariant": "^2.2.4",
36
34
  "nullthrows": "^1.1.1",
37
- "open": "^7.0.3",
35
+ "open": "^8.4.2",
38
36
  "serve-static": "^1.16.2",
39
37
  "ws": "^7.5.10"
40
38
  },
41
39
  "devDependencies": {
42
- "@react-native/debugger-shell": "0.88.0-nightly-20260722-eb4d3892a",
40
+ "@react-native/debugger-shell": "0.88.0-nightly-20260723-e46189e1e",
43
41
  "selfsigned": "^5.5.0",
44
42
  "undici": "^6.23.0",
45
43
  "wait-for-expect": "^3.0.2"