Bump prettier from 2.2.1 to 2.3.0 in /desktop (#2300)

Summary:
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p>
<blockquote>
<h2>2.3.0</h2>
<p><a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">diff</a></p>
<p>{emoji:1f517} <a href="https://prettier.io/blog/2021/05/09/2.3.0.html">Release Notes</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's changelog</a>.</em></p>
<blockquote>
<h1>2.3.0</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">diff</a></p>
<p>{emoji:1f517} <a href="https://prettier.io/blog/2021/05/09/2.3.0.html">Release Notes</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2afc3b9ae6"><code>2afc3b9</code></a> Release 2.3.0</li>
<li><a href="7cfa9aa89b"><code>7cfa9aa</code></a> Fix pre-commit hook setup command (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10710">#10710</a>)</li>
<li><a href="c8c02b4753"><code>c8c02b4</code></a> Build(deps-dev): Bump concurrently from 6.0.2 to 6.1.0 in /website (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10834">#10834</a>)</li>
<li><a href="6506e0f50e"><code>6506e0f</code></a> Build(deps-dev): Bump webpack-cli from 4.6.0 to 4.7.0 in /website (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10836">#10836</a>)</li>
<li><a href="69fae9c291"><code>69fae9c</code></a> Build(deps): Bump flow-parser from 0.150.0 to 0.150.1 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10839">#10839</a>)</li>
<li><a href="164a6e2351"><code>164a6e2</code></a> Switch CLI to async (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10804">#10804</a>)</li>
<li><a href="d3e7e2f634"><code>d3e7e2f</code></a> Build(deps): Bump codecov/codecov-action from v1.4.1 to v1.5.0 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10833">#10833</a>)</li>
<li><a href="9e09845da0"><code>9e09845</code></a> Build(deps): Bump <code>@​angular/compiler</code> from 11.2.12 to 11.2.13 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10838">#10838</a>)</li>
<li><a href="1bfab3d045"><code>1bfab3d</code></a> Build(deps-dev): Bump eslint from 7.25.0 to 7.26.0 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10840">#10840</a>)</li>
<li><a href="387fce4ed8"><code>387fce4</code></a> Minor formatting tweaks (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10807">#10807</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">compare view</a></li>
</ul>
</details>
<br />

[![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)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

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)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2300

Reviewed By: passy

Differential Revision: D28323849

Pulled By: cekkaewnumchai

fbshipit-source-id: 1842877ccc9a9587af7f0d9ff9432c2075c8ee22
This commit is contained in:
dependabot[bot]
2021-05-11 05:50:25 -07:00
committed by Facebook GitHub Bot
parent b3bacc4812
commit 674f71a426
86 changed files with 476 additions and 708 deletions

View File

@@ -98,25 +98,23 @@ export function devicePlugin(client: PluginClient<{}, {}>) {
displayCPUDetail: true,
});
const updateCoreFrequency: (
core: number,
type: string,
) => Promise<void> = 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<void> =
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<void> = async (
core: number,

View File

@@ -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 (
<Menu>
{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

View File

@@ -197,9 +197,8 @@ export default class Inspector extends Component<Props, State> {
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<Props, State> {
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<Props, State> {
): Promise<Array<Element>> {
if (ids.length > 0 && this.props.client.isConnected) {
const {forAccessibilityEvent} = options;
const {
elements,
}: {elements: Array<Element>} = await this.props.client.call(
this.call().GET_NODES,
{
const {elements}: {elements: Array<Element>} =
await this.props.client.call(this.call().GET_NODES, {
ids,
forAccessibilityEvent,
selected: false,
},
);
});
elements.forEach((e) => this.updateElement(e.id, e));
return elements;
} else {

View File

@@ -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);

View File

@@ -116,9 +116,8 @@ export function devicePlugin(client: DevicePluginClient) {
persist: 'logs',
});
const isPaused = createState(true);
const tableManagerRef = createRef<
undefined | DataTableManager<ExtendedLogEntry>
>();
const tableManagerRef =
createRef<undefined | DataTableManager<ExtendedLogEntry>>();
client.onDeepLink((payload: unknown) => {
if (typeof payload === 'string') {

View File

@@ -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 (
<Modal
visible

View File

@@ -95,12 +95,8 @@ class SearchBar extends Component<Props, State> {
render() {
const {bookmarks, providers} = this.props;
const {
autoCompleteSheetOpen,
inputFocused,
searchInputValue,
query,
} = this.state;
const {autoCompleteSheetOpen, inputFocused, searchInputValue, query} =
this.state;
return (
<ToolbarContainer>
<Toolbar>

View File

@@ -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;
}

View File

@@ -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 (
<Text>
@@ -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 (
<Text>

View File

@@ -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', {

View File

@@ -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]) => ({

View File

@@ -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();