Skip to content

Commit

Permalink
Remove faviconUrl field from CDP list response (facebook#44834)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#44834

- Remove the nonstandard, unused `faviconUrl` field from CDP `/json` response targets (note: both legacy and modern targets).
- Reorder `PageDescription` members.

Changelog:
[General][Removed] - `react-native/dev-middleware`: Remove nonstandard `faviconUrl` field from CDP `/json` response

Reviewed By: hoxyq

Differential Revision: D58092090

fbshipit-source-id: a593be00464853a3fe179305efae5643d616573b
  • Loading branch information
huntie authored and kosmydel committed Jun 11, 2024
1 parent 728d773 commit 6e48cf7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ describe('inspector proxy HTTP API', () => {
description: 'bar-app',
deviceName: 'foo',
devtoolsFrontendUrl: expect.any(String),
faviconUrl: 'https://reactjs.org/favicon.ico',
id: 'device1-page1',
reactNative: {
capabilities: {},
Expand All @@ -203,7 +202,6 @@ describe('inspector proxy HTTP API', () => {
description: 'bar-app',
deviceName: 'foo',
devtoolsFrontendUrl: expect.any(String),
faviconUrl: 'https://reactjs.org/favicon.ico',
id: 'device2-page1',
reactNative: {
capabilities: {},
Expand Down
5 changes: 2 additions & 3 deletions packages/dev-middleware/src/inspector-proxy/InspectorProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,10 @@ export default class InspectorProxy implements InspectorProxyQueries {

return {
id: `${deviceId}-${page.id}`,
description: page.app,
title: page.title,
faviconUrl: 'https://reactjs.org/favicon.ico',
devtoolsFrontendUrl,
description: page.app,
type: 'node',
devtoolsFrontendUrl,
webSocketDebuggerUrl,
vm: page.vm,
deviceName: device.getName(),
Expand Down
10 changes: 6 additions & 4 deletions packages/dev-middleware/src/inspector-proxy/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ export type MessageToDevice =
// Page description object that is sent in response to /json HTTP request from debugger.
export type PageDescription = $ReadOnly<{
id: string,
description: string,
title: string,
faviconUrl: string,
devtoolsFrontendUrl: string,
description: string,
type: string,
devtoolsFrontendUrl: string,
webSocketDebuggerUrl: string,

// React Native specific fields
deviceName: string,
vm: string,
// Metadata specific to React Native

// React Native specific metadata
reactNative: $ReadOnly<{
logicalDeviceId: string,
capabilities: Page['capabilities'],
Expand Down

0 comments on commit 6e48cf7

Please sign in to comment.