Sign In

@react-native/dev-middleware

Package Overview
Dependencies
Maintainers
2
Versions
1124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native/dev-middleware - npm Package Compare versions

Comparing version
0.88.0-nightly-20260722-eb4d3892a
to
0.88.0-nightly-20260723-e46189e1e
+13
-28
dist/utils/DefaultToolLauncher.js

@@ -11,6 +11,4 @@ "use strict";

} = require("@react-native/debugger-shell");
const ChromeLauncher = require("chrome-launcher");
const { Launcher: EdgeLauncher } = require("chromium-edge-launcher");
const { spawn } = require("node:child_process");
const open = require("open");
const { apps, openApp } = open;
const DefaultToolLauncher = {

@@ -21,31 +19,18 @@ launchDebuggerAppWindow: async (url) => {

}
let chromePath;
try {
chromePath = ChromeLauncher.getChromePath();
const subprocess = await openApp(apps.chrome, {
arguments: [`--app=${url}`],
newInstance: true,
});
await new Promise((resolve, reject) => {
subprocess.once("error", reject);
subprocess.once("exit", (code) => {
code === 0
? resolve()
: reject(new Error(`openApp exited with code ${code}`));
});
});
} catch (e) {
chromePath = EdgeLauncher.getFirstInstallation();
}
if (chromePath == null) {
await open(url);
return;
}
const chromeFlags = [`--app=${url}`, "--window-size=1200,600"];
return new Promise((resolve, reject) => {
const childProcess = spawn(chromePath, chromeFlags, {
detached: true,
stdio: "ignore",
});
childProcess.on("data", () => {
resolve();
});
childProcess.on("close", (code) => {
if (code !== 0) {
reject(
new Error(
`Failed to launch debugger app window: ${chromePath} exited with code ${code}`,
),
);
}
});
});
},

@@ -52,0 +37,0 @@ async launchDebuggerShell(url, windowKey) {

{
"name": "@react-native/dev-middleware",
"version": "0.88.0-nightly-20260722-eb4d3892a",
"version": "0.88.0-nightly-20260723-e46189e1e",
"description": "Dev server middleware for React Native",

@@ -29,6 +29,4 @@ "keywords": [

"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.88.0-nightly-20260722-eb4d3892a",
"@react-native/debugger-shell": "0.88.0-nightly-20260722-eb4d3892a",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.3.0",
"@react-native/debugger-frontend": "0.88.0-nightly-20260723-e46189e1e",
"@react-native/debugger-shell": "0.88.0-nightly-20260723-e46189e1e",
"connect": "^3.6.5",

@@ -38,3 +36,3 @@ "debug": "^4.4.0",

"nullthrows": "^1.1.1",
"open": "^7.0.3",
"open": "^8.4.2",
"serve-static": "^1.16.2",

@@ -44,3 +42,3 @@ "ws": "^7.5.10"

"devDependencies": {
"@react-native/debugger-shell": "0.88.0-nightly-20260722-eb4d3892a",
"@react-native/debugger-shell": "0.88.0-nightly-20260723-e46189e1e",
"selfsigned": "^5.5.0",

@@ -47,0 +45,0 @@ "undici": "^6.23.0",