@react-native/dev-middleware 0.84.0-rc.0 → 0.85.0-nightly-20260108-1236b6be4

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.
@@ -93,17 +93,6 @@ function createWrappedEventReporter(reporter, logger, experiments) {
93
93
  event.appId ?? "unknown",
94
94
  );
95
95
  break;
96
- case "fusebox_console_notice":
97
- logger?.info(
98
- "\u001B[1m\u001B[7m💡 JavaScript logs have moved!\u001B[22m They can now be " +
99
- "viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in " +
100
- "the terminal to open" +
101
- (experiments.enableStandaloneFuseboxShell
102
- ? ""
103
- : " (requires Google Chrome or Microsoft Edge)") +
104
- ".\u001B[27m",
105
- );
106
- break;
107
96
  case "fusebox_shell_preparation_attempt":
108
97
  switch (event.result.code) {
109
98
  case "success":
@@ -15,7 +15,7 @@ import type { ExperimentsConfig } from "./types/Experiments";
15
15
  import type { Logger } from "./types/Logger";
16
16
  import type { NextHandleFunction } from "connect";
17
17
 
18
- type Options = $ReadOnly<{
18
+ type Options = Readonly<{
19
19
  /**
20
20
  * The base URL to the dev server, as reachable from the machine on which
21
21
  * dev-middleware is hosted. Typically `http://localhost:${metroPort}`.
@@ -62,7 +62,7 @@ type Options = $ReadOnly<{
62
62
  unstable_trackInspectorProxyEventLoopPerf?: boolean,
63
63
  }>;
64
64
 
65
- type DevMiddlewareAPI = $ReadOnly<{
65
+ type DevMiddlewareAPI = Readonly<{
66
66
  middleware: NextHandleFunction,
67
67
  websocketEndpoints: { [path: string]: ws$WebSocketServer },
68
68
  }>;
@@ -10,19 +10,19 @@
10
10
 
11
11
  import type { JSONSerializable, Page } from "./types";
12
12
 
13
- type ExposedDevice = $ReadOnly<{
13
+ type ExposedDevice = Readonly<{
14
14
  appId: string,
15
15
  id: string,
16
16
  name: string,
17
17
  sendMessage: (message: JSONSerializable) => void,
18
18
  }>;
19
19
 
20
- type ExposedDebugger = $ReadOnly<{
20
+ type ExposedDebugger = Readonly<{
21
21
  userAgent: string | null,
22
22
  sendMessage: (message: JSONSerializable) => void,
23
23
  }>;
24
24
 
25
- export type CustomMessageHandlerConnection = $ReadOnly<{
25
+ export type CustomMessageHandlerConnection = Readonly<{
26
26
  page: Page,
27
27
  device: ExposedDevice,
28
28
  debugger: ExposedDebugger,
@@ -27,7 +27,6 @@ const WS_CLOSE_REASON = (exports.WS_CLOSE_REASON = {
27
27
  "[NEW_DEBUGGER_OPENED] New debugger opened for the same app instance",
28
28
  });
29
29
  const FILE_PREFIX = "file://";
30
- let fuseboxConsoleNoticeLogged = false;
31
30
  const REACT_NATIVE_RELOADABLE_PAGE_ID = "-1";
32
31
  class Device {
33
32
  #id;
@@ -375,7 +374,6 @@ class Device {
375
374
  }
376
375
  for (const page of this.#pages.values()) {
377
376
  if (this.#pageHasCapability(page, "nativePageReloads")) {
378
- this.#logFuseboxConsoleNotice();
379
377
  continue;
380
378
  }
381
379
  if (page.title.includes("React")) {
@@ -799,12 +797,5 @@ class Device {
799
797
  dangerouslyGetSocket() {
800
798
  return this.#deviceSocket;
801
799
  }
802
- #logFuseboxConsoleNotice() {
803
- if (fuseboxConsoleNoticeLogged) {
804
- return;
805
- }
806
- this.#deviceEventReporter?.logFuseboxConsoleNotice();
807
- fuseboxConsoleNoticeLogged = true;
808
- }
809
800
  }
810
801
  exports.default = Device;
@@ -23,7 +23,7 @@ declare export const WS_CLOSE_REASON: {
23
23
  NEW_DEBUGGER_OPENED: "[NEW_DEBUGGER_OPENED] New debugger opened for the same app instance",
24
24
  };
25
25
 
26
- export type DeviceOptions = $ReadOnly<{
26
+ export type DeviceOptions = Readonly<{
27
27
  id: string,
28
28
  name: string,
29
29
  app: string,
@@ -61,7 +61,7 @@ declare export default class Device {
61
61
  handleDebuggerConnection(
62
62
  socket: WS,
63
63
  pageId: string,
64
- $$PARAM_2$$: $ReadOnly<{
64
+ $$PARAM_2$$: Readonly<{
65
65
  debuggerRelativeBaseUrl: URL,
66
66
  userAgent: string | null,
67
67
  }>,
@@ -49,6 +49,5 @@ declare class DeviceEventReporter {
49
49
  error: Error,
50
50
  message: string,
51
51
  ): void;
52
- logFuseboxConsoleNotice(): void;
53
52
  }
54
53
  export default DeviceEventReporter;
@@ -166,11 +166,6 @@ class DeviceEventReporter {
166
166
  connectionUptime: this.#deviceConnectedTimestamp - Date.now(),
167
167
  });
168
168
  }
169
- logFuseboxConsoleNotice() {
170
- this.#eventReporter.logEvent({
171
- type: "fusebox_console_notice",
172
- });
173
- }
174
169
  #logExpiredCommand(pendingCommand) {
175
170
  this.#eventReporter.logEvent({
176
171
  type: "debugger_command",
@@ -12,19 +12,19 @@ import type { EventReporter } from "../types/EventReporter";
12
12
  import type { CDPResponse } from "./cdp-types/messages";
13
13
  import type { DeepReadOnly } from "./types";
14
14
 
15
- type DeviceMetadata = $ReadOnly<{
15
+ type DeviceMetadata = Readonly<{
16
16
  appId: string,
17
17
  deviceId: string,
18
18
  deviceName: string,
19
19
  }>;
20
20
 
21
- type RequestMetadata = $ReadOnly<{
21
+ type RequestMetadata = Readonly<{
22
22
  pageId: string | null,
23
23
  frontendUserAgent: string | null,
24
24
  prefersFuseboxFrontend: boolean | null,
25
25
  }>;
26
26
 
27
- type ResponseMetadata = $ReadOnly<{
27
+ type ResponseMetadata = Readonly<{
28
28
  pageId: string | null,
29
29
  frontendUserAgent: string | null,
30
30
  prefersFuseboxFrontend: boolean | null,
@@ -33,7 +33,7 @@ type ResponseMetadata = $ReadOnly<{
33
33
  declare class DeviceEventReporter {
34
34
  constructor(eventReporter: EventReporter, metadata: DeviceMetadata): void;
35
35
  logRequest(
36
- req: $ReadOnly<{ id: number, method: string, ... }>,
36
+ req: Readonly<{ id: number, method: string, ... }>,
37
37
  origin: "debugger" | "proxy",
38
38
  metadata: RequestMetadata,
39
39
  ): void;
@@ -45,7 +45,7 @@ declare class DeviceEventReporter {
45
45
  logProfilingTargetRegistered(): void;
46
46
  logConnection(
47
47
  connectedEntity: "debugger",
48
- metadata: $ReadOnly<{
48
+ metadata: Readonly<{
49
49
  pageId: string,
50
50
  frontendUserAgent: string | null,
51
51
  }>,
@@ -56,7 +56,6 @@ declare class DeviceEventReporter {
56
56
  error: Error,
57
57
  message: string,
58
58
  ): void;
59
- logFuseboxConsoleNotice(): void;
60
59
  }
61
60
 
62
61
  declare export default typeof DeviceEventReporter;
@@ -12,7 +12,7 @@
12
12
  * A capability flag disables a specific feature/hack in the InspectorProxy
13
13
  * layer by indicating that the target supports one or more modern CDP features.
14
14
  */
15
- export type TargetCapabilityFlags = $ReadOnly<{
15
+ export type TargetCapabilityFlags = Readonly<{
16
16
  /**
17
17
  * The target supports a stable page representation across reloads.
18
18
  *
@@ -43,7 +43,7 @@ export type TargetCapabilityFlags = $ReadOnly<{
43
43
  // each new instance of VM and can appear when user reloads React Native
44
44
  // application.
45
45
 
46
- export type PageFromDevice = $ReadOnly<{
46
+ export type PageFromDevice = Readonly<{
47
47
  id: string,
48
48
  title: string,
49
49
  /** Sent from modern targets only */
@@ -54,15 +54,15 @@ export type PageFromDevice = $ReadOnly<{
54
54
  capabilities?: TargetCapabilityFlags,
55
55
  }>;
56
56
 
57
- export type Page = $ReadOnly<{
57
+ export type Page = Readonly<{
58
58
  ...PageFromDevice,
59
59
  capabilities: NonNullable<PageFromDevice["capabilities"]>,
60
60
  }>;
61
61
 
62
62
  // Chrome Debugger Protocol message/event passed between device and debugger.
63
- export type WrappedEvent = $ReadOnly<{
63
+ export type WrappedEvent = Readonly<{
64
64
  event: "wrappedEvent",
65
- payload: $ReadOnly<{
65
+ payload: Readonly<{
66
66
  pageId: string,
67
67
  wrappedEvent: string,
68
68
  }>,
@@ -70,16 +70,16 @@ export type WrappedEvent = $ReadOnly<{
70
70
 
71
71
  // Request sent from Inspector Proxy to Device when new debugger is connected
72
72
  // to particular page.
73
- export type ConnectRequest = $ReadOnly<{
73
+ export type ConnectRequest = Readonly<{
74
74
  event: "connect",
75
- payload: $ReadOnly<{ pageId: string }>,
75
+ payload: Readonly<{ pageId: string }>,
76
76
  }>;
77
77
 
78
78
  // Request sent from Inspector Proxy to Device to notify that debugger is
79
79
  // disconnected.
80
- export type DisconnectRequest = $ReadOnly<{
80
+ export type DisconnectRequest = Readonly<{
81
81
  event: "disconnect",
82
- payload: $ReadOnly<{ pageId: string }>,
82
+ payload: Readonly<{ pageId: string }>,
83
83
  }>;
84
84
 
85
85
  // Request sent from Inspector Proxy to Device to get a list of pages.
@@ -105,7 +105,7 @@ export type MessageToDevice =
105
105
  | DisconnectRequest;
106
106
 
107
107
  // Page description object that is sent in response to /json HTTP request from debugger.
108
- export type PageDescription = $ReadOnly<{
108
+ export type PageDescription = Readonly<{
109
109
  id: string,
110
110
  title: string,
111
111
  appId: string,
@@ -121,7 +121,7 @@ export type PageDescription = $ReadOnly<{
121
121
  vm?: string,
122
122
 
123
123
  // React Native specific metadata
124
- reactNative: $ReadOnly<{
124
+ reactNative: Readonly<{
125
125
  logicalDeviceId: string,
126
126
  capabilities: Page["capabilities"],
127
127
  }>,
@@ -131,7 +131,7 @@ export type JsonPagesListResponse = Array<PageDescription>;
131
131
 
132
132
  // Response to /json/version HTTP request from the debugger specifying browser type and
133
133
  // Chrome protocol version.
134
- export type JsonVersionResponse = $ReadOnly<{
134
+ export type JsonVersionResponse = Readonly<{
135
135
  Browser: string,
136
136
  "Protocol-Version": string,
137
137
  }>;
@@ -14,7 +14,7 @@ import type { EventReporter } from "../types/EventReporter";
14
14
  import type { Experiments } from "../types/Experiments";
15
15
  import type { Logger } from "../types/Logger";
16
16
  import type { NextHandleFunction } from "connect";
17
- type Options = $ReadOnly<{
17
+ type Options = Readonly<{
18
18
  serverBaseUrl: string,
19
19
  logger?: Logger,
20
20
  browserLauncher: BrowserLauncher,
@@ -78,34 +78,33 @@ export type ReportableEvent =
78
78
  * | ^^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
79
79
  **/
80
80
  any
81
- | { type: "fusebox_console_notice" }
82
81
  | /**
83
- * > 96 | ...DebuggerSessionIDs,
82
+ * > 93 | ...DebuggerSessionIDs,
84
83
  * | ^^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
85
84
  **/
86
85
  any
87
86
  | /**
88
- * > 105 | ...ConnectionUptime,
87
+ * > 102 | ...ConnectionUptime,
89
88
  * | ^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
90
89
  **/
91
90
  any
92
91
  | /**
93
- * > 112 | ...ConnectionUptime,
92
+ * > 109 | ...ConnectionUptime,
94
93
  * | ^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
95
94
  **/
96
95
  any
97
96
  | /**
98
- * > 119 | ...ConnectionUptime,
97
+ * > 116 | ...ConnectionUptime,
99
98
  * | ^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
100
99
  **/
101
100
  any
102
101
  | /**
103
- * > 127 | ...ConnectionUptime,
102
+ * > 124 | ...ConnectionUptime,
104
103
  * | ^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
105
104
  **/
106
105
  any
107
106
  | /**
108
- * > 135 | ...ConnectionUptime,
107
+ * > 132 | ...ConnectionUptime,
109
108
  * | ^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with spreads in the middle or at the end" is currently not supported.
110
109
  **/
111
110
  any
@@ -88,9 +88,6 @@ export type ReportableEvent =
88
88
  status: "success",
89
89
  ...DebuggerSessionIDs,
90
90
  }
91
- | {
92
- type: "fusebox_console_notice",
93
- }
94
91
  | {
95
92
  type: "no_debug_pages_for_device",
96
93
  ...DebuggerSessionIDs,
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- export type Experiments = $ReadOnly<{
11
+ export type Experiments = Readonly<{
12
12
  /**
13
13
  * Enables the handling of GET requests in the /open-debugger endpoint,
14
14
  * in addition to POST requests. GET requests respond by redirecting to
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- export type Logger = $ReadOnly<{
11
+ export type Logger = Readonly<{
12
12
  error: (...message: Array<string>) => void,
13
13
  info: (...message: Array<string>) => void,
14
14
  warn: (...message: Array<string>) => void,
@@ -17,7 +17,7 @@ declare export default function getDevToolsFrontendUrl(
17
17
  experiments: Experiments,
18
18
  webSocketDebuggerUrl: string,
19
19
  devServerUrl: string,
20
- options?: $ReadOnly<{
20
+ options?: Readonly<{
21
21
  relative?: boolean,
22
22
  launchId?: string,
23
23
  telemetryInfo?: string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/dev-middleware",
3
- "version": "0.84.0-rc.0",
3
+ "version": "0.85.0-nightly-20260108-1236b6be4",
4
4
  "description": "Dev server middleware for React Native",
5
5
  "keywords": [
6
6
  "react-native",
@@ -26,10 +26,10 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@isaacs/ttlcache": "^1.4.1",
29
- "@react-native/debugger-frontend": "0.84.0-rc.0",
30
- "@react-native/debugger-shell": "0.84.0-rc.0",
29
+ "@react-native/debugger-frontend": "0.85.0-nightly-20260108-1236b6be4",
30
+ "@react-native/debugger-shell": "0.85.0-nightly-20260108-1236b6be4",
31
31
  "chrome-launcher": "^0.15.2",
32
- "chromium-edge-launcher": "^0.2.0",
32
+ "chromium-edge-launcher": "^0.3.0",
33
33
  "connect": "^3.6.5",
34
34
  "debug": "^4.4.0",
35
35
  "invariant": "^2.2.4",
@@ -39,7 +39,7 @@
39
39
  "ws": "^7.5.10"
40
40
  },
41
41
  "devDependencies": {
42
- "@react-native/debugger-shell": "0.84.0-rc.0",
42
+ "@react-native/debugger-shell": "0.85.0-nightly-20260108-1236b6be4",
43
43
  "selfsigned": "^4.0.0",
44
44
  "undici": "^5.29.0",
45
45
  "wait-for-expect": "^3.0.2"