Upgrading flow and fixing lint errors

Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13900794

fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
This commit is contained in:
Pascal Hartig
2019-02-01 06:42:40 -08:00
committed by Facebook Github Bot
parent 88cc299811
commit 09a93cd9e6
30 changed files with 477 additions and 338 deletions

View File

@@ -6,3 +6,4 @@ node_modules
flow-typed flow-typed
lib lib
!.eslintrc.js !.eslintrc.js
dist

View File

@@ -33,4 +33,4 @@ untyped-import
untyped-type-import untyped-type-import
[version] [version]
^0.86.0 ^0.91.0

View File

@@ -1,157 +1,273 @@
// flow-typed signature: 16b40ff613d36712444ef20fb107de7c /**
// flow-typed version: be6cfc6753/react-redux_v5.x.x/flow_>=v0.62.0 The order of type arguments for connect() is as follows:
import type { Dispatch, Store } from "redux"; connect<Props, OwnProps, StateProps, DispatchProps, State, Dispatch>(…)
declare module "react-redux" { In Flow v0.89 only the first two are mandatory to specify. Other 4 can be repaced with the new awesome type placeholder:
import type { ComponentType, ElementConfig } from 'react';
declare export class Provider<S, A> extends React$Component<{ connect<Props, OwnProps, _, _, _, _>(…)
store: Store<S, A>,
children?: any
}> {}
declare export function createProvider( But beware, in case of weird type errors somewhere in random places
storeKey?: string, just type everything and get to a green field and only then try to
subKey?: string remove the definitions you see bogus.
): Provider<*, *>;
/*
Decrypting the abbreviations:
WC = Component being wrapped
S = State S = State
A = Action D = Dispatch
OP = OwnProps OP = OwnProps
SP = StateProps SP = StateProps
DP = DispatchProps DP = DispatchProps
MP = Merge props MP = Merge props
MDP = Map dispatch to props object
RSP = Returned state props RSP = Returned state props
RDP = Returned dispatch props RDP = Returned dispatch props
RMP = Returned merge props RMP = Returned merge props
CP = Props for returned component CP = Props for returned component
Com = React Component Com = React Component
*/ ST = Static properties of Com
EFO = Extra factory options (used only in connectAdvanced)
*/
declare type MapStateToProps<S: Object, SP: Object, RSP: Object> = (state: S, props: SP) => RSP; declare module "react-redux" {
// ------------------------------------------------------------
// Typings for connect()
// ------------------------------------------------------------
declare type MapDispatchToProps<A, OP: Object, RDP: Object> = (dispatch: Dispatch<A>, ownProps: OP) => RDP; declare export type Options<S, OP, SP, MP> = {|
declare type MergeProps<SP: Object, DP: Object, MP: Object, RMP: Object> = (
stateProps: SP,
dispatchProps: DP,
ownProps: MP
) => RMP;
declare type ConnectOptions<S: Object, OP: Object, RSP: Object, RMP: Object> = {|
pure?: boolean, pure?: boolean,
withRef?: boolean, withRef?: boolean,
areStatesEqual?: (next: S, prev: S) => boolean, areStatesEqual?: (next: S, prev: S) => boolean,
areOwnPropsEqual?: (next: OP, prev: OP) => boolean, areOwnPropsEqual?: (next: OP, prev: OP) => boolean,
areStatePropsEqual?: (next: RSP, prev: RSP) => boolean, areStatePropsEqual?: (next: SP, prev: SP) => boolean,
areMergedPropsEqual?: (next: RMP, prev: RMP) => boolean, areMergedPropsEqual?: (next: MP, prev: MP) => boolean,
storeKey?: string storeKey?: string,
|}; |};
declare type OmitDispatch<Component> = $Diff<Component, {dispatch: Dispatch<*>}>; declare type MapStateToProps<-S, -OP, +SP> =
| ((state: S, ownProps: OP) => SP)
// If you want to use the factory function but get a strange error
// like "function is not an object" then just type the factory function
// like this:
// const factory: (State, OwnProps) => (State, OwnProps) => StateProps
// and provide the StateProps type to the SP type parameter.
| ((state: S, ownProps: OP) => (state: S, ownProps: OP) => SP);
declare export function connect< declare type Bind<D> = <A, R>((...A) => R) => (...A) => $Call<D, R>;
Com: ComponentType<*>,
declare type MapDispatchToPropsFn<D, -OP, +DP> =
| ((dispatch: D, ownProps: OP) => DP)
// If you want to use the factory function but get a strange error
// like "function is not an object" then just type the factory function
// like this:
// const factory: (Dispatch, OwnProps) => (Dispatch, OwnProps) => DispatchProps
// and provide the DispatchProps type to the DP type parameter.
| ((dispatch: D, ownProps: OP) => (dispatch: D, ownProps: OP) => DP);
declare class ConnectedComponent<OP, +WC> extends React$Component<OP> {
static +WrappedComponent: WC;
getWrappedInstance(): React$ElementRef<WC>;
}
// The connection of the Wrapped Component and the Connected Component
// happens here in `MP: P`. It means that type wise MP belongs to P,
// so to say MP >= P.
declare type Connector<P, OP, MP: P> = <WC: React$ComponentType<P>>(
WC,
) => Class<ConnectedComponent<OP, WC>> & WC;
// No `mergeProps` argument
// Got error like inexact OwnProps is incompatible with exact object type?
// Just make the OP parameter for `connect()` an exact object.
declare type MergeOP<OP, D> = {| ...$Exact<OP>, dispatch: D |};
declare type MergeOPSP<OP, SP> = {| ...$Exact<OP>, ...SP |};
declare type MergeOPDP<OP, DP> = {| ...$Exact<OP>, ...DP |};
declare type MergeOPSPDP<OP, SP, DP> = {| ...$Exact<OP>, ...SP, ...DP |};
declare export function connect<-P, -OP, -SP, -DP, -S, -D>(
mapStateToProps?: null | void,
mapDispatchToProps?: null | void,
mergeProps?: null | void,
options?: ?Options<S, OP, {||}, MergeOP<OP, D>>,
): Connector<P, OP, MergeOP<OP, D>>;
declare export function connect<-P, -OP, -SP, -DP, -S, -D>(
// If you get error here try adding return type to your mapStateToProps function
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps?: null | void,
mergeProps?: null | void,
options?: ?Options<S, OP, SP, MergeOPSP<OP, SP>>,
): Connector<P, OP, MergeOPSP<OP, SP>>;
// In this case DP is an object of functions which has been bound to dispatch
// by the given mapDispatchToProps function.
declare export function connect<-P, -OP, -SP, -DP, S, D>(
mapStateToProps: null | void,
mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
mergeProps?: null | void,
options?: ?Options<S, OP, {||}, MergeOPDP<OP, DP>>,
): Connector<P, OP, MergeOPDP<OP, DP>>;
// In this case DP is an object of action creators not yet bound to dispatch,
// this difference is not important in the vanila redux,
// but in case of usage with redux-thunk, the return type may differ.
declare export function connect<-P, -OP, -SP, -DP, S, D>(
mapStateToProps: null | void,
mapDispatchToProps: DP,
mergeProps?: null | void,
options?: ?Options<S, OP, {||}, MergeOPDP<OP, DP>>,
): Connector<P, OP, MergeOPDP<OP, $ObjMap<DP, Bind<D>>>>;
declare export function connect<-P, -OP, -SP, -DP, S, D>(
// If you get error here try adding return type to your mapStateToProps function
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
mergeProps?: null | void,
options?: ?Options<S, OP, SP, {| ...OP, ...SP, ...DP |}>,
): Connector<P, OP, {| ...OP, ...SP, ...DP |}>;
declare export function connect<-P, -OP, -SP, -DP, S, D>(
// If you get error here try adding return type to your mapStateToProps function
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps: DP,
mergeProps?: null | void,
options?: ?Options<S, OP, SP, MergeOPSPDP<OP, SP, DP>>,
): Connector<P, OP, MergeOPSPDP<OP, SP, $ObjMap<DP, Bind<D>>>>;
// With `mergeProps` argument
declare type MergeProps<+P, -OP, -SP, -DP> = (
stateProps: SP,
dispatchProps: DP,
ownProps: OP,
) => P;
declare export function connect<-P, -OP, -SP: {||}, -DP: {||}, S, D>(
mapStateToProps: null | void,
mapDispatchToProps: null | void,
// If you get error here try adding return type to you mapStateToProps function
mergeProps: MergeProps<P, OP, {||}, {| dispatch: D |}>,
options?: ?Options<S, OP, {||}, P>,
): Connector<P, OP, P>;
declare export function connect<-P, -OP, -SP, -DP: {||}, S, D>(
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps: null | void,
// If you get error here try adding return type to you mapStateToProps function
mergeProps: MergeProps<P, OP, SP, {| dispatch: D |}>,
options?: ?Options<S, OP, SP, P>,
): Connector<P, OP, P>;
// In this case DP is an object of functions which has been bound to dispatch
// by the given mapDispatchToProps function.
declare export function connect<-P, -OP, -SP: {||}, -DP, S, D>(
mapStateToProps: null | void,
mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
mergeProps: MergeProps<P, OP, {||}, DP>,
options?: ?Options<S, OP, {||}, P>,
): Connector<P, OP, P>;
// In this case DP is an object of action creators not yet bound to dispatch,
// this difference is not important in the vanila redux,
// but in case of usage with redux-thunk, the return type may differ.
declare export function connect<-P, -OP, -SP: {||}, -DP, S, D>(
mapStateToProps: null | void,
mapDispatchToProps: DP,
mergeProps: MergeProps<P, OP, {||}, $ObjMap<DP, Bind<D>>>,
options?: ?Options<S, OP, {||}, P>,
): Connector<P, OP, P>;
// In this case DP is an object of functions which has been bound to dispatch
// by the given mapDispatchToProps function.
declare export function connect<-P, -OP, -SP, -DP, S, D>(
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps: MapDispatchToPropsFn<D, OP, DP>,
mergeProps: MergeProps<P, OP, SP, DP>,
options?: ?Options<S, OP, SP, P>,
): Connector<P, OP, P>;
// In this case DP is an object of action creators not yet bound to dispatch,
// this difference is not important in the vanila redux,
// but in case of usage with redux-thunk, the return type may differ.
declare export function connect<-P, -OP, -SP, -DP, S, D>(
mapStateToProps: MapStateToProps<S, OP, SP>,
mapDispatchToProps: DP,
mergeProps: MergeProps<P, OP, SP, $ObjMap<DP, Bind<D>>>,
options?: ?Options<S, OP, SP, P>,
): Connector<P, OP, P>;
// ------------------------------------------------------------
// Typings for Provider
// ------------------------------------------------------------
declare export class Provider<Store> extends React$Component<{
store: Store,
children?: React$Node,
}> {}
declare export function createProvider(
storeKey?: string,
subKey?: string,
): Class<Provider<*>>;
// ------------------------------------------------------------
// Typings for connectAdvanced()
// ------------------------------------------------------------
declare type ConnectAdvancedOptions = {
getDisplayName?: (name: string) => string,
methodName?: string,
renderCountProp?: string,
shouldHandleStateChanges?: boolean,
storeKey?: string,
withRef?: boolean,
};
declare type SelectorFactoryOptions<Com> = {
getDisplayName: (name: string) => string,
methodName: string,
renderCountProp: ?string,
shouldHandleStateChanges: boolean,
storeKey: string,
withRef: boolean,
displayName: string,
wrappedComponentName: string,
WrappedComponent: Com,
};
declare type MapStateToPropsEx<S: Object, SP: Object, RSP: Object> = (
state: S,
props: SP,
) => RSP;
declare type SelectorFactory<
Com: React$ComponentType<*>,
Dispatch,
S: Object, S: Object,
DP: Object,
RSP: Object,
CP: $Diff<OmitDispatch<ElementConfig<Com>>, RSP>
>(
mapStateToProps: MapStateToProps<S, DP, RSP>,
mapDispatchToProps?: null
): (component: Com) => ComponentType<CP & DP>;
declare export function connect<Com: ComponentType<*>>(
mapStateToProps?: null,
mapDispatchToProps?: null
): (component: Com) => ComponentType<OmitDispatch<ElementConfig<Com>>>;
declare export function connect<
Com: ComponentType<*>,
A,
S: Object,
DP: Object,
SP: Object,
RSP: Object,
RDP: Object,
CP: $Diff<$Diff<ElementConfig<Com>, RSP>, RDP>
>(
mapStateToProps: MapStateToProps<S, SP, RSP>,
mapDispatchToProps: MapDispatchToProps<A, DP, RDP>
): (component: Com) => ComponentType<CP & SP & DP>;
declare export function connect<
Com: ComponentType<*>,
A,
OP: Object, OP: Object,
DP: Object, EFO: Object,
PR: Object, CP: Object,
CP: $Diff<ElementConfig<Com>, DP> > = (
>( dispatch: Dispatch,
mapStateToProps?: null, factoryOptions: SelectorFactoryOptions<Com> & EFO,
mapDispatchToProps: MapDispatchToProps<A, OP, DP> ) => MapStateToPropsEx<S, OP, CP>;
): (Com) => ComponentType<CP & OP>;
declare export function connect< declare export function connectAdvanced<
Com: ComponentType<*>, Com: React$ComponentType<*>,
MDP: Object D,
>(
mapStateToProps?: null,
mapDispatchToProps: MDP
): (component: Com) => ComponentType<$Diff<ElementConfig<Com>, MDP>>;
declare export function connect<
Com: ComponentType<*>,
S: Object, S: Object,
SP: Object, OP: Object,
RSP: Object, CP: Object,
MDP: Object, EFO: Object,
CP: $Diff<ElementConfig<Com>, RSP> ST: { [_: $Keys<Com>]: any },
>( >(
mapStateToProps: MapStateToProps<S, SP, RSP>, selectorFactory: SelectorFactory<Com, D, S, OP, EFO, CP>,
mapDispatchToPRops: MDP connectAdvancedOptions: ?(ConnectAdvancedOptions & EFO),
): (component: Com) => ComponentType<$Diff<CP, MDP> & SP>; ): (component: Com) => React$ComponentType<OP> & $Shape<ST>;
declare export function connect<
Com: ComponentType<*>,
A,
S: Object,
DP: Object,
SP: Object,
RSP: Object,
RDP: Object,
MP: Object,
RMP: Object,
CP: $Diff<ElementConfig<Com>, RMP>
>(
mapStateToProps: MapStateToProps<S, SP, RSP>,
mapDispatchToProps: ?MapDispatchToProps<A, DP, RDP>,
mergeProps: MergeProps<RSP, RDP, MP, RMP>
): (component: Com) => ComponentType<CP & SP & DP & MP>;
declare export function connect<Com: ComponentType<*>,
A,
S: Object,
DP: Object,
SP: Object,
RSP: Object,
RDP: Object,
MP: Object,
RMP: Object
>(
mapStateToProps: ?MapStateToProps<S, SP, RSP>,
mapDispatchToProps: ?MapDispatchToProps<A, DP, RDP>,
mergeProps: ?MergeProps<RSP, RDP, MP, RMP>,
options: ConnectOptions<S, SP & DP & MP, RSP, RMP>
): (component: Com) => ComponentType<$Diff<ElementConfig<Com>, RMP> & SP & DP & MP>;
declare export default { declare export default {
Provider: typeof Provider, Provider: typeof Provider,
createProvider: typeof createProvider, createProvider: typeof createProvider,
connect: typeof connect, connect: typeof connect,
connectAdvanced: typeof connectAdvanced,
}; };
} }

