From 674f71a42693fb4b87eb0b31c196731eecea9cbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 05:50:25 -0700 Subject: [PATCH] Bump prettier from 2.2.1 to 2.3.0 in /desktop (#2300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0.
Release notes

Sourced from prettier's releases.

2.3.0

diff

{emoji:1f517} Release Notes

Changelog

Sourced from prettier's changelog.

2.3.0

diff

{emoji:1f517} Release Notes

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Pull Request resolved: https://github.com/facebook/flipper/pull/2300 Reviewed By: passy Differential Revision: D28323849 Pulled By: cekkaewnumchai fbshipit-source-id: 1842877ccc9a9587af7f0d9ff9432c2075c8ee22 --- desktop/app/src/NotificationsHub.tsx | 61 ++++++++------- desktop/app/src/PluginContainer.tsx | 18 +---- .../src/__tests__/PluginContainer.node.tsx | 54 +++++-------- .../createMockFlipperWithPlugin.node.tsx | 8 +- .../src/__tests__/createTablePlugin.node.tsx | 5 +- desktop/app/src/__tests__/disconnect.node.tsx | 12 +-- desktop/app/src/chrome/RatingButton.tsx | 6 +- .../app/src/chrome/ShareSheetExportUrl.tsx | 12 ++- desktop/app/src/chrome/UpdateIndicator.tsx | 6 +- .../__tests__/ExportDataPluginSheet.node.tsx | 13 +--- .../chrome/plugin-manager/PluginInstaller.tsx | 21 +++--- .../chrome/settings/KeyboardShortcutInput.tsx | 10 +-- .../src/devices/__tests__/BaseDevice.node.tsx | 7 +- desktop/app/src/dispatcher/androidDevice.tsx | 13 +--- desktop/app/src/dispatcher/notifications.tsx | 12 +-- desktop/app/src/dispatcher/plugins.tsx | 34 ++++----- desktop/app/src/dispatcher/tracking.tsx | 15 +--- desktop/app/src/fb-stubs/__mocks__/Logger.tsx | 7 +- desktop/app/src/init.tsx | 8 +- desktop/app/src/plugin.tsx | 6 +- desktop/app/src/plugins/TableNativePlugin.tsx | 9 +-- .../__tests__/sandydeviceplugins.node.tsx | 5 +- .../reducers/__tests__/sandyplugins.node.tsx | 20 +++-- desktop/app/src/reducers/supportForm.tsx | 4 +- desktop/app/src/sandy-chrome/SandyApp.tsx | 6 +- .../src/sandy-chrome/SetupDoctorScreen.tsx | 7 +- .../sandy-chrome/appinspect/AppSelector.tsx | 9 +-- .../appinspect/BookmarkSection.tsx | 8 +- .../sandy-chrome/appinspect/PluginList.tsx | 51 +++++++------ desktop/app/src/server.tsx | 35 ++++----- .../src/ui/components/ContextMenuProvider.tsx | 5 +- .../app/src/ui/components/PopoverProvider.tsx | 9 ++- desktop/app/src/ui/components/Select.tsx | 11 +-- desktop/app/src/ui/components/StackTrace.tsx | 12 +-- .../ui/components/searchable/Searchable.tsx | 7 +- .../components/searchable/SearchableTable.tsx | 18 +++-- .../src/ui/components/table/ManagedTable.tsx | 14 ++-- .../table/ManagedTable_immutable.tsx | 14 ++-- desktop/app/src/utils/CertificateProvider.tsx | 26 +++---- .../src/utils/__tests__/exportData.node.tsx | 36 ++++----- .../src/utils/__tests__/messageQueue.node.tsx | 73 +++++------------- .../__tests__/messageQueueSandy.node.tsx | 75 +++++-------------- desktop/app/src/utils/exportData.tsx | 9 +-- desktop/app/src/utils/icons.ts | 7 +- .../js-client-server-utils/serverUtils.tsx | 3 +- .../websocketClientFlipperConnection.tsx | 3 +- desktop/app/src/utils/packageMetadata.tsx | 19 +++-- .../self-inspection/selfInspectionClient.tsx | 3 +- desktop/app/src/utils/serialization.tsx | 9 +-- desktop/app/src/utils/sideEffect.tsx | 2 +- desktop/babel-transformer/package.json | 2 +- desktop/doctor/package.json | 2 +- desktop/doctor/src/index.ts | 59 +++++++-------- desktop/eslint-plugin-flipper/package.json | 2 +- .../src/__tests__/test-utils-device.node.tsx | 5 +- .../src/data-source/DataSource.tsx | 2 +- .../flipper-plugin/src/plugin/MenuEntry.tsx | 6 +- desktop/flipper-plugin/src/plugin/Plugin.tsx | 4 +- .../src/plugin/PluginContext.tsx | 9 ++- .../src/test-utils/test-utils.tsx | 18 ++--- desktop/flipper-plugin/src/ui/DataList.tsx | 2 +- desktop/flipper-plugin/src/ui/Interactive.tsx | 11 +-- desktop/flipper-plugin/src/ui/Layout.tsx | 10 +-- desktop/flipper-plugin/src/ui/Panel.tsx | 7 +- .../ui/data-inspector/DataInspectorNode.tsx | 20 ++--- .../src/utils/createTablePlugin.tsx | 10 +-- .../flipper-plugin/src/utils/parseColor.tsx | 4 +- desktop/flipper-plugin/src/utils/urlRegex.tsx | 3 +- desktop/package.json | 2 +- desktop/pkg-lib/package.json | 2 +- desktop/pkg/package.json | 2 +- desktop/plugins/public/cpu/index.tsx | 34 ++++----- .../public/databases/DatabasesPlugin.tsx | 15 ++-- desktop/plugins/public/layout/Inspector.tsx | 20 ++--- .../public/logs/__tests__/logs.node.tsx | 16 +--- desktop/plugins/public/logs/index.tsx | 5 +- .../components/RequiredParametersDialog.tsx | 5 +- .../navigation/components/SearchBar.tsx | 8 +- .../network/ProtobufDefinitionsRepository.tsx | 3 +- .../plugins/public/network/RequestDetails.tsx | 21 +++--- .../network/__tests__/customheaders.node.tsx | 9 +-- .../ManageMockResponsePanel.tsx | 7 +- .../src/__tests__/seamammals.spec.tsx | 9 +-- desktop/scripts/build-release.ts | 2 +- desktop/scripts/build-utils.ts | 3 +- desktop/yarn.lock | 8 +- 86 files changed, 476 insertions(+), 708 deletions(-) diff --git a/desktop/app/src/NotificationsHub.tsx b/desktop/app/src/NotificationsHub.tsx index 752454e5d..f0b490933 100644 --- a/desktop/app/src/NotificationsHub.tsx +++ b/desktop/app/src/NotificationsHub.tsx @@ -157,42 +157,41 @@ class NotificationsTable extends Component { ); }; - getFilter = (): ((n: PluginNotification) => boolean) => ( - n: PluginNotification, - ) => { - const searchTerm = this.props.searchTerm.toLowerCase(); + getFilter = + (): ((n: PluginNotification) => boolean) => (n: PluginNotification) => { + const searchTerm = this.props.searchTerm.toLowerCase(); - // filter plugins - const blocklistedPlugins = new Set( - this.props.blocklistedPlugins.map((p) => p.toLowerCase()), - ); - if (blocklistedPlugins.has(n.pluginId.toLowerCase())) { - return false; - } - - // filter categories - const {category} = n.notification; - if (category) { - const blocklistedCategories = new Set( - this.props.blocklistedCategories.map((p) => p.toLowerCase()), + // filter plugins + const blocklistedPlugins = new Set( + this.props.blocklistedPlugins.map((p) => p.toLowerCase()), ); - if (blocklistedCategories.has(category.toLowerCase())) { + if (blocklistedPlugins.has(n.pluginId.toLowerCase())) { return false; } - } - if (searchTerm.length === 0) { - return true; - } else if (n.notification.title.toLowerCase().indexOf(searchTerm) > -1) { - return true; - } else if ( - typeof n.notification.message === 'string' && - n.notification.message.toLowerCase().indexOf(searchTerm) > -1 - ) { - return true; - } - return false; - }; + // filter categories + const {category} = n.notification; + if (category) { + const blocklistedCategories = new Set( + this.props.blocklistedCategories.map((p) => p.toLowerCase()), + ); + if (blocklistedCategories.has(category.toLowerCase())) { + return false; + } + } + + if (searchTerm.length === 0) { + return true; + } else if (n.notification.title.toLowerCase().indexOf(searchTerm) > -1) { + return true; + } else if ( + typeof n.notification.message === 'string' && + n.notification.message.toLowerCase().indexOf(searchTerm) > -1 + ) { + return true; + } + return false; + }; getPlugin = (id: string) => this.props.clientPlugins.get(id) || this.props.devicePlugins.get(id); diff --git a/desktop/app/src/PluginContainer.tsx b/desktop/app/src/PluginContainer.tsx index 2882647d1..c688ed495 100644 --- a/desktop/app/src/PluginContainer.tsx +++ b/desktop/app/src/PluginContainer.tsx @@ -207,13 +207,8 @@ class PluginContainer extends PureComponent { } processMessageQueue() { - const { - pluginKey, - pendingMessages, - activePlugin, - pluginIsEnabled, - target, - } = this.props; + const {pluginKey, pendingMessages, activePlugin, pluginIsEnabled, target} = + this.props; if (pluginKey !== this.pluginBeingProcessed) { this.pluginBeingProcessed = pluginKey; this.cancelCurrentQueue(); @@ -273,13 +268,8 @@ class PluginContainer extends PureComponent { } render() { - const { - activePlugin, - pluginKey, - target, - pendingMessages, - pluginIsEnabled, - } = this.props; + const {activePlugin, pluginKey, target, pendingMessages, pluginIsEnabled} = + this.props; if (!activePlugin || !target || !pluginKey) { return null; } diff --git a/desktop/app/src/__tests__/PluginContainer.node.tsx b/desktop/app/src/__tests__/PluginContainer.node.tsx index c57013141..5a7d44f21 100644 --- a/desktop/app/src/__tests__/PluginContainer.node.tsx +++ b/desktop/app/src/__tests__/PluginContainer.node.tsx @@ -150,13 +150,8 @@ test('PluginContainer can render Sandy plugins', async () => { Component: MySandyPlugin, }, ); - const { - renderer, - act, - sendMessage, - client, - store, - } = await renderMockFlipperWithPlugin(definition); + const {renderer, act, sendMessage, client, store} = + await renderMockFlipperWithPlugin(definition); expect(client.rawSend).toBeCalledWith('init', {plugin: 'TestPlugin'}); @@ -211,9 +206,8 @@ test('PluginContainer can render Sandy plugins', async () => { `); // make sure the plugin gets connected - const pluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + client.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.connectedStub).toBeCalledTimes(1); expect(pluginInstance.disconnectedStub).toBeCalledTimes(0); expect(pluginInstance.activatedStub).toBeCalledTimes(1); @@ -359,9 +353,8 @@ test('PluginContainer triggers correct lifecycles for background plugin', async expect(client.rawSend).toBeCalledWith('init', {plugin: 'TestPlugin'}); (client.rawSend as jest.Mock).mockClear(); // make sure the plugin gets connected - const pluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + client.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.connectedStub).toBeCalledTimes(1); expect(pluginInstance.disconnectedStub).toBeCalledTimes(0); expect(pluginInstance.activatedStub).toBeCalledTimes(1); @@ -440,9 +433,8 @@ test('PluginContainer triggers correct lifecycles for background plugin', async expect(pluginInstance.activatedStub).toBeCalledTimes(2); expect(pluginInstance.deactivatedStub).toBeCalledTimes(2); - const newPluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get('TestPlugin')!.instanceApi; + const newPluginInstance: ReturnType = + client.sandyPluginStates.get('TestPlugin')!.instanceApi; expect(newPluginInstance.connectedStub).toBeCalledTimes(1); expect(newPluginInstance.disconnectedStub).toBeCalledTimes(0); expect(newPluginInstance.activatedStub).toBeCalledTimes(0); @@ -705,9 +697,8 @@ test('PluginContainer can render Sandy device plugins', async () => { `); // make sure the plugin gets connected - const pluginInstance: ReturnType< - typeof devicePlugin - > = device.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + device.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.activatedStub).toBeCalledTimes(1); expect(pluginInstance.deactivatedStub).toBeCalledTimes(0); @@ -959,9 +950,8 @@ test('Sandy plugins support isPluginSupported + selectPlugin', async () => { `); expect(renders).toBe(1); - const pluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + client.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.isPluginAvailable(definition.id)).toBeTruthy(); expect(pluginInstance.isPluginAvailable('nonsense')).toBeFalsy(); expect(pluginInstance.isPluginAvailable(definition2.id)).toBeFalsy(); // not enabled yet @@ -1076,12 +1066,10 @@ test('PluginContainer can render Sandy plugins for archived devices', async () = Component: MySandyPlugin, }, ); - const { - renderer, - act, - client, - store, - } = await renderMockFlipperWithPlugin(definition, {archivedDevice: true}); + const {renderer, act, client, store} = await renderMockFlipperWithPlugin( + definition, + {archivedDevice: true}, + ); expect(client.rawSend).not.toBeCalled(); @@ -1106,9 +1094,8 @@ test('PluginContainer can render Sandy plugins for archived devices', async () = expect(renders).toBe(1); // make sure the plugin gets activated, but not connected! - const pluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + client.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.connectedStub).toBeCalledTimes(0); expect(pluginInstance.disconnectedStub).toBeCalledTimes(0); expect(pluginInstance.activatedStub).toBeCalledTimes(1); @@ -1210,9 +1197,8 @@ test('PluginContainer triggers correct lifecycles for background plugin', async expect(client.rawSend).not.toBeCalled(); // make sure the plugin gets connected - const pluginInstance: ReturnType< - typeof plugin - > = client.sandyPluginStates.get(definition.id)!.instanceApi; + const pluginInstance: ReturnType = + client.sandyPluginStates.get(definition.id)!.instanceApi; expect(pluginInstance.connectedStub).toBeCalledTimes(0); expect(pluginInstance.disconnectedStub).toBeCalledTimes(0); expect(pluginInstance.activatedStub).toBeCalledTimes(1); diff --git a/desktop/app/src/__tests__/createMockFlipperWithPlugin.node.tsx b/desktop/app/src/__tests__/createMockFlipperWithPlugin.node.tsx index ab2ef1ab2..ca44b5191 100644 --- a/desktop/app/src/__tests__/createMockFlipperWithPlugin.node.tsx +++ b/desktop/app/src/__tests__/createMockFlipperWithPlugin.node.tsx @@ -40,12 +40,8 @@ class TestPlugin extends FlipperPlugin { } test('can create a Fake flipper', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); expect(client).toBeTruthy(); expect(device).toBeTruthy(); expect(store).toBeTruthy(); diff --git a/desktop/app/src/__tests__/createTablePlugin.node.tsx b/desktop/app/src/__tests__/createTablePlugin.node.tsx index 08a31bf65..062d774cd 100644 --- a/desktop/app/src/__tests__/createTablePlugin.node.tsx +++ b/desktop/app/src/__tests__/createTablePlugin.node.tsx @@ -66,10 +66,7 @@ test('persistedStateReducer is adding data', () => { const tablePlugin = createTablePlugin({...PROPS, method}); const id = '1'; - const { - rows, - datas, - } = tablePlugin.persistedStateReducer( + const {rows, datas} = tablePlugin.persistedStateReducer( tablePlugin.defaultPersistedState, method, {id}, diff --git a/desktop/app/src/__tests__/disconnect.node.tsx b/desktop/app/src/__tests__/disconnect.node.tsx index d9b6bff44..557860028 100644 --- a/desktop/app/src/__tests__/disconnect.node.tsx +++ b/desktop/app/src/__tests__/disconnect.node.tsx @@ -213,14 +213,10 @@ test('new clients replace old ones', async () => { }, }, ); - const { - client, - store, - device, - createClient, - } = await createMockFlipperWithPlugin(plugin, { - asBackgroundPlugin: true, - }); + const {client, store, device, createClient} = + await createMockFlipperWithPlugin(plugin, { + asBackgroundPlugin: true, + }); const instance = client.sandyPluginStates.get(plugin.id)!; instance.instanceApi.counter.set(1); diff --git a/desktop/app/src/chrome/RatingButton.tsx b/desktop/app/src/chrome/RatingButton.tsx index 3576df954..86f6a58e3 100644 --- a/desktop/app/src/chrome/RatingButton.tsx +++ b/desktop/app/src/chrome/RatingButton.tsx @@ -372,10 +372,8 @@ class RatingButton extends Component { } export function SandyRatingButton() { - const [ - promptData, - setPromptData, - ] = useState(null); + const [promptData, setPromptData] = + useState(null); const [isShown, setIsShown] = useState(false); const [hasTriggered, setHasTriggered] = useState(false); const sessionId = useStore((store) => store.application.sessionId); diff --git a/desktop/app/src/chrome/ShareSheetExportUrl.tsx b/desktop/app/src/chrome/ShareSheetExportUrl.tsx index 8c5fe9e79..3d38c6553 100644 --- a/desktop/app/src/chrome/ShareSheetExportUrl.tsx +++ b/desktop/app/src/chrome/ShareSheetExportUrl.tsx @@ -122,13 +122,11 @@ export default class ShareSheetExportUrl extends Component { this.setState({statusUpdate: msg}); } }; - const { - serializedString, - fetchMetaDataErrors, - } = await reportPlatformFailures( - exportStore(this.store, false, this.idler, statusUpdate), - `${EXPORT_FLIPPER_TRACE_EVENT}:UI_LINK`, - ); + const {serializedString, fetchMetaDataErrors} = + await reportPlatformFailures( + exportStore(this.store, false, this.idler, statusUpdate), + `${EXPORT_FLIPPER_TRACE_EVENT}:UI_LINK`, + ); const uploadMarker = `${EXPORT_FLIPPER_TRACE_EVENT}:upload`; performance.mark(uploadMarker); statusUpdate('Uploading Flipper Export...'); diff --git a/desktop/app/src/chrome/UpdateIndicator.tsx b/desktop/app/src/chrome/UpdateIndicator.tsx index 588173335..9d1f0bf50 100644 --- a/desktop/app/src/chrome/UpdateIndicator.tsx +++ b/desktop/app/src/chrome/UpdateIndicator.tsx @@ -32,10 +32,8 @@ export type VersionCheckResult = }; export default function UpdateIndicator() { - const [ - versionCheckResult, - setVersionCheckResult, - ] = useState({kind: 'up-to-date'}); + const [versionCheckResult, setVersionCheckResult] = + useState({kind: 'up-to-date'}); const launcherMsg = useStore((state) => state.application.launcherMsg); // Effect to show notification if details change diff --git a/desktop/app/src/chrome/__tests__/ExportDataPluginSheet.node.tsx b/desktop/app/src/chrome/__tests__/ExportDataPluginSheet.node.tsx index 6b1592497..2febd9b6c 100644 --- a/desktop/app/src/chrome/__tests__/ExportDataPluginSheet.node.tsx +++ b/desktop/app/src/chrome/__tests__/ExportDataPluginSheet.node.tsx @@ -42,15 +42,10 @@ TestDevicePlugin.defaultPersistedState = {msg: 'TestDevicePlugin'}; test('SettingsSheet snapshot with nothing enabled', async () => { let root: ReactTestRenderer; - const { - store, - togglePlugin, - client, - device, - pluginKey, - } = await createMockFlipperWithPlugin(TestPlugin, { - additionalPlugins: [TestDevicePlugin], - }); + const {store, togglePlugin, client, device, pluginKey} = + await createMockFlipperWithPlugin(TestPlugin, { + additionalPlugins: [TestDevicePlugin], + }); togglePlugin(); diff --git a/desktop/app/src/chrome/plugin-manager/PluginInstaller.tsx b/desktop/app/src/chrome/plugin-manager/PluginInstaller.tsx index a4d4154ba..364110029 100644 --- a/desktop/app/src/chrome/plugin-manager/PluginInstaller.tsx +++ b/desktop/app/src/chrome/plugin-manager/PluginInstaller.tsx @@ -185,17 +185,16 @@ function InstallButton(props: { | {kind: 'Remove'; error?: string} | {kind: 'Update'; error?: string}; - const catchError = ( - actionKind: 'Install' | 'Remove' | 'Update', - fn: () => Promise, - ) => async () => { - try { - await fn(); - } catch (err) { - console.error(err); - setAction({kind: actionKind, error: err.toString()}); - } - }; + const catchError = + (actionKind: 'Install' | 'Remove' | 'Update', fn: () => Promise) => + async () => { + try { + await fn(); + } catch (err) { + console.error(err); + setAction({kind: actionKind, error: err.toString()}); + } + }; const mkInstallCallback = (action: 'Install' | 'Update') => catchError(action, async () => { diff --git a/desktop/app/src/chrome/settings/KeyboardShortcutInput.tsx b/desktop/app/src/chrome/settings/KeyboardShortcutInput.tsx index cc8365714..8b22e63a3 100644 --- a/desktop/app/src/chrome/settings/KeyboardShortcutInput.tsx +++ b/desktop/app/src/chrome/settings/KeyboardShortcutInput.tsx @@ -112,12 +112,10 @@ const KeyboardShortcutInput = (props: { const [initialPressedKeys] = useState( getInitialStateFromProps(), ); - const [pressedKeys, setPressedKeys] = useState( - initialPressedKeys, - ); - const [isShortcutValid, setIsShortcutValid] = useState( - undefined, - ); + const [pressedKeys, setPressedKeys] = + useState(initialPressedKeys); + const [isShortcutValid, setIsShortcutValid] = + useState(undefined); useEffect(() => { if (!isShortcutValid) { diff --git a/desktop/app/src/devices/__tests__/BaseDevice.node.tsx b/desktop/app/src/devices/__tests__/BaseDevice.node.tsx index d2fd866b4..736134426 100644 --- a/desktop/app/src/devices/__tests__/BaseDevice.node.tsx +++ b/desktop/app/src/devices/__tests__/BaseDevice.node.tsx @@ -69,8 +69,8 @@ const iosEmulatorDevicePlugin = new _SandyPluginDefinition( iosEmulatorlDevicePluginDetails, DeviceTestPluginModule, ); -const androiKaiosPhysicalDevicePluginDetails = TestUtils.createMockPluginDetails( - { +const androiKaiosPhysicalDevicePluginDetails = + TestUtils.createMockPluginDetails({ id: 'androidPhysicalDevicePlugin', name: 'flipper-plugin-android-physical-device', version: '0.0.1', @@ -82,8 +82,7 @@ const androiKaiosPhysicalDevicePluginDetails = TestUtils.createMockPluginDetails specs: ['KaiOS'], }, ], - }, -); + }); const androidKaiosPhysicalDevicePlugin = new _SandyPluginDefinition( androiKaiosPhysicalDevicePluginDetails, DeviceTestPluginModule, diff --git a/desktop/app/src/dispatcher/androidDevice.tsx b/desktop/app/src/dispatcher/androidDevice.tsx index 47e1a17aa..b870e0c2e 100644 --- a/desktop/app/src/dispatcher/androidDevice.tsx +++ b/desktop/app/src/dispatcher/androidDevice.tsx @@ -47,16 +47,9 @@ function createDevice( const isKaiOSDevice = Object.keys(props).some( (name) => name.startsWith('kaios') || name.startsWith('ro.kaios'), ); - const androidLikeDevice = new (isKaiOSDevice - ? KaiOSDevice - : AndroidDevice)( - device.id, - type, - name, - adbClient, - abiList, - sdkVersion, - ); + const androidLikeDevice = new ( + isKaiOSDevice ? KaiOSDevice : AndroidDevice + )(device.id, type, name, adbClient, abiList, sdkVersion); if (ports) { await androidLikeDevice .reverse([ports.secure, ports.insecure]) diff --git a/desktop/app/src/dispatcher/notifications.tsx b/desktop/app/src/dispatcher/notifications.tsx index 3f5be4d05..bde82479c 100644 --- a/desktop/app/src/dispatcher/notifications.tsx +++ b/desktop/app/src/dispatcher/notifications.tsx @@ -100,9 +100,8 @@ export default (store: Store, logger: Logger) => { return; } - const persistingPlugin: undefined | PluginDefinition = getPlugin( - pluginName, - ); + const persistingPlugin: undefined | PluginDefinition = + getPlugin(pluginName); if ( persistingPlugin && !isSandyPlugin(persistingPlugin) && @@ -129,11 +128,8 @@ export default (store: Store, logger: Logger) => { } }); - const { - activeNotifications, - blocklistedPlugins, - blocklistedCategories, - } = notifications; + const {activeNotifications, blocklistedPlugins, blocklistedCategories} = + notifications; activeNotifications .map((n) => ({ diff --git a/desktop/app/src/dispatcher/plugins.tsx b/desktop/app/src/dispatcher/plugins.tsx index 73813d6b0..100f62d4c 100644 --- a/desktop/app/src/dispatcher/plugins.tsx +++ b/desktop/app/src/dispatcher/plugins.tsx @@ -124,7 +124,7 @@ function reportVersion(pluginDetails: ActivatablePluginDetails) { export function filterNewestVersionOfEachPlugin< T1 extends PluginDetails, - T2 extends PluginDetails + T2 extends PluginDetails, >(bundledPlugins: T1[], dynamicPlugins: T2[]): (T1 | T2)[] { const pluginByName: {[key: string]: T1 | T2} = {}; for (const plugin of bundledPlugins) { @@ -170,23 +170,23 @@ export async function getDynamicPlugins() { } } -export const checkGK = (gatekeepedPlugins: Array) => ( - plugin: ActivatablePluginDetails, -): boolean => { - try { - if (!plugin.gatekeeper) { - return true; +export const checkGK = + (gatekeepedPlugins: Array) => + (plugin: ActivatablePluginDetails): boolean => { + try { + if (!plugin.gatekeeper) { + return true; + } + const result = GK.get(plugin.gatekeeper); + if (!result) { + gatekeepedPlugins.push(plugin); + } + return result; + } catch (err) { + console.error(`Failed to check GK for plugin ${plugin.id}`, err); + return false; } - const result = GK.get(plugin.gatekeeper); - if (!result) { - gatekeepedPlugins.push(plugin); - } - return result; - } catch (err) { - console.error(`Failed to check GK for plugin ${plugin.id}`, err); - return false; - } -}; + }; export const checkDisabled = ( disabledPlugins: Array, diff --git a/desktop/app/src/dispatcher/tracking.tsx b/desktop/app/src/dispatcher/tracking.tsx index 329941161..bc194b8a5 100644 --- a/desktop/app/src/dispatcher/tracking.tsx +++ b/desktop/app/src/dispatcher/tracking.tsx @@ -89,11 +89,8 @@ export default (store: Store, logger: Logger) => { timeSinceLastStartup, }); // create fresh exit data - const { - selectedDevice, - selectedApp, - selectedPlugin, - } = store.getState().connections; + const {selectedDevice, selectedApp, selectedPlugin} = + store.getState().connections; persistExitData( { selectedDevice, @@ -142,12 +139,8 @@ export default (store: Store, logger: Logger) => { ); return; } - const { - selectedDevice, - selectedPlugin, - selectedApp, - clients, - } = state.connections; + const {selectedDevice, selectedPlugin, selectedApp, clients} = + state.connections; persistExitData( {selectedDevice, selectedPlugin, selectedApp}, diff --git a/desktop/app/src/fb-stubs/__mocks__/Logger.tsx b/desktop/app/src/fb-stubs/__mocks__/Logger.tsx index cd6cd84e5..4c2a48579 100644 --- a/desktop/app/src/fb-stubs/__mocks__/Logger.tsx +++ b/desktop/app/src/fb-stubs/__mocks__/Logger.tsx @@ -20,9 +20,10 @@ const instance = { debug: jest.fn(), }; -export function extractError( - ...data: Array -): {message: string; error: Error} { +export function extractError(...data: Array): { + message: string; + error: Error; +} { const message = data.map(getStringFromErrorLike).join(' '); const error = data.find((e) => e instanceof Error) || new Error(message); return { diff --git a/desktop/app/src/init.tsx b/desktop/app/src/init.tsx index d35ed7e6d..028a36a0e 100644 --- a/desktop/app/src/init.tsx +++ b/desktop/app/src/init.tsx @@ -206,11 +206,9 @@ function init() { dark: state.settingsState.darkMode, }), (theme) => { - (document.getElementById( - 'flipper-theme-import', - ) as HTMLLinkElement).href = `themes/${ - theme.dark ? 'dark' : 'light' - }.css`; + ( + document.getElementById('flipper-theme-import') as HTMLLinkElement + ).href = `themes/${theme.dark ? 'dark' : 'light'}.css`; }, ); } diff --git a/desktop/app/src/plugin.tsx b/desktop/app/src/plugin.tsx index d3cd0d1fc..432df4b84 100644 --- a/desktop/app/src/plugin.tsx +++ b/desktop/app/src/plugin.tsx @@ -96,7 +96,7 @@ type StaticPersistedState = any; export abstract class FlipperBasePlugin< State, Actions extends BaseAction, - PersistedState + PersistedState, > extends Component, State> { abstract ['constructor']: any; static title: string | null = null; @@ -197,7 +197,7 @@ export abstract class FlipperBasePlugin< export class FlipperDevicePlugin< S, A extends BaseAction, - P + P, > extends FlipperBasePlugin { ['constructor']: typeof FlipperPlugin; device: BaseDevice; @@ -226,7 +226,7 @@ export class FlipperDevicePlugin< export class FlipperPlugin< S, A extends BaseAction, - P + P, > extends FlipperBasePlugin { ['constructor']: typeof FlipperPlugin; constructor(props: Props

) { diff --git a/desktop/app/src/plugins/TableNativePlugin.tsx b/desktop/app/src/plugins/TableNativePlugin.tsx index c4f700703..b3637ba4b 100644 --- a/desktop/app/src/plugins/TableNativePlugin.tsx +++ b/desktop/app/src/plugins/TableNativePlugin.tsx @@ -470,13 +470,8 @@ export default function createTableNativePlugin(id: string, title: string) { if (!this.props.persistedState.tableMetadata) { return 'Loading...'; } - const { - topToolbar, - bottomToolbar, - columns, - columnSizes, - columnOrder, - } = this.props.persistedState.tableMetadata; + const {topToolbar, bottomToolbar, columns, columnSizes, columnOrder} = + this.props.persistedState.tableMetadata; const {rows} = this.props.persistedState; const topToolbarComponent = topToolbar ? renderToolbar(topToolbar) : null; diff --git a/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx b/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx index acb5a41ad..985a989a0 100644 --- a/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx +++ b/desktop/app/src/reducers/__tests__/sandydeviceplugins.node.tsx @@ -71,8 +71,9 @@ test('it should initialize device sandy plugins', async () => { expect(device.sandyPluginStates.get(TestPlugin.id)).toBeInstanceOf( _SandyDevicePluginInstance, ); - const instanceApi: PluginApi = device.sandyPluginStates.get(TestPlugin.id)! - .instanceApi; + const instanceApi: PluginApi = device.sandyPluginStates.get( + TestPlugin.id, + )!.instanceApi; expect(instanceApi.activateStub).toBeCalledTimes(0); selectTestPlugin(store); diff --git a/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx b/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx index d17f56c9a..b8fad9f75 100644 --- a/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx +++ b/desktop/app/src/reducers/__tests__/sandyplugins.node.tsx @@ -85,8 +85,9 @@ test('it should initialize starred sandy plugins', async () => { expect(client.sandyPluginStates.get(TestPlugin.id)).toBeInstanceOf( _SandyPluginInstance, ); - const instanceApi: PluginApi = client.sandyPluginStates.get(TestPlugin.id)! - .instanceApi; + const instanceApi: PluginApi = client.sandyPluginStates.get( + TestPlugin.id, + )!.instanceApi; expect(instanceApi.connectStub).toBeCalledTimes(0); selectTestPlugin(store, client); @@ -104,8 +105,9 @@ test('it should cleanup a plugin if disabled', async () => { const {client, store} = await createMockFlipperWithPlugin(TestPlugin); expect(TestPlugin.asPluginModule().plugin).toBeCalledTimes(1); - const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)! - .instanceApi; + const pluginInstance: PluginApi = client.sandyPluginStates.get( + TestPlugin.id, + )!.instanceApi; expect(pluginInstance.destroyStub).toHaveBeenCalledTimes(0); client.initPlugin(TestPlugin.id); expect(pluginInstance.connectStub).toHaveBeenCalledTimes(1); @@ -210,8 +212,9 @@ test('it trigger hooks for background plugins', async () => { const {client} = await createMockFlipperWithPlugin(TestPlugin, { asBackgroundPlugin: true, }); - const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)! - .instanceApi; + const pluginInstance: PluginApi = client.sandyPluginStates.get( + TestPlugin.id, + )!.instanceApi; expect(client.isBackgroundPlugin(TestPlugin.id)).toBeTruthy(); expect(pluginInstance.destroyStub).toHaveBeenCalledTimes(0); expect(pluginInstance.connectStub).toHaveBeenCalledTimes(1); @@ -234,8 +237,9 @@ test('it can send messages from sandy clients', async () => { } }, }); - const pluginInstance: PluginApi = client.sandyPluginStates.get(TestPlugin.id)! - .instanceApi; + const pluginInstance: PluginApi = client.sandyPluginStates.get( + TestPlugin.id, + )!.instanceApi; // without rendering, non-bg plugins won't connect automatically, client.initPlugin(TestPlugin.id); await pluginInstance.send('test', {test: 3}); diff --git a/desktop/app/src/reducers/supportForm.tsx b/desktop/app/src/reducers/supportForm.tsx index fe5cd6b32..fdd6e27ee 100644 --- a/desktop/app/src/reducers/supportForm.tsx +++ b/desktop/app/src/reducers/supportForm.tsx @@ -124,8 +124,8 @@ export class Group { let errorMessage: string | undefined = undefined; if (selectedApp) { const {app} = deconstructClientId(selectedApp); - const enabledPlugins: Array | null = store.getState().connections - .enabledPlugins[app]; + const enabledPlugins: Array | null = + store.getState().connections.enabledPlugins[app]; const unsupportedPlugins = []; for (const requiredPlugin of this.requiredPlugins) { const requiredPluginEnabled = diff --git a/desktop/app/src/sandy-chrome/SandyApp.tsx b/desktop/app/src/sandy-chrome/SandyApp.tsx index 6c5dc07f4..149960dca 100644 --- a/desktop/app/src/sandy-chrome/SandyApp.tsx +++ b/desktop/app/src/sandy-chrome/SandyApp.tsx @@ -61,10 +61,8 @@ export function SandyApp() { * The logic here is to sync both, but without modifying the navigation related reducers to not break classic Flipper. * It is possible to simplify this in the future. */ - const [ - toplevelSelection, - setStoredToplevelSelection, - ] = useState('appinspect'); + const [toplevelSelection, setStoredToplevelSelection] = + useState('appinspect'); // Handle toplevel nav clicks from LeftRail const setToplevelSelection = useCallback( diff --git a/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx b/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx index b33c62080..f40e1407a 100644 --- a/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx +++ b/desktop/app/src/sandy-chrome/SetupDoctorScreen.tsx @@ -212,9 +212,10 @@ export default function SetupDoctorScreen(props: { const [acknowlodgeProblem, setAcknowlodgeProblem] = useState( checkHasNewProblem(healthcheckReport.result), ); - const hasProblem = useMemo(() => checkHasProblem(healthcheckReport.result), [ - healthcheckReport, - ]); + const hasProblem = useMemo( + () => checkHasProblem(healthcheckReport.result), + [healthcheckReport], + ); const onCloseModal = useCallback(() => { const hasNewProblem = checkHasNewProblem(healthcheckReport.result); if (acknowlodgeProblem) { diff --git a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx index 2bd6914a2..368691f7e 100644 --- a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx @@ -49,13 +49,8 @@ function getOsIcon(os?: OS) { export function AppSelector() { const dispatch = useDispatch(); - const { - devices, - selectedDevice, - clients, - uninitializedClients, - selectedApp, - } = useStore((state) => state.connections); + const {devices, selectedDevice, clients, uninitializedClients, selectedApp} = + useStore((state) => state.connections); useValue(selectedDevice?.connected, false); // subscribe to future archived state changes const onSelectDevice = useTrackedCallback( diff --git a/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx b/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx index b7dda6709..f49707270 100644 --- a/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/BookmarkSection.tsx @@ -46,10 +46,10 @@ function BookmarkSectionInput({navPlugin}: {navPlugin: NavigationPlugin}) { const bookmarks = useValue(navPlugin.bookmarks); const patterns = useValue(navPlugin.appMatchPatterns); - const isBookmarked = useMemo(() => bookmarks.has(currentURI), [ - bookmarks, - currentURI, - ]); + const isBookmarked = useMemo( + () => bookmarks.has(currentURI), + [bookmarks, currentURI], + ); const autoCompleteItems = useMemoize( navPlugin.getAutoCompleteAppMatchPatterns, diff --git a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx index 22dd7b8e1..c2d41a266 100644 --- a/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/PluginList.tsx @@ -493,33 +493,36 @@ const PluginMenu = styled(Menu)({ '.ant-menu-sub.ant-menu-inline': { background: theme.backgroundDefault, }, - '.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title ': { - width: '100%', // reset to remove weird bonus pixel from ANT - }, - '.ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-sub.ant-menu-inline > .ant-menu-item': { - borderRadius: theme.borderRadius, - height: '32px', - lineHeight: '24px', - padding: `4px 8px !important`, - '&:hover': { - color: theme.textColorPrimary, - background: theme.backgroundTransparentHover, + '.ant-menu-inline .ant-menu-item, .ant-menu-inline .ant-menu-submenu-title ': + { + width: '100%', // reset to remove weird bonus pixel from ANT }, - '&.ant-menu-item-selected::after': { - border: 'none', + '.ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-sub.ant-menu-inline > .ant-menu-item': + { + borderRadius: theme.borderRadius, + height: '32px', + lineHeight: '24px', + padding: `4px 8px !important`, + '&:hover': { + color: theme.textColorPrimary, + background: theme.backgroundTransparentHover, + }, + '&.ant-menu-item-selected::after': { + border: 'none', + }, + '&.ant-menu-item-selected': { + color: theme.white, + background: theme.primaryColor, + border: 'none', + }, + '&.ant-menu-item-selected .ant-typography': { + color: theme.white, + }, }, - '&.ant-menu-item-selected': { - color: theme.white, - background: theme.primaryColor, - border: 'none', + '.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow': + { + right: 8, }, - '&.ant-menu-item-selected .ant-typography': { - color: theme.white, - }, - }, - '.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow': { - right: 8, - }, '.ant-badge-count': { color: theme.textColorSecondary, // border: `1px solid ${theme.dividerColor}`, diff --git a/desktop/app/src/server.tsx b/desktop/app/src/server.tsx index 462720999..92f9e9375 100644 --- a/desktop/app/src/server.tsx +++ b/desktop/app/src/server.tsx @@ -292,16 +292,8 @@ class Server extends EventEmitter { }); this.connectionTracker.logConnectionAttempt(clientData); - const { - app, - os, - device, - device_id, - sdk_version, - csr, - csr_path, - medium, - } = clientData; + const {app, os, device, device_id, sdk_version, csr, csr_path, medium} = + clientData; const transformedMedium = transformCertificateExchangeMediumToType(medium); if (transformedMedium === 'WWW') { this.store.dispatch({ @@ -518,16 +510,19 @@ class Server extends EventEmitter { // otherwise, use given device_id const {csr_path, csr} = csrQuery; // For iOS we do not need to confirm the device id, as it never changes unlike android. - return (csr_path && csr && query.os != 'iOS' - ? this.certificateProvider.extractAppNameFromCSR(csr).then((appName) => { - return this.certificateProvider.getTargetDeviceId( - query.os, - appName, - csr_path, - csr, - ); - }) - : Promise.resolve(query.device_id) + return ( + csr_path && csr && query.os != 'iOS' + ? this.certificateProvider + .extractAppNameFromCSR(csr) + .then((appName) => { + return this.certificateProvider.getTargetDeviceId( + query.os, + appName, + csr_path, + csr, + ); + }) + : Promise.resolve(query.device_id) ).then(async (csrId) => { query.device_id = csrId; query.app = appNameWithUpdateHint(query); diff --git a/desktop/app/src/ui/components/ContextMenuProvider.tsx b/desktop/app/src/ui/components/ContextMenuProvider.tsx index 0c4e8bbdc..6f2c886e1 100644 --- a/desktop/app/src/ui/components/ContextMenuProvider.tsx +++ b/desktop/app/src/ui/components/ContextMenuProvider.tsx @@ -22,9 +22,8 @@ const Container = styled.div({ }); Container.displayName = 'ContextMenuProvider:Container'; -export const ContextMenuContext = createContext( - undefined, -); +export const ContextMenuContext = + createContext(undefined); /** * Flipper's root is already wrapped with this component, so plugins should not * need to use this. ContextMenu is what you probably want to use. diff --git a/desktop/app/src/ui/components/PopoverProvider.tsx b/desktop/app/src/ui/components/PopoverProvider.tsx index 73e74f0cd..b6d656ce4 100644 --- a/desktop/app/src/ui/components/PopoverProvider.tsx +++ b/desktop/app/src/ui/components/PopoverProvider.tsx @@ -63,10 +63,11 @@ const PopoverElement = (props: { children: ReactNode; }) => { const ref = useRef(null); - const [dimensions, setDimensions] = useState<{ - width: number; - height: number; - } | null>(null); + const [dimensions, setDimensions] = + useState<{ + width: number; + height: number; + } | null>(null); useEffect(() => { if (!ref.current) { return; diff --git a/desktop/app/src/ui/components/Select.tsx b/desktop/app/src/ui/components/Select.tsx index 94c56b931..3c76a527f 100644 --- a/desktop/app/src/ui/components/Select.tsx +++ b/desktop/app/src/ui/components/Select.tsx @@ -69,15 +69,8 @@ export default class Select extends Component<{ }; render() { - const { - className, - options, - selected, - label, - grow, - disabled, - style, - } = this.props; + const {className, options, selected, label, grow, disabled, style} = + this.props; let select = ( ).reduce((acc, cv) => { + const columns = ( + Object.keys(children[0]) as Array + ).reduce((acc, cv) => { if (cv !== 'isBold') { acc[cv] = { value: cv, @@ -131,9 +131,9 @@ export default class StackTrace extends Component<{ visible: Boolean(columns[key]), })); - const columnSizes = (Object.keys(COLUMNS) as Array< - keyof typeof COLUMNS - >).reduce((acc, cv: keyof typeof COLUMNS) => { + const columnSizes = ( + Object.keys(COLUMNS) as Array + ).reduce((acc, cv: keyof typeof COLUMNS) => { acc[cv] = COLUMNS[cv] === 'flex' ? 'flex' diff --git a/desktop/app/src/ui/components/searchable/Searchable.tsx b/desktop/app/src/ui/components/searchable/Searchable.tsx index c9f4903e3..402b130c9 100644 --- a/desktop/app/src/ui/components/searchable/Searchable.tsx +++ b/desktop/app/src/ui/components/searchable/Searchable.tsx @@ -208,11 +208,8 @@ export default function Searchable( const filters = new Set( savedDefaultFilter.enum.map((filter) => filter.value), ); - savedStateFilters[ - filterIndex - ].value = savedDefaultFilter.value.filter((value) => - filters.has(value), - ); + savedStateFilters[filterIndex].value = + savedDefaultFilter.value.filter((value) => filters.has(value)); } }); } diff --git a/desktop/app/src/ui/components/searchable/SearchableTable.tsx b/desktop/app/src/ui/components/searchable/SearchableTable.tsx index bdfab56bf..f1cc59370 100644 --- a/desktop/app/src/ui/components/searchable/SearchableTable.tsx +++ b/desktop/app/src/ui/components/searchable/SearchableTable.tsx @@ -91,14 +91,16 @@ export function rowMatchesSearchTerm( ); } -export const filterRowsFactory = ( - filters: Array, - searchTerm: string, - regexSearch: boolean, - contentSearch: boolean, -) => (row: TableBodyRow): boolean => - rowMatchesFilters(filters, row) && - rowMatchesSearchTerm(searchTerm, regexSearch, contentSearch, row); +export const filterRowsFactory = + ( + filters: Array, + searchTerm: string, + regexSearch: boolean, + contentSearch: boolean, + ) => + (row: TableBodyRow): boolean => + rowMatchesFilters(filters, row) && + rowMatchesSearchTerm(searchTerm, regexSearch, contentSearch, row); class SearchableManagedTable extends PureComponent { static defaultProps = { diff --git a/desktop/app/src/ui/components/table/ManagedTable.tsx b/desktop/app/src/ui/components/table/ManagedTable.tsx index d258e7a09..3727f4209 100644 --- a/desktop/app/src/ui/components/table/ManagedTable.tsx +++ b/desktop/app/src/ui/components/table/ManagedTable.tsx @@ -540,8 +540,9 @@ export class ManagedTable extends React.Component< .map((column, index) => ({ label: this.props.columns[column].value, click: () => { - const rowId = this.state.highlightedRows.values().next() - .value; + const rowId = this.state.highlightedRows + .values() + .next().value; rowId && this.onCopyCell(rowId, index); }, })), @@ -665,13 +666,8 @@ export class ManagedTable extends React.Component< }; render() { - const { - columns, - rows, - rowLineHeight, - hideHeader, - horizontallyScrollable, - } = this.props; + const {columns, rows, rowLineHeight, hideHeader, horizontallyScrollable} = + this.props; const {columnOrder, columnSizes} = this.state; let computedWidth = 0; diff --git a/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx b/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx index 8507b9c37..72909486a 100644 --- a/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx +++ b/desktop/app/src/ui/components/table/ManagedTable_immutable.tsx @@ -499,8 +499,9 @@ class ManagedTable extends React.Component< .map((column, index) => ({ label: this.props.columns[column].value, click: () => { - const rowId = this.state.highlightedRows.values().next() - .value; + const rowId = this.state.highlightedRows + .values() + .next().value; rowId && this.onCopyCell(rowId, index); }, })), @@ -632,13 +633,8 @@ class ManagedTable extends React.Component< }; render() { - const { - columns, - rows, - rowLineHeight, - hideHeader, - horizontallyScrollable, - } = this.props; + const {columns, rows, rowLineHeight, hideHeader, horizontallyScrollable} = + this.props; const {columnOrder, columnSizes} = this.state; let computedWidth = 0; diff --git a/desktop/app/src/utils/CertificateProvider.tsx b/desktop/app/src/utils/CertificateProvider.tsx index 91b226774..3b1783fe9 100644 --- a/desktop/app/src/utils/CertificateProvider.tsx +++ b/desktop/app/src/utils/CertificateProvider.tsx @@ -286,18 +286,15 @@ export default class CertificateProvider { const deviceIdPromise = appNamePromise.then((app) => this.getTargetAndroidDeviceId(app, destination, csr), ); - return Promise.all([ - deviceIdPromise, - appNamePromise, - this.adb, - ]).then(([deviceId, appName, adbClient]) => - androidUtil.push( - adbClient, - deviceId, - appName, - destination + filename, - contents, - ), + return Promise.all([deviceIdPromise, appNamePromise, this.adb]).then( + ([deviceId, appName, adbClient]) => + androidUtil.push( + adbClient, + deviceId, + appName, + destination + filename, + contents, + ), ); } if (os === 'iOS' || os === 'windows' || os == 'MacOS') { @@ -305,9 +302,8 @@ export default class CertificateProvider { (err) => { if (os === 'iOS') { // Writing directly to FS failed. It's probably a physical device. - const relativePathInsideApp = this.getRelativePathInAppContainer( - destination, - ); + const relativePathInsideApp = + this.getRelativePathInAppContainer(destination); return appNamePromise .then((appName) => { return this.getTargetiOSDeviceId(appName, destination, csr); diff --git a/desktop/app/src/utils/__tests__/exportData.node.tsx b/desktop/app/src/utils/__tests__/exportData.node.tsx index abf26c04c..ed9e5b5e0 100644 --- a/desktop/app/src/utils/__tests__/exportData.node.tsx +++ b/desktop/app/src/utils/__tests__/exportData.node.tsx @@ -1127,12 +1127,8 @@ const sandyTestPlugin = new _SandyPluginDefinition( ); test('Sandy plugins are exported properly', async () => { - const { - client, - sendMessage, - store, - device, - } = await createMockFlipperWithPlugin(sandyTestPlugin); + const {client, sendMessage, store, device} = + await createMockFlipperWithPlugin(sandyTestPlugin); // We do select another plugin, to verify that pending message queues are indeed processed before exporting store.dispatch( @@ -1266,8 +1262,7 @@ test('Sandy plugins are imported properly', async () => { const data = { clients: [ { - id: - 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial', + id: 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial', query: { app: 'TestApp', device: 'MockAndroidDevice', @@ -1288,14 +1283,15 @@ test('Sandy plugins are imported properly', async () => { fileVersion: '0.9.99', flipperReleaseRevision: undefined, pluginStates2: { - 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': { - TestPlugin: { - otherState: { - testCount: -3, + 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': + { + TestPlugin: { + otherState: { + testCount: -3, + }, + counter: 3, }, - counter: 3, }, - }, }, store: { activeNotifications: [], @@ -1484,8 +1480,7 @@ test('Sandy plugin with custom import', async () => { const data = { clients: [ { - id: - 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial', + id: 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial', query: { app: 'TestApp', device: 'MockAndroidDevice', @@ -1506,11 +1501,12 @@ test('Sandy plugin with custom import', async () => { fileVersion: '0.9.99', flipperReleaseRevision: undefined, pluginStates2: { - 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': { - [plugin.id]: { - count: 4, + 'TestApp#Android#MockAndroidDevice#2e52cea6-94b0-4ea1-b9a8-c9135ede14ca-serial': + { + [plugin.id]: { + count: 4, + }, }, - }, }, store: { activeNotifications: [], diff --git a/desktop/app/src/utils/__tests__/messageQueue.node.tsx b/desktop/app/src/utils/__tests__/messageQueue.node.tsx index 94ffcafdf..0521107cd 100644 --- a/desktop/app/src/utils/__tests__/messageQueue.node.tsx +++ b/desktop/app/src/utils/__tests__/messageQueue.node.tsx @@ -109,12 +109,8 @@ test('queue - events are processed immediately if plugin is selected', async () }); test('queue - events are NOT processed immediately if plugin is NOT selected (but enabled)', async () => { - const { - store, - client, - sendMessage, - device, - } = await createMockFlipperWithPlugin(TestPlugin); + const {store, client, sendMessage, device} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -203,12 +199,8 @@ test('queue - events are NOT processed immediately if plugin is NOT selected (bu }); test('queue - events are queued for plugins that are favorite when app is not selected', async () => { - const { - device, - store, - sendMessage, - createClient, - } = await createMockFlipperWithPlugin(TestPlugin); + const {device, store, sendMessage, createClient} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -235,13 +227,8 @@ test('queue - events are queued for plugins that are favorite when app is not se }); test('queue - events are queued for plugins that are favorite when app is selected on different device', async () => { - const { - client, - store, - sendMessage, - createDevice, - createClient, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, sendMessage, createDevice, createClient} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -282,12 +269,8 @@ test('queue - events are queued for plugins that are favorite when app is select }); test('queue - events processing will be paused', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -330,12 +313,8 @@ test('queue - events processing will be paused', async () => { }); test('queue - messages that arrive during processing will be queued', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -380,12 +359,8 @@ test('queue - messages that arrive during processing will be queued', async () = }); test('queue - processing can be cancelled', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -415,12 +390,8 @@ test('queue - processing can be cancelled', async () => { }); test('queue - make sure resetting plugin state clears the message queue', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -486,12 +457,8 @@ test('client - incoming messages are buffered and flushed together', async () => static persistedStateReducer = jest.fn(); } - const { - client, - store, - device, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, device, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); store.dispatch(registerPlugins([StubDeviceLogs])); @@ -646,12 +613,8 @@ test('client - incoming messages are buffered and flushed together', async () => }); test('queue - messages that have not yet flushed be lost when disabling the plugin', async () => { - const { - client, - store, - sendMessage, - pluginKey, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, sendMessage, pluginKey} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); diff --git a/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx b/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx index 394269e9d..cc49e2c1d 100644 --- a/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx +++ b/desktop/app/src/utils/__tests__/messageQueueSandy.node.tsx @@ -116,12 +116,8 @@ test('queue - events are processed immediately if plugin is selected', async () }); test('queue - events are NOT processed immediately if plugin is NOT selected (but enabled)', async () => { - const { - store, - client, - sendMessage, - device, - } = await createMockFlipperWithPlugin(TestPlugin); + const {store, client, sendMessage, device} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -260,13 +256,8 @@ test('queue - events ARE processed immediately if plugin is NOT selected / enabl }); test('queue - events are queued for plugins that are favorite when app is not selected', async () => { - const { - client, - device, - store, - sendMessage, - createClient, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage, createClient} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -293,13 +284,8 @@ test('queue - events are queued for plugins that are favorite when app is not se }); test('queue - events are queued for plugins that are favorite when app is selected on different device', async () => { - const { - client, - store, - sendMessage, - createDevice, - createClient, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, sendMessage, createDevice, createClient} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); expect(store.getState().connections.selectedPlugin).not.toBe('TestPlugin'); @@ -340,12 +326,8 @@ test('queue - events are queued for plugins that are favorite when app is select }); test('queue - events processing will be paused', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -390,12 +372,8 @@ test('queue - events processing will be paused', async () => { }); test('queue - messages that arrive during processing will be queued', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -446,12 +424,8 @@ test('queue - messages that arrive during processing will be queued', async () = }); test('queue - processing can be cancelled', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -487,12 +461,8 @@ test('queue - processing can be cancelled', async () => { }); test('queue - make sure resetting plugin state clears the message queue', async () => { - const { - client, - device, - store, - sendMessage, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, device, store, sendMessage} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); @@ -522,13 +492,8 @@ test('client - incoming messages are buffered and flushed together', async () => static persistedStateReducer = jest.fn(); } - const { - client, - store, - device, - sendMessage, - pluginKey, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, device, sendMessage, pluginKey} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); store.dispatch(registerPlugins([StubDeviceLogs])); @@ -687,12 +652,8 @@ test('client - incoming messages are buffered and flushed together', async () => }); test('queue - messages that have not yet flushed be lost when disabling the plugin', async () => { - const { - client, - store, - sendMessage, - pluginKey, - } = await createMockFlipperWithPlugin(TestPlugin); + const {client, store, sendMessage, pluginKey} = + await createMockFlipperWithPlugin(TestPlugin); selectDeviceLogs(store); sendMessage('inc', {}); diff --git a/desktop/app/src/utils/exportData.tsx b/desktop/app/src/utils/exportData.tsx index d975439ab..02c3062b5 100644 --- a/desktop/app/src/utils/exportData.tsx +++ b/desktop/app/src/utils/exportData.tsx @@ -201,13 +201,8 @@ export function processPluginStates( export function processNotificationStates( options: ProcessNotificationStatesOptions, ): Array { - const { - clients, - serial, - allActiveNotifications, - devicePlugins, - statusUpdate, - } = options; + const {clients, serial, allActiveNotifications, devicePlugins, statusUpdate} = + options; statusUpdate && statusUpdate('Filtering the notifications for the filtered Clients...'); const activeNotifications = allActiveNotifications.filter((notif) => { diff --git a/desktop/app/src/utils/icons.ts b/desktop/app/src/utils/icons.ts index 4f249bb5f..00a27d783 100644 --- a/desktop/app/src/utils/icons.ts +++ b/desktop/app/src/utils/icons.ts @@ -34,9 +34,10 @@ export function getIcons(): Icons { // Takes a string like 'star', or 'star-outline', and converts it to // {trimmedName: 'star', variant: 'filled'} or {trimmedName: 'star', variant: 'outline'} -function getIconPartsFromName( - icon: string, -): {trimmedName: string; variant: 'outline' | 'filled'} { +function getIconPartsFromName(icon: string): { + trimmedName: string; + variant: 'outline' | 'filled'; +} { const isOutlineVersion = icon.endsWith('-outline'); const trimmedName = isOutlineVersion ? icon.replace('-outline', '') : icon; const variant = isOutlineVersion ? 'outline' : 'filled'; diff --git a/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx b/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx index ae3f97409..92462f7e3 100644 --- a/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx +++ b/desktop/app/src/utils/js-client-server-utils/serverUtils.tsx @@ -157,7 +157,8 @@ export function launchJsEmulator(url: string, height: number, width: number) { } export class JSClientFlipperConnection - implements FlipperClientConnection { + implements FlipperClientConnection +{ webContentsId: number; connStatusSubscribers: Set> = new Set(); connStatus: ConnectionStatus; diff --git a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx b/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx index c197f9cc2..56d6887bf 100644 --- a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx +++ b/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx @@ -13,7 +13,8 @@ import {Payload, ConnectionStatus, ISubscriber} from 'rsocket-types'; import WebSocket from 'ws'; export class WebsocketClientFlipperConnection - implements FlipperClientConnection { + implements FlipperClientConnection +{ websocket: WebSocket; connStatusSubscribers: Set> = new Set(); connStatus: ConnectionStatus; diff --git a/desktop/app/src/utils/packageMetadata.tsx b/desktop/app/src/utils/packageMetadata.tsx index e3e3bc753..b4d3aaa7b 100644 --- a/desktop/app/src/utils/packageMetadata.tsx +++ b/desktop/app/src/utils/packageMetadata.tsx @@ -26,13 +26,12 @@ const getPackageJSON = async () => { return JSON.parse(content); }; -export const readCurrentRevision: () => Promise< - string | undefined -> = lodash.memoize(async () => { - // This is provided as part of the bundling process for headless. - if (global.__REVISION__) { - return global.__REVISION__; - } - const json = await getPackageJSON(); - return json.revision; -}); +export const readCurrentRevision: () => Promise = + lodash.memoize(async () => { + // This is provided as part of the bundling process for headless. + if (global.__REVISION__) { + return global.__REVISION__; + } + const json = await getPackageJSON(); + return json.revision; + }); diff --git a/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx b/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx index 4bc3c5f5a..8a158020d 100644 --- a/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx +++ b/desktop/app/src/utils/self-inspection/selfInspectionClient.tsx @@ -26,7 +26,8 @@ interface IFutureSubject { export class SelfInspectionFlipperClient extends FlipperClient - implements FlipperClientConnection { + implements FlipperClientConnection +{ connStatusSubscribers: Set> = new Set(); connStatus: ConnectionStatus = {kind: 'CONNECTED'}; diff --git a/desktop/app/src/utils/serialization.tsx b/desktop/app/src/utils/serialization.tsx index d646389c6..8417db86a 100644 --- a/desktop/app/src/utils/serialization.tsx +++ b/desktop/app/src/utils/serialization.tsx @@ -15,12 +15,9 @@ export async function serialize( statusUpdate?: (msg: string) => void, statusMsg?: string, ): Promise { - return makeObjectSerializable( - obj, - idler, - statusUpdate, - statusMsg, - ).then((obj) => JSON.stringify(obj)); + return makeObjectSerializable(obj, idler, statusUpdate, statusMsg).then( + (obj) => JSON.stringify(obj), + ); } export function deserialize(str: string): any { diff --git a/desktop/app/src/utils/sideEffect.tsx b/desktop/app/src/utils/sideEffect.tsx index 46d0f9821..e4350a009 100644 --- a/desktop/app/src/utils/sideEffect.tsx +++ b/desktop/app/src/utils/sideEffect.tsx @@ -25,7 +25,7 @@ import {shallowEqual} from 'react-redux'; export function sideEffect< Store extends ReduxStore, V, - State = Store extends ReduxStore ? S : never + State = Store extends ReduxStore ? S : never, >( store: Store, options: { diff --git a/desktop/babel-transformer/package.json b/desktop/babel-transformer/package.json index 7dc74207d..127b3794b 100644 --- a/desktop/babel-transformer/package.json +++ b/desktop/babel-transformer/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/jest": "26.0.23", "jest": "^26.6.3", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "rimraf": "^3.0.2", "ts-jest": "^26.5.6", "ts-node": "^9.1.1", diff --git a/desktop/doctor/package.json b/desktop/doctor/package.json index 5dfc6e40e..f71562b6b 100644 --- a/desktop/doctor/package.json +++ b/desktop/doctor/package.json @@ -17,7 +17,7 @@ "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.23.2", "jest": "^26.6.3", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "ts-jest": "^26.5.6", "tslint-config-prettier": "^1.18.0", "typescript": "^4.2.4" diff --git a/desktop/doctor/src/index.ts b/desktop/doctor/src/index.ts index 8c28808fb..5a347e6c8 100644 --- a/desktop/doctor/src/index.ts +++ b/desktop/doctor/src/index.ts @@ -301,38 +301,37 @@ export async function runHealthchecks(): Promise< > { const environmentInfo = await getEnvInfo(); const healthchecks: Healthchecks = getHealthchecks(); - const results: Array< - CategoryResult | SkippedHealthcheckCategory - > = await Promise.all( - Object.entries(healthchecks).map(async ([key, category]) => { - if (category.isSkipped) { - return category; - } - const categoryResult: CategoryResult = [ - key, - { - label: category.label, - results: await Promise.all( - category.healthchecks.map( - async ({key, label, run, isRequired}) => ({ - key, - label, - isRequired: isRequired ?? true, - result: await run(environmentInfo).catch((e) => { - console.error(e); - // TODO Improve result type to be: OK | Problem(message, fix...) - return { - hasProblem: true, - }; + const results: Array = + await Promise.all( + Object.entries(healthchecks).map(async ([key, category]) => { + if (category.isSkipped) { + return category; + } + const categoryResult: CategoryResult = [ + key, + { + label: category.label, + results: await Promise.all( + category.healthchecks.map( + async ({key, label, run, isRequired}) => ({ + key, + label, + isRequired: isRequired ?? true, + result: await run(environmentInfo).catch((e) => { + console.error(e); + // TODO Improve result type to be: OK | Problem(message, fix...) + return { + hasProblem: true, + }; + }), }), - }), + ), ), - ), - }, - ]; - return categoryResult; - }), - ); + }, + ]; + return categoryResult; + }), + ); return results; } diff --git a/desktop/eslint-plugin-flipper/package.json b/desktop/eslint-plugin-flipper/package.json index dbd15cb53..9b8b1c998 100644 --- a/desktop/eslint-plugin-flipper/package.json +++ b/desktop/eslint-plugin-flipper/package.json @@ -18,7 +18,7 @@ "@typescript-eslint/parser": "^4.22.0", "flipper-test-utils": "0.0.0", "jest": "^26.6.3", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "rimraf": "^3.0.2", "ts-jest": "^26.5.6", "ts-node": "^9.1.1", diff --git a/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx b/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx index 88b9fbbf2..3e9a7cc84 100644 --- a/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx +++ b/desktop/flipper-plugin/src/__tests__/test-utils-device.node.tsx @@ -67,9 +67,8 @@ test('it can start a device plugin and listen to lifecycle events', () => { }); test('it can render a device plugin', () => { - const {renderer, instance, sendLogEntry} = TestUtils.renderDevicePlugin( - testPlugin, - ); + const {renderer, instance, sendLogEntry} = + TestUtils.renderDevicePlugin(testPlugin); expect(renderer.baseElement).toMatchInlineSnapshot(` diff --git a/desktop/flipper-plugin/src/data-source/DataSource.tsx b/desktop/flipper-plugin/src/data-source/DataSource.tsx index fdc95dbec..b11dfa7ba 100644 --- a/desktop/flipper-plugin/src/data-source/DataSource.tsx +++ b/desktop/flipper-plugin/src/data-source/DataSource.tsx @@ -86,7 +86,7 @@ type OutputChange = export class DataSource< T = any, KEY extends keyof T = any, - KEY_TYPE extends string | number | never = ExtractKeyType + KEY_TYPE extends string | number | never = ExtractKeyType, > { private nextId = 0; private _records: Entry[] = []; diff --git a/desktop/flipper-plugin/src/plugin/MenuEntry.tsx b/desktop/flipper-plugin/src/plugin/MenuEntry.tsx index eeaa7b199..00bfaad0f 100644 --- a/desktop/flipper-plugin/src/plugin/MenuEntry.tsx +++ b/desktop/flipper-plugin/src/plugin/MenuEntry.tsx @@ -54,9 +54,9 @@ export const buildInMenuEntries = { export function normalizeMenuEntry(entry: MenuEntry): NormalizedMenuEntry; export function normalizeMenuEntry(entry: any): NormalizedMenuEntry { - const builtInEntry: - | NormalizedMenuEntry - | undefined = (buildInMenuEntries as any)[entry.action]; + const builtInEntry: NormalizedMenuEntry | undefined = ( + buildInMenuEntries as any + )[entry.action]; return builtInEntry ? {...builtInEntry, ...entry} : { diff --git a/desktop/flipper-plugin/src/plugin/Plugin.tsx b/desktop/flipper-plugin/src/plugin/Plugin.tsx index dc7ada1cb..d84422c8d 100644 --- a/desktop/flipper-plugin/src/plugin/Plugin.tsx +++ b/desktop/flipper-plugin/src/plugin/Plugin.tsx @@ -27,7 +27,7 @@ type Message = { */ export interface PluginClient< Events extends EventsContract = {}, - Methods extends MethodsContract = {} + Methods extends MethodsContract = {}, > extends BasePluginClient { /** * Identifier that uniquely identifies the connected application @@ -128,7 +128,7 @@ export interface RealFlipperClient { export type PluginFactory< Events extends EventsContract, - Methods extends MethodsContract + Methods extends MethodsContract, > = (client: PluginClient) => object; export type FlipperPluginComponent = React.FC<{}>; diff --git a/desktop/flipper-plugin/src/plugin/PluginContext.tsx b/desktop/flipper-plugin/src/plugin/PluginContext.tsx index c5018d658..3cb5ee2f5 100644 --- a/desktop/flipper-plugin/src/plugin/PluginContext.tsx +++ b/desktop/flipper-plugin/src/plugin/PluginContext.tsx @@ -11,9 +11,10 @@ import {createContext, useContext} from 'react'; import {SandyPluginInstance, PluginFactory} from './Plugin'; import {SandyDevicePluginInstance, DevicePluginFactory} from './DevicePlugin'; -export const SandyPluginContext = createContext< - SandyPluginInstance | SandyDevicePluginInstance | undefined ->(undefined); +export const SandyPluginContext = + createContext( + undefined, + ); export function usePluginInstance(): | SandyPluginInstance @@ -26,7 +27,7 @@ export function usePluginInstance(): } export function usePlugin< - Factory extends PluginFactory | DevicePluginFactory + Factory extends PluginFactory | DevicePluginFactory, >(plugin: Factory): ReturnType { const pluginInstance = usePluginInstance(); // In principle we don't *need* the plugin, but having it passed it makes sure the diff --git a/desktop/flipper-plugin/src/test-utils/test-utils.tsx b/desktop/flipper-plugin/src/test-utils/test-utils.tsx index 05bcc9233..67b7cc514 100644 --- a/desktop/flipper-plugin/src/test-utils/test-utils.tsx +++ b/desktop/flipper-plugin/src/test-utils/test-utils.tsx @@ -60,17 +60,15 @@ type ExtractClientType> = Parameters< Module['plugin'] >[0]; -type ExtractMethodsType< - Module extends FlipperPluginModule -> = ExtractClientType extends PluginClient - ? Methods - : never; +type ExtractMethodsType> = + ExtractClientType extends PluginClient + ? Methods + : never; -type ExtractEventsType< - Module extends FlipperPluginModule -> = ExtractClientType extends PluginClient - ? Events - : never; +type ExtractEventsType> = + ExtractClientType extends PluginClient + ? Events + : never; interface BasePluginResult { /** diff --git a/desktop/flipper-plugin/src/ui/DataList.tsx b/desktop/flipper-plugin/src/ui/DataList.tsx index 9be896662..49e40fdf9 100644 --- a/desktop/flipper-plugin/src/ui/DataList.tsx +++ b/desktop/flipper-plugin/src/ui/DataList.tsx @@ -78,7 +78,7 @@ export type DataListProps = DataListBaseProps & Omit, 'records' | 'dataSource' | 'columns' | 'onSelect'>; export const DataList: React.FC> = function DataList< - T extends Item + T extends Item, >({ selection: baseSelection, onSelect, diff --git a/desktop/flipper-plugin/src/ui/Interactive.tsx b/desktop/flipper-plugin/src/ui/Interactive.tsx index e4660f909..b9e52715e 100644 --- a/desktop/flipper-plugin/src/ui/Interactive.tsx +++ b/desktop/flipper-plugin/src/ui/Interactive.tsx @@ -404,11 +404,8 @@ export class Interactive extends React.Component< } calculateResize(event: MouseEvent) { - const { - resizingInitialCursor, - resizingInitialRect, - resizingSides, - } = this.state; + const {resizingInitialCursor, resizingInitialRect, resizingSides} = + this.state; const deltaLeft = resizingInitialCursor!.left - event.clientX; const deltaTop = resizingInitialCursor!.top - event.clientY; @@ -517,9 +514,7 @@ export class Interactive extends React.Component< } } - checkIfResizable( - event: MouseEvent, - ): + checkIfResizable(event: MouseEvent): | { left: boolean; right: boolean; diff --git a/desktop/flipper-plugin/src/ui/Layout.tsx b/desktop/flipper-plugin/src/ui/Layout.tsx index a49887b50..a51c1baee 100644 --- a/desktop/flipper-plugin/src/ui/Layout.tsx +++ b/desktop/flipper-plugin/src/ui/Layout.tsx @@ -190,14 +190,8 @@ function renderSplitLayout( child2 = ; } if ('resizable' in props && props.resizable) { - const { - width, - height, - minHeight, - minWidth, - maxHeight, - maxWidth, - } = props as any; + const {width, height, minHeight, minWidth, maxHeight, maxWidth} = + props as any; const sizeProps = direction === 'column' ? ({ diff --git a/desktop/flipper-plugin/src/ui/Panel.tsx b/desktop/flipper-plugin/src/ui/Panel.tsx index 7588a423f..c1d3ba3e9 100644 --- a/desktop/flipper-plugin/src/ui/Panel.tsx +++ b/desktop/flipper-plugin/src/ui/Panel.tsx @@ -94,7 +94,8 @@ const StyledCollapse = styled(Collapse)({ '& > .ant-collapse-item': { borderBottom: 'none', }, - '& > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box': { - padding: 0, - }, + '& > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box': + { + padding: 0, + }, }); diff --git a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx index c1d118392..f2671a70b 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx @@ -326,18 +326,14 @@ export const DataInspectorNode: React.FC = memo( [extractValueProp], ); - const res = useMemo(() => extractValue(data, depth, path), [ - extractValue, - data, - depth, - path, - ]); - const resDiff = useMemo(() => extractValue(diff, depth, path), [ - extractValue, - diff, - depth, - path, - ]); + const res = useMemo( + () => extractValue(data, depth, path), + [extractValue, data, depth, path], + ); + const resDiff = useMemo( + () => extractValue(diff, depth, path), + [extractValue, diff, depth, path], + ); const ancestry = useMemo( () => (res ? parentAncestry!.concat([res.value]) : []), [parentAncestry, res?.value], diff --git a/desktop/flipper-plugin/src/utils/createTablePlugin.tsx b/desktop/flipper-plugin/src/utils/createTablePlugin.tsx index f053654ce..a1a04c6d5 100644 --- a/desktop/flipper-plugin/src/utils/createTablePlugin.tsx +++ b/desktop/flipper-plugin/src/utils/createTablePlugin.tsx @@ -18,9 +18,7 @@ import {MasterDetail} from '../ui/MasterDetail'; import {createDataSource} from '../state/createDataSource'; type PluginResult = { - plugin( - client: PluginClient>, - ): { + plugin(client: PluginClient>): { rows: DataSource; }; Component(): React.ReactElement; @@ -49,7 +47,7 @@ export function createTablePlugin(props: { }): PluginResult; export function createTablePlugin< Raw extends object, - Row extends object = Raw + Row extends object = Raw, >(props: { buildRow: (record: Raw) => Row; method: string; @@ -63,7 +61,7 @@ export function createTablePlugin< Raw extends object, Method extends string, ResetMethod extends string, - Row extends object = Raw + Row extends object = Raw, >(props: { method: Method; resetMethod?: ResetMethod; @@ -89,7 +87,7 @@ export function createTablePlugin< } const record = props.buildRow ? props.buildRow(event) - : ((event as any) as Row); + : (event as any as Row); if (props.key) { rows.upsert(record); } else { diff --git a/desktop/flipper-plugin/src/utils/parseColor.tsx b/desktop/flipper-plugin/src/utils/parseColor.tsx index 8704bc43d..4740cf3ed 100644 --- a/desktop/flipper-plugin/src/utils/parseColor.tsx +++ b/desktop/flipper-plugin/src/utils/parseColor.tsx @@ -7,9 +7,7 @@ * @format */ -export function parseColor( - val: string | number, -): +export function parseColor(val: string | number): | { r: number; g: number; diff --git a/desktop/flipper-plugin/src/utils/urlRegex.tsx b/desktop/flipper-plugin/src/utils/urlRegex.tsx index 6d639d5bd..577e49ee8 100644 --- a/desktop/flipper-plugin/src/utils/urlRegex.tsx +++ b/desktop/flipper-plugin/src/utils/urlRegex.tsx @@ -9,4 +9,5 @@ // Source: https://github.com/sindresorhus/linkify-urls/blob/e0cf2a2d51dc8f5f95d93f97ecb1cc804cc9e6be/index.js#L5 // n.b. no /g flag, as that makes the regex stateful! Which is not needed for splitting -export const urlRegex = /((?) { displayCPUDetail: true, }); - const updateCoreFrequency: ( - core: number, - type: string, - ) => Promise = async (core: number, type: string) => { - const output = await executeShell( - 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type, - ); - cpuState.update((draft) => { - const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1; - // update table only if frequency changed - if (draft.cpuFreq[core][type] != newFreq) { - draft.cpuFreq[core][type] = newFreq; - if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) { - // cannot find current freq means offline - draft.cpuFreq[core][type] = -2; + const updateCoreFrequency: (core: number, type: string) => Promise = + async (core: number, type: string) => { + const output = await executeShell( + 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type, + ); + cpuState.update((draft) => { + const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1; + // update table only if frequency changed + if (draft.cpuFreq[core][type] != newFreq) { + draft.cpuFreq[core][type] = newFreq; + if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) { + // cannot find current freq means offline + draft.cpuFreq[core][type] = -2; + } } - } - }); - }; + }); + }; const updateAvailableFrequencies: (core: number) => Promise = async ( core: number, diff --git a/desktop/plugins/public/databases/DatabasesPlugin.tsx b/desktop/plugins/public/databases/DatabasesPlugin.tsx index ad676e9eb..551c19f29 100644 --- a/desktop/plugins/public/databases/DatabasesPlugin.tsx +++ b/desktop/plugins/public/databases/DatabasesPlugin.tsx @@ -332,9 +332,10 @@ const FavoritesMenu = React.memo( favorites: string[]; onClick: (value: string) => void; }) => { - const onMenuClick = useCallback((p: any) => onClick(p.key as string), [ - onClick, - ]); + const onMenuClick = useCallback( + (p: any) => onClick(p.key as string), + [onClick], + ); return (

{favorites.map((q) => ( @@ -488,12 +489,8 @@ export function Component() { const onRowEdited = useCallback( (change: {[key: string]: string | null}) => { - const { - selectedDatabaseTable, - currentStructure, - viewMode, - currentPage, - } = instance.state.get(); + const {selectedDatabaseTable, currentStructure, viewMode, currentPage} = + instance.state.get(); const highlightedRowIdx = currentPage?.highlightedRows[0] ?? -1; const row = highlightedRowIdx >= 0 diff --git a/desktop/plugins/public/layout/Inspector.tsx b/desktop/plugins/public/layout/Inspector.tsx index fc64144fd..5ae390858 100644 --- a/desktop/plugins/public/layout/Inspector.tsx +++ b/desktop/plugins/public/layout/Inspector.tsx @@ -197,9 +197,8 @@ export default class Inspector extends Component { selectedElement !== prevProps.selectedElement ) { // selected element in non-AX tree changed, find linked element in AX tree - const newlySelectedElem = this.props.persistedState.elements[ - selectedElement - ]; + const newlySelectedElem = + this.props.persistedState.elements[selectedElement]; if (newlySelectedElem) { this.props.onSelect( newlySelectedElem.extraInfo @@ -213,9 +212,8 @@ export default class Inspector extends Component { selectedAXElement !== prevProps.selectedAXElement ) { // selected element in AX tree changed, find linked element in non-AX tree - const newlySelectedAXElem = this.props.persistedState.AXelements[ - selectedAXElement - ]; + const newlySelectedAXElem = + this.props.persistedState.AXelements[selectedAXElement]; if (newlySelectedAXElem) { this.props.onSelect( newlySelectedAXElem.extraInfo @@ -310,16 +308,12 @@ export default class Inspector extends Component { ): Promise> { if (ids.length > 0 && this.props.client.isConnected) { const {forAccessibilityEvent} = options; - const { - elements, - }: {elements: Array} = await this.props.client.call( - this.call().GET_NODES, - { + const {elements}: {elements: Array} = + await this.props.client.call(this.call().GET_NODES, { ids, forAccessibilityEvent, selected: false, - }, - ); + }); elements.forEach((e) => this.updateElement(e.id, e)); return elements; } else { diff --git a/desktop/plugins/public/logs/__tests__/logs.node.tsx b/desktop/plugins/public/logs/__tests__/logs.node.tsx index 36bfadadd..befd0961a 100644 --- a/desktop/plugins/public/logs/__tests__/logs.node.tsx +++ b/desktop/plugins/public/logs/__tests__/logs.node.tsx @@ -86,13 +86,8 @@ test('it will merge equal rows', () => { }); test('it supports deeplink and select nodes + navigating to bottom', async () => { - const { - instance, - sendLogEntry, - triggerDeepLink, - act, - triggerMenuEntry, - } = TestUtils.renderDevicePlugin(LogsPlugin); + const {instance, sendLogEntry, triggerDeepLink, act, triggerMenuEntry} = + TestUtils.renderDevicePlugin(LogsPlugin); sendLogEntry(entry1); sendLogEntry(entry2); @@ -126,11 +121,8 @@ test('it supports deeplink and select nodes + navigating to bottom', async () => }); test('export / import plugin does work', async () => { - const { - instance, - exportStateAsync, - sendLogEntry, - } = TestUtils.startDevicePlugin(LogsPlugin); + const {instance, exportStateAsync, sendLogEntry} = + TestUtils.startDevicePlugin(LogsPlugin); sendLogEntry(entry1); sendLogEntry(entry2); diff --git a/desktop/plugins/public/logs/index.tsx b/desktop/plugins/public/logs/index.tsx index 6c0a21f10..8ada3aa2a 100644 --- a/desktop/plugins/public/logs/index.tsx +++ b/desktop/plugins/public/logs/index.tsx @@ -116,9 +116,8 @@ export function devicePlugin(client: DevicePluginClient) { persist: 'logs', }); const isPaused = createState(true); - const tableManagerRef = createRef< - undefined | DataTableManager - >(); + const tableManagerRef = + createRef>(); client.onDeepLink((payload: unknown) => { if (typeof payload === 'string') { diff --git a/desktop/plugins/public/navigation/components/RequiredParametersDialog.tsx b/desktop/plugins/public/navigation/components/RequiredParametersDialog.tsx index f32c04842..b409915bd 100644 --- a/desktop/plugins/public/navigation/components/RequiredParametersDialog.tsx +++ b/desktop/plugins/public/navigation/components/RequiredParametersDialog.tsx @@ -30,9 +30,8 @@ type Props = { export default (props: Props) => { const {onHide, onSubmit, uri, requiredParameters} = props; - const {isValid, values, setValuesArray} = useRequiredParameterFormValidator( - requiredParameters, - ); + const {isValid, values, setValuesArray} = + useRequiredParameterFormValidator(requiredParameters); return ( { render() { const {bookmarks, providers} = this.props; - const { - autoCompleteSheetOpen, - inputFocused, - searchInputValue, - query, - } = this.state; + const {autoCompleteSheetOpen, inputFocused, searchInputValue, query} = + this.state; return ( diff --git a/desktop/plugins/public/network/ProtobufDefinitionsRepository.tsx b/desktop/plugins/public/network/ProtobufDefinitionsRepository.tsx index 94c76318a..bd968cff1 100644 --- a/desktop/plugins/public/network/ProtobufDefinitionsRepository.tsx +++ b/desktop/plugins/public/network/ProtobufDefinitionsRepository.tsx @@ -21,7 +21,8 @@ export class ProtobufDefinitionsRepository { public static getInstance(): ProtobufDefinitionsRepository { if (!ProtobufDefinitionsRepository.instance) { - ProtobufDefinitionsRepository.instance = new ProtobufDefinitionsRepository(); + ProtobufDefinitionsRepository.instance = + new ProtobufDefinitionsRepository(); } return ProtobufDefinitionsRepository.instance; } diff --git a/desktop/plugins/public/network/RequestDetails.tsx b/desktop/plugins/public/network/RequestDetails.tsx index 65521400d..79115480c 100644 --- a/desktop/plugins/public/network/RequestDetails.tsx +++ b/desktop/plugins/public/network/RequestDetails.tsx @@ -668,17 +668,19 @@ class BinaryFormatter { } class ProtobufFormatter { - private protobufDefinitionRepository = ProtobufDefinitionsRepository.getInstance(); + private protobufDefinitionRepository = + ProtobufDefinitionsRepository.getInstance(); formatRequest(request: Request) { if ( getHeaderValue(request.requestHeaders, 'content-type') === 'application/x-protobuf' ) { - const protobufDefinition = this.protobufDefinitionRepository.getRequestType( - request.method, - request.url, - ); + const protobufDefinition = + this.protobufDefinitionRepository.getRequestType( + request.method, + request.url, + ); if (protobufDefinition == undefined) { return ( @@ -708,10 +710,11 @@ class ProtobufFormatter { 'application/x-protobuf' || request.url.endsWith('.proto') ) { - const protobufDefinition = this.protobufDefinitionRepository.getResponseType( - request.method, - request.url, - ); + const protobufDefinition = + this.protobufDefinitionRepository.getResponseType( + request.method, + request.url, + ); if (protobufDefinition == undefined) { return ( diff --git a/desktop/plugins/public/network/__tests__/customheaders.node.tsx b/desktop/plugins/public/network/__tests__/customheaders.node.tsx index 1c1001cf7..35163006c 100644 --- a/desktop/plugins/public/network/__tests__/customheaders.node.tsx +++ b/desktop/plugins/public/network/__tests__/customheaders.node.tsx @@ -11,13 +11,8 @@ import {TestUtils} from 'flipper-plugin'; import * as NetworkPlugin from '../index'; test('Can handle custom headers', async () => { - const { - instance, - sendEvent, - act, - renderer, - exportState, - } = TestUtils.renderPlugin(NetworkPlugin); + const {instance, sendEvent, act, renderer, exportState} = + TestUtils.renderPlugin(NetworkPlugin); act(() => { sendEvent('newRequest', { diff --git a/desktop/plugins/public/network/request-mocking/ManageMockResponsePanel.tsx b/desktop/plugins/public/network/request-mocking/ManageMockResponsePanel.tsx index e79d65f4a..dcd1ef9ca 100644 --- a/desktop/plugins/public/network/request-mocking/ManageMockResponsePanel.tsx +++ b/desktop/plugins/public/network/request-mocking/ManageMockResponsePanel.tsx @@ -90,9 +90,10 @@ export function ManageMockResponsePanel(props: Props) { return returnValue; }); }, [props.routes, selectedIdAtom]); - const duplicatedIds = useMemo(() => _duplicateIds(props.routes), [ - props.routes, - ]); + const duplicatedIds = useMemo( + () => _duplicateIds(props.routes), + [props.routes], + ); const items: RouteItem[] = Object.entries(props.routes).map( ([id, route]) => ({ diff --git a/desktop/plugins/public/seamammals/src/__tests__/seamammals.spec.tsx b/desktop/plugins/public/seamammals/src/__tests__/seamammals.spec.tsx index 5d6157fea..d1f4ddca8 100644 --- a/desktop/plugins/public/seamammals/src/__tests__/seamammals.spec.tsx +++ b/desktop/plugins/public/seamammals/src/__tests__/seamammals.spec.tsx @@ -65,13 +65,8 @@ test('It can store rows', () => { }); test('It can have selection and render details', async () => { - const { - instance, - renderer, - act, - sendEvent, - exportState, - } = TestUtils.renderPlugin(MammalsPlugin); + const {instance, renderer, act, sendEvent, exportState} = + TestUtils.renderPlugin(MammalsPlugin); expect(instance.rows.get()).toEqual({}); expect(instance.selectedID.get()).toBeNull(); diff --git a/desktop/scripts/build-release.ts b/desktop/scripts/build-release.ts index d09ccd581..2c8b4d8cb 100755 --- a/desktop/scripts/build-release.ts +++ b/desktop/scripts/build-release.ts @@ -160,7 +160,7 @@ async function afterPack(context: AfterPackContext) { // and property names being present. type Mutable = {-readonly [P in keyof T]: T[P]}; const originalPackager = Object.assign({}, context.packager); - const packager = (context.packager as unknown) as WinPackager; + const packager = context.packager as unknown as WinPackager; const appInfo: Mutable = packager.appInfo; const exeFileName = `${packager.appInfo.productFilename}.exe`; appInfo.version = FIX_RELEASE_VERSION; diff --git a/desktop/scripts/build-utils.ts b/desktop/scripts/build-utils.ts index 360142a9b..cabe6c974 100644 --- a/desktop/scripts/build-utils.ts +++ b/desktop/scripts/build-utils.ts @@ -174,7 +174,8 @@ export async function compileRenderer(buildFolder: string) { export async function compileMain() { const out = path.join(staticDir, 'main.bundle.js'); - process.env.FLIPPER_ELECTRON_VERSION = require('electron/package.json').version; + process.env.FLIPPER_ELECTRON_VERSION = + require('electron/package.json').version; console.log('⚙️ Compiling main bundle...'); try { const config = Object.assign({}, await Metro.loadConfig(), { diff --git a/desktop/yarn.lock b/desktop/yarn.lock index b26200e6a..0dc846284 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -10230,10 +10230,10 @@ prettier@^1.14.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettier@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" - integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +prettier@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== pretty-format@^25.5.0: version "25.5.0"