diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 9b0dc129195..62042e0cbaf 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -205,6 +205,15 @@ rules: - error - AssignmentExpression: {array: false, object: false} + # new Promise(r => setTimeout(r, 1000)); + # Certain other things could be nice to catch, but see + # https://github.com/zulip/zulip-mobile/pull/5393#discussion_r883237343 + no-promise-executor-return: off + + # More noisy than helpful; see + # https://github.com/zulip/zulip-mobile/pull/5393#discussion_r883233303 + class-methods-use-this: off + # Likely-wrong code no-unused-vars: [warn, {vars: local, args: none}] # no-param-reassign seems well-intentioned... but fires on common uses @@ -285,9 +294,10 @@ rules: react/prop-types: off # We handle this better with types. react/require-default-props: off # We handle this better with types. - # These two could be good to fix. + # These could be good to fix. react/prefer-stateless-function: off react/sort-comp: off + react/no-unstable-nested-components: off # @@ -334,6 +344,18 @@ rules: flowtype/use-flow-type: warn flowtype/valid-syntax: warn + # + # ================================================================ + # New rules we want, but that require code changes to enable + # + + default-param-last: off + react/function-component-definition: off + react/jsx-no-useless-fragment: off + react/no-arrow-function-lifecycle: off + import/no-import-module-exports: off + prefer-regex-literals: off + react/no-unused-class-component-methods: off overrides: @@ -343,6 +365,7 @@ overrides: - files: ['**/__tests__/**', 'jest/jestSetup.js'] rules: no-restricted-imports: off + no-import-assign: off # Jest mocking # # ================================================================ diff --git a/package.json b/package.json index 73d670d2eb2..00099ab4071 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,8 @@ "@babel/core": "^7.12.9", "@babel/eslint-parser": "^7.18.2", "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-syntax-flow": "^7.14.5", + "@babel/plugin-transform-react-jsx": "^7.14.9", "@babel/preset-env": "^7.11.0", "@babel/runtime": "^7.12.5", "@octokit/core": "^3.4.0", @@ -90,16 +92,16 @@ "@vusion/webfonts-generator": "^0.8.0", "core-js": "^3.1.4", "deep-freeze": "^0.0.1", - "eslint": "^7.28.0", - "eslint-config-airbnb": "^18.2.1", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-flowtype": "^5.2.0", + "eslint": "^8.15.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-jest": "^26.1.5", "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^3.2.0", + "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.24.0", - "eslint-plugin-react-hooks": "^4.2.0", + "eslint-plugin-react-hooks": "^4.5.0", "flow-bin": "^0.158.0", "flow-coverage-report": "^0.8.0", "flow-typed": "^3.3.1", @@ -112,9 +114,9 @@ "jest-extended": "^0.11.5", "jetifier": "^2.0.0", "metro-react-native-babel-preset": "^0.66.2", - "prettier": "^1.18.2", - "prettier-eslint": "^12.0.0", - "prettier-eslint-cli": "^5.0.0", + "prettier": "^2.6.2", + "prettier-eslint": "^15.0.0", + "prettier-eslint-cli": "^6.0.1", "react-native-cli": "^2.0.1", "react-test-renderer": "17.0.2", "redux-mock-store": "^1.5.1", @@ -126,6 +128,7 @@ }, "resolutions": { "jest-expo/react-test-renderer": "17.0.2", + "prettier-eslint-cli/prettier-eslint": "^15.0.0", "react-native/use-subscription": ">=1.0.0 <1.6.0", "sqlite3/**/node-gyp": "^8" } diff --git a/src/__tests__/lib/exampleData.js b/src/__tests__/lib/exampleData.js index 077d865c6bf..066b9d9ffbb 100644 --- a/src/__tests__/lib/exampleData.js +++ b/src/__tests__/lib/exampleData.js @@ -142,9 +142,10 @@ const makeAvatarUrl = (tag: string) => // here with a full-blown URL object in the first place to prevent that. new UploadedAvatarURL(new URL(`https://zulip.example.org/yo/avatar-${tag}.png`)); -const randUserId: () => UserId = (mk => () => makeUserId(mk()))( - makeUniqueRandInt('user IDs', 10000), -); +const randUserId: () => UserId = ( + mk => () => + makeUserId(mk()) +)(makeUniqueRandInt('user IDs', 10000)); const userOrBotProperties = (args: UserOrBotPropertiesArgs) => { const user_id = args.user_id != null ? makeUserId(args.user_id) : randUserId(); const randName = randString(); @@ -152,9 +153,7 @@ const userOrBotProperties = (args: UserOrBotPropertiesArgs) => { avatar_url: args.avatar_url ?? makeAvatarUrl(user_id.toString()), avatar_version: 0, - date_joined: `2014-04-${randInt(30) - .toString() - .padStart(2, '0')}`, + date_joined: `2014-04-${randInt(30).toString().padStart(2, '0')}`, email: args.email ?? `${randName}@example.org`, full_name: args.full_name ?? `${randName} User`, diff --git a/src/__tests__/permissionSelectors-test.js b/src/__tests__/permissionSelectors-test.js index 2195de2fb41..b6c81812881 100644 --- a/src/__tests__/permissionSelectors-test.js +++ b/src/__tests__/permissionSelectors-test.js @@ -51,12 +51,8 @@ describe('roleIsAtLeast', () => { // TODO(?): Could deduplicate with the other getCanCreate*Streams; see // https://github.com/zulip/zulip-mobile/pull/5394#discussion_r883215288 describe('getCanCreatePublicStreams', () => { - const { - MemberOrAbove, - AdminOrAbove, - FullMemberOrAbove, - ModeratorOrAbove, - } = CreatePublicOrPrivateStreamPolicy; + const { MemberOrAbove, AdminOrAbove, FullMemberOrAbove, ModeratorOrAbove } = + CreatePublicOrPrivateStreamPolicy; const { Owner, Admin, Moderator, Member, Guest } = Role; test.each` @@ -135,12 +131,8 @@ describe('getCanCreatePublicStreams', () => { // TODO(?): Could deduplicate with the other getCanCreate*Streams; see // https://github.com/zulip/zulip-mobile/pull/5394#discussion_r883215288 describe('getCanCreatePrivateStreams', () => { - const { - MemberOrAbove, - AdminOrAbove, - FullMemberOrAbove, - ModeratorOrAbove, - } = CreatePublicOrPrivateStreamPolicy; + const { MemberOrAbove, AdminOrAbove, FullMemberOrAbove, ModeratorOrAbove } = + CreatePublicOrPrivateStreamPolicy; const { Owner, Admin, Moderator, Member, Guest } = Role; test.each` diff --git a/src/account/accountActions.js b/src/account/accountActions.js index 3b9ee7ae253..5bcc5afc696 100644 --- a/src/account/accountActions.js +++ b/src/account/accountActions.js @@ -24,10 +24,12 @@ const accountSwitchPlain = (index: number): AllAccountsAction => ({ index, }); -export const accountSwitch = (index: number): GlobalThunkAction => (dispatch, getState) => { - NavigationService.dispatch(resetToMainTabs()); - dispatch(accountSwitchPlain(index)); -}; +export const accountSwitch = + (index: number): GlobalThunkAction => + (dispatch, getState) => { + NavigationService.dispatch(resetToMainTabs()); + dispatch(accountSwitchPlain(index)); + }; export const removeAccount = (index: number): AllAccountsAction => ({ type: ACCOUNT_REMOVE, @@ -41,13 +43,12 @@ const loginSuccessPlain = (realm: URL, email: string, apiKey: string): AllAccoun apiKey, }); -export const loginSuccess = (realm: URL, email: string, apiKey: string): ThunkAction => ( - dispatch, - getState, -) => { - NavigationService.dispatch(resetToMainTabs()); - dispatch(loginSuccessPlain(realm, email, apiKey)); -}; +export const loginSuccess = + (realm: URL, email: string, apiKey: string): ThunkAction => + (dispatch, getState) => { + NavigationService.dispatch(resetToMainTabs()); + dispatch(loginSuccessPlain(realm, email, apiKey)); + }; const logoutPlain = (): AllAccountsAction => ({ type: LOGOUT, diff --git a/src/account/accountsSelectors.js b/src/account/accountsSelectors.js index ee054ec587b..3b52c2dd135 100644 --- a/src/account/accountsSelectors.js +++ b/src/account/accountsSelectors.js @@ -25,10 +25,10 @@ export type AccountStatus = {| ...Identity, isLoggedIn: boolean |}; * This should be used in preference to `getAccounts` where we don't * actually need the API keys, but just need to know whether we have them. */ -export const getAccountStatuses: GlobalSelector< - $ReadOnlyArray, -> = createSelector(getAccounts, accounts => - accounts.map(({ realm, email, apiKey }) => ({ realm, email, isLoggedIn: apiKey !== '' })), +export const getAccountStatuses: GlobalSelector<$ReadOnlyArray> = createSelector( + getAccounts, + accounts => + accounts.map(({ realm, email, apiKey }) => ({ realm, email, isLoggedIn: apiKey !== '' })), ); /** The list of known accounts, reduced to `Identity`. */ diff --git a/src/api/modelTypes.js b/src/api/modelTypes.js index 1182fa51544..64c3ef91004 100644 --- a/src/api/modelTypes.js +++ b/src/api/modelTypes.js @@ -58,9 +58,8 @@ typesEquivalent> * See CustomProfileFieldType for an enum to refer to these by meaningful * names. */ -export const CustomProfileFieldTypeValues: $ReadOnlyArray = objectValues( - CustomProfileFieldType, -); +export const CustomProfileFieldTypeValues: $ReadOnlyArray = + objectValues(CustomProfileFieldType); /** * A custom profile field available to users in this org. diff --git a/src/api/permissionsTypes.js b/src/api/permissionsTypes.js index b106eb66be3..e64235b7320 100644 --- a/src/api/permissionsTypes.js +++ b/src/api/permissionsTypes.js @@ -82,9 +82,8 @@ typesEquivalent< * See CreatePublicOrPrivateStreamPolicy for an enum to refer to these by * meaningful names. */ -export const CreatePublicOrPrivateStreamPolicyValues: $ReadOnlyArray = objectValues( - CreatePublicOrPrivateStreamPolicy, -); +export const CreatePublicOrPrivateStreamPolicyValues: $ReadOnlyArray = + objectValues(CreatePublicOrPrivateStreamPolicy); /** * The policy for which users can create web public streams in this @@ -119,6 +118,5 @@ typesEquivalent = objectValues( - CreateWebPublicStreamPolicy, -); +export const CreateWebPublicStreamPolicyValues: $ReadOnlyArray = + objectValues(CreateWebPublicStreamPolicy); diff --git a/src/autocomplete/StreamAutocomplete.js b/src/autocomplete/StreamAutocomplete.js index f1ce1b7bf43..5d47dbf2561 100644 --- a/src/autocomplete/StreamAutocomplete.js +++ b/src/autocomplete/StreamAutocomplete.js @@ -18,9 +18,10 @@ export default function StreamAutocomplete(props: Props): Node { const { filter, onAutocomplete } = props; const subscriptions = useSelector(getSubscriptions); - const handleStreamItemAutocomplete = useCallback(stream => onAutocomplete(`**${stream.name}**`), [ - onAutocomplete, - ]); + const handleStreamItemAutocomplete = useCallback( + stream => onAutocomplete(`**${stream.name}**`), + [onAutocomplete], + ); const isPrefixMatch = x => x.name.toLowerCase().startsWith(filter.toLowerCase()); diff --git a/src/chat/__tests__/flagsReducer-test.js b/src/chat/__tests__/flagsReducer-test.js index cd790ada85c..c6697973831 100644 --- a/src/chat/__tests__/flagsReducer-test.js +++ b/src/chat/__tests__/flagsReducer-test.js @@ -61,7 +61,7 @@ describe('flagsReducer', () => { const action = deepFreeze({ type: MESSAGE_FETCH_COMPLETE, // prettier-ignore - messages: [{ id: 1, flags: ['read'] }, { id: 2, flags: [] }] + messages: [{ id: 1, flags: ['read'] }, { id: 2, flags: [] }], }); const expectedState = { diff --git a/src/common/Icons.js b/src/common/Icons.js index 981d10dd1a6..5d92eef75d9 100644 --- a/src/common/Icons.js +++ b/src/common/Icons.js @@ -54,13 +54,15 @@ export const Icon: ComponentType> = fixIconType( /** A (type for a) component-type like `Icon` but with `name` already specified. */ export type SpecificIconType = ComponentType<$Diff, {| name: mixed |}>>; -const makeIcon = ( - iconSet: ComponentType>, - name: Glyphs, -): SpecificIconType => props => { - const FixedIcon = fixIconType(iconSet); - return ; -}; +const makeIcon = + ( + iconSet: ComponentType>, + name: Glyphs, + ): SpecificIconType => + props => { + const FixedIcon = fixIconType(iconSet); + return ; + }; export const IconInbox: SpecificIconType = makeIcon(Feather, 'inbox'); export const IconMention: SpecificIconType = makeIcon(Feather, 'at-sign'); diff --git a/src/common/ServerCompatBanner.js b/src/common/ServerCompatBanner.js index fb0f941ab1e..2e86222826a 100644 --- a/src/common/ServerCompatBanner.js +++ b/src/common/ServerCompatBanner.js @@ -70,13 +70,11 @@ export default function ServerCompatBanner(props: Props): Node { visible = true; text = isAtLeastAdmin ? { - text: - '{realm} is running Zulip Server {serverVersion}, which is unsupported. Please upgrade your server as soon as possible.', + text: '{realm} is running Zulip Server {serverVersion}, which is unsupported. Please upgrade your server as soon as possible.', values: { realm: realm.toString(), serverVersion: zulipVersion.raw() }, } : { - text: - '{realm} is running Zulip Server {serverVersion}, which is unsupported. Please contact your administrator about upgrading.', + text: '{realm} is running Zulip Server {serverVersion}, which is unsupported. Please contact your administrator about upgrading.', values: { realm: realm.toString(), serverVersion: zulipVersion.raw() }, }; } diff --git a/src/common/ServerPushSetupBanner.js b/src/common/ServerPushSetupBanner.js index ee005bfec8d..11bfe560682 100644 --- a/src/common/ServerPushSetupBanner.js +++ b/src/common/ServerPushSetupBanner.js @@ -58,8 +58,7 @@ export default function PushNotifsSetupBanner(props: Props): Node { visible = true; text = isAtLeastAdmin ? { - text: - 'The Zulip server at {realm} is not set up to deliver push notifications. Please contact your administrator.', + text: 'The Zulip server at {realm} is not set up to deliver push notifications. Please contact your administrator.', values: { realm: realm.toString() }, } : { diff --git a/src/common/ZulipStatusBar.js b/src/common/ZulipStatusBar.js index 681d7a20408..2b6ea3eafec 100644 --- a/src/common/ZulipStatusBar.js +++ b/src/common/ZulipStatusBar.js @@ -55,10 +55,7 @@ export default function ZulipStatusBar(props: Props): Node { animated showHideTransition="slide" hidden={hidden && Platform.OS !== 'android'} - backgroundColor={Color(statusBarColor) - .darken(0.1) - .hsl() - .string()} + backgroundColor={Color(statusBarColor).darken(0.1).hsl().string()} barStyle={getStatusBarStyle(statusBarColor)} /> ) diff --git a/src/common/ZulipSwitch.js b/src/common/ZulipSwitch.js index 57ce70cec7b..a28e4764f12 100644 --- a/src/common/ZulipSwitch.js +++ b/src/common/ZulipSwitch.js @@ -27,9 +27,7 @@ export default function ZulipSwitch(props: Props): Node { value={value} trackColor={{ false: 'hsl(0, 0%, 86%)', - true: Color(BRAND_COLOR) - .fade(0.3) - .toString(), + true: Color(BRAND_COLOR).fade(0.3).toString(), }} thumbColor={ /* eslint-disable operator-linebreak */ diff --git a/src/compose/MentionWarnings.js b/src/compose/MentionWarnings.js index 334f5739e5b..eea91dc8fa1 100644 --- a/src/compose/MentionWarnings.js +++ b/src/compose/MentionWarnings.js @@ -168,8 +168,7 @@ function MentionWarningsInner(props: Props, ref): Node { return mentionWarnings; } -const MentionWarnings: AbstractComponent = forwardRef( - MentionWarningsInner, -); +const MentionWarnings: AbstractComponent = + forwardRef(MentionWarningsInner); export default MentionWarnings; diff --git a/src/events/doEventActionSideEffects.js b/src/events/doEventActionSideEffects.js index 511a185e162..8411e437135 100644 --- a/src/events/doEventActionSideEffects.js +++ b/src/events/doEventActionSideEffects.js @@ -20,73 +20,74 @@ import { * * To be dispatched before the event actions are dispatched. */ -export default (action: EventAction): ThunkAction> => async (dispatch, getState) => { - switch (action.type) { - case EVENT_TYPING_START: - dispatch(ensureTypingStatusExpiryLoop()); - break; - - case EVENT_UPDATE_MESSAGE: { - // If the conversation we were looking at got moved, follow it. - // See #5251 for background. - - const { event, move } = action; - const { propagate_mode } = event; - if (!move || !(propagate_mode === 'change_all' || propagate_mode === 'change_later')) { - // This edit wasn't a move, or was targeted to a specific message. +export default (action: EventAction): ThunkAction> => + async (dispatch, getState) => { + switch (action.type) { + case EVENT_TYPING_START: + dispatch(ensureTypingStatusExpiryLoop()); break; - } - const navState = NavigationService.getState(); - for (const route of navState.routes) { - if (route.name !== 'chat') { - continue; + case EVENT_UPDATE_MESSAGE: { + // If the conversation we were looking at got moved, follow it. + // See #5251 for background. + + const { event, move } = action; + const { propagate_mode } = event; + if (!move || !(propagate_mode === 'change_all' || propagate_mode === 'change_later')) { + // This edit wasn't a move, or was targeted to a specific message. + break; } - // TODO(#5005): Only make these updates if this ChatScreen is for - // the account that this event applies to. (I.e., just if this is - // the active account.) + const navState = NavigationService.getState(); + for (const route of navState.routes) { + if (route.name !== 'chat') { + continue; + } - // $FlowFixMe[incompatible-use]: relying on ChatScreen having route params - // $FlowFixMe[prop-missing]: relying on ChatScreen route-params type - const narrow: Narrow = route.params.narrow; - if ( - isTopicNarrow(narrow) - && streamIdOfNarrow(narrow) === move.orig_stream_id - && topicOfNarrow(narrow) === move.orig_topic - ) { - // A ChatScreen showing the very conversation that was moved. + // TODO(#5005): Only make these updates if this ChatScreen is for + // the account that this event applies to. (I.e., just if this is + // the active account.) - // Change the ChatScreen's narrow to follow the move. - // - // Web does this only if the blue box is on one of the affected - // messages, in case only some of the conversation was moved. - // We don't have a blue box, but: - // TODO: Ideally if the moved messages are all offscreen we'd skip this. - NavigationService.dispatch({ - ...CommonActions.setParams({ - narrow: topicNarrow(move.new_stream_id, move.new_topic), - }), - // Spreading the `setParams` action and adding `source` like - // this is the documented way to specify a route (rather than - // apply to the focused route): - // https://reactnavigation.org/docs/5.x/navigation-actions#setparams - source: route.key, - }); + // $FlowFixMe[incompatible-use]: relying on ChatScreen having route params + // $FlowFixMe[prop-missing]: relying on ChatScreen route-params type + const narrow: Narrow = route.params.narrow; + if ( + isTopicNarrow(narrow) + && streamIdOfNarrow(narrow) === move.orig_stream_id + && topicOfNarrow(narrow) === move.orig_topic + ) { + // A ChatScreen showing the very conversation that was moved. - // TODO(#5251): If compose box is open and topic was resolved, warn. - } else if (isStreamNarrow(narrow) && streamIdOfNarrow(narrow) === move.orig_stream_id) { - // A ChatScreen showing the stream that contained the moved messages. - // - // TODO(#5251): Update topic input, if it matches. (If the stream - // changed too, unclear what to do. Possibly change the - // screen's narrow, as if narrowed to the moved topic?) + // Change the ChatScreen's narrow to follow the move. + // + // Web does this only if the blue box is on one of the affected + // messages, in case only some of the conversation was moved. + // We don't have a blue box, but: + // TODO: Ideally if the moved messages are all offscreen we'd skip this. + NavigationService.dispatch({ + ...CommonActions.setParams({ + narrow: topicNarrow(move.new_stream_id, move.new_topic), + }), + // Spreading the `setParams` action and adding `source` like + // this is the documented way to specify a route (rather than + // apply to the focused route): + // https://reactnavigation.org/docs/5.x/navigation-actions#setparams + source: route.key, + }); + + // TODO(#5251): If compose box is open and topic was resolved, warn. + } else if (isStreamNarrow(narrow) && streamIdOfNarrow(narrow) === move.orig_stream_id) { + // A ChatScreen showing the stream that contained the moved messages. + // + // TODO(#5251): Update topic input, if it matches. (If the stream + // changed too, unclear what to do. Possibly change the + // screen's narrow, as if narrowed to the moved topic?) + } } + + break; } - break; + default: } - - default: - } -}; + }; diff --git a/src/events/eventActions.js b/src/events/eventActions.js index 42822bb0e84..71a8f851a18 100644 --- a/src/events/eventActions.js +++ b/src/events/eventActions.js @@ -53,80 +53,79 @@ const handleEvent = (event: GeneralEvent, dispatch, getState) => { * This is part of our use of the Zulip events system; see `doInitialFetch` * for discussion. */ -export const startEventPolling = ( - queueId: string, - eventId: number, -): ThunkAction> => async (dispatch, getState) => { - let lastEventId = eventId; - - const backoffMachine = new BackoffMachine(); - - // eslint-disable-next-line no-constant-condition - while (true) { - const auth = tryGetAuth(getState()); - if (!auth) { - // This account is not logged in. - break; - } - // `auth` represents the active account. It might be different from - // the one in the previous loop iteration, if we did a backoff wait. - // TODO(#5009): Is that really quite OK? - - let events = undefined; - try { - const response = await api.pollForEvents(auth, queueId, lastEventId); - events = response.events; - - if (getState().session.eventQueueId === null) { - // We don't want to keep polling, e.g., because we've logged out; - // see `PerAccountSessionState.eventQueueId` for other cases. - break; - } else if (!isEqual(getIdentity(getState()), identityOfAuth(auth))) { - // During the last poll, the active account changed. Stop polling - // for the previous one. - // TODO(#5005): Remove this conditional as unreachable, once `auth` - // represents the current account (instead of secretly - // representing the global "active account" which can change.) - break; - } else if (queueId !== getState().session.eventQueueId) { - // While the most recent poll was happening, another queue was - // established for this account, and we've started polling on that - // one. Stop polling on this one. - // - // In theory this could happen if you logged out of this account and - // logged back in again. - // - // TODO(#5009): Instead of this conditional, abort the - // `api.pollForEvents` immediately when `eventQueueId` becomes - // `null`, then break at that time? +export const startEventPolling = + (queueId: string, eventId: number): ThunkAction> => + async (dispatch, getState) => { + let lastEventId = eventId; + + const backoffMachine = new BackoffMachine(); + + // eslint-disable-next-line no-constant-condition + while (true) { + const auth = tryGetAuth(getState()); + if (!auth) { + // This account is not logged in. break; } - } catch (errorIllTyped) { - const e: mixed = errorIllTyped; // https://github.com/facebook/flow/issues/2470 - // We had an error polling the server for events. - - if (e instanceof RequestError && e.httpStatus === 401) { - // 401 Unauthorized -> our `auth` is invalid. No use retrying. - dispatch(logout()); - break; + // `auth` represents the active account. It might be different from + // the one in the previous loop iteration, if we did a backoff wait. + // TODO(#5009): Is that really quite OK? + + let events = undefined; + try { + const response = await api.pollForEvents(auth, queueId, lastEventId); + events = response.events; + + if (getState().session.eventQueueId === null) { + // We don't want to keep polling, e.g., because we've logged out; + // see `PerAccountSessionState.eventQueueId` for other cases. + break; + } else if (!isEqual(getIdentity(getState()), identityOfAuth(auth))) { + // During the last poll, the active account changed. Stop polling + // for the previous one. + // TODO(#5005): Remove this conditional as unreachable, once `auth` + // represents the current account (instead of secretly + // representing the global "active account" which can change.) + break; + } else if (queueId !== getState().session.eventQueueId) { + // While the most recent poll was happening, another queue was + // established for this account, and we've started polling on that + // one. Stop polling on this one. + // + // In theory this could happen if you logged out of this account and + // logged back in again. + // + // TODO(#5009): Instead of this conditional, abort the + // `api.pollForEvents` immediately when `eventQueueId` becomes + // `null`, then break at that time? + break; + } + } catch (errorIllTyped) { + const e: mixed = errorIllTyped; // https://github.com/facebook/flow/issues/2470 + // We had an error polling the server for events. + + if (e instanceof RequestError && e.httpStatus === 401) { + // 401 Unauthorized -> our `auth` is invalid. No use retrying. + dispatch(logout()); + break; + } + + // protection from inadvertent DDOS + await backoffMachine.wait(); + + if (e instanceof ApiError && e.code === 'BAD_EVENT_QUEUE_ID') { + // The event queue is too old or has been garbage collected. + dispatch(deadQueue()); + break; + } + + continue; } - // protection from inadvertent DDOS - await backoffMachine.wait(); - - if (e instanceof ApiError && e.code === 'BAD_EVENT_QUEUE_ID') { - // The event queue is too old or has been garbage collected. - dispatch(deadQueue()); - break; + for (const event of events) { + handleEvent(event, dispatch, getState); } - continue; - } - - for (const event of events) { - handleEvent(event, dispatch, getState); + lastEventId = Math.max(lastEventId, ...events.map(x => x.id)); } - - lastEventId = Math.max(lastEventId, ...events.map(x => x.id)); - } -}; + }; diff --git a/src/lightbox/Lightbox.js b/src/lightbox/Lightbox.js index 6bf3ba405c3..f8bb0f043e5 100644 --- a/src/lightbox/Lightbox.js +++ b/src/lightbox/Lightbox.js @@ -47,8 +47,8 @@ type Props = $ReadOnly<{| export default function Lightbox(props: Props): Node { const [headerFooterVisible, setHeaderFooterVisible] = useState(true); - const showActionSheetWithOptions: ShowActionSheetWithOptions = useActionSheet() - .showActionSheetWithOptions; + const showActionSheetWithOptions: ShowActionSheetWithOptions = + useActionSheet().showActionSheetWithOptions; const auth = useSelector(getAuth); // Pulled out here just because this function is used twice. diff --git a/src/message/fetchActions.js b/src/message/fetchActions.js index 2048a8f1a56..53715eb438b 100644 --- a/src/message/fetchActions.js +++ b/src/message/fetchActions.js @@ -83,16 +83,8 @@ const messageFetchComplete = (args: {| foundOldest: boolean, ownUserId: UserId, |}): PerAccountAction => { - const { - messages, - narrow, - anchor, - numBefore, - numAfter, - foundNewest, - foundOldest, - ownUserId, - } = args; + const { messages, narrow, anchor, numBefore, numAfter, foundNewest, foundOldest, ownUserId } = + args; return { type: MESSAGE_FETCH_COMPLETE, messages, @@ -113,108 +105,114 @@ const messageFetchComplete = (args: {| * failed network request or any failure to process data and get it * stored in Redux. If it rejects, it tells Redux about it. */ -export const fetchMessages = (fetchArgs: {| - narrow: Narrow, - anchor: number, - numBefore: number, - numAfter: number, -|}): ThunkAction>> => async (dispatch, getState) => { - dispatch(messageFetchStart(fetchArgs.narrow, fetchArgs.numBefore, fetchArgs.numAfter)); - try { - const { messages, found_newest, found_oldest } = - // TODO: If `MESSAGE_FETCH_ERROR` isn't the right way to respond - // to a timeout, maybe make a new action. - // eslint-disable-next-line no-use-before-define - await tryFetch(() => - api.getMessages(getAuth(getState()), { +export const fetchMessages = + (fetchArgs: {| + narrow: Narrow, + anchor: number, + numBefore: number, + numAfter: number, + |}): ThunkAction>> => + async (dispatch, getState) => { + dispatch(messageFetchStart(fetchArgs.narrow, fetchArgs.numBefore, fetchArgs.numAfter)); + try { + const { messages, found_newest, found_oldest } = + // TODO: If `MESSAGE_FETCH_ERROR` isn't the right way to respond + // to a timeout, maybe make a new action. + // eslint-disable-next-line no-use-before-define + await tryFetch(() => + api.getMessages(getAuth(getState()), { + ...fetchArgs, + narrow: apiNarrowOfNarrow( + fetchArgs.narrow, + getAllUsersById(getState()), + getStreamsById(getState()), + ), + useFirstUnread: fetchArgs.anchor === FIRST_UNREAD_ANCHOR, // TODO: don't use this; see #4203 + }), + ); + dispatch( + messageFetchComplete({ ...fetchArgs, - narrow: apiNarrowOfNarrow( - fetchArgs.narrow, - getAllUsersById(getState()), - getStreamsById(getState()), - ), - useFirstUnread: fetchArgs.anchor === FIRST_UNREAD_ANCHOR, // TODO: don't use this; see #4203 + messages, + foundNewest: found_newest, + foundOldest: found_oldest, + ownUserId: getOwnUserId(getState()), }), ); - dispatch( - messageFetchComplete({ - ...fetchArgs, - messages, - foundNewest: found_newest, - foundOldest: found_oldest, - ownUserId: getOwnUserId(getState()), - }), - ); - return messages; - } catch (errorIllTyped) { - const e: mixed = errorIllTyped; // https://github.com/facebook/flow/issues/2470 - dispatch( - messageFetchError({ - narrow: fetchArgs.narrow, - error: e, - }), - ); - // $FlowFixMe[incompatible-cast]: assuming caught exception was Error - logging.warn((e: Error), { - message: 'Message-fetch error', - - // Describe the narrow without sending sensitive data to Sentry. - narrow: caseNarrow(fetchArgs.narrow, { - stream: () => 'stream', - topic: () => 'topic', - pm: ids => (ids.length > 1 ? 'pm (group)' : 'pm (1:1)'), - home: () => 'all', - starred: () => 'starred', - mentioned: () => 'mentioned', - allPrivate: () => 'all-pm', - search: () => 'search', - }), - - anchor: fetchArgs.anchor, - numBefore: fetchArgs.numBefore, - numAfter: fetchArgs.numAfter, - }); - throw e; - } -}; - -export const fetchOlder = (narrow: Narrow): ThunkAction => (dispatch, getState) => { - const state = getState(); - const firstMessageId = getFirstMessageId(state, narrow); - const caughtUp = getCaughtUpForNarrow(state, narrow); - const fetching = getFetchingForNarrow(state, narrow); - const { loading } = getSession(state); + return messages; + } catch (errorIllTyped) { + const e: mixed = errorIllTyped; // https://github.com/facebook/flow/issues/2470 + dispatch( + messageFetchError({ + narrow: fetchArgs.narrow, + error: e, + }), + ); + // $FlowFixMe[incompatible-cast]: assuming caught exception was Error + logging.warn((e: Error), { + message: 'Message-fetch error', + + // Describe the narrow without sending sensitive data to Sentry. + narrow: caseNarrow(fetchArgs.narrow, { + stream: () => 'stream', + topic: () => 'topic', + pm: ids => (ids.length > 1 ? 'pm (group)' : 'pm (1:1)'), + home: () => 'all', + starred: () => 'starred', + mentioned: () => 'mentioned', + allPrivate: () => 'all-pm', + search: () => 'search', + }), - if (!loading && !fetching.older && !caughtUp.older && firstMessageId !== undefined) { - dispatch( - fetchMessages({ - narrow, - anchor: firstMessageId, - numBefore: config.messagesPerRequest, - numAfter: 0, - }), - ); - } -}; + anchor: fetchArgs.anchor, + numBefore: fetchArgs.numBefore, + numAfter: fetchArgs.numAfter, + }); + throw e; + } + }; -export const fetchNewer = (narrow: Narrow): ThunkAction => (dispatch, getState) => { - const state = getState(); - const lastMessageId = getLastMessageId(state, narrow); - const caughtUp = getCaughtUpForNarrow(state, narrow); - const fetching = getFetchingForNarrow(state, narrow); - const { loading } = getSession(state); +export const fetchOlder = + (narrow: Narrow): ThunkAction => + (dispatch, getState) => { + const state = getState(); + const firstMessageId = getFirstMessageId(state, narrow); + const caughtUp = getCaughtUpForNarrow(state, narrow); + const fetching = getFetchingForNarrow(state, narrow); + const { loading } = getSession(state); + + if (!loading && !fetching.older && !caughtUp.older && firstMessageId !== undefined) { + dispatch( + fetchMessages({ + narrow, + anchor: firstMessageId, + numBefore: config.messagesPerRequest, + numAfter: 0, + }), + ); + } + }; - if (!loading && !fetching.newer && !caughtUp.newer && lastMessageId !== undefined) { - dispatch( - fetchMessages({ - narrow, - anchor: lastMessageId, - numBefore: 0, - numAfter: config.messagesPerRequest, - }), - ); - } -}; +export const fetchNewer = + (narrow: Narrow): ThunkAction => + (dispatch, getState) => { + const state = getState(); + const lastMessageId = getLastMessageId(state, narrow); + const caughtUp = getCaughtUpForNarrow(state, narrow); + const fetching = getFetchingForNarrow(state, narrow); + const { loading } = getSession(state); + + if (!loading && !fetching.newer && !caughtUp.newer && lastMessageId !== undefined) { + dispatch( + fetchMessages({ + narrow, + anchor: lastMessageId, + numBefore: 0, + numAfter: config.messagesPerRequest, + }), + ); + } + }; /** Some message ID in the conversation; void if there are none. */ // This corresponds to web's message_edit.with_first_message_id. (Note @@ -250,60 +248,59 @@ const registerAbortPlain = (reason: RegisterAbortReason): PerAccountAction => ({ reason, }); -export const registerAbort = (reason: RegisterAbortReason): ThunkAction> => async ( - dispatch, - getState, -) => { - dispatch(registerAbortPlain(reason)); - if (getHaveServerData(getState()) && reason !== 'unexpected') { - // Try again, forever if necessary; the user has an interactable UI and - // can look at stale data while waiting. - // - // Do so by lying that the server has told us our queue is invalid and - // we need a new one. Note that this must fire *after* - // `registerAbortPlain()`, so that AppDataFetcher sees - // `needsInitialFetch` go from `false` to `true`. We don't call - // `doInitialFetch` directly here because that would go against - // `AppDataFetcher`'s implicit interface. (Also, `needsInitialFetch` is - // dubiously being read outside `AppDataFetcher`, in - // `fetchOlder`/`fetchNewer`, and we don't want to break something - // there.) - // - // TODO: Clean up all this brittle logic. - // TODO: Instead, let the retry be on-demand, with a banner. - dispatch(deadQueue()); // eslint-disable-line no-use-before-define - } else { - // Tell the user we've given up and let them try the same account or a - // different account from the account picker. - showErrorAlert( - // TODO: Set up these user-facing strings for translation once - // `initialFetchAbort`'s callers all have access to a `GetText` - // function. As of adding the strings, the initial fetch is dispatched - // from `AppDataFetcher` which isn't a descendant of - // `TranslationProvider`. - 'Connection failed', - (() => { - const realmStr = getIdentity(getState()).realm.toString(); - switch (reason) { - case 'server': - return roleIsAtLeast(getOwnUserRole(getState()), Role.Admin) - ? `Could not connect to ${realmStr} because the server encountered an error. Please check the server logs.` - : `Could not connect to ${realmStr} because the server encountered an error. Please ask an admin to check the server logs.`; - case 'network': - return `The network request to ${realmStr} failed.`; - case 'timeout': - return `Gave up trying to connect to ${realmStr} after waiting too long.`; - case 'unexpected': - return `Unexpected error while trying to connect to ${realmStr}.`; - default: - ensureUnreachable(reason); - return ''; - } - })(), - ); - NavigationService.dispatch(resetToAccountPicker()); - } -}; +export const registerAbort = + (reason: RegisterAbortReason): ThunkAction> => + async (dispatch, getState) => { + dispatch(registerAbortPlain(reason)); + if (getHaveServerData(getState()) && reason !== 'unexpected') { + // Try again, forever if necessary; the user has an interactable UI and + // can look at stale data while waiting. + // + // Do so by lying that the server has told us our queue is invalid and + // we need a new one. Note that this must fire *after* + // `registerAbortPlain()`, so that AppDataFetcher sees + // `needsInitialFetch` go from `false` to `true`. We don't call + // `doInitialFetch` directly here because that would go against + // `AppDataFetcher`'s implicit interface. (Also, `needsInitialFetch` is + // dubiously being read outside `AppDataFetcher`, in + // `fetchOlder`/`fetchNewer`, and we don't want to break something + // there.) + // + // TODO: Clean up all this brittle logic. + // TODO: Instead, let the retry be on-demand, with a banner. + dispatch(deadQueue()); // eslint-disable-line no-use-before-define + } else { + // Tell the user we've given up and let them try the same account or a + // different account from the account picker. + showErrorAlert( + // TODO: Set up these user-facing strings for translation once + // `initialFetchAbort`'s callers all have access to a `GetText` + // function. As of adding the strings, the initial fetch is dispatched + // from `AppDataFetcher` which isn't a descendant of + // `TranslationProvider`. + 'Connection failed', + (() => { + const realmStr = getIdentity(getState()).realm.toString(); + switch (reason) { + case 'server': + return roleIsAtLeast(getOwnUserRole(getState()), Role.Admin) + ? `Could not connect to ${realmStr} because the server encountered an error. Please check the server logs.` + : `Could not connect to ${realmStr} because the server encountered an error. Please ask an admin to check the server logs.`; + case 'network': + return `The network request to ${realmStr} failed.`; + case 'timeout': + return `Gave up trying to connect to ${realmStr} after waiting too long.`; + case 'unexpected': + return `Unexpected error while trying to connect to ${realmStr}.`; + default: + ensureUnreachable(reason); + return ''; + } + })(), + ); + NavigationService.dispatch(resetToAccountPicker()); + } + }; const registerComplete = (data: InitialData): PerAccountAction => ({ type: REGISTER_COMPLETE, @@ -343,22 +340,24 @@ export const isFetchNeededAtAnchor = ( * See also handlers for the `MESSAGE_FETCH_COMPLETE` action, which this * dispatches with the data it receives from the server. */ -export const fetchMessagesInNarrow = ( - narrow: Narrow, - anchor: number = FIRST_UNREAD_ANCHOR, -): ThunkAction | void>> => async (dispatch, getState) => { - if (!isFetchNeededAtAnchor(getState(), narrow, anchor)) { - return undefined; - } - return dispatch( - fetchMessages({ - narrow, - anchor, - numBefore: config.messagesPerRequest / 2, - numAfter: config.messagesPerRequest / 2, - }), - ); -}; +export const fetchMessagesInNarrow = + ( + narrow: Narrow, + anchor: number = FIRST_UNREAD_ANCHOR, + ): ThunkAction | void>> => + async (dispatch, getState) => { + if (!isFetchNeededAtAnchor(getState(), narrow, anchor)) { + return undefined; + } + return dispatch( + fetchMessages({ + narrow, + anchor, + numBefore: config.messagesPerRequest / 2, + numAfter: config.messagesPerRequest / 2, + }), + ); + }; /** * Fetch the few most recent PMs. @@ -559,14 +558,12 @@ export const doInitialFetch = (): ThunkAction> => async (dispatch, dispatch(initNotifications()); }; -export const uploadFile = ( - destinationNarrow: Narrow, - uri: string, - name: string, -): ThunkAction> => async (dispatch, getState) => { - const auth = getAuth(getState()); - const response = await api.uploadFile(auth, uri, name); - const messageToSend = `[${name}](${response.uri})`; +export const uploadFile = + (destinationNarrow: Narrow, uri: string, name: string): ThunkAction> => + async (dispatch, getState) => { + const auth = getAuth(getState()); + const response = await api.uploadFile(auth, uri, name); + const messageToSend = `[${name}](${response.uri})`; - dispatch(addToOutbox(destinationNarrow, messageToSend)); -}; + dispatch(addToOutbox(destinationNarrow, messageToSend)); + }; diff --git a/src/message/messagesActions.js b/src/message/messagesActions.js index 700731526e7..5edc740da58 100644 --- a/src/message/messagesActions.js +++ b/src/message/messagesActions.js @@ -14,38 +14,35 @@ import { getOwnUserId } from '../users/userSelectors'; /** * Navigate to the given narrow. */ -export const doNarrow = ( - narrow: Narrow, - anchor: number = FIRST_UNREAD_ANCHOR, -): ThunkAction => (dispatch, getState) => { - // TODO: Use `anchor` to open the message list to a particular message. - NavigationService.dispatch(navigateToChat(narrow)); -}; +export const doNarrow = + (narrow: Narrow, anchor: number = FIRST_UNREAD_ANCHOR): ThunkAction => + (dispatch, getState) => { + // TODO: Use `anchor` to open the message list to a particular message. + NavigationService.dispatch(navigateToChat(narrow)); + }; -export const messageLinkPress = (href: string): ThunkAction> => async ( - dispatch, - getState, - { getGlobalSettings }, -) => { - const state = getState(); - const auth = getAuth(state); - const streamsById = getStreamsById(state); - const streamsByName = getStreamsByName(state); - const ownUserId = getOwnUserId(state); - const narrow = getNarrowFromLink(href, auth.realm, streamsById, streamsByName, ownUserId); - // TODO: In some cases getNarrowFromLink successfully parses the link, but - // finds it points somewhere we can't see: in particular, to a stream - // that's hidden from our user (perhaps doesn't exist.) For those, - // perhaps give an error instead of falling back to opening in browser, - // which should be futile. - if (narrow) { - const anchor = getMessageIdFromLink(href, auth.realm); - dispatch(doNarrow(narrow, anchor)); - } else if (!isUrlOnRealm(href, auth.realm)) { - openLinkWithUserPreference(href, getGlobalSettings()); - } else { - const url = - (await api.tryGetFileTemporaryUrl(href, auth)) ?? new URL(href, auth.realm).toString(); - openLinkWithUserPreference(url, getGlobalSettings()); - } -}; +export const messageLinkPress = + (href: string): ThunkAction> => + async (dispatch, getState, { getGlobalSettings }) => { + const state = getState(); + const auth = getAuth(state); + const streamsById = getStreamsById(state); + const streamsByName = getStreamsByName(state); + const ownUserId = getOwnUserId(state); + const narrow = getNarrowFromLink(href, auth.realm, streamsById, streamsByName, ownUserId); + // TODO: In some cases getNarrowFromLink successfully parses the link, but + // finds it points somewhere we can't see: in particular, to a stream + // that's hidden from our user (perhaps doesn't exist.) For those, + // perhaps give an error instead of falling back to opening in browser, + // which should be futile. + if (narrow) { + const anchor = getMessageIdFromLink(href, auth.realm); + dispatch(doNarrow(narrow, anchor)); + } else if (!isUrlOnRealm(href, auth.realm)) { + openLinkWithUserPreference(href, getGlobalSettings()); + } else { + const url = + (await api.tryGetFileTemporaryUrl(href, auth)) ?? new URL(href, auth.realm).toString(); + openLinkWithUserPreference(url, getGlobalSettings()); + } + }; diff --git a/src/nav/ChatNavBar.js b/src/nav/ChatNavBar.js index 8116913741a..0e08328afc5 100644 --- a/src/nav/ChatNavBar.js +++ b/src/nav/ChatNavBar.js @@ -160,10 +160,7 @@ export default function ChatNavBar(props: {| borderColor: streamColor === undefined ? 'hsla(0, 0%, 50%, 0.25)' - : Color(streamColor) - .darken(0.1) - .hsl() - .string(), + : Color(streamColor).darken(0.1).hsl().string(), borderBottomWidth: 1, backgroundColor: streamColor, }} diff --git a/src/notification/notifOpen.js b/src/notification/notifOpen.js index f80c7da11c9..fa9c75aca30 100644 --- a/src/notification/notifOpen.js +++ b/src/notification/notifOpen.js @@ -193,52 +193,51 @@ const readInitialNotification = async (): Promise => { return fromPushNotificationIOS(notification) || null; }; -export const narrowToNotification = (data: ?Notification): GlobalThunkAction => ( - dispatch, - getState, -) => { - if (!data) { - return; - } +export const narrowToNotification = + (data: ?Notification): GlobalThunkAction => + (dispatch, getState) => { + if (!data) { + return; + } - const globalState = getState(); - const accountIndex = getAccountFromNotificationData(data, getAccounts(globalState)); - if (accountIndex !== null && accountIndex > 0) { - // Notification is for a non-active account. Switch there. - dispatch(accountSwitch(accountIndex)); - // TODO actually narrow to conversation. - return; - } + const globalState = getState(); + const accountIndex = getAccountFromNotificationData(data, getAccounts(globalState)); + if (accountIndex !== null && accountIndex > 0) { + // Notification is for a non-active account. Switch there. + dispatch(accountSwitch(accountIndex)); + // TODO actually narrow to conversation. + return; + } - // If accountIndex is null, then `getAccountFromNotificationData` has - // already logged a warning. We go on to treat it as if it's 0, i.e. the - // active account, in the hopes that the user has one account they use - // regularly and it's the same one this notification is for. + // If accountIndex is null, then `getAccountFromNotificationData` has + // already logged a warning. We go on to treat it as if it's 0, i.e. the + // active account, in the hopes that the user has one account they use + // regularly and it's the same one this notification is for. - const state = tryGetActiveAccountState(globalState); - if (!state) { - // There are no accounts at all. (Which also means accountIndex is null - // and we've already logged a warning.) - return; - } + const state = tryGetActiveAccountState(globalState); + if (!state) { + // There are no accounts at all. (Which also means accountIndex is null + // and we've already logged a warning.) + return; + } - const narrow = getNarrowFromNotificationData( - data, - getAllUsersByEmail(state), - getStreamsByName(state), - getOwnUserId(state), - ); - if (narrow) { - // We have a GlobalDispatch, because this is a global thunk action -- - // at the top of the function, we didn't yet know which account was - // intended and had to work that out. But now we know we're working on - // the active account, and want to dispatch a per-account action there. - // For the present, we just use the fact that our GlobalDispatch value - // is the same function as we use for Dispatch. - // TODO(#5006): perhaps have an extra `activeAccountDispatch: Dispatch`? - (dispatch: $FlowFixMe)(doNarrow(narrow)); - } -}; + const narrow = getNarrowFromNotificationData( + data, + getAllUsersByEmail(state), + getStreamsByName(state), + getOwnUserId(state), + ); + if (narrow) { + // We have a GlobalDispatch, because this is a global thunk action -- + // at the top of the function, we didn't yet know which account was + // intended and had to work that out. But now we know we're working on + // the active account, and want to dispatch a per-account action there. + // For the present, we just use the fact that our GlobalDispatch value + // is the same function as we use for Dispatch. + // TODO(#5006): perhaps have an extra `activeAccountDispatch: Dispatch`? + (dispatch: $FlowFixMe)(doNarrow(narrow)); + } + }; /** * Act on the notification-opening the app was started from, if any. diff --git a/src/notification/notifTokens.js b/src/notification/notifTokens.js index 1f2d1b7e5d6..1e2f86c6cc0 100644 --- a/src/notification/notifTokens.js +++ b/src/notification/notifTokens.js @@ -28,34 +28,32 @@ import * as logging from '../utils/logging'; * * Returns null (and logs a warning or error) if getting the token failed. */ -export const androidGetToken = (): GlobalThunkAction> => async ( - dispatch, - getState, -) => { - try { - return await NativeModules.Notifications.getToken(); - } catch (e) { - // `getToken` failed. That happens sometimes, apparently including - // due to network errors: see #5061. In that case all will be well - // if the user later launches the app while on a working network. - // - // But maybe this can happen in other, non-transient situations too. - // Log it so we can hope to find out if that's happening. - const ackedPushTokens = getAccounts(getState()).map(a => a.ackedPushToken); - if (ackedPushTokens.some(t => t !== null) || ackedPushTokens.length === 0) { - // It's probably a transient issue: we've previously gotten a - // token (that we've even successfully sent to a server), or else - // we have no accounts at all so we haven't had a chance to do so. - logging.warn(`notif: getToken failed, but looks transient: ${e.message}`); - } else { - // Might not be transient! The user might be persistently unable - // to get push notifications. - logging.error(`notif: getToken failed, seems persistent: ${e.message}`); - } +export const androidGetToken = + (): GlobalThunkAction> => async (dispatch, getState) => { + try { + return await NativeModules.Notifications.getToken(); + } catch (e) { + // `getToken` failed. That happens sometimes, apparently including + // due to network errors: see #5061. In that case all will be well + // if the user later launches the app while on a working network. + // + // But maybe this can happen in other, non-transient situations too. + // Log it so we can hope to find out if that's happening. + const ackedPushTokens = getAccounts(getState()).map(a => a.ackedPushToken); + if (ackedPushTokens.some(t => t !== null) || ackedPushTokens.length === 0) { + // It's probably a transient issue: we've previously gotten a + // token (that we've even successfully sent to a server), or else + // we have no accounts at all so we haven't had a chance to do so. + logging.warn(`notif: getToken failed, but looks transient: ${e.message}`); + } else { + // Might not be transient! The user might be persistently unable + // to get push notifications. + logging.error(`notif: getToken failed, seems persistent: ${e.message}`); + } - return null; - } -}; + return null; + } + }; /** * Try to cause a `remoteNotificationsRegistered` event. @@ -129,10 +127,11 @@ const ackPushToken = (pushToken: string, identity: Identity): AllAccountsAction }); /** Tell the given server about this device token, if it doesn't already know. */ -const sendPushToken = ( - account: Account | void, - pushToken: string, -): GlobalThunkAction> & ThunkAction> => +const sendPushToken = + ( + account: Account | void, + pushToken: string, + ): GlobalThunkAction> & ThunkAction> => // Why both GlobalThunkAction and ThunkAction? Well, this function is // per-account... but whereas virtually all our other per-account code is // implicitly about the active account, this is about a specific account @@ -155,32 +154,34 @@ const sendPushToken = ( }; /** Tell this account's server about our device token, if needed. */ -export const initNotifications = (): ThunkAction> => async ( - dispatch, - getState, - { getGlobalSession }, // eslint-disable-line no-shadow -) => { - const { pushToken } = getGlobalSession(); - if (pushToken === null) { - // Probably, we just don't have the token yet. When we learn it, - // the listener will update this and all other logged-in servers. - // Try to learn it. - // - // Or, if we *have* gotten something for the token and it was - // `null`, we're probably on Android; see note on - // `SessionState.pushToken`. It's harmless to call - // `getNotificationToken` in that case; it does nothing on - // Android. - // - // On iOS this is normal because getting the token may involve - // showing the user a permissions modal, so we defer that until - // this point. - getNotificationToken(); - return; - } - const account = getAccount(getState()); - await dispatch(sendPushToken(account, pushToken)); -}; +export const initNotifications = + (): ThunkAction> => + async ( + dispatch, + getState, + { getGlobalSession }, // eslint-disable-line no-shadow + ) => { + const { pushToken } = getGlobalSession(); + if (pushToken === null) { + // Probably, we just don't have the token yet. When we learn it, + // the listener will update this and all other logged-in servers. + // Try to learn it. + // + // Or, if we *have* gotten something for the token and it was + // `null`, we're probably on Android; see note on + // `SessionState.pushToken`. It's harmless to call + // `getNotificationToken` in that case; it does nothing on + // Android. + // + // On iOS this is normal because getting the token may involve + // showing the user a permissions modal, so we defer that until + // this point. + getNotificationToken(); + return; + } + const account = getAccount(getState()); + await dispatch(sendPushToken(account, pushToken)); + }; /** Tell all logged-in accounts' servers about our device token, as needed. */ const sendAllPushToken = (): GlobalThunkAction> => async (dispatch, getState) => { @@ -199,27 +200,27 @@ const sendAllPushToken = (): GlobalThunkAction> => async (dispatch * at the registration site to allow us to ensure it. As we've been burned * by unexpected types here before, we do the validation explicitly. */ -export const handleDeviceToken = ( - deviceToken: mixed, -): GlobalThunkAction> => async dispatch => { - // Null device tokens are known to occur (at least) on Android emulators - // without Google Play services, and have been reported in other scenarios. - // See https://stackoverflow.com/q/37517860 for relevant discussion. - // - // Otherwise, a device token should be some (platform-dependent and largely - // unspecified) flavor of string. - if (deviceToken !== null && typeof deviceToken !== 'string') { - /* $FlowFixMe[incompatible-type]: `deviceToken` probably _is_ +export const handleDeviceToken = + (deviceToken: mixed): GlobalThunkAction> => + async dispatch => { + // Null device tokens are known to occur (at least) on Android emulators + // without Google Play services, and have been reported in other scenarios. + // See https://stackoverflow.com/q/37517860 for relevant discussion. + // + // Otherwise, a device token should be some (platform-dependent and largely + // unspecified) flavor of string. + if (deviceToken !== null && typeof deviceToken !== 'string') { + /* $FlowFixMe[incompatible-type]: `deviceToken` probably _is_ JSONable, but we can only hope. */ - const token: JSONable = deviceToken; - logging.error('Received invalid device token', { token }); - // Take no further action. - return; - } + const token: JSONable = deviceToken; + logging.error('Received invalid device token', { token }); + // Take no further action. + return; + } - dispatch(gotPushToken(deviceToken)); - await dispatch(sendAllPushToken()); -}; + dispatch(gotPushToken(deviceToken)); + await dispatch(sendAllPushToken()); + }; /** Ask this account's server to stop sending notifications to this device. */ // TODO: We don't call this in enough situations: see #3469. @@ -228,18 +229,16 @@ export const handleDeviceToken = ( // you should be able to log in from elsewhere and cut the device off from // your account, including notifications, even when you don't have the // device in your possession. That's zulip/zulip#17939. -export const tryStopNotifications = (): ThunkAction> => async ( - dispatch, - getState, -) => { - const auth = getAuth(getState()); - const { ackedPushToken } = getAccount(getState()); - if (ackedPushToken !== null) { - dispatch(unackPushToken(identityOfAuth(auth))); - try { - await api.forgetPushToken(auth, Platform.OS, ackedPushToken); - } catch (e) { - logging.warn(e); +export const tryStopNotifications = + (): ThunkAction> => async (dispatch, getState) => { + const auth = getAuth(getState()); + const { ackedPushToken } = getAccount(getState()); + if (ackedPushToken !== null) { + dispatch(unackPushToken(identityOfAuth(auth))); + try { + await api.forgetPushToken(auth, Platform.OS, ackedPushToken); + } catch (e) { + logging.warn(e); + } } - } -}; + }; diff --git a/src/outbox/outboxActions.js b/src/outbox/outboxActions.js index 8a597db0a3c..7142a744282 100644 --- a/src/outbox/outboxActions.js +++ b/src/outbox/outboxActions.js @@ -171,35 +171,34 @@ const getContentPreview = (content: string, state: PerAccountState): string => { } }; -export const addToOutbox = ( - destinationNarrow: Narrow, - content: string, -): ThunkAction> => async (dispatch, getState) => { - invariant(isConversationNarrow(destinationNarrow), 'destination narrow must be conversation'); - const state = getState(); - const ownUser = getOwnUser(state); - - const localTime = Math.round(new Date().getTime() / 1000); - dispatch( - messageSendStart({ - isSent: false, - ...outboxPropertiesForNarrow( - destinationNarrow, - getStreamsById(state), - getAllUsersById(state), - ownUser, - ), - markdownContent: content, - content: getContentPreview(content, state), - timestamp: localTime, - id: localTime, - sender_full_name: ownUser.full_name, - sender_email: ownUser.email, - sender_id: ownUser.user_id, - avatar_url: ownUser.avatar_url, - isOutbox: true, - reactions: [], - }), - ); - dispatch(sendOutbox()); -}; +export const addToOutbox = + (destinationNarrow: Narrow, content: string): ThunkAction> => + async (dispatch, getState) => { + invariant(isConversationNarrow(destinationNarrow), 'destination narrow must be conversation'); + const state = getState(); + const ownUser = getOwnUser(state); + + const localTime = Math.round(new Date().getTime() / 1000); + dispatch( + messageSendStart({ + isSent: false, + ...outboxPropertiesForNarrow( + destinationNarrow, + getStreamsById(state), + getAllUsersById(state), + ownUser, + ), + markdownContent: content, + content: getContentPreview(content, state), + timestamp: localTime, + id: localTime, + sender_full_name: ownUser.full_name, + sender_email: ownUser.email, + sender_id: ownUser.user_id, + avatar_url: ownUser.avatar_url, + isOutbox: true, + reactions: [], + }), + ); + dispatch(sendOutbox()); + }; diff --git a/src/permissionSelectors.js b/src/permissionSelectors.js index 95406ad7659..a5f9074b516 100644 --- a/src/permissionSelectors.js +++ b/src/permissionSelectors.js @@ -155,9 +155,8 @@ export function getCanCreatePrivateStreams(state: PerAccountState): boolean { // TODO(?): Could deduplicate with the other getCanCreate*Streams; see // https://github.com/zulip/zulip-mobile/pull/5394#discussion_r883215288 export function getCanCreateWebPublicStreams(state: PerAccountState): boolean { - const { webPublicStreamsEnabled, enableSpectatorAccess, createWebPublicStreamPolicy } = getRealm( - state, - ); + const { webPublicStreamsEnabled, enableSpectatorAccess, createWebPublicStreamPolicy } = + getRealm(state); const role = getOwnUserRole(state); if (!webPublicStreamsEnabled || !enableSpectatorAccess) { diff --git a/src/pm-conversations/pmConversationsSelectors.js b/src/pm-conversations/pmConversationsSelectors.js index f51fc8e2253..28ee423b8cb 100644 --- a/src/pm-conversations/pmConversationsSelectors.js +++ b/src/pm-conversations/pmConversationsSelectors.js @@ -30,65 +30,63 @@ function unreadCount(unreadsKey, unreadPms, unreadHuddles): number { } // TODO(server-2.1): Delete this, and simplify logic around it. -export const getRecentConversationsLegacy: Selector< - $ReadOnlyArray, -> = createSelector( - getOwnUserId, - getPrivateMessages, - getUnreadByPms, - getUnreadByHuddles, - getAllUsersById, - ( - ownUserId, - messages: $ReadOnlyArray, - unreadPms: {| [number]: number |}, - unreadHuddles: {| [string]: number |}, - allUsersById, - ): $ReadOnlyArray => { - const items = messages - .map(msg => { - // Note this can be a different set of users from those in `keyRecipients`. - const unreadsKey = pmUnreadsKeyFromMessage(msg, ownUserId); - const keyRecipients = pmKeyRecipientUsersFromMessage(msg, allUsersById, ownUserId); - return keyRecipients === null ? null : { unreadsKey, keyRecipients, msgId: msg.id }; - }) - .filter(Boolean); +export const getRecentConversationsLegacy: Selector<$ReadOnlyArray> = + createSelector( + getOwnUserId, + getPrivateMessages, + getUnreadByPms, + getUnreadByHuddles, + getAllUsersById, + ( + ownUserId, + messages: $ReadOnlyArray, + unreadPms: {| [number]: number |}, + unreadHuddles: {| [string]: number |}, + allUsersById, + ): $ReadOnlyArray => { + const items = messages + .map(msg => { + // Note this can be a different set of users from those in `keyRecipients`. + const unreadsKey = pmUnreadsKeyFromMessage(msg, ownUserId); + const keyRecipients = pmKeyRecipientUsersFromMessage(msg, allUsersById, ownUserId); + return keyRecipients === null ? null : { unreadsKey, keyRecipients, msgId: msg.id }; + }) + .filter(Boolean); - const latestByRecipients = new Map(); - items.forEach(item => { - const prev = latestByRecipients.get(item.unreadsKey); - if (!prev || item.msgId > prev.msgId) { - latestByRecipients.set(item.unreadsKey, item); - } - }); + const latestByRecipients = new Map(); + items.forEach(item => { + const prev = latestByRecipients.get(item.unreadsKey); + if (!prev || item.msgId > prev.msgId) { + latestByRecipients.set(item.unreadsKey, item); + } + }); - const sortedByMostRecent = Array.from(latestByRecipients.values()).sort( - (a, b) => +b.msgId - +a.msgId, - ); + const sortedByMostRecent = Array.from(latestByRecipients.values()).sort( + (a, b) => +b.msgId - +a.msgId, + ); - return sortedByMostRecent.map(conversation => ({ - key: conversation.unreadsKey, - keyRecipients: conversation.keyRecipients, - msgId: conversation.msgId, - unread: unreadCount(conversation.unreadsKey, unreadPms, unreadHuddles), - })); - }, -); + return sortedByMostRecent.map(conversation => ({ + key: conversation.unreadsKey, + keyRecipients: conversation.keyRecipients, + msgId: conversation.msgId, + unread: unreadCount(conversation.unreadsKey, unreadPms, unreadHuddles), + })); + }, + ); -export const getRecentConversationsModern: Selector< - $ReadOnlyArray, -> = createSelector( - state => state.pmConversations, - getUnreadByPms, - getUnreadByHuddles, - getAllUsersById, - getOwnUserId, - // This is defined separately, just below. When this is defined inline, - // if there's a type error in it, the message Flow gives is often pretty - // terrible: just highlighting the whole thing and pointing at something - // in the `reselect` libdef. Defining it separately seems to help. - getRecentConversationsModernImpl, // eslint-disable-line no-use-before-define -); +export const getRecentConversationsModern: Selector<$ReadOnlyArray> = + createSelector( + state => state.pmConversations, + getUnreadByPms, + getUnreadByHuddles, + getAllUsersById, + getOwnUserId, + // This is defined separately, just below. When this is defined inline, + // if there's a type error in it, the message Flow gives is often pretty + // terrible: just highlighting the whole thing and pointing at something + // in the `reselect` libdef. Defining it separately seems to help. + getRecentConversationsModernImpl, // eslint-disable-line no-use-before-define + ); function getRecentConversationsModernImpl( { sorted, map }: PmConversationsState, @@ -138,8 +136,7 @@ export const getRecentConversations = ( ): $ReadOnlyArray => getServerIsOld(state) ? getRecentConversationsLegacy(state) : getRecentConversationsModern(state); -export const getUnreadConversations: Selector< - $ReadOnlyArray, -> = createSelector(getRecentConversations, conversations => - conversations.filter(c => c.unread > 0), +export const getUnreadConversations: Selector<$ReadOnlyArray> = createSelector( + getRecentConversations, + conversations => conversations.filter(c => c.unread > 0), ); diff --git a/src/presence/__tests__/heartbeat-test.js b/src/presence/__tests__/heartbeat-test.js index 8216de85806..bc39f214335 100644 --- a/src/presence/__tests__/heartbeat-test.js +++ b/src/presence/__tests__/heartbeat-test.js @@ -26,6 +26,7 @@ describe('Heartbeat', () => { callback: CallbackType; heartbeat: Heartbeat; + // eslint-disable-next-line no-use-before-define static _currentHeartbeats: Array = []; constructor() { @@ -45,6 +46,7 @@ describe('Heartbeat', () => { return this.heartbeat.isActive(); } + // eslint-disable-next-line no-use-before-define static getExtant(): $ReadOnlyArray { return this._currentHeartbeats; } diff --git a/src/presence/presenceReducer.js b/src/presence/presenceReducer.js index 93c119f72ae..40f8cd7998a 100644 --- a/src/presence/presenceReducer.js +++ b/src/presence/presenceReducer.js @@ -35,9 +35,9 @@ export default ( case EVENT_PRESENCE: { // A presence event should have either "active" or "idle" status - const isPresenceEventValid = !!objectEntries( - action.presence, - ).find(([device, devicePresence]) => ['active', 'idle'].includes(devicePresence.status)); + const isPresenceEventValid = !!objectEntries(action.presence).find( + ([device, devicePresence]) => ['active', 'idle'].includes(devicePresence.status), + ); if (!isPresenceEventValid) { return state; } diff --git a/src/realm/__tests__/realmReducer-test.js b/src/realm/__tests__/realmReducer-test.js index cf8ccc9366a..c2c49abc2d5 100644 --- a/src/realm/__tests__/realmReducer-test.js +++ b/src/realm/__tests__/realmReducer-test.js @@ -264,15 +264,14 @@ describe('realmReducer', () => { describe('type `user_settings`, op `update`', () => { const eventCommon = { id: 0, type: EventTypes.user_settings, op: 'update' }; - const mkCheck = , E: $Keys>( - statePropertyName: S, - eventPropertyName: E, - ): (($ElementType, $ElementType) => void) => ( - initialStateValue, - eventValue, - ) => { - /* prettier-ignore */ // (wants to wrap the name weirdly) - test(`${initialStateValue?.toString() ?? '[nullish]'} → ${eventValue?.toString() ?? '[nullish]'}`, () => { + const mkCheck = + , E: $Keys>( + statePropertyName: S, + eventPropertyName: E, + ): (($ElementType, $ElementType) => void) => + (initialStateValue, eventValue) => { + /* prettier-ignore */ // (wants to wrap the name weirdly) + test(`${initialStateValue?.toString() ?? '[nullish]'} → ${eventValue?.toString() ?? '[nullish]'}`, () => { const initialState = { ...eg.plusReduxState.realm }; // $FlowFixMe[prop-missing] // $FlowFixMe[class-object-subtyping] @@ -293,7 +292,7 @@ describe('realmReducer', () => { }), ).toEqual(expectedState); }); - }; + }; describe('twentyFourHourTime / twenty_four_hour_time', () => { const check = mkCheck('twentyFourHourTime', 'twenty_four_hour_time'); @@ -307,15 +306,14 @@ describe('realmReducer', () => { describe('type `realm`, op `update_dict`', () => { const eventCommon = { id: 0, type: EventTypes.realm, op: 'update_dict', property: 'default' }; - const mkCheck = , E: $Keys>( - statePropertyName: S, - eventPropertyName: E, - ): (($ElementType, $ElementType) => void) => ( - initialStateValue, - eventValue, - ) => { - /* prettier-ignore */ // (wants to wrap the name weirdly) - test(`${initialStateValue?.toString() ?? '[nullish]'} → ${eventValue?.toString() ?? '[nullish]'}`, () => { + const mkCheck = + , E: $Keys>( + statePropertyName: S, + eventPropertyName: E, + ): (($ElementType, $ElementType) => void) => + (initialStateValue, eventValue) => { + /* prettier-ignore */ // (wants to wrap the name weirdly) + test(`${initialStateValue?.toString() ?? '[nullish]'} → ${eventValue?.toString() ?? '[nullish]'}`, () => { const initialState = { ...eg.plusReduxState.realm }; // $FlowFixMe[prop-missing] // $FlowFixMe[class-object-subtyping] @@ -339,7 +337,7 @@ describe('realmReducer', () => { }), ).toEqual(expectedState); }); - }; + }; describe('name / name', () => { const check = mkCheck('name', 'name'); @@ -379,12 +377,8 @@ describe('realmReducer', () => { }); describe('createPublicStreamPolicy / create_public_stream_policy', () => { - const { - MemberOrAbove, - AdminOrAbove, - FullMemberOrAbove, - ModeratorOrAbove, - } = CreatePublicOrPrivateStreamPolicy; + const { MemberOrAbove, AdminOrAbove, FullMemberOrAbove, ModeratorOrAbove } = + CreatePublicOrPrivateStreamPolicy; const check = mkCheck('createPublicStreamPolicy', 'create_public_stream_policy'); check(MemberOrAbove, AdminOrAbove); check(MemberOrAbove, FullMemberOrAbove); @@ -401,12 +395,8 @@ describe('realmReducer', () => { }); describe('createPrivateStreamPolicy / create_private_stream_policy', () => { - const { - MemberOrAbove, - AdminOrAbove, - FullMemberOrAbove, - ModeratorOrAbove, - } = CreatePublicOrPrivateStreamPolicy; + const { MemberOrAbove, AdminOrAbove, FullMemberOrAbove, ModeratorOrAbove } = + CreatePublicOrPrivateStreamPolicy; const check = mkCheck('createPrivateStreamPolicy', 'create_private_stream_policy'); check(MemberOrAbove, AdminOrAbove); check(MemberOrAbove, FullMemberOrAbove); @@ -425,12 +415,8 @@ describe('realmReducer', () => { describe('create{Private,Public}StreamPolicy / create_stream_policy', () => { // TODO(server-5.0): Stop expecting create_stream_policy; remove. - const { - MemberOrAbove, - AdminOrAbove, - FullMemberOrAbove, - ModeratorOrAbove, - } = CreatePublicOrPrivateStreamPolicy; + const { MemberOrAbove, AdminOrAbove, FullMemberOrAbove, ModeratorOrAbove } = + CreatePublicOrPrivateStreamPolicy; const check = (initialStateValue, eventValue) => { test(`${initialStateValue.toString()} → ${eventValue.toString()}`, () => { const initialState = { diff --git a/src/realm/realmReducer.js b/src/realm/realmReducer.js index 0bae28f11dc..0de76d1c8f4 100644 --- a/src/realm/realmReducer.js +++ b/src/realm/realmReducer.js @@ -121,9 +121,9 @@ export default ( filters: action.data.realm_filters, emoji: convertRealmEmoji(action.data.realm_emoji), defaultExternalAccounts: new Map( - objectEntries( - action.data.realm_default_external_accounts, - ).map(([name, { url_pattern }]) => [name, { url_pattern }]), + objectEntries(action.data.realm_default_external_accounts).map( + ([name, { url_pattern }]) => [name, { url_pattern }], + ), ), videoChatProvider: getVideoChatProvider({ availableProviders: action.data.realm_available_video_chat_providers, diff --git a/src/settings/__tests__/settingsReducer-test.js b/src/settings/__tests__/settingsReducer-test.js index afe6fe0eff9..bba153a1e87 100644 --- a/src/settings/__tests__/settingsReducer-test.js +++ b/src/settings/__tests__/settingsReducer-test.js @@ -162,32 +162,31 @@ describe('settingsReducer', () => { describe('type `user_settings`, op `update`', () => { const eventCommon = { id: 0, type: EventTypes.user_settings, op: 'update' }; - const mkCheck = , E: $Keys>( - statePropertyName: S, - eventPropertyName: E, - ): (($ElementType, $ElementType) => void) => ( - initialStateValue, - eventValue, - ) => { - test(`${initialStateValue.toString()} → ${eventValue?.toString() ?? '[nullish]'}`, () => { - const initialState = { ...baseState }; - /* $FlowFixMe[incompatible-type]: Trust that the caller passed the + const mkCheck = + , E: $Keys>( + statePropertyName: S, + eventPropertyName: E, + ): (($ElementType, $ElementType) => void) => + (initialStateValue, eventValue) => { + test(`${initialStateValue.toString()} → ${eventValue?.toString() ?? '[nullish]'}`, () => { + const initialState = { ...baseState }; + /* $FlowFixMe[incompatible-type]: Trust that the caller passed the right kind of value for its chosen key. */ - initialState[statePropertyName] = initialStateValue; + initialState[statePropertyName] = initialStateValue; - const expectedState = { ...initialState }; - /* $FlowFixMe[incompatible-type]: Trust that the caller passed the + const expectedState = { ...initialState }; + /* $FlowFixMe[incompatible-type]: Trust that the caller passed the right kind of value for its chosen key. */ - expectedState[statePropertyName] = eventValue; - - expect( - settingsReducer(initialState, { - type: EVENT, - event: { ...eventCommon, property: eventPropertyName, value: eventValue }, - }), - ).toEqual(expectedState); - }); - }; + expectedState[statePropertyName] = eventValue; + + expect( + settingsReducer(initialState, { + type: EVENT, + event: { ...eventCommon, property: eventPropertyName, value: eventValue }, + }), + ).toEqual(expectedState); + }); + }; describe('offlineNotification / enable_offline_push_notifications', () => { const check = mkCheck('offlineNotification', 'enable_offline_push_notifications'); diff --git a/src/streams/EditStreamCard.js b/src/streams/EditStreamCard.js index 253b670fa1d..f9d473cdd2e 100644 --- a/src/streams/EditStreamCard.js +++ b/src/streams/EditStreamCard.js @@ -111,14 +111,12 @@ function useStreamPrivacyOptions(initialValue: Privacy) { }; case 2: // CreateWebPublicStreamPolicy.AdminOrAbove return { - text: - '{realmName} only allows organization administrators or owners to make web-public streams.', + text: '{realmName} only allows organization administrators or owners to make web-public streams.', values: { realmName }, }; case 4: // CreateWebPublicStreamPolicy.ModeratorOrAbove return { - text: - '{realmName} only allows organization moderators, administrators, or owners to make web-public streams.', + text: '{realmName} only allows organization moderators, administrators, or owners to make web-public streams.', values: { realmName }, }; default: { diff --git a/src/streams/StreamItem.js b/src/streams/StreamItem.js index 92c49f0fbe1..15f118abfad 100644 --- a/src/streams/StreamItem.js +++ b/src/streams/StreamItem.js @@ -111,8 +111,8 @@ export default function StreamItem(props: Props): Node { const realmUrl = useSelector(getRealmUrl); const globalSettings = useGlobalSelector(getGlobalSettings); - const showActionSheetWithOptions: ShowActionSheetWithOptions = useActionSheet() - .showActionSheetWithOptions; + const showActionSheetWithOptions: ShowActionSheetWithOptions = + useActionSheet().showActionSheetWithOptions; const _ = useContext(TranslationContext); const dispatch = useDispatch(); const backgroundData = useSelector(state => ({ diff --git a/src/streams/SubscriptionsCard.js b/src/streams/SubscriptionsCard.js index 4f49583a9c8..b4c66db36af 100644 --- a/src/streams/SubscriptionsCard.js +++ b/src/streams/SubscriptionsCard.js @@ -50,9 +50,10 @@ export default function SubscriptionsCard(props: Props): Node { ]; }, [subscriptions]); - const handleNarrow = useCallback(stream => dispatch(doNarrow(streamNarrow(stream.stream_id))), [ - dispatch, - ]); + const handleNarrow = useCallback( + stream => dispatch(doNarrow(streamNarrow(stream.stream_id))), + [dispatch], + ); return ( diff --git a/src/streams/TopicItem.js b/src/streams/TopicItem.js index 8fc79f7e9c9..69a1d671189 100644 --- a/src/streams/TopicItem.js +++ b/src/streams/TopicItem.js @@ -66,8 +66,8 @@ export default function TopicItem(props: Props): Node { onPress, } = props; - const showActionSheetWithOptions: ShowActionSheetWithOptions = useActionSheet() - .showActionSheetWithOptions; + const showActionSheetWithOptions: ShowActionSheetWithOptions = + useActionSheet().showActionSheetWithOptions; const _ = useContext(TranslationContext); const dispatch = useDispatch(); const backgroundData = useSelector(state => ({ diff --git a/src/streams/streamsActions.js b/src/streams/streamsActions.js index 0212c16b7c5..fee45001edb 100644 --- a/src/streams/streamsActions.js +++ b/src/streams/streamsActions.js @@ -44,43 +44,45 @@ export const privacyToStreamProps = (privacy: Privacy): $Exact> => async (dispatch, getState) => { - const state = getState(); +export const updateExistingStream = + ( + id: number, + changedValues: {| +name?: string, +description?: string, +privacy?: Privacy |}, + ): ThunkAction> => + async (dispatch, getState) => { + const state = getState(); - const maybeEncode = (value: string): string => - // Adapt to a server API change that was accidentally incompatible: - // https://github.com/zulip/zulip-mobile/pull/4748#issuecomment-852254404 - // https://github.com/zulip/zulip-mobile/issues/4747#issuecomment-946362729 - // TODO(#4659): Ideally this belongs inside `api.updateStream`. - // TODO(server-4.0): Simplify this (if it hasn't already moved.) - getZulipFeatureLevel(state) >= 64 ? value : JSON.stringify(value); + const maybeEncode = (value: string): string => + // Adapt to a server API change that was accidentally incompatible: + // https://github.com/zulip/zulip-mobile/pull/4748#issuecomment-852254404 + // https://github.com/zulip/zulip-mobile/issues/4747#issuecomment-946362729 + // TODO(#4659): Ideally this belongs inside `api.updateStream`. + // TODO(server-4.0): Simplify this (if it hasn't already moved.) + getZulipFeatureLevel(state) >= 64 ? value : JSON.stringify(value); - const auth = getAuth(state); - const updates = {}; - if (changedValues.name !== undefined) { - updates.new_name = maybeEncode(changedValues.name); - } - if (changedValues.description !== undefined) { - updates.description = maybeEncode(changedValues.description); - } - if (changedValues.privacy !== undefined) { - const streamProps = privacyToStreamProps(changedValues.privacy); + const auth = getAuth(state); + const updates = {}; + if (changedValues.name !== undefined) { + updates.new_name = maybeEncode(changedValues.name); + } + if (changedValues.description !== undefined) { + updates.description = maybeEncode(changedValues.description); + } + if (changedValues.privacy !== undefined) { + const streamProps = privacyToStreamProps(changedValues.privacy); - // Only send is_web_public if the server will recognize it. - // TODO(server-5.0): Remove conditional. - if (getZulipFeatureLevel(state) >= 98) { - updates.is_web_public = streamProps.is_web_public; + // Only send is_web_public if the server will recognize it. + // TODO(server-5.0): Remove conditional. + if (getZulipFeatureLevel(state) >= 98) { + updates.is_web_public = streamProps.is_web_public; + } + updates.is_private = streamProps.invite_only; + updates.history_public_to_subscribers = streamProps.history_public_to_subscribers; } - updates.is_private = streamProps.invite_only; - updates.history_public_to_subscribers = streamProps.history_public_to_subscribers; - } - if (Object.keys(updates).length === 0) { - return; - } + if (Object.keys(updates).length === 0) { + return; + } - await api.updateStream(auth, id, updates); -}; + await api.updateStream(auth, id, updates); + }; diff --git a/src/styles/constants.js b/src/styles/constants.js index e3be7779a41..b8d180c9d0d 100644 --- a/src/styles/constants.js +++ b/src/styles/constants.js @@ -14,9 +14,7 @@ export const NAVBAR_SIZE = 58; // * in `ios/**/Brand.colorset/Contents.json`. export const BRAND_COLOR = 'hsl(222, 99%, 69%)'; export const BORDER_COLOR = BRAND_COLOR; -export const HIGHLIGHT_COLOR: string = Color(BRAND_COLOR) - .fade(0.5) - .toString(); +export const HIGHLIGHT_COLOR: string = Color(BRAND_COLOR).fade(0.5).toString(); export const HALF_COLOR = 'hsla(0, 0%, 50%, 0.5)'; export const QUARTER_COLOR = 'hsla(0, 0%, 50%, 0.25)'; diff --git a/src/subscriptions/StreamListCard.js b/src/subscriptions/StreamListCard.js index 2508c26a338..8bc8204d53f 100644 --- a/src/subscriptions/StreamListCard.js +++ b/src/subscriptions/StreamListCard.js @@ -64,9 +64,10 @@ export default function StreamListCard(props: Props): Node { [auth], ); - const handleNarrow = useCallback(stream => dispatch(doNarrow(streamNarrow(stream.stream_id))), [ - dispatch, - ]); + const handleNarrow = useCallback( + stream => dispatch(doNarrow(streamNarrow(stream.stream_id))), + [dispatch], + ); return ( diff --git a/src/title/TitleStream.js b/src/title/TitleStream.js index 3ba2830e779..a6f4190dbfc 100644 --- a/src/title/TitleStream.js +++ b/src/title/TitleStream.js @@ -64,8 +64,8 @@ export default function TitleStream(props: Props): Node { zulipFeatureLevel: getZulipFeatureLevel(state), })); - const showActionSheetWithOptions: ShowActionSheetWithOptions = useActionSheet() - .showActionSheetWithOptions; + const showActionSheetWithOptions: ShowActionSheetWithOptions = + useActionSheet().showActionSheetWithOptions; const _ = useContext(TranslationContext); return ( diff --git a/src/topics/__tests__/topicsSelectors-test.js b/src/topics/__tests__/topicsSelectors-test.js index a06108f7e27..7d983429e77 100644 --- a/src/topics/__tests__/topicsSelectors-test.js +++ b/src/topics/__tests__/topicsSelectors-test.js @@ -18,7 +18,7 @@ describe('getTopicsForNarrow', () => { const state = eg.reduxStatePlus({ topics: { // prettier-ignore - [eg.stream.stream_id]: [{ name: 'hi', max_id: 123 }, { name: 'wow', max_id: 234 }] + [eg.stream.stream_id]: [{ name: 'hi', max_id: 123 }, { name: 'wow', max_id: 234 }], }, }); diff --git a/src/topics/topicActions.js b/src/topics/topicActions.js index e471e530d38..65d206e8060 100644 --- a/src/topics/topicActions.js +++ b/src/topics/topicActions.js @@ -13,40 +13,37 @@ export const initTopics = (topics: $ReadOnlyArray, streamId: number): Per streamId, }); -export const fetchTopics = (streamId: number): ThunkAction> => async ( - dispatch, - getState, -) => { - const auth = getAuth(getState()); - const { topics } = await api.getTopics(auth, streamId); - dispatch(initTopics(topics, streamId)); -}; +export const fetchTopics = + (streamId: number): ThunkAction> => + async (dispatch, getState) => { + const auth = getAuth(getState()); + const { topics } = await api.getTopics(auth, streamId); + dispatch(initTopics(topics, streamId)); + }; -export const fetchTopicsForStream = (narrow: Narrow): ThunkAction> => async ( - dispatch, - getState, -) => { - if (!isStreamNarrow(narrow)) { - return; - } - dispatch(fetchTopics(streamIdOfNarrow(narrow))); -}; +export const fetchTopicsForStream = + (narrow: Narrow): ThunkAction> => + async (dispatch, getState) => { + if (!isStreamNarrow(narrow)) { + return; + } + dispatch(fetchTopics(streamIdOfNarrow(narrow))); + }; -export const deleteMessagesForTopic = ( - streamId: number, - topic: string, -): ThunkAction> => async (dispatch, getState) => { - const state = getState(); - const outbox = getOutbox(state); +export const deleteMessagesForTopic = + (streamId: number, topic: string): ThunkAction> => + async (dispatch, getState) => { + const state = getState(); + const outbox = getOutbox(state); - outbox.forEach((outboxMessage: Outbox) => { - if ( - outboxMessage.type === 'stream' - && outboxMessage.stream_id === streamId - && outboxMessage.subject === topic - ) { - dispatch(deleteOutboxMessage(outboxMessage.id)); - } - }); - await api.deleteTopic(getAuth(state), streamId, topic); -}; + outbox.forEach((outboxMessage: Outbox) => { + if ( + outboxMessage.type === 'stream' + && outboxMessage.stream_id === streamId + && outboxMessage.subject === topic + ) { + dispatch(deleteOutboxMessage(outboxMessage.id)); + } + }); + await api.deleteTopic(getAuth(state), streamId, topic); + }; diff --git a/src/typing/typingActions.js b/src/typing/typingActions.js index d325c28de0a..9fdfeec1402 100644 --- a/src/typing/typingActions.js +++ b/src/typing/typingActions.js @@ -30,12 +30,10 @@ const typingStatusExpiryLoop = () => async (dispatch, getState) => { }; /** Start the typing-status expiry loop, if there isn't one already. */ -export const ensureTypingStatusExpiryLoop = (): ThunkAction> => async ( - dispatch, - getState, -) => { - const state = getState(); - if (Object.keys(state.typing).length === 0) { - dispatch(typingStatusExpiryLoop()); - } -}; +export const ensureTypingStatusExpiryLoop = + (): ThunkAction> => async (dispatch, getState) => { + const state = getState(); + if (Object.keys(state.typing).length === 0) { + dispatch(typingStatusExpiryLoop()); + } + }; diff --git a/src/unread/unreadSelectors.js b/src/unread/unreadSelectors.js index c3fcdd50acd..2135436c483 100644 --- a/src/unread/unreadSelectors.js +++ b/src/unread/unreadSelectors.js @@ -191,16 +191,15 @@ export const getUnreadStreamsAndTopics: Selector<$ReadOnlyArray, -> = createSelector(getUnreadStreamsAndTopics, unreadStreamsAndTopics => - unreadStreamsAndTopics - .map(stream => ({ - ...stream, - data: stream.data.filter(topic => !topic.isMuted), - })) - .filter(stream => !stream.isMuted && stream.data.length > 0), -); +export const getUnreadStreamsAndTopicsSansMuted: Selector<$ReadOnlyArray> = + createSelector(getUnreadStreamsAndTopics, unreadStreamsAndTopics => + unreadStreamsAndTopics + .map(stream => ({ + ...stream, + data: stream.data.filter(topic => !topic.isMuted), + })) + .filter(stream => !stream.isMuted && stream.data.length > 0), + ); /** * Total number of unreads in the given narrow... mostly. diff --git a/src/users/usersActions.js b/src/users/usersActions.js index cc813afd6f6..176ac93dc6c 100644 --- a/src/users/usersActions.js +++ b/src/users/usersActions.js @@ -8,20 +8,19 @@ import { getAuth, getServerVersion } from '../selectors'; import { isPmNarrow, userIdsOfPmNarrow } from '../utils/narrow'; import { getUserForId } from './userSelectors'; -export const reportPresence = (isActive: boolean): ThunkAction> => async ( - dispatch, - getState, -) => { - const newUserInput = false; // TODO Why this value? Maybe it's the right one... but why? +export const reportPresence = + (isActive: boolean): ThunkAction> => + async (dispatch, getState) => { + const newUserInput = false; // TODO Why this value? Maybe it's the right one... but why? - const auth = getAuth(getState()); - const response = await api.reportPresence(auth, isActive, newUserInput); - dispatch({ - type: PRESENCE_RESPONSE, - presence: response.presences, - serverTimestamp: response.server_timestamp, - }); -}; + const auth = getAuth(getState()); + const response = await api.reportPresence(auth, isActive, newUserInput); + dispatch({ + type: PRESENCE_RESPONSE, + presence: response.presences, + serverTimestamp: response.server_timestamp, + }); + }; // Callbacks for the typing_status module, all bound to this account. // NB the callbacks may be invoked later, on timers. They should continue @@ -55,38 +54,36 @@ const typingWorker = (state: PerAccountState) => { }; }; -export const sendTypingStart = (narrow: Narrow): ThunkAction> => async ( - dispatch, - getState, -) => { - if (!isPmNarrow(narrow)) { - return; - } +export const sendTypingStart = + (narrow: Narrow): ThunkAction> => + async (dispatch, getState) => { + if (!isPmNarrow(narrow)) { + return; + } - const recipientIds = userIdsOfPmNarrow(narrow); - // TODO(#5005): The shared typing_status doesn't behave right on switching - // accounts; it mingles state from the last call with data from this one. - // E.g., `update` calls stop_last_notification with this worker, so the - // new notify_server_stop, not with the old. Also if user IDs happen to - // match when server changed, it won't notice change. - // - // To fix, state should live in an object we can keep around per-account, - // instead of as module global. - // - // (This is pretty low-impact, because these are inherently ephemeral.) - typing_status.update(typingWorker(getState()), recipientIds); -}; + const recipientIds = userIdsOfPmNarrow(narrow); + // TODO(#5005): The shared typing_status doesn't behave right on switching + // accounts; it mingles state from the last call with data from this one. + // E.g., `update` calls stop_last_notification with this worker, so the + // new notify_server_stop, not with the old. Also if user IDs happen to + // match when server changed, it won't notice change. + // + // To fix, state should live in an object we can keep around per-account, + // instead of as module global. + // + // (This is pretty low-impact, because these are inherently ephemeral.) + typing_status.update(typingWorker(getState()), recipientIds); + }; // TODO call this on more than send: blur, navigate away, // delete all contents, etc. -export const sendTypingStop = (narrow: Narrow): ThunkAction> => async ( - dispatch, - getState, -) => { - if (!isPmNarrow(narrow)) { - return; - } +export const sendTypingStop = + (narrow: Narrow): ThunkAction> => + async (dispatch, getState) => { + if (!isPmNarrow(narrow)) { + return; + } - // TODO(#5005): Same as in sendTypingStart, above. - typing_status.update(typingWorker(getState()), null); -}; + // TODO(#5005): Same as in sendTypingStart, above. + typing_status.update(typingWorker(getState()), null); + }; diff --git a/src/utils/internalLinks.js b/src/utils/internalLinks.js index c5407319ae4..8596bc1f191 100644 --- a/src/utils/internalLinks.js +++ b/src/utils/internalLinks.js @@ -9,12 +9,8 @@ import { pmKeyRecipientsFromIds } from './recipient'; // TODO: Work out what this does, write a jsdoc for its interface, and // reimplement using URL object (not just for the realm) const getPathsFromUrl = (url: string = '', realm: URL) => { - const paths = url - .split(realm.toString()) - .pop() - .split('#narrow/') - .pop() - .split('/'); + const paths = url.split(realm.toString()).pop().split('#narrow/').pop() +.split('/'); if (paths.length > 0 && paths[paths.length - 1] === '') { // url ends with / diff --git a/src/utils/userAgent.js b/src/utils/userAgent.js index 2ad16edbacd..514ce9c39ce 100644 --- a/src/utils/userAgent.js +++ b/src/utils/userAgent.js @@ -4,5 +4,6 @@ import { nativeApplicationVersion } from 'expo-application'; const { getSystemName, getSystemVersion } = DeviceInfo; -export default `ZulipMobile/${nativeApplicationVersion - ?? '?.?.?'} (${getSystemName()} ${getSystemVersion()})`; +export default `ZulipMobile/${ + nativeApplicationVersion ?? '?.?.?' +} (${getSystemName()} ${getSystemVersion()})`; diff --git a/types/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.js.flow b/types/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.js.flow index 3d9bee3f7f8..f2109b25e64 100644 --- a/types/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/NavigationBuilderContext.js.flow @@ -37,9 +37,7 @@ export type ChildActionListener = ( ) => boolean; export type FocusedNavigationCallback = (navigation: NavigationHelpers) => T; -export type FocusedNavigationListener = ( - callback: FocusedNavigationCallback, -) => { +export type FocusedNavigationListener = (callback: FocusedNavigationCallback) => { handled: boolean, result: T, ... diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow index b1232ee3198..58cf56a858f 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -116,11 +116,11 @@ export type EventEmitter = { } & $FlowFixMe /* EventMap[EventName]['canPreventDefault'] extends true ? { canPreventDefault: true; } : {} */ /* tsflower-unimplemented: ConditionalType */ & - $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends EventMap[EventName]['data'] ? { + $FlowFixMe /* undefined extends EventMap[EventName]['data'] ? { data?: EventMap[EventName]['data']; } : { data: EventMap[EventName]['data']; - } */, + } */ /* tsflower-unimplemented: ConditionalType */, ): EventArg< EventName, $ElementType<$ElementType, 'canPreventDefault'>, @@ -155,7 +155,7 @@ type NavigationHelpersCommon< dispatch(action: NavigationAction | ((state: State) => NavigationAction)): void, // prettier-ignore navigate>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, navigate>( route: diff --git a/types/@react-navigation/core/lib/typescript/src/useCurrentRender.js.flow b/types/@react-navigation/core/lib/typescript/src/useCurrentRender.js.flow index ecbda3c3a8a..37eaf0b0ecf 100644 --- a/types/@react-navigation/core/lib/typescript/src/useCurrentRender.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useCurrentRender.js.flow @@ -9,7 +9,7 @@ type Options = { navigation: NavigationHelpers, descriptors: { [key: string]: Descriptor, { ... }>, - ..., + ... }, ... }; diff --git a/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow b/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow index df244f7fba0..c07a899badf 100644 --- a/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow @@ -221,9 +221,7 @@ declare export default function useNavigationBuilder< target?: string | void, ... }> - | (( - state: any, - ) => Readonly<{ + | ((state: any) => Readonly<{ type: string, payload?: { ... } | void, source?: string | void, diff --git a/types/@react-navigation/core/lib/typescript/src/useNavigationCache.js.flow b/types/@react-navigation/core/lib/typescript/src/useNavigationCache.js.flow index 02dc22f99f0..ee78ddf5b2f 100644 --- a/types/@react-navigation/core/lib/typescript/src/useNavigationCache.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useNavigationCache.js.flow @@ -26,7 +26,7 @@ type Options> = { type NavigationCache, ScreenOptions: { ... }> = { [key: string]: NavigationProp, - ..., + ... }; declare export default function useNavigationCache< State: NavigationState<>, diff --git a/types/@react-navigation/core/lib/typescript/src/useNavigationHelpers.js.flow b/types/@react-navigation/core/lib/typescript/src/useNavigationHelpers.js.flow index 5f10da3ad4d..19de1edc527 100644 --- a/types/@react-navigation/core/lib/typescript/src/useNavigationHelpers.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useNavigationHelpers.js.flow @@ -265,9 +265,7 @@ declare export default function useNavigationHelpers< target?: string | void, ... }> - | (( - state: any, - ) => Readonly<{ + | ((state: any) => Readonly<{ type: string, payload?: { ... } | void, source?: string | void, diff --git a/types/@react-navigation/core/lib/typescript/src/useOptionsGetters.js.flow b/types/@react-navigation/core/lib/typescript/src/useOptionsGetters.js.flow index 8e71a78fc20..e1881069c14 100644 --- a/types/@react-navigation/core/lib/typescript/src/useOptionsGetters.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useOptionsGetters.js.flow @@ -11,9 +11,7 @@ type Options = { ... }; -declare export default function useOptionsGetters( - Options, -): { +declare export default function useOptionsGetters(Options): { addOptionsGetter: (key: string, getter: () => { ... } | void | null) => () => void, getCurrentOptions: () => { ... } | null | void, ... diff --git a/types/@react-navigation/native/lib/typescript/src/useLinkProps.js.flow b/types/@react-navigation/native/lib/typescript/src/useLinkProps.js.flow index bc07e1a08d4..5d6ad355f73 100644 --- a/types/@react-navigation/native/lib/typescript/src/useLinkProps.js.flow +++ b/types/@react-navigation/native/lib/typescript/src/useLinkProps.js.flow @@ -13,9 +13,7 @@ type Props = { ... }; -declare export default function useLinkProps( - Props, -): { +declare export default function useLinkProps(Props): { href: string, accessibilityRole: 'link', onPress: ( diff --git a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow index e5f87894565..cce94da4b54 100644 --- a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow @@ -62,11 +62,11 @@ export type StackNavigationState = NavigationState = { // prettier-ignore replace>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, // prettier-ignore push>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, pop(count?: number): void, popToTop(): void, @@ -81,9 +81,7 @@ declare export var StackActions: { ... }; -declare export default function StackRouter( - options: StackRouterOptions, -): Router< +declare export default function StackRouter(options: StackRouterOptions): Router< StackNavigationState<{ [key: string]: { ... } | void }>, | { type: 'GO_BACK', diff --git a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow index eca6ce9be6a..db3326e8401 100644 --- a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow @@ -44,7 +44,7 @@ export type TabNavigationState = $Diff< export type TabActionHelpers = { // prettier-ignore jumpTo, string>>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, ... }; @@ -54,9 +54,7 @@ declare export var TabActions: { ... }; -declare export default function TabRouter( - TabRouterOptions, -): Router< +declare export default function TabRouter(TabRouterOptions): Router< TabNavigationState<{ [key: string]: { ... } | void }>, | { type: 'GO_BACK', diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow index 780a9b08fe2..2bef8a174a9 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow @@ -82,7 +82,7 @@ export type NavigationAction = Readonly<{ export type ActionCreators = { [key: string]: (...args: any) => Action, - ..., + ... }; export type DefaultRouterOptions = { initialRouteName?: RouteName, diff --git a/types/patches/0001-format-Add-a-few-prettier-ignores-to-work-around-a-P.patch b/types/patches/0001-format-Add-a-few-prettier-ignores-to-work-around-a-P.patch index 3d8ccfa0f82..26437ed835b 100644 --- a/types/patches/0001-format-Add-a-few-prettier-ignores-to-work-around-a-P.patch +++ b/types/patches/0001-format-Add-a-few-prettier-ignores-to-work-around-a-P.patch @@ -13,7 +13,7 @@ Discussion with a reduced repro of the Prettier bug: 3 files changed, 4 insertions(+) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index 41c9a70d2..3e166a2b0 100644 +index 086c12609..b6145283b 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -150,6 +150,7 @@ type NavigationHelpersCommon< @@ -22,10 +22,10 @@ index 41c9a70d2..3e166a2b0 100644 dispatch(action: NavigationAction | ((state: State) => NavigationAction)): void, + // prettier-ignore navigate>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, diff --git a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow -index b93d56027..ba5e5e532 100644 +index 179e34e09..3bd89b8ce 100644 --- a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow @@ -58,9 +58,11 @@ export type StackNavigationState = NavigationState = { + // prettier-ignore replace>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, + // prettier-ignore push>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, diff --git a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow -index 8da462379..99c02f62b 100644 +index fd281a865..4fa8ed1ca 100644 --- a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow @@ -41,6 +41,7 @@ export type TabNavigationState = $Diff< @@ -50,8 +50,8 @@ index 8da462379..99c02f62b 100644 export type TabActionHelpers = { + // prettier-ignore jumpTo, string>>( - ...args: $FlowFixMe /* tsflower-unimplemented: ConditionalType */ /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ + ...args: $FlowFixMe /* undefined extends ParamList[RouteName] ? [RouteName] | [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] */ /* tsflower-unimplemented: ConditionalType */ ): void, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0002-tsflower-rnsac-Fix-ReadOnlyArray-reference-to-litera.patch b/types/patches/0002-tsflower-rnsac-Fix-ReadOnlyArray-reference-to-litera.patch index 471d5af21fb..a5011bbf001 100644 --- a/types/patches/0002-tsflower-rnsac-Fix-ReadOnlyArray-reference-to-litera.patch +++ b/types/patches/0002-tsflower-rnsac-Fix-ReadOnlyArray-reference-to-litera.patch @@ -37,5 +37,5 @@ index f3c41af41..e31ab1a65 100644 ... }; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0003-upstream-rnav-ReadOnlyArray-on-NavigationState-prope.patch b/types/patches/0003-upstream-rnav-ReadOnlyArray-on-NavigationState-prope.patch index 1262a59c61d..fec6d6a9f21 100644 --- a/types/patches/0003-upstream-rnav-ReadOnlyArray-on-NavigationState-prope.patch +++ b/types/patches/0003-upstream-rnav-ReadOnlyArray-on-NavigationState-prope.patch @@ -9,7 +9,7 @@ I believe this could be expressed upstream, with `readonly Foo[]`. 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -index 9b9a04c74..1a60f57f0 100644 +index 574ad164b..65d187165 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow @@ -12,9 +12,9 @@ type NavigationRoute> = Ro @@ -26,5 +26,5 @@ index 9b9a04c74..1a60f57f0 100644 stale: false, ... -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0004-upstream-rnav-ReadOnly-on-ResetState-as-param-of-res.patch b/types/patches/0004-upstream-rnav-ReadOnly-on-ResetState-as-param-of-res.patch index 28958e77fbf..efc8f010765 100644 --- a/types/patches/0004-upstream-rnav-ReadOnly-on-ResetState-as-param-of-res.patch +++ b/types/patches/0004-upstream-rnav-ReadOnly-on-ResetState-as-param-of-res.patch @@ -20,5 +20,5 @@ index 0976fd765..dcd559b0a 100644 declare export function setParams(params: { ... }): Action; export {}; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0005-upstream-rnav-Fix-type-parameter-defaults-that-don-t.patch b/types/patches/0005-upstream-rnav-Fix-type-parameter-defaults-that-don-t.patch index 2093a892f19..ddc5035f0ac 100644 --- a/types/patches/0005-upstream-rnav-Fix-type-parameter-defaults-that-don-t.patch +++ b/types/patches/0005-upstream-rnav-Fix-type-parameter-defaults-that-don-t.patch @@ -25,7 +25,7 @@ case. For example, our `typesEquivalent` in src/generics.js. 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index 3e166a2b0..c9a644412 100644 +index b6145283b..e3dd9a0d0 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -181,7 +181,7 @@ type NavigationHelpersCommon< @@ -73,5 +73,5 @@ index 946df1eb6..94ea2dee5 100644 ParamList, RouteName, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0006-upstream-rnav-Fix-State-tparam-bound-in-NavigationPr.patch b/types/patches/0006-upstream-rnav-Fix-State-tparam-bound-in-NavigationPr.patch index a19614123da..ce41aee04ae 100644 --- a/types/patches/0006-upstream-rnav-Fix-State-tparam-bound-in-NavigationPr.patch +++ b/types/patches/0006-upstream-rnav-Fix-State-tparam-bound-in-NavigationPr.patch @@ -10,7 +10,7 @@ not some other. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index c9a644412..1e26183cb 100644 +index e3dd9a0d0..41f13ea18 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -202,7 +202,7 @@ export type NavigationContainerProps = { @@ -23,5 +23,5 @@ index c9a644412..1e26183cb 100644 EventMap: EventMapBase = EventMapBase, > = NavigationHelpersCommon & { -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0007-upstream-rnav-Covariant-indexers-in-create-Navigator.patch b/types/patches/0007-upstream-rnav-Covariant-indexers-in-create-Navigator.patch index de5ef968eb2..d9635bfa0f8 100644 --- a/types/patches/0007-upstream-rnav-Covariant-indexers-in-create-Navigator.patch +++ b/types/patches/0007-upstream-rnav-Covariant-indexers-in-create-Navigator.patch @@ -47,5 +47,5 @@ index 7a17b58e6..1842836b1 100644 StackNavigationEventMap, typeof StackNavigator, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0008-upstream-rnav-Covariant-indexer-in-ParamListBase.patch b/types/patches/0008-upstream-rnav-Covariant-indexer-in-ParamListBase.patch index abd33b51ee4..cbca00c020e 100644 --- a/types/patches/0008-upstream-rnav-Covariant-indexer-in-ParamListBase.patch +++ b/types/patches/0008-upstream-rnav-Covariant-indexer-in-ParamListBase.patch @@ -8,7 +8,7 @@ Subject: [upstream] rnav: Covariant indexer in ParamListBase 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -index 1a60f57f0..daf37cc5f 100644 +index 65d187165..a194fa5fa 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow @@ -70,7 +70,7 @@ export type Route = @@ -21,5 +21,5 @@ index 1a60f57f0..daf37cc5f 100644 export type NavigationAction = Readonly<{ type: string, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0009-upstream-rnav-create-Navigator-type-surely-means-to-.patch b/types/patches/0009-upstream-rnav-create-Navigator-type-surely-means-to-.patch index 42dcc82e9f9..5ce9c792f31 100644 --- a/types/patches/0009-upstream-rnav-create-Navigator-type-surely-means-to-.patch +++ b/types/patches/0009-upstream-rnav-create-Navigator-type-surely-means-to-.patch @@ -40,5 +40,5 @@ index 1842836b1..3c2939d32 100644 StackNavigationEventMap, typeof StackNavigator, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0010-upstream-rnav-On-create-Navigator-cut-redundant-wron.patch b/types/patches/0010-upstream-rnav-On-create-Navigator-cut-redundant-wron.patch index 87f54ff85f6..05f68f00300 100644 --- a/types/patches/0010-upstream-rnav-On-create-Navigator-cut-redundant-wron.patch +++ b/types/patches/0010-upstream-rnav-On-create-Navigator-cut-redundant-wron.patch @@ -53,5 +53,5 @@ index 3c2939d32..f96ddf688 100644 declare var _default: < ParamList: { +[key: string]: { ... } | void }, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0011-upstream-optional-rnav-Fix-NavigationRoute-to-supply.patch b/types/patches/0011-upstream-optional-rnav-Fix-NavigationRoute-to-supply.patch index d9fea39d727..68abe8e33ad 100644 --- a/types/patches/0011-upstream-optional-rnav-Fix-NavigationRoute-to-supply.patch +++ b/types/patches/0011-upstream-optional-rnav-Fix-NavigationRoute-to-supply.patch @@ -12,7 +12,7 @@ that I hoped it might resolve.) 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -index daf37cc5f..45fb02599 100644 +index a194fa5fa..ea0e29c32 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow @@ -7,7 +7,7 @@ export type CommonNavigationAction = CommonActions.Action; @@ -25,5 +25,5 @@ index daf37cc5f..45fb02599 100644 export type NavigationState = Readonly<{ key: string, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0012-irreducible-rnav-Make-action-types-exact.patch b/types/patches/0012-irreducible-rnav-Make-action-types-exact.patch index 1fe2827057c..e8b878fd1ce 100644 --- a/types/patches/0012-irreducible-rnav-Make-action-types-exact.patch +++ b/types/patches/0012-irreducible-rnav-Make-action-types-exact.patch @@ -38,7 +38,7 @@ index dcd559b0a..054215538 100644 declare export function goBack(): Action; diff --git a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow -index ba5e5e532..746d3b1f7 100644 +index 3bd89b8ce..d7bdf0f5e 100644 --- a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow @@ -12,7 +12,7 @@ import { @@ -61,5 +61,5 @@ index ba5e5e532..746d3b1f7 100644 export type StackRouterOptions = DefaultRouterOptions<>; export type StackNavigationState = NavigationState & { -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0013-irreducible-rnav-Covariant-type-parameters-on-variou.patch b/types/patches/0013-irreducible-rnav-Covariant-type-parameters-on-variou.patch index aaf65715290..e0af60b2602 100644 --- a/types/patches/0013-irreducible-rnav-Covariant-type-parameters-on-variou.patch +++ b/types/patches/0013-irreducible-rnav-Covariant-type-parameters-on-variou.patch @@ -27,7 +27,7 @@ index d3c2017d4..3bc615faa 100644 ParamList, RouteName, diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index 1e26183cb..91a0f4541 100644 +index 41f13ea18..ccdd92d43 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -126,7 +126,7 @@ export type EventEmitter = { @@ -48,7 +48,7 @@ index 1e26183cb..91a0f4541 100644 State: NavigationState<> = NavigationState<>, > = { dispatch(action: NavigationAction | ((state: State) => NavigationAction)): void, -@@ -200,19 +200,19 @@ export type NavigationContainerProps = { +@@ -200,8 +200,8 @@ export type NavigationContainerProps = { }; export type NavigationProp< @@ -59,10 +59,7 @@ index 1e26183cb..91a0f4541 100644 State: NavigationState = NavigationState, ScreenOptions: { ... } = { ... }, EventMap: EventMapBase = EventMapBase, - > = NavigationHelpersCommon & { - setParams(params: Partial<$ElementType>): void, - setOptions(options: Partial): void, - ... +@@ -212,7 +212,7 @@ export type NavigationProp< } & EventConsumer> & PrivateValueStore; @@ -85,7 +82,7 @@ index cf53d769d..8d2ea317f 100644 ParamList, RouteName, diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -index 45fb02599..4b0964c14 100644 +index ea0e29c32..6a0de188b 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow @@ -4,12 +4,12 @@ @@ -135,5 +132,5 @@ index 94ea2dee5..da137e97a 100644 ParamList, RouteName, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0014-irreducible-rnav-EventMap-types-exact-and-covariant.patch b/types/patches/0014-irreducible-rnav-EventMap-types-exact-and-covariant.patch index 9ef2b14b769..4040a165e26 100644 --- a/types/patches/0014-irreducible-rnav-EventMap-types-exact-and-covariant.patch +++ b/types/patches/0014-irreducible-rnav-EventMap-types-exact-and-covariant.patch @@ -39,7 +39,7 @@ index 3bc615faa..ed9343057 100644 export type LabelPosition = 'beside-icon' | 'below-icon'; export type BottomTabNavigationHelpers = NavigationHelpers< diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index 91a0f4541..a96ec6c0d 100644 +index ccdd92d43..1421d39dd 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -45,24 +45,21 @@ export type DefaultNavigatorOptions< @@ -169,5 +169,5 @@ index da137e97a..fa014c506 100644 export type StackNavigationHelpers = NavigationHelpers & StackActionHelpers; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0015-tsflower-rnav-Fix-a-parenthesization-of-intersection.patch b/types/patches/0015-tsflower-rnav-Fix-a-parenthesization-of-intersection.patch index 97bdfe24f19..8ac6adef0a2 100644 --- a/types/patches/0015-tsflower-rnav-Fix-a-parenthesization-of-intersection.patch +++ b/types/patches/0015-tsflower-rnav-Fix-a-parenthesization-of-intersection.patch @@ -12,7 +12,7 @@ So that's a TsFlower bug. Probably ultimately a Recast bug. 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index a96ec6c0d..e319b03e1 100644 +index 1421d39dd..cb0af945e 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -268,32 +268,32 @@ export type RouteConfig< @@ -81,5 +81,5 @@ index a96ec6c0d..e319b03e1 100644 export type NavigationContainerEventMap = {| state: {| data: { state: NavigationState<> | PartialState> | void, ... } |}, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0016-tsflower-Handle-TS-reference-pragma-for-React-in-mat.patch b/types/patches/0016-tsflower-Handle-TS-reference-pragma-for-React-in-mat.patch index c773fb9e6a1..ae2540b306f 100644 --- a/types/patches/0016-tsflower-Handle-TS-reference-pragma-for-React-in-mat.patch +++ b/types/patches/0016-tsflower-Handle-TS-reference-pragma-for-React-in-mat.patch @@ -48,7 +48,7 @@ index 36bc57918..1c02714a5 100644 tabBarAccessibilityLabel?: string, tabBarTestID?: string, ... -@@ -88,30 +89,30 @@ export type MaterialTopTabDescriptorMap = { [key: string]: MaterialTopTabDescrip +@@ -88,7 +89,7 @@ export type MaterialTopTabDescriptorMap = { [key: string]: MaterialTopTabDescrip export type MaterialTopTabNavigationConfig = Partial< $Diff< @@ -57,12 +57,7 @@ index 36bc57918..1c02714a5 100644 {| navigationState: mixed, onIndexChange: mixed, - onSwipeStart: mixed, - onSwipeEnd: mixed, - renderScene: mixed, - renderTabBar: mixed, - renderPager: mixed, - renderLazyPlaceholder: mixed, +@@ -101,9 +102,9 @@ export type MaterialTopTabNavigationConfig = Partial< |}, >, > & { @@ -75,7 +70,7 @@ index 36bc57918..1c02714a5 100644 tabBarOptions?: MaterialTopTabBarOptions, tabBarPosition?: 'top' | 'bottom', ... - }; +@@ -111,7 +112,7 @@ export type MaterialTopTabNavigationConfig = Partial< export type MaterialTopTabBarOptions = Partial< $Diff< @@ -85,5 +80,5 @@ index 36bc57918..1c02714a5 100644 [key: | 'navigationState' -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0017-tsflower-Resolve-re-export-indirection-on-CommonActi.patch b/types/patches/0017-tsflower-Resolve-re-export-indirection-on-CommonActi.patch index 80fc1782701..9849105e164 100644 --- a/types/patches/0017-tsflower-Resolve-re-export-indirection-on-CommonActi.patch +++ b/types/patches/0017-tsflower-Resolve-re-export-indirection-on-CommonActi.patch @@ -52,5 +52,5 @@ index cc5442458..3f2af62eb 100644 type Options = { -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0018-tsflower-Fix-import-type-of-classes.patch b/types/patches/0018-tsflower-Fix-import-type-of-classes.patch index 344240a2c60..0ecac010eab 100644 --- a/types/patches/0018-tsflower-Fix-import-type-of-classes.patch +++ b/types/patches/0018-tsflower-Fix-import-type-of-classes.patch @@ -56,5 +56,5 @@ index 1c02714a5..0dd4c30b6 100644 import { type ParamListBase, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0019-tsflower-Better-substitution-for-React.ForwardRefExo.patch b/types/patches/0019-tsflower-Better-substitution-for-React.ForwardRefExo.patch index 339581eb336..d1595ef56d7 100644 --- a/types/patches/0019-tsflower-Better-substitution-for-React.ForwardRefExo.patch +++ b/types/patches/0019-tsflower-Better-substitution-for-React.ForwardRefExo.patch @@ -36,5 +36,5 @@ index fecf4f88b..ef52d077f 100644 theme?: Theme | void, linking?: LinkingOptions | void, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0020-tsflower-Manually-rewrite-Pick-from-TS-default-libra.patch b/types/patches/0020-tsflower-Manually-rewrite-Pick-from-TS-default-libra.patch index 094a3795525..0a9c7bad506 100644 --- a/types/patches/0020-tsflower-Manually-rewrite-Pick-from-TS-default-libra.patch +++ b/types/patches/0020-tsflower-Manually-rewrite-Pick-from-TS-default-libra.patch @@ -29,7 +29,7 @@ first argument? 5 files changed, 67 insertions(+), 154 deletions(-) diff --git a/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow b/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow -index 0c9c167c3..df244f7fb 100644 +index 081a20a79..c07a899ba 100644 --- a/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/useNavigationBuilder.js.flow @@ -1,6 +1,7 @@ @@ -40,7 +40,7 @@ index 0c9c167c3..df244f7fb 100644 import type { NavigationProp as $tsflower_import_type$_$_2e__2f_types$NavigationProp } from './types'; import type { EventEmitter as $tsflower_import_type$_$_2e__2f_types$EventEmitter } from './types'; import type { EventConsumer as $tsflower_import_type$_$_2e__2f_types$EventConsumer } from './types'; -@@ -317,12 +318,12 @@ declare export default function useNavigationBuilder< +@@ -315,12 +316,12 @@ declare export default function useNavigationBuilder< >, }, NavigationContent: ( @@ -59,7 +59,7 @@ diff --git a/types/@react-navigation/native/lib/typescript/src/useLinking.js.flo index 66bfb1f4d..19a797a4a 100644 --- a/types/@react-navigation/native/lib/typescript/src/useLinking.js.flow +++ b/types/@react-navigation/native/lib/typescript/src/useLinking.js.flow -@@ -16,70 +16,32 @@ declare export default function useLinking( +@@ -16,33 +16,14 @@ declare export default function useLinking( ): { getInitialState: () => PromiseLike< | (Partial< @@ -101,10 +101,7 @@ index 66bfb1f4d..19a797a4a 100644 > & Readonly<{ stale?: true | void, - routes: $tsflower_import_type$_$_40_react_2d_navigation_2f_core$PartialRoute< - $tsflower_import_type$_$_40_react_2d_navigation_2f_core$Route, - >[], - ... +@@ -53,33 +34,14 @@ declare export default function useLinking( }> & { state?: | (Partial< @@ -150,7 +147,7 @@ diff --git a/types/@react-navigation/native/lib/typescript/src/useLinking.native index 66bfb1f4d..19a797a4a 100644 --- a/types/@react-navigation/native/lib/typescript/src/useLinking.native.js.flow +++ b/types/@react-navigation/native/lib/typescript/src/useLinking.native.js.flow -@@ -16,70 +16,32 @@ declare export default function useLinking( +@@ -16,33 +16,14 @@ declare export default function useLinking( ): { getInitialState: () => PromiseLike< | (Partial< @@ -192,10 +189,7 @@ index 66bfb1f4d..19a797a4a 100644 > & Readonly<{ stale?: true | void, - routes: $tsflower_import_type$_$_40_react_2d_navigation_2f_core$PartialRoute< - $tsflower_import_type$_$_40_react_2d_navigation_2f_core$Route, - >[], - ... +@@ -53,33 +34,14 @@ declare export default function useLinking( }> & { state?: | (Partial< @@ -238,7 +232,7 @@ index 66bfb1f4d..19a797a4a 100644 Readonly<{ stale?: true | void, diff --git a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow -index 746d3b1f7..e5f878945 100644 +index d7bdf0f5e..cce94da4b 100644 --- a/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/StackRouter.js.flow @@ -1,6 +1,7 @@ @@ -249,7 +243,7 @@ index 746d3b1f7..e5f878945 100644 import type { PartialState as $tsflower_import_type$_$_2e__2f_types$PartialState } from './types'; import type { Readonly } from 'tsflower/subst/lib'; -@@ -160,31 +161,21 @@ declare export default function StackRouter( +@@ -158,31 +159,21 @@ declare export default function StackRouter(options: StackRouterOptions): Router ... }>, > @@ -297,7 +291,7 @@ index 746d3b1f7..e5f878945 100644 source?: string | void, target?: string | void, diff --git a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow -index 99c02f62b..eca6ce9be 100644 +index 4fa8ed1ca..db3326e84 100644 --- a/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/TabRouter.js.flow @@ -1,6 +1,7 @@ @@ -308,7 +302,7 @@ index 99c02f62b..eca6ce9be 100644 import type { Extract, Readonly } from 'tsflower/subst/lib'; import { -@@ -121,25 +122,21 @@ declare export default function TabRouter( +@@ -119,25 +120,21 @@ declare export default function TabRouter(TabRouterOptions): Router< ... }>, > @@ -350,5 +344,5 @@ index 99c02f62b..eca6ce9be 100644 source?: string | void, target?: string | void, -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0021-tsflower-Substitute-for-React.ReactText.patch b/types/patches/0021-tsflower-Substitute-for-React.ReactText.patch index 7047210265d..8f45576f202 100644 --- a/types/patches/0021-tsflower-Substitute-for-React.ReactText.patch +++ b/types/patches/0021-tsflower-Substitute-for-React.ReactText.patch @@ -28,5 +28,5 @@ index 58e35d769..2c1a6e404 100644 ... }; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0022-adhoc-rnav-Manually-approximate-conditional-in-Route.patch b/types/patches/0022-adhoc-rnav-Manually-approximate-conditional-in-Route.patch index f72bfdc7854..e7adc34b0c0 100644 --- a/types/patches/0022-adhoc-rnav-Manually-approximate-conditional-in-Route.patch +++ b/types/patches/0022-adhoc-rnav-Manually-approximate-conditional-in-Route.patch @@ -25,10 +25,10 @@ probably get annoying. 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/@react-navigation/routers/lib/typescript/src/types.js.flow b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -index 4b0964c14..780a9b08f 100644 +index 6a0de188b..2bef8a174 100644 --- a/types/@react-navigation/routers/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/routers/lib/typescript/src/types.js.flow -@@ -56,19 +56,19 @@ export type PartialState<+State: NavigationState<>> = Partial< +@@ -56,9 +56,9 @@ export type PartialState<+State: NavigationState<>> = Partial< export type Route<+RouteName: string, +Params: { ... } | void = { ... } | void> = $ReadOnly<{ key: string, name: RouteName, @@ -40,9 +40,7 @@ index 4b0964c14..780a9b08f 100644 /** * Params for this route * / - params?: Readonly; - }> : Readonly<{ - /** +@@ -68,7 +68,7 @@ export type Route<+RouteName: string, +Params: { ... } | void = { ... } | void> * Params for this route * / params: Readonly; @@ -52,5 +50,5 @@ index 4b0964c14..780a9b08f 100644 export type ParamListBase = { +[key: string]: { ... } | void }; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0023-adhoc-rnav-Manually-approximate-conditionals-in-Even.patch b/types/patches/0023-adhoc-rnav-Manually-approximate-conditionals-in-Even.patch index e5f6ba329cc..dc9458e7541 100644 --- a/types/patches/0023-adhoc-rnav-Manually-approximate-conditionals-in-Even.patch +++ b/types/patches/0023-adhoc-rnav-Manually-approximate-conditionals-in-Even.patch @@ -16,10 +16,10 @@ them unconditionally. 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index e319b03e1..9ddf90385 100644 +index cb0af945e..4d918550e 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow -@@ -65,17 +65,23 @@ export type EventArg; -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/patches/0024-rnav-Fix-odd-initialRouteName-index-signature-error.patch b/types/patches/0024-rnav-Fix-odd-initialRouteName-index-signature-error.patch index b36d01f48dc..e0d8e70344b 100644 --- a/types/patches/0024-rnav-Fix-odd-initialRouteName-index-signature-error.patch +++ b/types/patches/0024-rnav-Fix-odd-initialRouteName-index-signature-error.patch @@ -34,7 +34,7 @@ References: 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/@react-navigation/core/lib/typescript/src/types.js.flow b/types/@react-navigation/core/lib/typescript/src/types.js.flow -index 9ddf90385..b1232ee31 100644 +index 4d918550e..58cf56a85 100644 --- a/types/@react-navigation/core/lib/typescript/src/types.js.flow +++ b/types/@react-navigation/core/lib/typescript/src/types.js.flow @@ -24,7 +24,7 @@ import { @@ -47,5 +47,5 @@ index 9ddf90385..b1232ee31 100644 screenOptions?: | ScreenOptions -- -2.30.2 +2.32.0 (Apple Git-132) diff --git a/types/react-native-tab-view/lib/typescript/src/SceneMap.js.flow b/types/react-native-tab-view/lib/typescript/src/SceneMap.js.flow index 4b5ff9b6f9d..0d678e134fa 100644 --- a/types/react-native-tab-view/lib/typescript/src/SceneMap.js.flow +++ b/types/react-native-tab-view/lib/typescript/src/SceneMap.js.flow @@ -6,5 +6,5 @@ import * as React from 'react'; import { type SceneRendererProps } from './types'; declare export default function SceneMap(scenes: { [key: string]: React.ComponentType, - ..., + ... }): (SceneRendererProps & { route: any, ... }) => $tsflower_subst$React$JSX$Element; diff --git a/types/react-native-tab-view/lib/typescript/src/ScrollPager.js.flow b/types/react-native-tab-view/lib/typescript/src/ScrollPager.js.flow index 19f9e541123..7908822ed90 100644 --- a/types/react-native-tab-view/lib/typescript/src/ScrollPager.js.flow +++ b/types/react-native-tab-view/lib/typescript/src/ScrollPager.js.flow @@ -15,10 +15,9 @@ type State = { ... }; -declare export default class ScrollPager extends React.Component< - Props & { overscroll?: boolean, ... }, - State, -> { +declare export default class ScrollPager + extends React.Component & { overscroll?: boolean, ... }, State> +{ defaultProps: { bounces: boolean, ... }; componentDidMount(): void; componentDidUpdate(prevProps: Props): void; diff --git a/yarn.lock b/yarn.lock index b7f728a2b18..9ab5cd6902e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,13 +9,6 @@ dependencies: "@jridgewell/trace-mapping" "^0.3.0" -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" @@ -198,10 +191,10 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== "@babel/helper-remap-async-to-generator@^7.16.8": version "7.16.8" @@ -507,12 +500,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.16.7", "@babel/plugin-syntax-flow@^7.2.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz#202b147e5892b8452bbb0bb269c7ed2539ab8832" - integrity sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ== +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.14.5", "@babel/plugin-syntax-flow@^7.16.7", "@babel/plugin-syntax-flow@^7.2.0": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.17.12.tgz#23d852902acd19f42923fca9d0f196984d124e73" + integrity sha512-B8QIgBvkIG6G2jgsOHQUist7Sm0EBLDCx8sen072IwqNuzMegZNXrYnSv77cYzA8mLDZAfQYqsLIhimiP1s2HQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -528,12 +521,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" - integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== +"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" + integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -819,16 +812,16 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.12.17": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz#eac1565da176ccb1a715dae0b4609858808008c1" - integrity sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ== +"@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.12.17", "@babel/plugin-transform-react-jsx@^7.14.9": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" + integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== dependencies: "@babel/helper-annotate-as-pure" "^7.16.7" "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-jsx" "^7.16.7" - "@babel/types" "^7.17.0" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/types" "^7.17.12" "@babel/plugin-transform-regenerator@^7.0.0", "@babel/plugin-transform-regenerator@^7.16.7": version "7.17.9" @@ -1076,10 +1069,10 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" - integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== +"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.17.12", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" + integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== dependencies: "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" @@ -1104,19 +1097,19 @@ dependencies: "@types/hammerjs" "^2.0.36" -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" + debug "^4.3.2" + espree "^9.3.2" + globals "^13.15.0" + ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" + js-yaml "^4.1.0" + minimatch "^3.1.2" strip-json-comments "^3.1.1" "@expo/config-plugins@3.1.0": @@ -1356,16 +1349,16 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== +"@humanwhocodes/config-array@^0.9.2": + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== dependencies: - "@humanwhocodes/object-schema" "^1.2.0" + "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" minimatch "^3.0.4" -"@humanwhocodes/object-schema@^1.2.0": +"@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== @@ -2319,10 +2312,18 @@ "@types/node" "*" "@types/responselike" "*" -"@types/eslint-visitor-keys@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" - integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== +"@types/eslint@^8.4.2": + version "8.4.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.2.tgz#48f2ac58ab9c631cb68845c3d956b28f79fad575" + integrity sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "0.0.51" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== "@types/estree@0.0.39": version "0.0.39" @@ -2386,7 +2387,7 @@ resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64" integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.7": +"@types/json-schema@*", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -2413,10 +2414,10 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/prettier@^2.0.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759" - integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== +"@types/prettier@^2.0.0", "@types/prettier@^2.6.0": + version "2.6.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.3.tgz#68ada76827b0010d0db071f739314fa429943d0a" + integrity sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg== "@types/prop-types@*": version "15.7.5" @@ -2518,126 +2519,61 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/experimental-utils@1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e" - integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-scope "^4.0.0" - -"@typescript-eslint/experimental-utils@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" - integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/typescript-estree" "3.10.1" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" +"@typescript-eslint/parser@^5.10.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.27.0.tgz#62bb091ed5cf9c7e126e80021bb563dcf36b6b12" + integrity sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA== + dependencies: + "@typescript-eslint/scope-manager" "5.27.0" + "@typescript-eslint/types" "5.27.0" + "@typescript-eslint/typescript-estree" "5.27.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.27.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz#a272178f613050ed62f51f69aae1e19e870a8bbb" + integrity sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g== + dependencies: + "@typescript-eslint/types" "5.27.0" + "@typescript-eslint/visitor-keys" "5.27.0" + +"@typescript-eslint/types@5.27.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.0.tgz#c3f44b9dda6177a9554f94a74745ca495ba9c001" + integrity sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A== + +"@typescript-eslint/typescript-estree@5.27.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz#7965f5b553c634c5354a47dcce0b40b94611e995" + integrity sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ== + dependencies: + "@typescript-eslint/types" "5.27.0" + "@typescript-eslint/visitor-keys" "5.27.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@^4.0.1": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== +"@typescript-eslint/utils@^5.10.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.27.0.tgz#d0021cbf686467a6a9499bd0589e19665f9f7e71" + integrity sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA== dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.27.0" + "@typescript-eslint/types" "5.27.0" + "@typescript-eslint/typescript-estree" "5.27.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^1.10.2": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" - integrity sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.13.0" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-visitor-keys "^1.0.0" - -"@typescript-eslint/parser@^3.0.0": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467" - integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw== +"@typescript-eslint/visitor-keys@5.27.0": + version "5.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz#97aa9a5d2f3df8215e6d3b77f9d214a24db269bd" + integrity sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA== dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "3.10.1" - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/typescript-estree" "3.10.1" - eslint-visitor-keys "^1.1.0" - -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - -"@typescript-eslint/types@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" - integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/typescript-estree@1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" - integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw== - dependencies: - lodash.unescape "4.0.1" - semver "5.5.0" - -"@typescript-eslint/typescript-estree@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" - integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w== - dependencies: - "@typescript-eslint/types" "3.10.1" - "@typescript-eslint/visitor-keys" "3.10.1" - debug "^4.1.1" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/visitor-keys@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" - integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ== - dependencies: - eslint-visitor-keys "^1.1.0" - -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== - dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "5.27.0" + eslint-visitor-keys "^3.3.0" "@vusion/webfonts-generator@^0.8.0": version "0.8.0" @@ -2711,14 +2647,7 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= - dependencies: - acorn "^3.0.4" - -acorn-jsx@^5.0.0, acorn-jsx@^5.2.0, acorn-jsx@^5.3.1: +acorn-jsx@^5.2.0, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== @@ -2728,30 +2657,15 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= - -acorn@^5.5.0: - version "5.7.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" - integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== - -acorn@^6.0.7: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.1.1: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4: - version "8.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" - integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== +acorn@^8.2.4, acorn@^8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== agent-base@6, agent-base@^6.0.2: version "6.0.2" @@ -2777,7 +2691,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.4, ajv@^6.9.1: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2802,11 +2716,6 @@ anser@^1.4.9: resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b" integrity sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww== -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" @@ -4201,14 +4110,14 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@^3.1.0, debug@^3.2.7: +debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -4503,13 +4412,6 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.5: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -4645,30 +4547,29 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== +eslint-config-airbnb-base@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236" + integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== dependencies: confusing-browser-globals "^1.0.10" object.assign "^4.1.2" - object.entries "^1.1.2" + object.entries "^1.1.5" + semver "^6.3.0" -eslint-config-airbnb@^18.2.1: - version "18.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9" - integrity sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg== +eslint-config-airbnb@^19.0.4: + version "19.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3" + integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew== dependencies: - eslint-config-airbnb-base "^14.2.1" + eslint-config-airbnb-base "^15.0.0" object.assign "^4.1.2" - object.entries "^1.1.2" + object.entries "^1.1.5" -eslint-config-prettier@^6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" - integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-import-resolver-node@^0.3.6: version "0.3.6" @@ -4686,12 +4587,12 @@ eslint-module-utils@^2.7.3: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-flowtype@^5.2.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz#7764cc63940f215bf3f0bd2d9a1293b2b9b2b4bb" - integrity sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw== +eslint-plugin-flowtype@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz#e1557e37118f24734aa3122e7536a038d34a4912" + integrity sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ== dependencies: - lodash "^4.17.15" + lodash "^4.17.21" string-natural-compare "^3.0.1" eslint-plugin-import@^2.22.1: @@ -4713,12 +4614,12 @@ eslint-plugin-import@^2.22.1: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@^24.1.3: - version "24.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.7.0.tgz#206ac0833841e59e375170b15f8d0955219c4889" - integrity sha512-wUxdF2bAZiYSKBclsUMrYHH6WxiBreNjyDxbRv345TIvPeoCEgPNEn3Sa+ZrSqsf1Dl9SqqSREXMHExlMMu1DA== +eslint-plugin-jest@^26.1.5: + version "26.4.6" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.4.6.tgz#9d8184c1ecf077722a20cc236c7e14f4e263606f" + integrity sha512-R3mq1IepnhtsukHQsWxdyKra3OVwYB+N4k8i45ndqSfr8p9KZV6G+EIUt1Z7hzAh4KlsbXG+nCTlNeGFLFLNvA== dependencies: - "@typescript-eslint/experimental-utils" "^4.0.1" + "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsx-a11y@^6.4.1: version "6.5.1" @@ -4738,17 +4639,17 @@ eslint-plugin-jsx-a11y@^6.4.1: language-tags "^1.0.5" minimatch "^3.0.4" -eslint-plugin-prettier@^3.2.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5" - integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g== +eslint-plugin-prettier@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0" + integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ== dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-react-hooks@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.4.0.tgz#71c39e528764c848d8253e1aa2c7024ed505f6c4" - integrity sha512-U3RVIfdzJaeKDQKEJbz5p3NW8/L80PCATJAfuojwbaEL+gBjfGdhUcGde+WGUW46Q5sr/NgxevsIiDtNXrvZaQ== +eslint-plugin-react-hooks@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz#5f762dfedf8b2cf431c689f533c9d3fa5dcf25ad" + integrity sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw== eslint-plugin-react@^7.24.0: version "7.29.4" @@ -4770,22 +4671,6 @@ eslint-plugin-react@^7.24.0: semver "^6.3.0" string.prototype.matchall "^4.0.6" -eslint-scope@^3.7.1: - version "3.7.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.3.tgz#bb507200d3d17f60247636160b4826284b108535" - integrity sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-scope@^4.0.0, eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4794,20 +4679,21 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^1.3.1, eslint-utils@^1.4.3: +eslint-scope@^7.0.0, eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^2.0.0, eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" @@ -4815,7 +4701,7 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -4825,47 +4711,10 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^5.0.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== - dependencies: - "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^4.0.1" - doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^5.0.1" - esquery "^1.0.1" - esutils "^2.0.2" - file-entry-cache "^5.0.1" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.7.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - inquirer "^6.2.2" - js-yaml "^3.13.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.11" - minimatch "^3.0.4" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - progress "^2.0.0" - regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" - table "^5.2.3" - text-table "^0.2.0" +eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@^6.0.1: version "6.8.0" @@ -4910,70 +4759,48 @@ eslint@^6.0.1: text-table "^0.2.0" v8-compile-cache "^2.0.3" -eslint@^7.28.0, eslint@^7.9.0: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== +eslint@^8.14.0, eslint@^8.15.0, eslint@^8.7.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.16.0.tgz#6d936e2d524599f2a86c708483b4c372c5d3bbae" + integrity sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA== dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.2" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" + glob-parent "^6.0.1" + globals "^13.15.0" + ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" + regexpp "^3.2.0" + strip-ansi "^6.0.1" strip-json-comments "^3.1.0" - table "^6.0.9" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^3.5.2: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" - integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== - dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" - -espree@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" - integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== - dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" - -espree@^6.1.2, espree@^6.2.1: +espree@^6.1.2: version "6.2.1" resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== @@ -4982,28 +4809,28 @@ espree@^6.1.2, espree@^6.2.1: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.1.0" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.0.0, espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + acorn "^8.7.1" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.0, esquery@^1.0.1, esquery@^1.4.0: +esquery@^1.0.1, esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" -esrecurse@^4.1.0, esrecurse@^4.3.0: +esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== @@ -5802,11 +5629,6 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stdin@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" @@ -5851,6 +5673,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" @@ -5907,7 +5736,7 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.1.0, globals@^11.7.0: +globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -5919,14 +5748,14 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globals@^13.6.0, globals@^13.9.0: - version "13.13.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.13.0.tgz#ac32261060d8070e2719dd6998406e27d2b5727b" - integrity sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== dependencies: type-fest "^0.20.2" -globby@^11.0.3: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -6274,7 +6103,7 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^6.2.0, inquirer@^6.2.2: +inquirer@^6.2.0: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== @@ -7328,7 +7157,7 @@ joi@^17.2.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -7336,6 +7165,13 @@ js-yaml@^3.13.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsc-android@^250230.2.1: version "250230.2.1" resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-250230.2.1.tgz#3790313a970586a03ab0ad47defbc84df54f1b83" @@ -7907,7 +7743,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash.unescape@4.0.1, lodash.unescape@^4.0.1: +lodash.unescape@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= @@ -7922,7 +7758,7 @@ lodash.uniqby@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= -lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.4, lodash@^4.7.0: +lodash@^4.17.10, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9014,7 +8850,7 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.2, object.entries@^1.1.5: +object.entries@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== @@ -9119,7 +8955,7 @@ opn@^5.4.0: dependencies: is-wsl "^1.1.0" -optionator@^0.8.1, optionator@^0.8.2, optionator@^0.8.3: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -9330,11 +9166,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -9439,10 +9270,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier-eslint-cli@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/prettier-eslint-cli/-/prettier-eslint-cli-5.0.1.tgz#8478e08f9b4c51c3751dd3ae76f630658329af64" - integrity sha512-fzX26Q6654RN3SD4c8XDBiJyNWOFQKsMLsMiXIGgSN2xNQLmiqjXW3wnR33qMVJOo+wq86a+WjA6wov0krTvCA== +prettier-eslint-cli@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/prettier-eslint-cli/-/prettier-eslint-cli-6.0.1.tgz#8f7c5bd4f272dd6b1d43766d2f5126b6416e8340" + integrity sha512-j/hFK4GoGFMa0+5N4BtOT46wmU+iXNpFpFAS9bUUopS2U7R0yf4D+LhEdW6ai9e0UuZrylCPB1MN/C9zSwMzTg== dependencies: arrify "^2.0.1" boolify "^1.0.0" @@ -9450,54 +9281,38 @@ prettier-eslint-cli@^5.0.0: chalk "^2.4.2" common-tags "^1.8.0" core-js "^3.1.4" - eslint "^5.0.0" + eslint "^8.14.0" find-up "^4.1.0" get-stdin "^7.0.0" glob "^7.1.4" ignore "^5.1.2" + indent-string "^4.0.0" lodash.memoize "^4.1.2" loglevel-colored-level-prefix "^1.0.0" messageformat "^2.2.1" - prettier-eslint "^9.0.0" + prettier-eslint "^14.0.3" rxjs "^6.5.2" yargs "^13.2.4" -prettier-eslint@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-12.0.0.tgz#b4dab5111aad1c0dca062eb7f92a69d5fb1ac1d3" - integrity sha512-N8SGGQwAosISXTNl1E57sBbtnqUGlyRWjcfIUxyD3HF4ynehA9GZ8IfJgiep/OfYvCof/JEpy9ZqSl250Wia7A== - dependencies: - "@typescript-eslint/parser" "^3.0.0" - common-tags "^1.4.0" - dlv "^1.1.0" - eslint "^7.9.0" - indent-string "^4.0.0" - lodash.merge "^4.6.0" - loglevel-colored-level-prefix "^1.0.0" - prettier "^2.0.0" - pretty-format "^23.0.1" - require-relative "^0.8.7" - typescript "^3.9.3" - vue-eslint-parser "~7.1.0" - -prettier-eslint@^9.0.0: - version "9.0.2" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-9.0.2.tgz#66c7b5d2a35712a104f6b7ce31f470ea9f8cb6a6" - integrity sha512-u6EQqxUhaGfra9gy9shcR7MT7r/2twwEfRGy1tfzyaJvLQwSg34M9IU5HuF7FsLW2QUgr5VIUc56EPWibw1pdw== +prettier-eslint@^14.0.3, prettier-eslint@^15.0.0: + version "15.0.1" + resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-15.0.1.tgz#2543a43e9acec2a9767ad6458165ce81f353db9c" + integrity sha512-mGOWVHixSvpZWARqSDXbdtTL54mMBxc5oQYQ6RAqy8jecuNJBgN3t9E5a81G66F8x8fsKNiR1HWaBV66MJDOpg== dependencies: - "@typescript-eslint/parser" "^1.10.2" + "@types/eslint" "^8.4.2" + "@types/prettier" "^2.6.0" + "@typescript-eslint/parser" "^5.10.0" common-tags "^1.4.0" - core-js "^3.1.4" dlv "^1.1.0" - eslint "^5.0.0" + eslint "^8.7.0" indent-string "^4.0.0" lodash.merge "^4.6.0" loglevel-colored-level-prefix "^1.0.0" - prettier "^1.7.0" + prettier "^2.5.1" pretty-format "^23.0.1" require-relative "^0.8.7" - typescript "^3.2.1" - vue-eslint-parser "^2.0.2" + typescript "^4.5.4" + vue-eslint-parser "^8.0.1" prettier-linter-helpers@^1.0.0: version "1.0.0" @@ -9506,12 +9321,12 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.18.2, prettier@^1.19.1, prettier@^1.7.0: +prettier@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettier@^2.0.0, prettier@^2.5.1: +prettier@^2.5.1, prettier@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== @@ -10123,7 +9938,7 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -regexpp@^3.1.0: +regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -10422,16 +10237,11 @@ scheduler@^0.20.2: loose-envify "^1.1.0" object-assign "^4.1.1" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - semver@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" @@ -10447,7 +10257,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.2, semver@^7.3.5: +semver@^7.3.2, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -11019,11 +10829,6 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strip-json-comments@^3.0.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -11147,7 +10952,7 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -table@^6.0.9, table@^6.7.3: +table@^6.7.3: version "6.8.0" resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca" integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA== @@ -11379,7 +11184,7 @@ tslib@^2.0.1, tslib@^2.1.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tsutils@^3.17.1, tsutils@^3.21.0: +tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== @@ -11472,15 +11277,10 @@ typescript-compiler@^1.4.1-2: resolved "https://registry.yarnpkg.com/typescript-compiler/-/typescript-compiler-1.4.1-2.tgz#ba4f7db22d91534a1929d90009dce161eb72fd3f" integrity sha1-uk99si2RU0oZKdkACdzhYety/T8= -typescript@^3.2.1, typescript@^3.9.3: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== - -typescript@^4.6.3: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@^4.5.4, typescript@^4.6.3: + version "4.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4" + integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A== typescript@~3.8.3: version "3.8.3" @@ -11738,29 +11538,18 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -vue-eslint-parser@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1" - integrity sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw== - dependencies: - debug "^3.1.0" - eslint-scope "^3.7.1" - eslint-visitor-keys "^1.0.0" - espree "^3.5.2" - esquery "^1.0.0" - lodash "^4.17.4" - -vue-eslint-parser@~7.1.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.1.1.tgz#c43c1c715ff50778b9a7e9a4e16921185f3425d3" - integrity sha512-8FdXi0gieEwh1IprIBafpiJWcApwrU+l2FEj8c1HtHFdNXMd0+2jUSjBVmcQYohf/E72irwAXEXLga6TQcB3FA== +vue-eslint-parser@^8.0.1: + version "8.3.0" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d" + integrity sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g== dependencies: - debug "^4.1.1" - eslint-scope "^5.0.0" - eslint-visitor-keys "^1.1.0" - espree "^6.2.1" - esquery "^1.0.1" - lodash "^4.17.15" + debug "^4.3.2" + eslint-scope "^7.0.0" + eslint-visitor-keys "^3.1.0" + espree "^9.0.0" + esquery "^1.4.0" + lodash "^4.17.21" + semver "^7.3.5" w3c-hr-time@^1.0.2: version "1.0.2"