View File

@@ -1,5 +1,5 @@
// flow-typed signature: cca4916b0213065533df8335c3285a4a // flow-typed signature: df80bdd535bfed9cf3223e077f3b4543
// flow-typed version: cab04034e7/redux_v3.x.x/flow_>=v0.55.x // flow-typed version: c4c8963c9c/redux_v4.x.x/flow_>=v0.55.x
declare module 'redux' { declare module 'redux' {
@@ -12,7 +12,7 @@ declare module 'redux' {
*/ */
declare export type DispatchAPI<A> = (action: A) => A; declare export type DispatchAPI<A> = (action: A) => A;
declare export type Dispatch<A: { type: string }> = DispatchAPI<A>; declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
declare export type MiddlewareAPI<S, A, D = Dispatch<A>> = { declare export type MiddlewareAPI<S, A, D = Dispatch<A>> = {
dispatch: D; dispatch: D;

View File

@@ -35,7 +35,7 @@
}, },
"devDependencies": { "devDependencies": {
"@jest-runner/electron": "^0.1.0", "@jest-runner/electron": "^0.1.0",
"babel-eslint": "8.2.1", "babel-eslint": "^10.0.1",
"electron": "3.0.0", "electron": "3.0.0",
"electron-builder": "^19.49.0", "electron-builder": "^19.49.0",
"eslint": "^5.12.1", "eslint": "^5.12.1",
@@ -47,7 +47,7 @@
"eslint-plugin-prettier": "^3.0.1", "eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.5.1", "eslint-plugin-react": "^7.5.1",
"eslint-plugin-relay": "^1.0.0", "eslint-plugin-relay": "^1.0.0",
"flow-bin": "^0.86.0", "flow-bin": "^0.91.0",
"glob": "^7.1.2", "glob": "^7.1.2",
"jest": "^23.6.0", "jest": "^23.6.0",
"prettier": "1.13.6", "prettier": "1.13.6",

View File

@@ -29,14 +29,18 @@ import type {ActiveSheet} from './reducers/application.js';
const version = remote.app.getVersion(); const version = remote.app.getVersion();
type Props = { type OwnProps = {|
logger: Logger, logger: Logger,
bugReporter: BugReporter, bugReporter: BugReporter,
|};
type Props = {|
...OwnProps,
leftSidebarVisible: boolean, leftSidebarVisible: boolean,
selectedDevice: ?BaseDevice, selectedDevice: ?BaseDevice,
error: ?string, error: ?string,
activeSheet: ActiveSheet, activeSheet: ActiveSheet,
}; |};
export class App extends React.Component<Props> { export class App extends React.Component<Props> {
componentDidMount() { componentDidMount() {
@@ -88,11 +92,8 @@ export class App extends React.Component<Props> {
); );
} }
} }
/* $FlowFixMe(>=0.86.0) This
* comment suppresses an error found when Flow v0.86 was export default connect<Props, OwnProps, _, _, _, _>(
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
({ ({
application: {leftSidebarVisible, activeSheet}, application: {leftSidebarVisible, activeSheet},
connections: {selectedDevice, error}, connections: {selectedDevice, error},

View File

@@ -98,24 +98,28 @@ export default class Notifications extends FlipperDevicePlugin<{}> {
} }
} }
type Props = {| type OwnProps = {|
...SearchableProps, ...SearchableProps,
onClear: () => void,
selectedID: ?string,
logger: Logger,
|};
type Props = {|
...OwnProps,
activeNotifications: Array<PluginNotification>, activeNotifications: Array<PluginNotification>,
invalidatedNotifications: Array<PluginNotification>, invalidatedNotifications: Array<PluginNotification>,
blacklistedPlugins: Array<string>, blacklistedPlugins: Array<string>,
blacklistedCategories: Array<string>, blacklistedCategories: Array<string>,
devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>, devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
clientPlugins: Map<string, Class<FlipperPlugin<>>>, clientPlugins: Map<string, Class<FlipperPlugin<>>>,
onClear: () => void,
updatePluginBlacklist: (blacklist: Array<string>) => mixed, updatePluginBlacklist: (blacklist: Array<string>) => mixed,
updateCategoryBlacklist: (blacklist: Array<string>) => mixed, updateCategoryBlacklist: (blacklist: Array<string>) => mixed,
selectPlugin: ({ selectPlugin: (payload: {|
selectedPlugin: ?string, selectedPlugin: ?string,
selectedApp: ?string, selectedApp: ?string,
deepLinkPayload?: ?string, deepLinkPayload: ?string,
}) => mixed, |}) => mixed,
selectedID: ?string,
logger: Logger,
|}; |};
type State = {| type State = {|
@@ -322,11 +326,7 @@ class NotificationsTable extends Component<Props, State> {
} }
} }
/* $FlowFixMe(>=0.86.0) This const ConnectedNotificationsTable = connect<Props, OwnProps, _, _, _, _>(
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
const ConnectedNotificationsTable = connect(
({ ({
notifications: { notifications: {
activeNotifications, activeNotifications,
@@ -343,6 +343,7 @@ const ConnectedNotificationsTable = connect(
devicePlugins, devicePlugins,
clientPlugins, clientPlugins,
}), }),
// $FlowFixMe
{ {
updatePluginBlacklist, updatePluginBlacklist,
updateCategoryBlacklist, updateCategoryBlacklist,
@@ -453,11 +454,11 @@ type ItemProps = {
onHideCategory?: () => mixed, onHideCategory?: () => mixed,
isSelected?: boolean, isSelected?: boolean,
inactive?: boolean, inactive?: boolean,
selectPlugin?: ({ selectPlugin?: (payload: {|
selectedPlugin: ?string, selectedPlugin: ?string,
selectedApp: ?string, selectedApp: ?string,
deepLinkPayload?: ?string, deepLinkPayload: ?string,
}) => mixed, |}) => mixed,
logger?: Logger, logger?: Logger,
plugin: ?Class<FlipperBasePlugin<>>, plugin: ?Class<FlipperBasePlugin<>>,
}; };

View File

@@ -38,8 +38,19 @@ const SidebarContainer = styled(FlexRow)({
overflow: 'scroll', overflow: 'scroll',
}); });
type Props = { /*
pluginState: pluginStates[pluginKey],
activePlugin,
target,
deepLinkPayload,
pluginKey,
*/
type OwnProps = {|
logger: LogManager, logger: LogManager,
|};
type Props = {|
...OwnProps,
pluginState: Object, pluginState: Object,
activePlugin: ?Class<FlipperPlugin<> | FlipperDevicePlugin<>>, activePlugin: ?Class<FlipperPlugin<> | FlipperDevicePlugin<>>,
target: Client | BaseDevice | null, target: Client | BaseDevice | null,
@@ -55,7 +66,7 @@ type Props = {
pluginKey: string, pluginKey: string,
state: Object, state: Object,
}) => void, }) => void,
}; |};
class PluginContainer extends PureComponent<Props> { class PluginContainer extends PureComponent<Props> {
plugin: ?FlipperPlugin<> | FlipperDevicePlugin<>; plugin: ?FlipperPlugin<> | FlipperDevicePlugin<>;
@@ -132,11 +143,7 @@ class PluginContainer extends PureComponent<Props> {
} }
} }
/* $FlowFixMe(>=0.86.0) This export default connect<Props, OwnProps, _, _, _, _>(
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
({ ({
application: {rightSidebarVisible, rightSidebarAvailable}, application: {rightSidebarVisible, rightSidebarAvailable},
connections: { connections: {
@@ -182,6 +189,7 @@ export default connect(
pluginKey, pluginKey,
}; };
}, },
// $FlowFixMe
{ {
setPluginState, setPluginState,
selectPlugin, selectPlugin,

View File

@@ -7,7 +7,6 @@
import { import {
FlexRow, FlexRow,
Text,
colors, colors,
LoadingIndicator, LoadingIndicator,
Glyph, Glyph,

View File

@@ -11,12 +11,17 @@ import Sidebar from '../ui/components/Sidebar';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {toggleRightSidebarAvailable} from '../reducers/application.js'; import {toggleRightSidebarAvailable} from '../reducers/application.js';
type Props = { type OwnProps = {|
children: any, children: any,
width?: number,
minWidth?: number,
|};
type Props = {
...OwnProps,
rightSidebarVisible: boolean, rightSidebarVisible: boolean,
rightSidebarAvailable: boolean, rightSidebarAvailable: boolean,
toggleRightSidebarAvailable: (visible?: boolean) => any, toggleRightSidebarAvailable: (visible?: boolean) => any,
width?: number,
}; };
class DetailSidebar extends React.Component<Props> { class DetailSidebar extends React.Component<Props> {
@@ -42,7 +47,10 @@ class DetailSidebar extends React.Component<Props> {
this.props.rightSidebarVisible && this.props.rightSidebarVisible &&
domNode && domNode &&
ReactDOM.createPortal( ReactDOM.createPortal(
<Sidebar width={this.props.width || 300} position="right"> <Sidebar
minWidth={this.props.minWidth}
width={this.props.width || 300}
position="right">
{this.props.children} {this.props.children}
</Sidebar>, </Sidebar>,
domNode, domNode,
@@ -51,11 +59,7 @@ class DetailSidebar extends React.Component<Props> {
} }
} }
/* $FlowFixMe(>=0.86.0) This export default connect<Props, OwnProps, _, _, _, _>(
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
({application: {rightSidebarVisible, rightSidebarAvailable}}) => ({ ({application: {rightSidebarVisible, rightSidebarAvailable}}) => ({
rightSidebarVisible, rightSidebarVisible,
rightSidebarAvailable, rightSidebarAvailable,

View File

@@ -28,22 +28,22 @@ const DropdownButton = styled(Button)({
fontSize: 11, fontSize: 11,
}); });
// Remove this if the flow fixme at the bottom is addressed (or has already been removed).
/* eslint-disable prettier/prettier */
class DevicesButton extends Component<Props> { class DevicesButton extends Component<Props> {
launchEmulator = (name: string) => { launchEmulator = (name: string) => {
// On Linux, you must run the emulator from the directory it's in because // On Linux, you must run the emulator from the directory it's in because
// reasons ... // reasons ...
whichPromise('emulator').then(emulatorPath => { whichPromise('emulator')
const child = spawn(emulatorPath, [`@${name}`], { .then(emulatorPath => {
detached: true, const child = spawn(emulatorPath, [`@${name}`], {
cwd: dirname(emulatorPath), detached: true,
}); cwd: dirname(emulatorPath),
child.stderr.on('data', data => { });
console.error(`Android emulator error: ${data}`); child.stderr.on('data', data => {
}); console.error(`Android emulator error: ${data}`);
child.on('error', console.error); });
}).catch(console.error); child.on('error', console.error);
})
.catch(console.error);
this.props.preferDevice(name); this.props.preferDevice(name);
}; };
@@ -109,10 +109,8 @@ class DevicesButton extends Component<Props> {
</DropdownButton> </DropdownButton>
); );
} }
} /* $FlowFixMe(>=0.86.0) This comment suppresses an error found when Flow v0.86 }
* was deployed. To see the error, delete this comment and run Flow. export default connect<Props, {||}, _, _, _, _>(
*/
export default connect(
({connections: {devices, androidEmulators, selectedDevice}}) => ({ ({connections: {devices, androidEmulators, selectedDevice}}) => ({
devices, devices,
androidEmulators, androidEmulators,

View File

@@ -10,6 +10,7 @@ import type BaseDevice from '../devices/BaseDevice.js';
import type Client from '../Client.js'; import type Client from '../Client.js';
import type {UninitializedClient} from '../UninitializedClient.js'; import type {UninitializedClient} from '../UninitializedClient.js';
import type {PluginNotification} from '../reducers/notifications'; import type {PluginNotification} from '../reducers/notifications';
import type {ActiveSheet} from '../reducers/application';
import { import {
PureComponent, PureComponent,
@@ -190,11 +191,11 @@ type MainSidebarProps = {|
selectedApp: ?string, selectedApp: ?string,
selectedDevice: ?BaseDevice, selectedDevice: ?BaseDevice,
windowIsFocused: boolean, windowIsFocused: boolean,
selectPlugin: (payload: { selectPlugin: (payload: {|
selectedPlugin: ?string, selectedPlugin: ?string,
selectedApp: ?string, selectedApp: ?string,
deepLinkPayload: ?string, deepLinkPayload: ?string,
}) => void, |}) => void,
clients: Array<Client>, clients: Array<Client>,
uninitializedClients: Array<{ uninitializedClients: Array<{
client: UninitializedClient, client: UninitializedClient,
@@ -204,7 +205,7 @@ type MainSidebarProps = {|
numNotifications: number, numNotifications: number,
devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>, devicePlugins: Map<string, Class<FlipperDevicePlugin<>>>,
clientPlugins: Map<string, Class<FlipperPlugin<>>>, clientPlugins: Map<string, Class<FlipperPlugin<>>>,
setActiveSheet: (activeSheet: ?string) => any, setActiveSheet: (activeSheet: ActiveSheet) => void,
|}; |};
class MainSidebar extends PureComponent<MainSidebarProps> { class MainSidebar extends PureComponent<MainSidebarProps> {
@@ -348,11 +349,7 @@ class MainSidebar extends PureComponent<MainSidebarProps> {
} }
} }
/* $FlowFixMe(>=0.86.0) This export default connect<MainSidebarProps, {||}, _, _, _, _>(
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
({ ({
application: {windowIsFocused}, application: {windowIsFocused},
connections: { connections: {

View File

@@ -8,6 +8,7 @@
import type {FlipperDevicePlugin, FlipperPlugin} from '../plugin'; import type {FlipperDevicePlugin, FlipperPlugin} from '../plugin';
import type {PluginDefinition} from '../dispatcher/plugins'; import type {PluginDefinition} from '../dispatcher/plugins';
import type Client from '../Client'; import type Client from '../Client';
import type {TableBodyRow} from '../ui/components/table/types';
import {Component, Fragment} from 'react'; import {Component, Fragment} from 'react';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
@@ -20,7 +21,6 @@ import {
colors, colors,
Link, Link,
} from 'flipper'; } from 'flipper';
import {remote} from 'electron';
const Container = styled(FlexColumn)({ const Container = styled(FlexColumn)({
padding: 10, padding: 10,
@@ -118,7 +118,7 @@ class PluginDebugger extends Component<Props> {
GKname: ?string, GKname: ?string,
GKpassing: ?boolean, GKpassing: ?boolean,
pluginPath: ?string, pluginPath: ?string,
) { ): TableBodyRow {
return { return {
key: name.toLowerCase(), key: name.toLowerCase(),
columns: { columns: {
@@ -165,8 +165,8 @@ class PluginDebugger extends Component<Props> {
.join(', '); .join(', ');
} }
getRows() { getRows(): Array<TableBodyRow> {
let rows = []; let rows: Array<TableBodyRow> = [];
// bundled plugins are loaded from the defaultPlugins directory within // bundled plugins are loaded from the defaultPlugins directory within
// Flipper's package. // Flipper's package.

View File

@@ -302,10 +302,8 @@ class ScreenCaptureButtons extends Component<Props, State> {
} }
} }
/* $FlowFixMe(>=0.86.0) This export default connect<Props, {||}, _, _, _, _>(
* comment suppresses an error found when Flow v0.86 was ({connections: {selectedDevice}}) => ({
* deployed. To see the error, delete this comment and selectedDevice,
* run Flow. */ }),
export default connect(({connections: {selectedDevice}}) => ({ )(ScreenCaptureButtons);
selectedDevice,
}))(ScreenCaptureButtons);

View File

@@ -35,10 +35,14 @@ const DialogContainer = styled('div')(({state}) => ({
boxShadow: '0 5px 13px rgba(0, 0, 0, 0.2)', boxShadow: '0 5px 13px rgba(0, 0, 0, 0.2)',
})); }));
type OwnProps = {|
children: (onHide: () => mixed) => any,
|};
type Props = {| type Props = {|
...OwnProps,
activeSheet: ActiveSheet, activeSheet: ActiveSheet,
onHideSheet: () => void, onHideSheet: () => void,
children: (onHide: () => mixed) => any,
|}; |};
type State = {| type State = {|
@@ -105,11 +109,8 @@ class Sheet extends Component<Props, State> {
); );
} }
} }
/* $FlowFixMe(>=0.86.0) This
* comment suppresses an error found when Flow v0.86 was export default connect<Props, OwnProps, _, _, _, _>(
* deployed. To see the error, delete this comment and
* run Flow. */
export default connect(
({application: {activeSheet}}) => ({ ({application: {activeSheet}}) => ({
activeSheet, activeSheet,
}), }),

View File

@@ -51,7 +51,12 @@ const AppTitleBar = styled(FlexRow)(({focused}) => ({
zIndex: 4, zIndex: 4,
})); }));
type OwnProps = {|
version: string,
|};
type Props = {| type Props = {|
...OwnProps,
windowIsFocused: boolean, windowIsFocused: boolean,
leftSidebarVisible: boolean, leftSidebarVisible: boolean,
rightSidebarVisible: boolean, rightSidebarVisible: boolean,
@@ -59,7 +64,6 @@ type Props = {|
toggleLeftSidebarVisible: (visible?: boolean) => void, toggleLeftSidebarVisible: (visible?: boolean) => void,
toggleRightSidebarVisible: (visible?: boolean) => void, toggleRightSidebarVisible: (visible?: boolean) => void,
setActiveSheet: (sheet: ActiveSheet) => void, setActiveSheet: (sheet: ActiveSheet) => void,
version: string,
|}; |};
const VersionText = styled(Text)({ const VersionText = styled(Text)({
@@ -114,23 +118,19 @@ class TitleBar extends Component<Props> {
} }
} }
/* $FlowFixMe(>=0.86.0) This comment suppresses an error found when Flow v0.86 export default connect<Props, OwnProps, _, _, _, _>(
* was deployed. To see the error, delete this comment and run Flow. */
export default connect(
({ ({
application: { application: {
windowIsFocused, windowIsFocused,
leftSidebarVisible, leftSidebarVisible,
rightSidebarVisible, rightSidebarVisible,
rightSidebarAvailable, rightSidebarAvailable,
pluginManagerVisible,
}, },
}) => ({ }) => ({
windowIsFocused, windowIsFocused,
leftSidebarVisible, leftSidebarVisible,
rightSidebarVisible, rightSidebarVisible,
rightSidebarAvailable, rightSidebarAvailable,
pluginManagerVisible,
}), }),
{ {
setActiveSheet, setActiveSheet,

View File

@@ -58,7 +58,6 @@ type State = {|
* the client in an unknown state. * the client in an unknown state.
*/ */
export function createTablePlugin<T: RowData>(props: Props<T>) { export function createTablePlugin<T: RowData>(props: Props<T>) {
// $FlowFixMe persistedStateReducer is fine to accept payload of type T, because it is of type RowData
return class extends FlipperPlugin<State, *, PersistedState<T>> { return class extends FlipperPlugin<State, *, PersistedState<T>> {
static keyboardActions = ['clear', 'createPaste']; static keyboardActions = ['clear', 'createPaste'];

View File

@@ -6,7 +6,6 @@
*/ */
import type {DeviceType, DeviceShell} from './BaseDevice.js'; import type {DeviceType, DeviceShell} from './BaseDevice.js';
import type {Store} from '../reducers/index';
import {Priority} from 'adbkit-logcat-fb'; import {Priority} from 'adbkit-logcat-fb';
import child_process from 'child_process'; import child_process from 'child_process';
@@ -69,7 +68,7 @@ export default class AndroidDevice extends BaseDevice {
return ['date', 'pid', 'tid', 'tag', 'message', 'type', 'time']; return ['date', 'pid', 'tid', 'tag', 'message', 'type', 'time'];
} }
reverse(ports: [number]): Promise<void> { reverse(ports: [number, number]): Promise<void> {
return Promise.all( return Promise.all(
ports.map(port => ports.map(port =>
this.adb.reverse(this.serial, `tcp:${port}`, `tcp:${port}`), this.adb.reverse(this.serial, `tcp:${port}`, `tcp:${port}`),

View File

@@ -7,6 +7,7 @@
export type LogTypes = 'error' | 'warn' | 'info' | 'debug'; export type LogTypes = 'error' | 'warn' | 'info' | 'debug';
export type TrackType = 'duration' | 'usage' | 'performance' | 'success-rate'; export type TrackType = 'duration' | 'usage' | 'performance' | 'success-rate';
import type {Store} from '../reducers/index';
import ScribeLogger from './ScribeLogger'; import ScribeLogger from './ScribeLogger';
var instance: ?LogManager = null; var instance: ?LogManager = null;

View File

@@ -5,6 +5,8 @@
* @format * @format
*/ */
import type {TableBodyRow} from 'flipper';
import { import {
PureComponent, PureComponent,
FlexColumn, FlexColumn,
@@ -129,11 +131,7 @@ export default class LogWatcher extends PureComponent<Props, State> {
this.props.onChange(newCounters); this.props.onChange(newCounters);
}; };
buildRows = () => { buildRows = (): Array<TableBodyRow> => {
/* $FlowFixMe(>=0.86.0) This
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
return this.props.counters.map(({label, count, notify}, i) => ({ return this.props.counters.map(({label, count, notify}, i) => ({
columns: { columns: {
expression: { expression: {

View File

@@ -104,7 +104,7 @@ export default class extends FlipperPlugin<SharedPreferencesState> {
const change = event.change; const change = event.change;
const entry = state.sharedPreferences[change.preferences]; const entry = state.sharedPreferences[change.preferences];
if (entry == null) { if (entry == null) {
return; return state;
} }
if (change.deleted) { if (change.deleted) {
delete entry.preferences[change.name]; delete entry.preferences[change.name];

View File

@@ -37,7 +37,14 @@ import type {
} from './plugins.js'; } from './plugins.js';
import type {Store as ReduxStore} from 'redux'; import type {Store as ReduxStore} from 'redux';
// $FlowFixMe introduced when removing $Subtype/$Supertype type Actions =
| ApplicationAction
| DevicesAction
| PluginStatesAction
| NotificationsAction
| PluginsAction
| {|type: 'INIT'|};
export type Store = ReduxStore< export type Store = ReduxStore<
{| {|
application: ApplicationState, application: ApplicationState,
@@ -46,19 +53,10 @@ export type Store = ReduxStore<
notifications: NotificationsState, notifications: NotificationsState,
plugins: PluginsState, plugins: PluginsState,
|}, |},
| ApplicationAction Actions,
| DevicesAction
| PluginStatesAction
| NotificationsAction
| PluginsAction
| {|type: 'INIT'|},
>; >;
/* $FlowFixMe(>=0.86.0) This export default combineReducers<_, Actions>({
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
export default combineReducers({
application, application,
connections: persistReducer( connections: persistReducer(
{ {

View File

@@ -81,7 +81,7 @@ type Props = {|
client: PluginClient, client: PluginClient,
realClient: Client, realClient: Client,
logger: Logger, logger: Logger,
extensions?: Array<any>, extensions?: Array<Function>,
|}; |};
type State = {| type State = {|
@@ -118,12 +118,8 @@ export class InspectorSidebar extends Component<Props, State> {
return null; return null;
} }
const sections = const sections: Array<any> =
(extensions && (extensions &&
/* $FlowFixMe(>=0.86.0) This
* comment suppresses an error found when Flow v0.86 was
* deployed. To see the error, delete this comment and
* run Flow. */
extensions.map(ext => extensions.map(ext =>
ext( ext(
this.props.client, this.props.client,

View File

@@ -156,9 +156,7 @@ class ManagedTable extends React.Component<
shouldScrollToBottom: Boolean(this.props.stickyBottom), shouldScrollToBottom: Boolean(this.props.stickyBottom),
}; };
tableRef: { tableRef = React.createRef<List>();
current: null | List,
} = React.createRef();
scrollRef: { scrollRef: {
current: null | HTMLDivElement, current: null | HTMLDivElement,

View File

@@ -8,8 +8,6 @@
import LogManager from '../fb-stubs/Logger'; import LogManager from '../fb-stubs/Logger';
import {RecurringError} from './errors'; import {RecurringError} from './errors';
import {promisify} from 'util'; import {promisify} from 'util';
import child_process from 'child_process';
const exec = promisify(child_process.exec);
const fs = require('fs'); const fs = require('fs');
const adb = require('adbkit-fb'); const adb = require('adbkit-fb');
import { import {

View File

@@ -14,10 +14,10 @@ import {getInstance} from '../fb-stubs/Logger';
Use this variant to report failures in core platform (Flipper) code. Use this variant to report failures in core platform (Flipper) code.
*/ */
export function reportPlatformFailures( export function reportPlatformFailures<T>(
promise: Promise<*>, promise: Promise<T>,
name: string, name: string,
): Promise<*> { ): Promise<T> {
return promise.then( return promise.then(
fulfilledValue => { fulfilledValue => {
getInstance().track('success-rate', name, 1); getInstance().track('success-rate', name, 1);
@@ -37,11 +37,11 @@ export function reportPlatformFailures(
Use this variant to report failures in plugin code. Use this variant to report failures in plugin code.
*/ */
export function reportPluginFailures( export function reportPluginFailures<T>(
promise: Promise<*>, promise: Promise<T>,
name: string, name: string,
plugin: string, plugin: string,
): Promise<*> { ): Promise<T> {
return promise.then( return promise.then(
fulfilledValue => { fulfilledValue => {
getInstance().track('success-rate', name, 1, plugin); getInstance().track('success-rate', name, 1, plugin);

View File

@@ -6,11 +6,11 @@
"dependencies": { "dependencies": {
"@babel/core": "^7.1.0", "@babel/core": "^7.1.0",
"@babel/generator": "^7.1.0", "@babel/generator": "^7.1.0",
"@babel/parser": "^7.1.0", "@babel/parser": "^7.3.1",
"@babel/plugin-proposal-class-properties": "^7.1.0", "@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0", "@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.2.3",
"@babel/plugin-transform-modules-commonjs": "^7.1.0", "@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"metro": "^0.49.0", "metro": "^0.49.0",

View File

@@ -20,7 +20,7 @@ function transform({filename, options, src}) {
filename, filename,
plugins: [ plugins: [
'jsx', 'jsx',
'flow', ['flow', {all: true}],
'classProperties', 'classProperties',
'objectRestSpread', 'objectRestSpread',
'optionalChaining', 'optionalChaining',

View File

@@ -216,6 +216,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e"
integrity sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg== integrity sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==
"@babel/parser@^7.3.1":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.1.tgz#8f4ffd45f779e6132780835ffa7a215fa0b2d181"
integrity sha512-ATz6yX/L8LEnC3dtLQnIx4ydcPxhLcoy9Vl6re00zb2w5lG6itY6Vhnr1KFRPq/FHNsgl/gh2mjNN20f9iJTTA==
"@babel/plugin-check-constants@^7.0.0-beta.38": "@babel/plugin-check-constants@^7.0.0-beta.38":
version "7.0.0-beta.38" version "7.0.0-beta.38"
resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf" resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf"
@@ -308,6 +313,13 @@
dependencies: dependencies:
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-flow@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c"
integrity sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx@^7.0.0": "@babel/plugin-syntax-jsx@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd"
@@ -416,6 +428,14 @@
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-flow" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0"
"@babel/plugin-transform-flow-strip-types@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.2.3.tgz#e3ac2a594948454e7431c7db33e1d02d51b5cd69"
integrity sha512-xnt7UIk9GYZRitqCnsVMjQK1O2eKZwFB3CvvHjf5SGx6K6vr/MScCKQDnf1DxRaj501e3pXjti+inbSXX2ZUoQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-flow" "^7.2.0"
"@babel/plugin-transform-for-of@^7.0.0": "@babel/plugin-transform-for-of@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39"

176
yarn.lock
View File

@@ -14,15 +14,6 @@
version "0.0.6" version "0.0.6"
resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30"
"@babel/code-frame@7.0.0-beta.36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4"
integrity sha512-sW77BFwJ48YvQp3Gzz5xtAUiXuYOL2aMJKDwiaY3OcvdqBFurtYfOpSa4QrNyDxmOGRFSYzUpabU2m9QrlWE7w==
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35": "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
@@ -30,21 +21,32 @@
dependencies: dependencies:
"@babel/highlight" "^7.0.0" "@babel/highlight" "^7.0.0"
"@babel/helper-function-name@7.0.0-beta.36": "@babel/generator@^7.2.2":
version "7.0.0-beta.36" version "7.3.0"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz#366e3bc35147721b69009f803907c4d53212e88d" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.0.tgz#f663838cd7b542366de3aa608a657b8ccb2a99eb"
integrity sha512-/SGPOyifPf20iTrMN+WdlY2MbKa7/o4j7B/4IAsdOusASp2icT+Wcdjf4tjJHaXNX8Pe9bpgVxLNxhRvcf8E5w== integrity sha512-dZTwMvTgWfhmibq4V9X+LMf6Bgl7zAodRn9PvcPdhlzFMbvUutx74dbEv7Atz3ToeEpevYEJtAwfxq/bDCzHWg==
dependencies: dependencies:
"@babel/helper-get-function-arity" "7.0.0-beta.36" "@babel/types" "^7.3.0"
"@babel/template" "7.0.0-beta.36" jsesc "^2.5.1"
"@babel/types" "7.0.0-beta.36" lodash "^4.17.10"
source-map "^0.5.0"
trim-right "^1.0.1"
"@babel/helper-get-function-arity@7.0.0-beta.36": "@babel/helper-function-name@^7.1.0":
version "7.0.0-beta.36" version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz#f5383bac9a96b274828b10d98900e84ee43e32b8" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53"
integrity sha512-vPPcx2vsSoDbcyWr9S3nd0FM3B4hEXnt0p1oKpwa08GwK0fSRxa98MyaRGf8suk8frdQlG1P3mDrz5p/Rr3pbA== integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==
dependencies: dependencies:
"@babel/types" "7.0.0-beta.36" "@babel/helper-get-function-arity" "^7.0.0"
"@babel/template" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/helper-get-function-arity@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3"
integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==
dependencies:
"@babel/types" "^7.0.0"
"@babel/helper-module-imports@7.0.0-beta.51": "@babel/helper-module-imports@7.0.0-beta.51":
version "7.0.0-beta.51" version "7.0.0-beta.51"
@@ -53,6 +55,13 @@
"@babel/types" "7.0.0-beta.51" "@babel/types" "7.0.0-beta.51"
lodash "^4.17.5" lodash "^4.17.5"
"@babel/helper-split-export-declaration@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813"
integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==
dependencies:
"@babel/types" "^7.0.0"
"@babel/highlight@^7.0.0": "@babel/highlight@^7.0.0":
version "7.0.0" version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
@@ -62,6 +71,11 @@
esutils "^2.0.2" esutils "^2.0.2"
js-tokens "^4.0.0" js-tokens "^4.0.0"
"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.1.tgz#8f4ffd45f779e6132780835ffa7a215fa0b2d181"
integrity sha512-ATz6yX/L8LEnC3dtLQnIx4ydcPxhLcoy9Vl6re00zb2w5lG6itY6Vhnr1KFRPq/FHNsgl/gh2mjNN20f9iJTTA==
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2":
version "7.2.0" version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f"
@@ -69,38 +83,29 @@
dependencies: dependencies:
regenerator-runtime "^0.12.0" regenerator-runtime "^0.12.0"
"@babel/template@7.0.0-beta.36": "@babel/template@^7.1.0":
version "7.0.0-beta.36" version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.36.tgz#02e903de5d68bd7899bce3c5b5447e59529abb00" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907"
integrity sha512-mUBi90WRyZ9iVvlWLEdeo8gn/tROyJdjKNC4W5xJTSZL+9MS89rTJSqiaJKXIkxk/YRDL/g/8snrG/O0xl33uA== integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==
dependencies: dependencies:
"@babel/code-frame" "7.0.0-beta.36" "@babel/code-frame" "^7.0.0"
"@babel/types" "7.0.0-beta.36" "@babel/parser" "^7.2.2"
babylon "7.0.0-beta.36" "@babel/types" "^7.2.2"
lodash "^4.2.0"
"@babel/traverse@7.0.0-beta.36": "@babel/traverse@^7.0.0":
version "7.0.0-beta.36" version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.36.tgz#1dc6f8750e89b6b979de5fe44aa993b1a2192261" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8"
integrity sha512-OTUb6iSKVR/98dGThRJ1BiyfwbuX10BVnkz89IpaerjTPRhDfMBfLsqmzxz5MiywUOW4M0Clta0o7rSxkfcuzw== integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==
dependencies: dependencies:
"@babel/code-frame" "7.0.0-beta.36" "@babel/code-frame" "^7.0.0"
"@babel/helper-function-name" "7.0.0-beta.36" "@babel/generator" "^7.2.2"
"@babel/types" "7.0.0-beta.36" "@babel/helper-function-name" "^7.1.0"
babylon "7.0.0-beta.36" "@babel/helper-split-export-declaration" "^7.0.0"
debug "^3.0.1" "@babel/parser" "^7.2.3"
"@babel/types" "^7.2.2"
debug "^4.1.0"
globals "^11.1.0" globals "^11.1.0"
invariant "^2.2.0" lodash "^4.17.10"
lodash "^4.2.0"
"@babel/types@7.0.0-beta.36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.36.tgz#64f2004353de42adb72f9ebb4665fc35b5499d23"
integrity sha512-PyAORDO9um9tfnrddXgmWN9e6Sq9qxraQIt5ynqBOSXKA5qvK1kUr+Q3nSzKFdzorsiK+oqcUnAFvEoKxv9D+Q==
dependencies:
esutils "^2.0.2"
lodash "^4.2.0"
to-fast-properties "^2.0.0"
"@babel/types@7.0.0-beta.51": "@babel/types@7.0.0-beta.51":
version "7.0.0-beta.51" version "7.0.0-beta.51"
@@ -110,6 +115,15 @@
lodash "^4.17.5" lodash "^4.17.5"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@babel/types@^7.0.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0":
version "7.3.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.0.tgz#61dc0b336a93badc02bf5f69c4cd8e1353f2ffc0"
integrity sha512-QkFPw68QqWU1/RVPyBe8SO7lXbPfjtqAxRYQKpFpaB8yMq7X2qAqfwK5LKoQufEkSmO5NQ70O6Kc3Afk03RwXw==
dependencies:
esutils "^2.0.2"
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@emotion/babel-utils@^0.6.4": "@emotion/babel-utils@^0.6.4":
version "0.6.9" version "0.6.9"
resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.9.tgz#bb074fadad65c443a575d3379488415fd194fc75" resolved "https://registry.yarnpkg.com/@emotion/babel-utils/-/babel-utils-0.6.9.tgz#bb074fadad65c443a575d3379488415fd194fc75"
@@ -583,16 +597,16 @@ babel-core@^6.0.0, babel-core@^6.26.0, babel-core@^6.26.3:
slash "^1.0.0" slash "^1.0.0"
source-map "^0.5.7" source-map "^0.5.7"
babel-eslint@8.2.1: babel-eslint@^10.0.1:
version "8.2.1" version "10.0.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.1.tgz#136888f3c109edc65376c23ebf494f36a3e03951" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed"
integrity sha512-RzdVOyWKQRUnLXhwLk+eKb4oyW+BykZSkpYwFhM4tnfzAG5OWfvG0w/uyzMp5XKEU0jN82+JefHr39bG2+KhRQ== integrity sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==
dependencies: dependencies:
"@babel/code-frame" "7.0.0-beta.36" "@babel/code-frame" "^7.0.0"
"@babel/traverse" "7.0.0-beta.36" "@babel/parser" "^7.0.0"
"@babel/types" "7.0.0-beta.36" "@babel/traverse" "^7.0.0"
babylon "7.0.0-beta.36" "@babel/types" "^7.0.0"
eslint-scope "~3.7.1" eslint-scope "3.7.1"
eslint-visitor-keys "^1.0.0" eslint-visitor-keys "^1.0.0"
babel-generator@^6.18.0, babel-generator@^6.26.0: babel-generator@^6.18.0, babel-generator@^6.26.0:
@@ -1264,11 +1278,6 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.
lodash "^4.17.4" lodash "^4.17.4"
to-fast-properties "^1.0.3" to-fast-properties "^1.0.3"
babylon@7.0.0-beta.36:
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.36.tgz#3a3683ba6a9a1e02b0aa507c8e63435e39305b9e"
integrity sha512-rw4YdadGwajAMMRl6a5swhQ0JCOOFyaYCfJ0AsmNBD8uBD/r4J8mux7wBaqavvFKqUKQYWOzA1Speams4YDzsQ==
babylon@^6.18.0: babylon@^6.18.0:
version "6.18.0" version "6.18.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
@@ -1922,14 +1931,7 @@ debug@^3.0.0, debug@^3.1.0, debug@~3.1.0:
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@^3.0.1: debug@^4.0.1, debug@^4.1.0:
version "3.2.5"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407"
integrity sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==
dependencies:
ms "^2.1.1"
debug@^4.0.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
@@ -2440,17 +2442,18 @@ eslint-rule-composer@^0.3.0:
resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==
eslint-scope@^4.0.0: eslint-scope@3.7.1:
version "4.0.0" version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA== integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=
dependencies: dependencies:
esrecurse "^4.1.0" esrecurse "^4.1.0"
estraverse "^4.1.1" estraverse "^4.1.1"
eslint-scope@~3.7.1: eslint-scope@^4.0.0:
version "3.7.1" version "4.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172"
integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==
dependencies: dependencies:
esrecurse "^4.1.0" esrecurse "^4.1.0"
estraverse "^4.1.1" estraverse "^4.1.1"
@@ -2881,10 +2884,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2" graceful-fs "^4.1.2"
write "^0.2.1" write "^0.2.1"
flow-bin@^0.86.0: flow-bin@^0.91.0:
version "0.86.0" version "0.91.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.86.0.tgz#153a28722b4dc13b7200c74b644dd4d9f4969a11" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.91.0.tgz#f5c89729f74b2ccbd47df6fbfadbdcc89cc1e478"
integrity sha512-ulRvFH3ewGIYwg+qPk/OJXoe3Nhqi0RyR0wqgK0b1NzUDEC6O99zU39MBTickXvlrr6iwRO6Wm4lVGeDmnzbew== integrity sha512-j+L+xNiUYnZZ27MjVI0y2c9474ZHOvdSQq0Tjwh56mEA7tfxYqp5Dcb6aZSwvs3tGMTjCrZow9aUlZf3OoRyDQ==
flow-parser@^0.*: flow-parser@^0.*:
version "0.81.0" version "0.81.0"
@@ -3394,7 +3397,7 @@ inquirer@^6.1.0:
strip-ansi "^5.0.0" strip-ansi "^5.0.0"
through "^2.3.6" through "^2.3.6"
invariant@^2.0.0, invariant@^2.2.0, invariant@^2.2.2, invariant@^2.2.4: invariant@^2.0.0, invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4" version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
dependencies: dependencies:
@@ -4198,6 +4201,11 @@ jsesc@^1.3.0:
version "1.3.0" version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
jsesc@~0.5.0: jsesc@~0.5.0:
version "0.5.0" version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
@@ -6261,7 +6269,7 @@ source-map-url@^0.4.0:
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7:
version "0.5.7" version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"