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 /> [](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:
committed by
Facebook GitHub Bot
parent
b3bacc4812
commit
674f71a426
@@ -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(`
|
||||
<body>
|
||||
|
||||
@@ -86,7 +86,7 @@ type OutputChange =
|
||||
export class DataSource<
|
||||
T = any,
|
||||
KEY extends keyof T = any,
|
||||
KEY_TYPE extends string | number | never = ExtractKeyType<T, KEY>
|
||||
KEY_TYPE extends string | number | never = ExtractKeyType<T, KEY>,
|
||||
> {
|
||||
private nextId = 0;
|
||||
private _records: Entry<T>[] = [];
|
||||
|
||||
@@ -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}
|
||||
: {
|
||||
|
||||
@@ -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<Events, Methods>) => object;
|
||||
|
||||
export type FlipperPluginComponent = React.FC<{}>;
|
||||
|
||||
@@ -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<SandyPluginInstance | SandyDevicePluginInstance | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
export function usePluginInstance():
|
||||
| SandyPluginInstance
|
||||
@@ -26,7 +27,7 @@ export function usePluginInstance():
|
||||
}
|
||||
|
||||
export function usePlugin<
|
||||
Factory extends PluginFactory<any, any> | DevicePluginFactory
|
||||
Factory extends PluginFactory<any, any> | DevicePluginFactory,
|
||||
>(plugin: Factory): ReturnType<Factory> {
|
||||
const pluginInstance = usePluginInstance();
|
||||
// In principle we don't *need* the plugin, but having it passed it makes sure the
|
||||
|
||||
@@ -60,17 +60,15 @@ type ExtractClientType<Module extends FlipperPluginModule<any>> = Parameters<
|
||||
Module['plugin']
|
||||
>[0];
|
||||
|
||||
type ExtractMethodsType<
|
||||
Module extends FlipperPluginModule<any>
|
||||
> = ExtractClientType<Module> extends PluginClient<any, infer Methods>
|
||||
? Methods
|
||||
: never;
|
||||
type ExtractMethodsType<Module extends FlipperPluginModule<any>> =
|
||||
ExtractClientType<Module> extends PluginClient<any, infer Methods>
|
||||
? Methods
|
||||
: never;
|
||||
|
||||
type ExtractEventsType<
|
||||
Module extends FlipperPluginModule<any>
|
||||
> = ExtractClientType<Module> extends PluginClient<infer Events, any>
|
||||
? Events
|
||||
: never;
|
||||
type ExtractEventsType<Module extends FlipperPluginModule<any>> =
|
||||
ExtractClientType<Module> extends PluginClient<infer Events, any>
|
||||
? Events
|
||||
: never;
|
||||
|
||||
interface BasePluginResult {
|
||||
/**
|
||||
|
||||
@@ -78,7 +78,7 @@ export type DataListProps<T extends Item> = DataListBaseProps<T> &
|
||||
Omit<DataTableProps<T>, 'records' | 'dataSource' | 'columns' | 'onSelect'>;
|
||||
|
||||
export const DataList: React.FC<DataListProps<any>> = function DataList<
|
||||
T extends Item
|
||||
T extends Item,
|
||||
>({
|
||||
selection: baseSelection,
|
||||
onSelect,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -190,14 +190,8 @@ function renderSplitLayout(
|
||||
child2 = <Empty />;
|
||||
}
|
||||
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'
|
||||
? ({
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -326,18 +326,14 @@ export const DataInspectorNode: React.FC<DataInspectorProps> = 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],
|
||||
|
||||
@@ -18,9 +18,7 @@ import {MasterDetail} from '../ui/MasterDetail';
|
||||
import {createDataSource} from '../state/createDataSource';
|
||||
|
||||
type PluginResult<Raw, Row> = {
|
||||
plugin(
|
||||
client: PluginClient<Record<string, Raw | {}>>,
|
||||
): {
|
||||
plugin(client: PluginClient<Record<string, Raw | {}>>): {
|
||||
rows: DataSource<Row>;
|
||||
};
|
||||
Component(): React.ReactElement;
|
||||
@@ -49,7 +47,7 @@ export function createTablePlugin<Row extends object>(props: {
|
||||
}): PluginResult<Row, Row>;
|
||||
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 {
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function parseColor(
|
||||
val: string | number,
|
||||
):
|
||||
export function parseColor(val: string | number):
|
||||
| {
|
||||
r: number;
|
||||
g: number;
|
||||
|
||||
@@ -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 = /((?<!\+)(?:https?(?::\/\/))(?:www\.)?(?:[a-zA-Z\d-_.]+(?:(?:\.|@)[a-zA-Z\d]{2,})|localhost)(?:(?:[-a-zA-Z\d:%_+.~#*$!?&//=@]*)(?:[,](?![\s]))*)*)/;
|
||||
export const urlRegex =
|
||||
/((?<!\+)(?:https?(?::\/\/))(?:www\.)?(?:[a-zA-Z\d-_.]+(?:(?:\.|@)[a-zA-Z\d]{2,})|localhost)(?:(?:[-a-zA-Z\d:%_+.~#*$!?&//=@]*)(?:[,](?![\s]))*)*)/;
|
||||
|
||||
Reference in New Issue
Block a user