From 7542a42fa6b6a0b4f783c28b349e742eb1af69a9 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 26 Jun 2023 17:30:35 +1000 Subject: [PATCH 01/45] feat: started adding rtl support to composition input updated buttons, emoji panel, @mentions --- ts/components/basic/Flex.tsx | 2 +- .../conversation/SessionEmojiPanel.tsx | 6 +++- .../composition/CompositionBox.tsx | 30 +++++++++++++------ ts/state/selectors/user.ts | 5 ++++ 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/ts/components/basic/Flex.tsx b/ts/components/basic/Flex.tsx index 18386c20c..11b7db2c3 100644 --- a/ts/components/basic/Flex.tsx +++ b/ts/components/basic/Flex.tsx @@ -6,7 +6,7 @@ export interface FlexProps { container?: boolean; dataTestId?: string; /****** Container Props ********/ - flexDirection?: 'row' | 'column'; + flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse'; justifyContent?: | 'flex-start' | 'flex-end' diff --git a/ts/components/conversation/SessionEmojiPanel.tsx b/ts/components/conversation/SessionEmojiPanel.tsx index 315776103..109a1c8ba 100644 --- a/ts/components/conversation/SessionEmojiPanel.tsx +++ b/ts/components/conversation/SessionEmojiPanel.tsx @@ -16,8 +16,10 @@ import { import { hexColorToRGB } from '../../util/hexColorToRGB'; import { getPrimaryColor } from '../../state/selectors/primaryColor'; import { i18nEmojiData } from '../../util/emoji'; +import { getWritingDirection } from '../../state/selectors/user'; export const StyledEmojiPanel = styled.div<{ + dir: string; isModal: boolean; primaryColor: PrimaryColorStateType; theme: ThemeStateType; @@ -68,7 +70,7 @@ export const StyledEmojiPanel = styled.div<{ content: ''; position: absolute; top: calc(100% - 40px); - left: calc(100% - 79px); + left: ${props.dir === 'rtl' ? '75px' : 'calc(100% - 106px)'}; width: 22px; height: 22px; transform: rotate(45deg); @@ -102,6 +104,7 @@ export const SessionEmojiPanel = forwardRef((props: Props const primaryColor = useSelector(getPrimaryColor); const theme = useSelector(getTheme); const isDarkMode = useSelector(isDarkTheme); + const writingDirection = useSelector(getWritingDirection); let panelBackgroundRGB = hexColorToRGB(THEMES.CLASSIC_DARK.COLOR1); let panelTextRGB = hexColorToRGB(THEMES.CLASSIC_DARK.COLOR6); @@ -134,6 +137,7 @@ export const SessionEmojiPanel = forwardRef((props: Props theme={theme} panelBackgroundRGB={panelBackgroundRGB} panelTextRGB={panelTextRGB} + dir={writingDirection} className={classNames(show && 'show')} ref={ref} > diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index 7a0547e5e..c4488bda8 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -57,6 +57,7 @@ import { getSelectedConversationKey, } from '../../../state/selectors/selectedConversation'; import { SettingsKey } from '../../../data/settings-key'; +import { isRtlBody } from '../../menu/Menu'; export interface ReplyingToMessageProps { convoId: string; @@ -205,21 +206,22 @@ const getSelectionBasedOnMentions = (draft: string, index: number) => { return Number.MAX_SAFE_INTEGER; }; -const StyledEmojiPanelContainer = styled.div` +const StyledEmojiPanelContainer = styled.div<{ dir: string }>` ${StyledEmojiPanel} { position: absolute; bottom: 68px; - right: 0px; + ${props => (props.dir === 'rtl' ? 'left: 0px' : 'right: 0px;')} } `; -const StyledSendMessageInput = styled.div` +const StyledSendMessageInput = styled.div<{ dir: string }>` cursor: text; display: flex; align-items: center; flex-grow: 1; min-height: var(--composition-container-height); padding: var(--margins-xs) 0; + ${props => (props.dir = 'rtl' && 'margin-right: var(--margins-sm);')} z-index: 1; background-color: inherit; @@ -409,8 +411,16 @@ class CompositionBoxInner extends React.Component { const { showEmojiPanel } = this.state; const { typingEnabled } = this.props; + const rtl = isRtlBody(); + const writingDirection = rtl ? 'rtl' : 'ltr'; + return ( - <> + {typingEnabled && } { { this.container = el; }} data-testid="message-input" > - {this.renderTextArea()} + {this.renderTextArea(writingDirection)} {typingEnabled && ( @@ -441,7 +452,7 @@ class CompositionBoxInner extends React.Component { {typingEnabled && showEmojiPanel && ( - + { /> )} - + ); } - private renderTextArea() { + private renderTextArea(dir: string) { const { i18n } = window; const { draft } = this.state; @@ -491,6 +502,7 @@ class CompositionBoxInner extends React.Component { onKeyUp={this.onKeyUp} placeholder={messagePlaceHolder} spellCheck={true} + dir={dir} inputRef={this.textarea} disabled={!typingEnabled} rows={1} @@ -505,7 +517,7 @@ class CompositionBoxInner extends React.Component { markup="@ᅭ__id__ᅲ__display__ᅭ" // ᅭ = \uFFD2 is one of the forbidden char for a display name (check displayNameRegex) trigger="@" // this is only for the composition box visible content. The real stuff on the backend box is the @markup - displayTransform={(_id, display) => `@${display}`} + displayTransform={(_id, display) => (dir === 'rtl' ? `${display}@` : `@${display}`)} data={this.fetchUsersForGroup} renderSuggestion={renderUserMentionRow} /> diff --git a/ts/state/selectors/user.ts b/ts/state/selectors/user.ts index 69535cfda..400144cbc 100644 --- a/ts/state/selectors/user.ts +++ b/ts/state/selectors/user.ts @@ -4,6 +4,7 @@ import { LocalizerType } from '../../types/Util'; import { StateType } from '../reducer'; import { UserStateType } from '../ducks/user'; +import { isRtlBody } from '../../components/menu/Menu'; export const getUser = (state: StateType): UserStateType => state.user; @@ -13,3 +14,7 @@ export const getOurNumber = createSelector( ); export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n); + +export const getWritingDirection = createSelector(getUser, (): string => + isRtlBody() ? 'rtl' : 'ltr' +); From 31c79f9eeabe885008384b1897eda6ec95a540d6 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 26 Jun 2023 17:30:52 +1000 Subject: [PATCH 02/45] feat: use LANGUAGE flag to change UI lang needs more testing --- ts/mains/main_node.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/mains/main_node.ts b/ts/mains/main_node.ts index c19373d52..3956cd127 100644 --- a/ts/mains/main_node.ts +++ b/ts/mains/main_node.ts @@ -745,8 +745,9 @@ app.on('ready', async () => { assertLogger().info('app ready'); assertLogger().info(`starting version ${packageJson.version}`); if (!locale) { - const appLocale = app.getLocale() || 'en'; + const appLocale = process.env.LANGUAGE || app.getLocale() || 'en'; locale = loadLocale({ appLocale, logger }); + assertLogger().info(`locale is ${appLocale}`); } const key = getDefaultSQLKey(); From 7be11cd9734ccd03065603d2909046e9c9640104 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 27 Jun 2023 11:06:39 +1000 Subject: [PATCH 03/45] feat: moved html direction logic into i18n util updated Flex component with RTL support, create getWritingDirection selector --- ts/components/basic/Flex.tsx | 4 ++++ ts/components/menu/Menu.tsx | 8 +------- ts/state/selectors/user.ts | 6 ++---- ts/util/i18n.ts | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/ts/components/basic/Flex.tsx b/ts/components/basic/Flex.tsx index 11b7db2c3..b1c0ed51e 100644 --- a/ts/components/basic/Flex.tsx +++ b/ts/components/basic/Flex.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; +import { HTMLDirection } from '../../util/i18n'; export interface FlexProps { children?: any; @@ -36,6 +37,8 @@ export interface FlexProps { maxWidth?: string; minWidth?: string; maxHeight?: string; + /****** RTL support ********/ + dir?: HTMLDirection; } export const Flex = styled.div` @@ -53,4 +56,5 @@ export const Flex = styled.div` height: ${props => props.height || 'auto'}; max-width: ${props => props.maxWidth || 'none'}; min-width: ${props => props.minWidth || 'none'}; + dir: ${props => props.dir || undefined}; `; diff --git a/ts/components/menu/Menu.tsx b/ts/components/menu/Menu.tsx index d1010df93..605e1c374 100644 --- a/ts/components/menu/Menu.tsx +++ b/ts/components/menu/Menu.tsx @@ -373,12 +373,6 @@ export const MarkAllReadMenuItem = (): JSX.Element | null => { } }; -export function isRtlBody(): boolean { - const body = document.getElementsByTagName('body').item(0); - - return body?.classList.contains('rtl') || false; -} - export const BlockMenuItem = (): JSX.Element | null => { const convoId = useConvoIdFromContext(); const isMe = useIsMe(convoId); @@ -577,7 +571,7 @@ export const NotificationForConvoMenuItem = (): JSX.Element | null => { return null; } - // const isRtlMode = isRtlBody();' + // const isRtlMode = isRtlBody(); // exclude mentions_only settings for private chats as this does not make much sense const notificationForConvoOptions = ConversationNotificationSetting.filter(n => diff --git a/ts/state/selectors/user.ts b/ts/state/selectors/user.ts index 400144cbc..91acbacfd 100644 --- a/ts/state/selectors/user.ts +++ b/ts/state/selectors/user.ts @@ -4,7 +4,7 @@ import { LocalizerType } from '../../types/Util'; import { StateType } from '../reducer'; import { UserStateType } from '../ducks/user'; -import { isRtlBody } from '../../components/menu/Menu'; +import { HTMLDirection, getHTMLDirection } from '../../util/i18n'; export const getUser = (state: StateType): UserStateType => state.user; @@ -15,6 +15,4 @@ export const getOurNumber = createSelector( export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n); -export const getWritingDirection = createSelector(getUser, (): string => - isRtlBody() ? 'rtl' : 'ltr' -); +export const getWritingDirection = createSelector(getUser, (): HTMLDirection => getHTMLDirection()); diff --git a/ts/util/i18n.ts b/ts/util/i18n.ts index 90ccf33f2..1ad307250 100644 --- a/ts/util/i18n.ts +++ b/ts/util/i18n.ts @@ -63,3 +63,17 @@ export const loadEmojiPanelI18n = async () => { } } }; + +// RTL Support + +export type HTMLDirection = 'ltr' | 'rtl'; + +export function isRtlBody(): boolean { + const body = document.getElementsByTagName('body').item(0); + + return body?.classList.contains('rtl') || false; +} + +export function getHTMLDirection(): HTMLDirection { + return isRtlBody() ? 'rtl' : 'ltr'; +} From 0996c917f299297674d7d13e971c9fe57e0b8ec7 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 27 Jun 2023 11:44:16 +1000 Subject: [PATCH 04/45] feat: use new methods in composition box for html direction use dir in flexbox instead of row-reverse --- ts/components/conversation/SessionEmojiPanel.tsx | 10 +++++----- .../conversation/composition/CompositionBox.tsx | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ts/components/conversation/SessionEmojiPanel.tsx b/ts/components/conversation/SessionEmojiPanel.tsx index 109a1c8ba..22c0fd1be 100644 --- a/ts/components/conversation/SessionEmojiPanel.tsx +++ b/ts/components/conversation/SessionEmojiPanel.tsx @@ -16,10 +16,8 @@ import { import { hexColorToRGB } from '../../util/hexColorToRGB'; import { getPrimaryColor } from '../../state/selectors/primaryColor'; import { i18nEmojiData } from '../../util/emoji'; -import { getWritingDirection } from '../../state/selectors/user'; export const StyledEmojiPanel = styled.div<{ - dir: string; isModal: boolean; primaryColor: PrimaryColorStateType; theme: ThemeStateType; @@ -70,7 +68,7 @@ export const StyledEmojiPanel = styled.div<{ content: ''; position: absolute; top: calc(100% - 40px); - left: ${props.dir === 'rtl' ? '75px' : 'calc(100% - 106px)'}; + left: calc(100% - 106px); width: 22px; height: 22px; transform: rotate(45deg); @@ -79,6 +77,10 @@ export const StyledEmojiPanel = styled.div<{ border: 0.7px solid var(--border-color); clip-path: polygon(100% 100%, 7.2px 100%, 100% 7.2px); ${props.panelBackgroundRGB && `background-color: rgb(${props.panelBackgroundRGB})`}; + + [dir='rtl'] & { + left: 75px; + } } `}; } @@ -104,7 +106,6 @@ export const SessionEmojiPanel = forwardRef((props: Props const primaryColor = useSelector(getPrimaryColor); const theme = useSelector(getTheme); const isDarkMode = useSelector(isDarkTheme); - const writingDirection = useSelector(getWritingDirection); let panelBackgroundRGB = hexColorToRGB(THEMES.CLASSIC_DARK.COLOR1); let panelTextRGB = hexColorToRGB(THEMES.CLASSIC_DARK.COLOR6); @@ -137,7 +138,6 @@ export const SessionEmojiPanel = forwardRef((props: Props theme={theme} panelBackgroundRGB={panelBackgroundRGB} panelTextRGB={panelTextRGB} - dir={writingDirection} className={classNames(show && 'show')} ref={ref} > diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index c4488bda8..efb222935 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -57,7 +57,7 @@ import { getSelectedConversationKey, } from '../../../state/selectors/selectedConversation'; import { SettingsKey } from '../../../data/settings-key'; -import { isRtlBody } from '../../menu/Menu'; +import { getHTMLDirection } from '../../../util/i18n'; export interface ReplyingToMessageProps { convoId: string; @@ -411,13 +411,13 @@ class CompositionBoxInner extends React.Component { const { showEmojiPanel } = this.state; const { typingEnabled } = this.props; - const rtl = isRtlBody(); - const writingDirection = rtl ? 'rtl' : 'ltr'; + const htmlDirection = getHTMLDirection(); return ( @@ -436,14 +436,14 @@ class CompositionBoxInner extends React.Component { { this.container = el; }} data-testid="message-input" > - {this.renderTextArea(writingDirection)} + {this.renderTextArea(htmlDirection)} {typingEnabled && ( @@ -452,7 +452,7 @@ class CompositionBoxInner extends React.Component { {typingEnabled && showEmojiPanel && ( - + Date: Tue, 27 Jun 2023 14:17:01 +1000 Subject: [PATCH 05/45] fix: use margin-inline-start instead of margin-right --- ts/components/conversation/composition/CompositionBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index efb222935..95e09dbd2 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -221,7 +221,7 @@ const StyledSendMessageInput = styled.div<{ dir: string }>` flex-grow: 1; min-height: var(--composition-container-height); padding: var(--margins-xs) 0; - ${props => (props.dir = 'rtl' && 'margin-right: var(--margins-sm);')} + ${props => props.dir === 'rtl' && 'margin-inline-start: var(--margins-sm);'} z-index: 1; background-color: inherit; From 1f1bb702c3211971be84fd28d06444c03a288ecd Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 27 Jun 2023 16:49:08 +1000 Subject: [PATCH 06/45] feat: made htmlDirection part of the compositionBox state for easier referencing user mentions and emoji quick results now support RTL --- .../composition/CompositionBox.tsx | 77 ++++++++++--------- .../composition/EmojiQuickResult.tsx | 1 + .../conversation/composition/UserMentions.tsx | 50 +++++++----- 3 files changed, 74 insertions(+), 54 deletions(-) diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index 95e09dbd2..1e4ee6c39 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -57,7 +57,7 @@ import { getSelectedConversationKey, } from '../../../state/selectors/selectedConversation'; import { SettingsKey } from '../../../data/settings-key'; -import { getHTMLDirection } from '../../../util/i18n'; +import { getHTMLDirection, HTMLDirection } from '../../../util/i18n'; export interface ReplyingToMessageProps { convoId: string; @@ -114,28 +114,31 @@ interface State { ignoredLink?: string; // set the ignored url when users closed the link preview stagedLinkPreview?: StagedLinkPreviewData; showCaptionEditor?: AttachmentType; + htmlDirection?: HTMLDirection; } -const sendMessageStyle = { - control: { - wordBreak: 'break-all', - }, - input: { - overflow: 'auto', - maxHeight: '50vh', - wordBreak: 'break-word', - padding: '0px', - margin: '0px', - }, - highlighter: { - boxSizing: 'border-box', - overflow: 'hidden', - maxHeight: '50vh', - }, - flexGrow: 1, - minHeight: '24px', - width: '100%', - ...styleForCompositionBoxSuggestions, +const sendMessageStyle = (dir: HTMLDirection) => { + return { + control: { + wordBreak: 'break-all', + }, + input: { + overflow: 'auto', + maxHeight: '50vh', + wordBreak: 'break-word', + padding: '0px', + margin: '0px', + }, + highlighter: { + boxSizing: 'border-box', + overflow: 'hidden', + maxHeight: '50vh', + }, + flexGrow: 1, + minHeight: '24px', + width: '100%', + ...styleForCompositionBoxSuggestions(dir), + }; }; const getDefaultState = (newConvoId?: string) => { @@ -146,6 +149,7 @@ const getDefaultState = (newConvoId?: string) => { ignoredLink: undefined, stagedLinkPreview: undefined, showCaptionEditor: undefined, + htmlDirection: getHTMLDirection(), }; }; @@ -206,7 +210,7 @@ const getSelectionBasedOnMentions = (draft: string, index: number) => { return Number.MAX_SAFE_INTEGER; }; -const StyledEmojiPanelContainer = styled.div<{ dir: string }>` +const StyledEmojiPanelContainer = styled.div<{ dir?: HTMLDirection }>` ${StyledEmojiPanel} { position: absolute; bottom: 68px; @@ -214,7 +218,8 @@ const StyledEmojiPanelContainer = styled.div<{ dir: string }>` } `; -const StyledSendMessageInput = styled.div<{ dir: string }>` +const StyledSendMessageInput = styled.div<{ dir?: HTMLDirection }>` + position: relative; cursor: text; display: flex; align-items: center; @@ -233,7 +238,7 @@ const StyledSendMessageInput = styled.div<{ dir: string }>` textarea { font-family: var(--font-default); min-height: calc(var(--composition-container-height) / 3); - max-height: 3 * var(--composition-container-height); + max-height: calc(3 * var(--composition-container-height)); margin-right: var(--margins-md); color: var(--text-color-primary); @@ -411,11 +416,9 @@ class CompositionBoxInner extends React.Component { const { showEmojiPanel } = this.state; const { typingEnabled } = this.props; - const htmlDirection = getHTMLDirection(); - return ( { { this.container = el; }} data-testid="message-input" > - {this.renderTextArea(htmlDirection)} + {this.renderTextArea()} {typingEnabled && ( @@ -452,7 +455,7 @@ class CompositionBoxInner extends React.Component { {typingEnabled && showEmojiPanel && ( - + { ); } - private renderTextArea(dir: string) { + private renderTextArea() { const { i18n } = window; - const { draft } = this.state; + const { draft, htmlDirection } = this.state; if (!this.props.selectedConversation) { return null; @@ -494,6 +497,8 @@ class CompositionBoxInner extends React.Component { const { typingEnabled } = this.props; const neverMatchingRegex = /($a)/; + const style = sendMessageStyle(htmlDirection || 'ltr'); + return ( { onKeyUp={this.onKeyUp} placeholder={messagePlaceHolder} spellCheck={true} - dir={dir} + dir={htmlDirection} inputRef={this.textarea} disabled={!typingEnabled} rows={1} data-testid="message-input-text-area" - style={sendMessageStyle} + style={style} suggestionsPortalHost={this.container as any} forceSuggestionsAboveCursor={true} // force mentions to be rendered on top of the cursor, this is working with a fork of react-mentions for now > @@ -517,7 +522,9 @@ class CompositionBoxInner extends React.Component { markup="@ᅭ__id__ᅲ__display__ᅭ" // ᅭ = \uFFD2 is one of the forbidden char for a display name (check displayNameRegex) trigger="@" // this is only for the composition box visible content. The real stuff on the backend box is the @markup - displayTransform={(_id, display) => (dir === 'rtl' ? `${display}@` : `@${display}`)} + displayTransform={(_id, display) => + htmlDirection === 'rtl' ? `${display}@` : `@${display}` + } data={this.fetchUsersForGroup} renderSuggestion={renderUserMentionRow} /> diff --git a/ts/components/conversation/composition/EmojiQuickResult.tsx b/ts/components/conversation/composition/EmojiQuickResult.tsx index c1c1e3b51..5f359b2d5 100644 --- a/ts/components/conversation/composition/EmojiQuickResult.tsx +++ b/ts/components/conversation/composition/EmojiQuickResult.tsx @@ -8,6 +8,7 @@ import { searchSync } from '../../../util/emoji.js'; const EmojiQuickResult = styled.span` display: flex; align-items: center; + min-width: 250px; width: 100%; padding-inline-end: 20px; padding-inline-start: 10px; diff --git a/ts/components/conversation/composition/UserMentions.tsx b/ts/components/conversation/composition/UserMentions.tsx index 09f18ab0a..badc3bf76 100644 --- a/ts/components/conversation/composition/UserMentions.tsx +++ b/ts/components/conversation/composition/UserMentions.tsx @@ -1,28 +1,40 @@ import React from 'react'; import { SuggestionDataItem } from 'react-mentions'; import { MemberListItem } from '../../MemberListItem'; +import { HTMLDirection } from '../../../util/i18n'; -export const styleForCompositionBoxSuggestions = { - suggestions: { - list: { - fontSize: 14, - boxShadow: 'var(--suggestions-shadow)', - backgroundColor: 'var(--suggestions-background-color)', - color: 'var(--suggestions-text-color)', - }, - item: { - height: '100%', - paddingTop: '5px', - paddingBottom: '5px', - backgroundColor: 'var(--suggestions-background-color)', - color: 'var(--suggestions-text-color)', - transition: '0.25s', - - '&focused': { - backgroundColor: 'var(--suggestions-background-hover-color)', +const listRTLStyle = { position: 'absolute', bottom: '0px', right: '100%' }; + +export const styleForCompositionBoxSuggestions = (dir: HTMLDirection) => { + const styles = { + suggestions: { + list: { + fontSize: 14, + boxShadow: 'var(--suggestions-shadow)', + backgroundColor: 'var(--suggestions-background-color)', + color: 'var(--suggestions-text-color)', + dir, + }, + item: { + height: '100%', + paddingTop: '5px', + paddingBottom: '5px', + backgroundColor: 'var(--suggestions-background-color)', + color: 'var(--suggestions-text-color)', + transition: '0.25s', + + '&focused': { + backgroundColor: 'var(--suggestions-background-hover-color)', + }, }, }, - }, + }; + + if (dir === 'rtl') { + styles.suggestions.list = { ...styles.suggestions.list, ...listRTLStyle }; + } + + return styles; }; export const renderUserMentionRow = (suggestion: SuggestionDataItem) => { From 266a0d696456351b3f5d7d38b56fa8cedae964a8 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 27 Jun 2023 17:10:51 +1000 Subject: [PATCH 07/45] fix: cleaned up sendMessageStyle arguments --- ts/components/conversation/composition/CompositionBox.tsx | 4 ++-- ts/components/conversation/composition/UserMentions.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/components/conversation/composition/CompositionBox.tsx b/ts/components/conversation/composition/CompositionBox.tsx index 1e4ee6c39..c117a109c 100644 --- a/ts/components/conversation/composition/CompositionBox.tsx +++ b/ts/components/conversation/composition/CompositionBox.tsx @@ -117,7 +117,7 @@ interface State { htmlDirection?: HTMLDirection; } -const sendMessageStyle = (dir: HTMLDirection) => { +const sendMessageStyle = (dir?: HTMLDirection) => { return { control: { wordBreak: 'break-all', @@ -497,7 +497,7 @@ class CompositionBoxInner extends React.Component { const { typingEnabled } = this.props; const neverMatchingRegex = /($a)/; - const style = sendMessageStyle(htmlDirection || 'ltr'); + const style = sendMessageStyle(htmlDirection); return ( { +export const styleForCompositionBoxSuggestions = (dir: HTMLDirection = 'ltr') => { const styles = { suggestions: { list: { From ac4a00d41506c0e1cb3158c03dd6c523a593512c Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 27 Jun 2023 17:17:24 +1000 Subject: [PATCH 08/45] fix: remove unused selector --- ts/state/selectors/user.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/ts/state/selectors/user.ts b/ts/state/selectors/user.ts index 91acbacfd..69535cfda 100644 --- a/ts/state/selectors/user.ts +++ b/ts/state/selectors/user.ts @@ -4,7 +4,6 @@ import { LocalizerType } from '../../types/Util'; import { StateType } from '../reducer'; import { UserStateType } from '../ducks/user'; -import { HTMLDirection, getHTMLDirection } from '../../util/i18n'; export const getUser = (state: StateType): UserStateType => state.user; @@ -14,5 +13,3 @@ export const getOurNumber = createSelector( ); export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n); - -export const getWritingDirection = createSelector(getUser, (): HTMLDirection => getHTMLDirection()); From 61149a5ca343dc02506fe5075fda209a1ab7f579 Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 28 Jun 2023 16:21:06 +1000 Subject: [PATCH 09/45] feat: use a selector for htmlDirection and pass it down as props instead of using state this is more inline with class component conventions --- ts/components/conversation/SessionConversation.tsx | 3 +++ .../conversation/composition/CompositionBox.tsx | 14 +++++++------- ts/state/selectors/user.ts | 6 ++++++ ts/state/smart/SessionConversation.ts | 3 ++- ts/util/i18n.ts | 4 ---- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ts/components/conversation/SessionConversation.tsx b/ts/components/conversation/SessionConversation.tsx index e8db1d73a..55b97678a 100644 --- a/ts/components/conversation/SessionConversation.tsx +++ b/ts/components/conversation/SessionConversation.tsx @@ -57,6 +57,7 @@ import { MessageDetail } from './message/message-item/MessageDetail'; import styled from 'styled-components'; import { SessionSpinner } from '../basic/SessionSpinner'; +import { HTMLDirection } from '../../util/i18n'; // tslint:disable: jsx-curly-spacing interface State { @@ -76,6 +77,7 @@ interface Props { showMessageDetails: boolean; isRightPanelShowing: boolean; hasOngoingCallWithFocusedConvo: boolean; + htmlDirection: HTMLDirection; // lightbox options lightBoxOptions?: LightBoxOptions; @@ -290,6 +292,7 @@ export class SessionConversation extends React.Component { sendMessage={this.sendMessageFn} stagedAttachments={this.props.stagedAttachments} onChoseAttachments={this.onChoseAttachments} + htmlDirection={this.props.htmlDirection} />
; onChoseAttachments: (newAttachments: Array) => void; + htmlDirection: HTMLDirection; } interface State { @@ -114,7 +115,6 @@ interface State { ignoredLink?: string; // set the ignored url when users closed the link preview stagedLinkPreview?: StagedLinkPreviewData; showCaptionEditor?: AttachmentType; - htmlDirection?: HTMLDirection; } const sendMessageStyle = (dir?: HTMLDirection) => { @@ -149,7 +149,6 @@ const getDefaultState = (newConvoId?: string) => { ignoredLink: undefined, stagedLinkPreview: undefined, showCaptionEditor: undefined, - htmlDirection: getHTMLDirection(), }; }; @@ -418,7 +417,7 @@ class CompositionBoxInner extends React.Component { return ( { { this.container = el; @@ -455,7 +454,7 @@ class CompositionBoxInner extends React.Component { {typingEnabled && showEmojiPanel && ( - + { private renderTextArea() { const { i18n } = window; - const { draft, htmlDirection } = this.state; + const { draft } = this.state; + const { htmlDirection } = this.props; if (!this.props.selectedConversation) { return null; diff --git a/ts/state/selectors/user.ts b/ts/state/selectors/user.ts index 69535cfda..c4a75a5de 100644 --- a/ts/state/selectors/user.ts +++ b/ts/state/selectors/user.ts @@ -4,6 +4,7 @@ import { LocalizerType } from '../../types/Util'; import { StateType } from '../reducer'; import { UserStateType } from '../ducks/user'; +import { HTMLDirection, isRtlBody } from '../../util/i18n'; export const getUser = (state: StateType): UserStateType => state.user; @@ -13,3 +14,8 @@ export const getOurNumber = createSelector( ); export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n); + +export const getHTMLDirection = createSelector( + getUser, + (): HTMLDirection => (isRtlBody() ? 'rtl' : 'ltr') +); diff --git a/ts/state/smart/SessionConversation.ts b/ts/state/smart/SessionConversation.ts index c5850f2f1..09d1b5174 100644 --- a/ts/state/smart/SessionConversation.ts +++ b/ts/state/smart/SessionConversation.ts @@ -17,7 +17,7 @@ import { } from '../selectors/selectedConversation'; import { getStagedAttachmentsForCurrentConversation } from '../selectors/stagedAttachments'; import { getTheme } from '../selectors/theme'; -import { getOurNumber } from '../selectors/user'; +import { getHTMLDirection, getOurNumber } from '../selectors/user'; const mapStateToProps = (state: StateType) => { return { @@ -33,6 +33,7 @@ const mapStateToProps = (state: StateType) => { stagedAttachments: getStagedAttachmentsForCurrentConversation(state), hasOngoingCallWithFocusedConvo: getHasOngoingCallWithFocusedConvo(state), isSelectedConvoInitialLoadingInProgress: getIsSelectedConvoInitialLoadingInProgress(state), + htmlDirection: getHTMLDirection(state), }; }; diff --git a/ts/util/i18n.ts b/ts/util/i18n.ts index 1ad307250..135f1d48e 100644 --- a/ts/util/i18n.ts +++ b/ts/util/i18n.ts @@ -73,7 +73,3 @@ export function isRtlBody(): boolean { return body?.classList.contains('rtl') || false; } - -export function getHTMLDirection(): HTMLDirection { - return isRtlBody() ? 'rtl' : 'ltr'; -} From 83f84c26e7da00e7f27f04ba021f02b7aeeb1e33 Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 29 Jun 2023 11:41:59 +1000 Subject: [PATCH 10/45] feat: changed getHTMLDirection into a util hook useHTMLDirection --- ts/components/SessionMainPanel.tsx | 4 +++- ts/state/selectors/user.ts | 6 ------ ts/state/smart/SessionConversation.ts | 11 ++++++++--- ts/util/i18n.ts | 2 ++ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ts/components/SessionMainPanel.tsx b/ts/components/SessionMainPanel.tsx index 035275712..d5d383331 100644 --- a/ts/components/SessionMainPanel.tsx +++ b/ts/components/SessionMainPanel.tsx @@ -5,12 +5,14 @@ import { getFocusedSettingsSection } from '../state/selectors/section'; import { SmartSessionConversation } from '../state/smart/SessionConversation'; import { SessionSettingsView } from './settings/SessionSettings'; +import { useHTMLDirection } from '../util/i18n'; const FilteredSettingsView = SessionSettingsView as any; export const SessionMainPanel = () => { const focusedSettingsSection = useSelector(getFocusedSettingsSection); const isSettingsView = focusedSettingsSection !== undefined; + const htmlDirection = useHTMLDirection(); // even if it looks like this does nothing, this does update the redux store. useAppIsFocused(); @@ -20,7 +22,7 @@ export const SessionMainPanel = () => { } return (
- +
); }; diff --git a/ts/state/selectors/user.ts b/ts/state/selectors/user.ts index c4a75a5de..69535cfda 100644 --- a/ts/state/selectors/user.ts +++ b/ts/state/selectors/user.ts @@ -4,7 +4,6 @@ import { LocalizerType } from '../../types/Util'; import { StateType } from '../reducer'; import { UserStateType } from '../ducks/user'; -import { HTMLDirection, isRtlBody } from '../../util/i18n'; export const getUser = (state: StateType): UserStateType => state.user; @@ -14,8 +13,3 @@ export const getOurNumber = createSelector( ); export const getIntl = createSelector(getUser, (): LocalizerType => window.i18n); - -export const getHTMLDirection = createSelector( - getUser, - (): HTMLDirection => (isRtlBody() ? 'rtl' : 'ltr') -); diff --git a/ts/state/smart/SessionConversation.ts b/ts/state/smart/SessionConversation.ts index 09d1b5174..39809f652 100644 --- a/ts/state/smart/SessionConversation.ts +++ b/ts/state/smart/SessionConversation.ts @@ -17,9 +17,14 @@ import { } from '../selectors/selectedConversation'; import { getStagedAttachmentsForCurrentConversation } from '../selectors/stagedAttachments'; import { getTheme } from '../selectors/theme'; -import { getHTMLDirection, getOurNumber } from '../selectors/user'; +import { getOurNumber } from '../selectors/user'; +import { HTMLDirection } from '../../util/i18n'; -const mapStateToProps = (state: StateType) => { +type SmartSessionConversationOwnProps = { + htmlDirection: HTMLDirection; +}; + +const mapStateToProps = (state: StateType, ownProps: SmartSessionConversationOwnProps) => { return { selectedConversation: getSelectedConversation(state), selectedConversationKey: getSelectedConversationKey(state), @@ -33,7 +38,7 @@ const mapStateToProps = (state: StateType) => { stagedAttachments: getStagedAttachmentsForCurrentConversation(state), hasOngoingCallWithFocusedConvo: getHasOngoingCallWithFocusedConvo(state), isSelectedConvoInitialLoadingInProgress: getIsSelectedConvoInitialLoadingInProgress(state), - htmlDirection: getHTMLDirection(state), + htmlDirection: ownProps.htmlDirection, }; }; diff --git a/ts/util/i18n.ts b/ts/util/i18n.ts index 135f1d48e..7b77826c4 100644 --- a/ts/util/i18n.ts +++ b/ts/util/i18n.ts @@ -73,3 +73,5 @@ export function isRtlBody(): boolean { return body?.classList.contains('rtl') || false; } + +export const useHTMLDirection = (): HTMLDirection => (isRtlBody() ? 'rtl' : 'ltr'); From a9e8862c0a79dd2df12085539001def4248cb165 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 22 May 2023 16:11:49 +1000 Subject: [PATCH 11/45] feat: convered EditProfileDialog to a functional component --- ts/components/dialog/EditProfileDialog.tsx | 512 ++++++++++----------- 1 file changed, 239 insertions(+), 273 deletions(-) diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 34d4947a1..0f664633f 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -1,20 +1,15 @@ -import React, { ChangeEvent, MouseEvent } from 'react'; +import React, { ChangeEvent, MouseEvent, ReactElement, useState } from 'react'; import { QRCode } from 'react-qr-svg'; import { Avatar, AvatarSize } from '../avatar/Avatar'; import { SyncUtils, ToastUtils, UserUtils } from '../../session/utils'; import { YourSessionIDPill, YourSessionIDSelectable } from '../basic/YourSessionIDPill'; - -import { ConversationModel } from '../../models/conversation'; - -import autoBind from 'auto-bind'; import styled from 'styled-components'; import { uploadOurAvatar } from '../../interactions/conversationInteractions'; import { ConversationTypeEnum } from '../../models/conversationAttributes'; import { MAX_USERNAME_BYTES } from '../../session/constants'; import { getConversationController } from '../../session/conversations'; -import { sanitizeSessionUsername } from '../../session/utils/String'; import { editProfileModal } from '../../state/ducks/modalDialog'; import { pickFileForAvatar } from '../../types/attachments/VisualAttachment'; import { saveQRCode } from '../../util/saveQRCode'; @@ -23,6 +18,9 @@ import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionButton, SessionButtonType } from '../basic/SessionButton'; import { SessionSpinner } from '../basic/SessionSpinner'; import { SessionIconButton } from '../icon'; +import { sanitizeSessionUsername } from '../../session/utils/String'; +import { useOurConversationUsername } from '../../hooks/useParamSelector'; +import { useOurAvatarPath } from '../../hooks/useParamSelector'; const handleSaveQRCode = (event: MouseEvent) => { event.preventDefault(); @@ -51,311 +49,279 @@ const QRView = ({ sessionID }: { sessionID: string }) => { ); }; -interface State { - profileName: string; - updatedProfileName: string; - oldAvatarPath: string; - newAvatarObjectUrl: string | null; - mode: 'default' | 'edit' | 'qr'; - loading: boolean; -} - -export class EditProfileDialog extends React.Component<{}, State> { - private readonly convo: ConversationModel; - - constructor(props: any) { - super(props); - - autoBind(this); - - this.convo = getConversationController().get(UserUtils.getOurPubKeyStrFromCache()); - - this.state = { - profileName: this.convo.getRealSessionUsername() || '', - updatedProfileName: this.convo.getRealSessionUsername() || '', - oldAvatarPath: this.convo.getAvatarPath() || '', - newAvatarObjectUrl: null, - mode: 'default', - loading: false, - }; - } +const commitProfileEdits = async (newName: string, scaledAvatarUrl: string | null) => { + const ourNumber = UserUtils.getOurPubKeyStrFromCache(); + const conversation = await getConversationController().getOrCreateAndWait( + ourNumber, + ConversationTypeEnum.PRIVATE + ); - public componentDidMount() { - window.addEventListener('keyup', this.onKeyUp); + if (scaledAvatarUrl?.length) { + try { + const blobContent = await (await fetch(scaledAvatarUrl)).blob(); + if (!blobContent || !blobContent.size) { + throw new Error('Failed to fetch blob content from scaled avatar'); + } + await uploadOurAvatar(await blobContent.arrayBuffer()); + } catch (error) { + if (error.message && error.message.length) { + ToastUtils.pushToastError('edit-profile', error.message); + } + window.log.error( + 'showEditProfileDialog Error ensuring that image is properly sized:', + error && error.stack ? error.stack : error + ); + } + return; } + // do not update the avatar if it did not change + conversation.setSessionDisplayNameNoCommit(newName); - public componentWillUnmount() { - window.removeEventListener('keyup', this.onKeyUp); - } + // might be good to not trigger a sync if the name did not change + await conversation.commit(); + await setLastProfileUpdateTimestamp(Date.now()); + await SyncUtils.forceSyncConfigurationNowIfNeeded(true); +}; - public render() { - const i18n = window.i18n; +type ProfileAvatarProps = { + newAvatarObjectUrl: string | null; + oldAvatarPath: string | null; + profileName: string | undefined; + ourId: string; +}; - const viewDefault = this.state.mode === 'default'; - const viewEdit = this.state.mode === 'edit'; - const viewQR = this.state.mode === 'qr'; +const ProfileAvatar = (props: ProfileAvatarProps): ReactElement => { + const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId } = props; + return ( + + ); +}; - const sessionID = UserUtils.getOurPubKeyStrFromCache(); +type ProfileHeaderProps = ProfileAvatarProps & { + fireInputEvent: () => void; + setMode: (mode: ProfileDialogModes) => void; +}; - const backButton = - viewEdit || viewQR - ? [ - { - iconType: 'chevron', - iconRotation: 90, - onClick: () => { - this.setState({ mode: 'default' }); - }, - }, - ] - : undefined; +const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { + const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId, fireInputEvent, setMode } = props; - return ( -
- +
+ +
{ + void fireInputEvent(); + }} + data-testid="image-upload-section" + /> +
{ + setMode('qr'); + }} + role="button" > - {viewQR && } - {viewDefault && this.renderDefaultView()} - {viewEdit && this.renderEditView()} - -
- - - - - - {viewDefault || viewQR ? ( - { - window.clipboard.writeText(sessionID); - ToastUtils.pushCopiedToClipBoard(); - }} - dataTestId="copy-button-profile-update" - /> - ) : ( - !this.state.loading && ( - - ) - )} -
- -
- ); - } - - private renderProfileHeader() { - return ( - <> -
-
- {this.renderAvatar()} -
-
{ - this.setState(state => ({ ...state, mode: 'qr' })); - }} - role="button" - > - -
-
+
- - ); - } +
+
+ ); +}; - private async fireInputEvent() { - const scaledAvatarUrl = await pickFileForAvatar(); +type ProfileDialogModes = 'default' | 'edit' | 'qr'; - if (scaledAvatarUrl) { - this.setState({ - newAvatarObjectUrl: scaledAvatarUrl, - mode: 'edit', - }); - } - } +export const EditProfileDialog = (): ReactElement => { + const _profileName = useOurConversationUsername() || ''; + const [profileName, setProfileName] = useState(_profileName); + const [updatedProfileName, setUpdateProfileName] = useState(profileName); + const oldAvatarPath = useOurAvatarPath() || ''; + const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(null); - private renderDefaultView() { - const name = this.state.updatedProfileName || this.state.profileName; - return ( - <> - {this.renderProfileHeader()} + const [mode, setMode] = useState('default'); + const [loading, setLoading] = useState(false); -
-

{name}

- { - this.setState({ mode: 'edit' }); - }} - dataTestId="edit-profile-icon" - /> -
- - ); - } + const ourId = UserUtils.getOurPubKeyStrFromCache(); - private renderEditView() { - const placeholderText = window.i18n('displayName'); + const closeDialog = () => { + window.removeEventListener('keyup', handleOnKeyUp); + window.inboxStore?.dispatch(editProfileModal(null)); + }; + + const backButton = + mode === 'edit' || mode === 'qr' + ? [ + { + iconType: 'chevron', + iconRotation: 90, + onClick: () => { + setMode('default'); + }, + }, + ] + : undefined; + + const onClickOK = async () => { + /** + * Tidy the profile name input text and save the new profile name and avatar + */ + try { + const newName = profileName ? profileName.trim() : ''; - return ( - <> - {this.renderProfileHeader()} -
- -
- - ); - } + if (newName.length === 0 || newName.length > MAX_USERNAME_BYTES) { + return; + } - private renderAvatar() { - const { oldAvatarPath, newAvatarObjectUrl, profileName } = this.state; - const userName = profileName || this.convo.id; + // this throw if the length in bytes is too long + const sanitizedName = sanitizeSessionUsername(newName); + const trimName = sanitizedName.trim(); - return ( - - ); - } + setUpdateProfileName(trimName); + setLoading(true); - private onNameEdited(event: ChangeEvent) { - const displayName = event.target.value; - try { - const newName = sanitizeSessionUsername(displayName); - this.setState({ - profileName: newName, - }); + await commitProfileEdits(newName, newAvatarObjectUrl); + setMode('default'); + setUpdateProfileName(profileName); + setLoading(false); } catch (e) { - this.setState({ - profileName: displayName, - }); ToastUtils.pushToastError('nameTooLong', window.i18n('displayNameTooLong')); } - } + }; - private onKeyUp(event: any) { + const handleOnKeyUp = (event: any) => { switch (event.key) { case 'Enter': - if (this.state.mode === 'edit') { - this.onClickOK(); + if (mode === 'edit') { + onClickOK(); } break; case 'Esc': case 'Escape': - this.closeDialog(); + closeDialog(); break; default: } - } + }; - /** - * Tidy the profile name input text and save the new profile name and avatar - */ - private onClickOK() { - const { newAvatarObjectUrl, profileName } = this.state; - try { - const newName = profileName ? profileName.trim() : ''; - - if (newName.length === 0 || newName.length > MAX_USERNAME_BYTES) { - return; - } - - // this throw if the length in bytes is too long - const sanitizedName = sanitizeSessionUsername(newName); - const trimName = sanitizedName.trim(); - - this.setState( - { - profileName: trimName, - loading: true, - }, - async () => { - await commitProfileEdits(newName, newAvatarObjectUrl); - this.setState({ - loading: false, + const fireInputEvent = async () => { + const scaledAvatarUrl = await pickFileForAvatar(); + if (scaledAvatarUrl) { + setNewAvatarObjectUrl(scaledAvatarUrl); + setMode('edit'); + } + }; - mode: 'default', - updatedProfileName: this.state.profileName, - }); - } - ); + const onNameEdited = (event: ChangeEvent) => { + const displayName = event.target.value; + try { + const newName = sanitizeSessionUsername(displayName); + setProfileName(newName); } catch (e) { + setProfileName(displayName); ToastUtils.pushToastError('nameTooLong', window.i18n('displayNameTooLong')); - - return; } - } + }; - private closeDialog() { - window.removeEventListener('keyup', this.onKeyUp); - window.inboxStore?.dispatch(editProfileModal(null)); - } -} + return ( +
+ + {mode === 'qr' && } + {mode === 'default' && ( + <> + +
+

{updatedProfileName || profileName}

+ { + setMode('edit'); + }} + dataTestId="edit-profile-icon" + /> +
+ + )} + {mode === 'edit' && ( + <> + +
+ +
+ + )} -async function commitProfileEdits(newName: string, scaledAvatarUrl: string | null) { - const ourNumber = UserUtils.getOurPubKeyStrFromCache(); - const conversation = await getConversationController().getOrCreateAndWait( - ourNumber, - ConversationTypeEnum.PRIVATE - ); +
+ + - if (scaledAvatarUrl?.length) { - try { - const blobContent = await (await fetch(scaledAvatarUrl)).blob(); - if (!blobContent || !blobContent.size) { - throw new Error('Failed to fetch blob content from scaled avatar'); - } - await uploadOurAvatar(await blobContent.arrayBuffer()); - } catch (error) { - if (error.message && error.message.length) { - ToastUtils.pushToastError('edit-profile', error.message); - } - window.log.error( - 'showEditProfileDialog Error ensuring that image is properly sized:', - error && error.stack ? error.stack : error - ); - } - return; - } - // do not update the avatar if it did not change - conversation.setSessionDisplayNameNoCommit(newName); + - // might be good to not trigger a sync if the name did not change - await conversation.commit(); - await setLastProfileUpdateTimestamp(Date.now()); - await SyncUtils.forceSyncConfigurationNowIfNeeded(true); -} + {mode === 'default' || mode === 'qr' ? ( + { + window.clipboard.writeText(ourId); + ToastUtils.pushCopiedToClipBoard(); + }} + dataTestId="copy-button-profile-update" + /> + ) : ( + !loading && ( + + ) + )} +
+
+
+ ); +}; From ebeaec20809ab7f7bf6235713627de32f49ced48 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 22 May 2023 17:49:54 +1000 Subject: [PATCH 12/45] feat: initial work for set display picture modal done still need to do logic and handle multiple modals on screen --- _locales/en/messages.json | 4 +- ts/components/dialog/DisplayPictureModal.tsx | 50 ++++++++++++++++++++ ts/components/dialog/EditProfileDialog.tsx | 14 +++--- ts/components/dialog/ModalContainer.tsx | 4 ++ ts/state/ducks/modalDialog.tsx | 8 ++++ ts/state/selectors/modal.ts | 6 +++ ts/types/LocalizerKeys.ts | 32 ++++++++++++- 7 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 ts/components/dialog/DisplayPictureModal.tsx diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e79bc63df..ec19331bd 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -507,5 +507,7 @@ "reactionPopupThree": "$name$, $name2$ & $name3$", "reactionPopupMany": "$name$, $name2$, $name3$ &", "reactionListCountSingular": "And $otherSingular$ has reacted $emoji$ to this message", - "reactionListCountPlural": "And $otherPlural$ have reacted $emoji$ to this message" + "reactionListCountPlural": "And $otherPlural$ have reacted $emoji$ to this message", + "setDisplayPicture": "Set Display Picture", + "upload": "Upload" } diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx new file mode 100644 index 000000000..4da383a0a --- /dev/null +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -0,0 +1,50 @@ +import React, { ReactElement } from 'react'; +import { SessionWrapperModal } from '../SessionWrapperModal'; +import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton'; +import { Avatar, AvatarSize } from '../avatar/Avatar'; +import { SpacerLG } from '../basic/Text'; +import { UserUtils } from '../../session/utils'; +import { useDispatch } from 'react-redux'; +import { updateDisplayPictureModel } from '../../state/ducks/modalDialog'; + +type Props = {}; + +export const DisplayPictureModal = (props: Props): ReactElement => { + const {} = props; + const dispatch = useDispatch(); + + const onClickClose = () => { + dispatch(updateDisplayPictureModel(null)); + }; + + return ( + +
+
+ +
+
+ + + +
+ {}} + /> + {}} + /> +
+
+ ); +}; diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 0f664633f..a076ca746 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -5,12 +5,10 @@ import { Avatar, AvatarSize } from '../avatar/Avatar'; import { SyncUtils, ToastUtils, UserUtils } from '../../session/utils'; import { YourSessionIDPill, YourSessionIDSelectable } from '../basic/YourSessionIDPill'; -import styled from 'styled-components'; -import { uploadOurAvatar } from '../../interactions/conversationInteractions'; -import { ConversationTypeEnum } from '../../models/conversationAttributes'; -import { MAX_USERNAME_BYTES } from '../../session/constants'; +import { SyncUtils, ToastUtils, UserUtils } from '../../session/utils'; + import { getConversationController } from '../../session/conversations'; -import { editProfileModal } from '../../state/ducks/modalDialog'; +import { editProfileModal, updateDisplayPictureModel } from '../../state/ducks/modalDialog'; import { pickFileForAvatar } from '../../types/attachments/VisualAttachment'; import { saveQRCode } from '../../util/saveQRCode'; import { setLastProfileUpdateTimestamp } from '../../util/storage'; @@ -21,6 +19,7 @@ import { SessionIconButton } from '../icon'; import { sanitizeSessionUsername } from '../../session/utils/String'; import { useOurConversationUsername } from '../../hooks/useParamSelector'; import { useOurAvatarPath } from '../../hooks/useParamSelector'; +import { useDispatch } from 'react-redux'; const handleSaveQRCode = (event: MouseEvent) => { event.preventDefault(); @@ -110,6 +109,8 @@ type ProfileHeaderProps = ProfileAvatarProps & { const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId, fireInputEvent, setMode } = props; + const dispatch = useDispatch(); + return (
@@ -123,7 +124,8 @@ const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { className="image-upload-section" role="button" onClick={async () => { - void fireInputEvent(); + // void fireInputEvent(); + dispatch(updateDisplayPictureModel({})); }} data-testid="image-upload-section" /> diff --git a/ts/components/dialog/ModalContainer.tsx b/ts/components/dialog/ModalContainer.tsx index d54bbe7e8..131f81495 100644 --- a/ts/components/dialog/ModalContainer.tsx +++ b/ts/components/dialog/ModalContainer.tsx @@ -7,6 +7,7 @@ import { getChangeNickNameDialog, getConfirmModal, getDeleteAccountModalState, + getDisplayPictureModalState, getEditProfileDialog, getInviteContactModal, getOnionPathDialog, @@ -36,6 +37,7 @@ import { SessionNicknameDialog } from './SessionNicknameDialog'; import { BanOrUnBanUserDialog } from './BanOrUnbanUserDialog'; import { ReactListModal } from './ReactListModal'; import { ReactClearAllModal } from './ReactClearAllModal'; +import { DisplayPictureModal } from './DisplayPictureModal'; export const ModalContainer = () => { const confirmModalState = useSelector(getConfirmModal); @@ -55,6 +57,7 @@ export const ModalContainer = () => { const banOrUnbanUserModalState = useSelector(getBanOrUnbanUserModalState); const reactListModalState = useSelector(getReactListDialog); const reactClearAllModalState = useSelector(getReactClearAllDialog); + const DisplayPictureModalState = useSelector(getDisplayPictureModalState); return ( <> @@ -79,6 +82,7 @@ export const ModalContainer = () => { {confirmModalState && } {reactListModalState && } {reactClearAllModalState && } + {DisplayPictureModalState && } ); }; diff --git a/ts/state/ducks/modalDialog.tsx b/ts/state/ducks/modalDialog.tsx index ea8428b70..53ba355d6 100644 --- a/ts/state/ducks/modalDialog.tsx +++ b/ts/state/ducks/modalDialog.tsx @@ -34,6 +34,8 @@ export type ReactModalsState = { messageId: string; } | null; +export type DisplayPictureModalState = {} | null; + export type ModalState = { confirmModal: ConfirmModalState; inviteContactModal: InviteContactModalState; @@ -52,6 +54,7 @@ export type ModalState = { deleteAccountModal: DeleteAccountModalState; reactListModalState: ReactModalsState; reactClearAllModalState: ReactModalsState; + displayPictureModalState: DisplayPictureModalState; }; export const initialModalState: ModalState = { @@ -72,6 +75,7 @@ export const initialModalState: ModalState = { deleteAccountModal: null, reactListModalState: null, reactClearAllModalState: null, + displayPictureModalState: null, }; const ModalSlice = createSlice({ @@ -129,6 +133,9 @@ const ModalSlice = createSlice({ updateReactClearAllModal(state, action: PayloadAction) { return { ...state, reactClearAllModalState: action.payload }; }, + updateDisplayPictureModel(state, action: PayloadAction) { + return { ...state, displayPictureModalState: action.payload }; + }, }, }); @@ -151,5 +158,6 @@ export const { updateBanOrUnbanUserModal, updateReactListModal, updateReactClearAllModal, + updateDisplayPictureModel, } = actions; export const modalReducer = reducer; diff --git a/ts/state/selectors/modal.ts b/ts/state/selectors/modal.ts index f959bc243..efb38e1a5 100644 --- a/ts/state/selectors/modal.ts +++ b/ts/state/selectors/modal.ts @@ -8,6 +8,7 @@ import { ChangeNickNameModalState, ConfirmModalState, DeleteAccountModalState, + DisplayPictureModalState, EditProfileModalState, InviteContactModalState, ModalState, @@ -109,3 +110,8 @@ export const getReactClearAllDialog = createSelector( getModal, (state: ModalState): ReactModalsState => state.reactClearAllModalState ); + +export const getDisplayPictureModalState = createSelector( + getModal, + (state: ModalState): DisplayPictureModalState => state.displayPictureModalState +); diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts index d7a9cb14b..e8d58a0c5 100644 --- a/ts/types/LocalizerKeys.ts +++ b/ts/types/LocalizerKeys.ts @@ -506,5 +506,33 @@ export type LocalizerKeys = | 'reactionPopupTwo' | 'reactionPopupThree' | 'reactionPopupMany' - | 'reactionListCountSingular' - | 'reactionListCountPlural'; + | 'timerSetTo' + | 'iAmSure' + | 'primaryColorRed' + | 'selectMessage' + | 'enterAnOpenGroupURL' + | 'delete' + | 'changePasswordInvalid' + | 'themesSettingTitle' + | 'timerOption_6_hours' + | 'confirmPassword' + | 'downloadAttachment' + | 'trimDatabaseDescription' + | 'showUserDetails' + | 'titleIsNow' + | 'removePasswordToastDescription' + | 'recoveryPhrase' + | 'deleteAccountFromLogin' + | 'newMessages' + | 'you' + | 'pruneSettingTitle' + | 'unbanUser' + | 'notificationForConvo_mentions_only' + | 'trustThisContactDialogDescription' + | 'unknownCountry' + | 'searchFor...' + | 'displayNameTooLong' + | 'joinedTheGroup' + | 'editGroupName' + | 'reportIssue' + | 'setDisplayPicture'; From 88587a203d71d0731765de2f68b4dd7cf6603e99 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 12:27:21 +1000 Subject: [PATCH 13/45] feat: added button state logic and migrated avatar upload logic from EditProfileDialog show loading spinner while avatar is loading --- ts/components/dialog/DisplayPictureModal.tsx | 101 ++++++++++++++++--- ts/components/dialog/EditProfileDialog.tsx | 37 ++++--- ts/state/ducks/modalDialog.tsx | 3 +- 3 files changed, 114 insertions(+), 27 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 4da383a0a..67f2e0ff3 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -1,48 +1,121 @@ -import React, { ReactElement } from 'react'; +import React, { useState } from 'react'; import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton'; -import { Avatar, AvatarSize } from '../avatar/Avatar'; import { SpacerLG } from '../basic/Text'; -import { UserUtils } from '../../session/utils'; import { useDispatch } from 'react-redux'; import { updateDisplayPictureModel } from '../../state/ducks/modalDialog'; +import { ProfileAvatar, ProfileAvatarProps } from './EditProfileDialog'; +import styled from 'styled-components'; +import { uploadOurAvatar } from '../../interactions/conversationInteractions'; +import { ToastUtils } from '../../session/utils'; +import { SessionSpinner } from '../basic/SessionSpinner'; -type Props = {}; +const StyledAvatarContainer = styled.div` + cursor: pointer; +`; -export const DisplayPictureModal = (props: Props): ReactElement => { - const {} = props; +const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { + if (scaledAvatarUrl?.length) { + try { + const blobContent = await (await fetch(scaledAvatarUrl)).blob(); + if (!blobContent || !blobContent.size) { + throw new Error('Failed to fetch blob content from scaled avatar'); + } + await uploadOurAvatar(await blobContent.arrayBuffer()); + } catch (error) { + if (error.message && error.message.length) { + ToastUtils.pushToastError('edit-profile', error.message); + } + window.log.error( + 'showEditProfileDialog Error ensuring that image is properly sized:', + error && error.stack ? error.stack : error + ); + } + } +}; + +export type DisplayPictureModalProps = ProfileAvatarProps & { + avatarAction: () => Promise; + removeAction: () => void; +}; + +export const DisplayPictureModal = (props: DisplayPictureModalProps) => { const dispatch = useDispatch(); - const onClickClose = () => { + if (!props) { + return null; + } + + const { + newAvatarObjectUrl: _newAvatarObjectUrl, + oldAvatarPath, + profileName, + ourId, + avatarAction, + removeAction, + } = props; + + const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(_newAvatarObjectUrl); + const [loading, setLoading] = useState(false); + + const closeDialog = () => { dispatch(updateDisplayPictureModel(null)); }; return ( -
-
- -
+
{ + const updatedAvatarObjectUrl = await avatarAction(); + if (updatedAvatarObjectUrl) { + setNewAvatarObjectUrl(updatedAvatarObjectUrl); + } + }} + > + + +
+
{}} + onClick={async () => { + setLoading(true); + if (newAvatarObjectUrl === _newAvatarObjectUrl) { + window.log.debug(`Avatar Object URL has not changed!`); + return; + } + + await uploadProfileAvatar(newAvatarObjectUrl); + setLoading(false); + closeDialog(); + }} + disabled={_newAvatarObjectUrl === newAvatarObjectUrl} /> {}} + onClick={() => { + removeAction(); + }} + disabled={!oldAvatarPath} />
diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index a076ca746..94a0c45a5 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -82,14 +82,14 @@ const commitProfileEdits = async (newName: string, scaledAvatarUrl: string | nul await SyncUtils.forceSyncConfigurationNowIfNeeded(true); }; -type ProfileAvatarProps = { +export type ProfileAvatarProps = { newAvatarObjectUrl: string | null; oldAvatarPath: string | null; profileName: string | undefined; ourId: string; }; -const ProfileAvatar = (props: ProfileAvatarProps): ReactElement => { +export const ProfileAvatar = (props: ProfileAvatarProps): ReactElement => { const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId } = props; return ( { }; type ProfileHeaderProps = ProfileAvatarProps & { - fireInputEvent: () => void; + onClick: () => void; setMode: (mode: ProfileDialogModes) => void; }; const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { - const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId, fireInputEvent, setMode } = props; - - const dispatch = useDispatch(); + const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId, onClick, setMode } = props; return (
@@ -123,10 +121,7 @@ const ProfileHeader = (props: ProfileHeaderProps): ReactElement => {
{ - // void fireInputEvent(); - dispatch(updateDisplayPictureModel({})); - }} + onClick={onClick} data-testid="image-upload-section" />
{ type ProfileDialogModes = 'default' | 'edit' | 'qr'; export const EditProfileDialog = (): ReactElement => { + const dispatch = useDispatch(); + const _profileName = useOurConversationUsername() || ''; const [profileName, setProfileName] = useState(_profileName); const [updatedProfileName, setUpdateProfileName] = useState(profileName); @@ -223,6 +220,22 @@ export const EditProfileDialog = (): ReactElement => { setNewAvatarObjectUrl(scaledAvatarUrl); setMode('edit'); } + + return scaledAvatarUrl; + }; + + const handleProfileHeaderClick = () => { + closeDialog(); + dispatch( + updateDisplayPictureModel({ + newAvatarObjectUrl, + oldAvatarPath, + profileName, + ourId, + avatarAction: fireInputEvent, + removeAction: () => {}, + }) + ); }; const onNameEdited = (event: ChangeEvent) => { @@ -252,7 +265,7 @@ export const EditProfileDialog = (): ReactElement => { oldAvatarPath={oldAvatarPath} profileName={profileName} ourId={ourId} - fireInputEvent={fireInputEvent} + onClick={handleProfileHeaderClick} setMode={setMode} />
@@ -275,7 +288,7 @@ export const EditProfileDialog = (): ReactElement => { oldAvatarPath={oldAvatarPath} profileName={profileName} ourId={ourId} - fireInputEvent={fireInputEvent} + onClick={handleProfileHeaderClick} setMode={setMode} />
diff --git a/ts/state/ducks/modalDialog.tsx b/ts/state/ducks/modalDialog.tsx index 53ba355d6..238bf54ac 100644 --- a/ts/state/ducks/modalDialog.tsx +++ b/ts/state/ducks/modalDialog.tsx @@ -1,6 +1,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { SessionConfirmDialogProps } from '../../components/dialog/SessionConfirm'; import { PasswordAction } from '../../components/dialog/SessionPasswordDialog'; +import { DisplayPictureModalProps } from '../../components/dialog/DisplayPictureModal'; export type BanType = 'ban' | 'unban'; export type ConfirmModalState = SessionConfirmDialogProps | null; @@ -34,7 +35,7 @@ export type ReactModalsState = { messageId: string; } | null; -export type DisplayPictureModalState = {} | null; +export type DisplayPictureModalState = DisplayPictureModalProps | null; export type ModalState = { confirmModal: ConfirmModalState; From cb7c36e2e63c16f7e0146699c77df3f1dea6d10a Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 14:40:33 +1000 Subject: [PATCH 14/45] feat: initial remove profile work done --- ts/components/dialog/DisplayPictureModal.tsx | 15 +++++++++------ ts/components/dialog/EditProfileDialog.tsx | 1 - ts/interactions/conversationInteractions.ts | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 67f2e0ff3..7cf18561b 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -6,7 +6,7 @@ import { useDispatch } from 'react-redux'; import { updateDisplayPictureModel } from '../../state/ducks/modalDialog'; import { ProfileAvatar, ProfileAvatarProps } from './EditProfileDialog'; import styled from 'styled-components'; -import { uploadOurAvatar } from '../../interactions/conversationInteractions'; +import { clearOurAvatar, uploadOurAvatar } from '../../interactions/conversationInteractions'; import { ToastUtils } from '../../session/utils'; import { SessionSpinner } from '../basic/SessionSpinner'; @@ -36,7 +36,6 @@ const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { export type DisplayPictureModalProps = ProfileAvatarProps & { avatarAction: () => Promise; - removeAction: () => void; }; export const DisplayPictureModal = (props: DisplayPictureModalProps) => { @@ -48,14 +47,14 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { const { newAvatarObjectUrl: _newAvatarObjectUrl, - oldAvatarPath, + oldAvatarPath: _oldAvatarPath, profileName, ourId, avatarAction, - removeAction, } = props; const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(_newAvatarObjectUrl); + const [oldAvatarPath, setOldAvatarPath] = useState(_oldAvatarPath); const [loading, setLoading] = useState(false); const closeDialog = () => { @@ -112,8 +111,12 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { text={window.i18n('remove')} buttonColor={SessionButtonColor.Danger} buttonType={SessionButtonType.Simple} - onClick={() => { - removeAction(); + onClick={async () => { + setLoading(true); + await clearOurAvatar(); + setNewAvatarObjectUrl(null); + setOldAvatarPath(null); + setLoading(false); }} disabled={!oldAvatarPath} /> diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 94a0c45a5..d502adc93 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -233,7 +233,6 @@ export const EditProfileDialog = (): ReactElement => { profileName, ourId, avatarAction: fireInputEvent, - removeAction: () => {}, }) ); }; diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index 6b6c7ca27..86a4df97c 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -487,6 +487,24 @@ export async function uploadOurAvatar(newAvatarDecrypted?: ArrayBuffer) { }; } +export async function clearOurAvatar() { + const ourConvo = getConversationController().get(UserUtils.getOurPubKeyStrFromCache()); + if (!ourConvo) { + window.log.warn('ourConvo not found... This is not a valid case'); + return; + } + + // TODO check if defined first + ourConvo.set('avatarPointer', undefined); + ourConvo.set('avatarInProfile', undefined); + ourConvo.set('profileKey', undefined); + + await ourConvo.commit(); + await SyncUtils.forceSyncConfigurationNowIfNeeded(true); + + // TODO send messages to opengroups to clear avatar from there +} + export async function replyToMessage(messageId: string) { const quotedMessageModel = await Data.getMessageById(messageId); if (!quotedMessageModel) { From 84d3d5b1b40477de203c22bbcc2a0b2f88292b39 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 14:59:01 +1000 Subject: [PATCH 15/45] feat: small refactoring --- ts/components/dialog/DisplayPictureModal.tsx | 40 +++++++++++--------- ts/interactions/conversationInteractions.ts | 4 ++ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 7cf18561b..96feefc74 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -61,6 +61,26 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { dispatch(updateDisplayPictureModel(null)); }; + const handleUpload = async () => { + setLoading(true); + if (newAvatarObjectUrl === _newAvatarObjectUrl) { + window.log.debug(`Avatar Object URL has not changed!`); + return; + } + + await uploadProfileAvatar(newAvatarObjectUrl); + setLoading(false); + closeDialog(); + }; + + const handleRemove = async () => { + setLoading(true); + await clearOurAvatar(); + setNewAvatarObjectUrl(null); + setOldAvatarPath(null); + setLoading(false); + }; + return ( { { - setLoading(true); - if (newAvatarObjectUrl === _newAvatarObjectUrl) { - window.log.debug(`Avatar Object URL has not changed!`); - return; - } - - await uploadProfileAvatar(newAvatarObjectUrl); - setLoading(false); - closeDialog(); - }} + onClick={handleUpload} disabled={_newAvatarObjectUrl === newAvatarObjectUrl} /> { - setLoading(true); - await clearOurAvatar(); - setNewAvatarObjectUrl(null); - setOldAvatarPath(null); - setLoading(false); - }} + onClick={handleRemove} disabled={!oldAvatarPath} />
diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index 86a4df97c..c85185766 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -487,6 +487,9 @@ export async function uploadOurAvatar(newAvatarDecrypted?: ArrayBuffer) { }; } +/** + * This function can be used for clearing our avatar. + */ export async function clearOurAvatar() { const ourConvo = getConversationController().get(UserUtils.getOurPubKeyStrFromCache()); if (!ourConvo) { @@ -500,6 +503,7 @@ export async function clearOurAvatar() { ourConvo.set('profileKey', undefined); await ourConvo.commit(); + await setLastProfileUpdateTimestamp(Date.now()); await SyncUtils.forceSyncConfigurationNowIfNeeded(true); // TODO send messages to opengroups to clear avatar from there From b59f1bf4453423e43323645921038b8b7074f3f5 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 15:36:39 +1000 Subject: [PATCH 16/45] feat: desktop now supports avatar being removed via sync configuration message disabled buttons while loading --- ts/components/dialog/DisplayPictureModal.tsx | 5 +++-- ts/interactions/conversationInteractions.ts | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 96feefc74..ab891b7d0 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -79,6 +79,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { setNewAvatarObjectUrl(null); setOldAvatarPath(null); setLoading(false); + closeDialog(); }; return ( @@ -115,14 +116,14 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { text={window.i18n('upload')} buttonType={SessionButtonType.Simple} onClick={handleUpload} - disabled={_newAvatarObjectUrl === newAvatarObjectUrl} + disabled={loading || _newAvatarObjectUrl === newAvatarObjectUrl} />
diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index c85185766..bbd0044e4 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -490,23 +490,23 @@ export async function uploadOurAvatar(newAvatarDecrypted?: ArrayBuffer) { /** * This function can be used for clearing our avatar. */ -export async function clearOurAvatar() { +export async function clearOurAvatar(commit: boolean = true) { const ourConvo = getConversationController().get(UserUtils.getOurPubKeyStrFromCache()); if (!ourConvo) { window.log.warn('ourConvo not found... This is not a valid case'); return; } - // TODO check if defined first ourConvo.set('avatarPointer', undefined); ourConvo.set('avatarInProfile', undefined); ourConvo.set('profileKey', undefined); - await ourConvo.commit(); await setLastProfileUpdateTimestamp(Date.now()); - await SyncUtils.forceSyncConfigurationNowIfNeeded(true); - // TODO send messages to opengroups to clear avatar from there + if (commit) { + await ourConvo.commit(); + await SyncUtils.forceSyncConfigurationNowIfNeeded(true); + } } export async function replyToMessage(messageId: string) { From c301eace4805a297537ebbe2bd91a0321ba5842c Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 16:06:45 +1000 Subject: [PATCH 17/45] feat: added proper typings to icons and added thumbnail icon confirmed support for svgs with multiple paths --- ts/components/icon/Icons.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ts/components/icon/Icons.tsx b/ts/components/icon/Icons.tsx index 9f1f2c6b2..ebc5ff38b 100644 --- a/ts/components/icon/Icons.tsx +++ b/ts/components/icon/Icons.tsx @@ -64,6 +64,7 @@ export type SessionIconType = | 'doubleCheckCircle' | 'gallery' | 'stop' + | 'thumbnail' | 'timer00' | 'timer05' | 'timer10' @@ -81,7 +82,10 @@ export type SessionIconType = export type SessionIconSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | 'huge2' | 'max'; -export const icons = { +export const icons: Record< + string, + { path: string | Array; viewBox: string; ratio: number } +> = { addUser: { path: 'M8.85,2.17c-1.73,0-3.12,1.4-3.12,3.12s1.4,3.12,3.12,3.12c1.73,0,3.13-1.4,3.13-3.12S10.58,2.17,8.85,2.17z M8.85,0.08c2.88,0,5.21,2.33,5.21,5.21s-2.33,5.21-5.21,5.21s-5.2-2.33-5.2-5.21C3.65,2.42,5.98,0.08,8.85,0.08z M20.83,5.29 c0.54,0,0.98,0.41,1.04,0.93l0.01,0.11v2.08h2.08c0.54,0,0.98,0.41,1.04,0.93v0.12c0,0.54-0.41,0.98-0.93,1.04l-0.11,0.01h-2.08 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08h-2.08c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11 c0-0.54,0.41-0.98,0.93-1.04l0.11-0.01h2.08V6.34C19.79,5.76,20.26,5.29,20.83,5.29z M12.5,12.58c2.8,0,5.09,2.21,5.2,4.99v0.22 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08c0-1.67-1.3-3.03-2.95-3.12h-0.18H5.21 c-1.67,0-3.03,1.3-3.12,2.95v0.18v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93L0,19.88V17.8 c0-2.8,2.21-5.09,4.99-5.2h0.22h7.29V12.58z', @@ -473,6 +477,16 @@ export const icons = { viewBox: '-1 -1 35 35', ratio: 1, }, + thumbnail: { + path: [ + 'M34.915 23.8987L26.594 17.812C26.5393 17.7682 26.4714 17.7444 26.4014 17.7444C26.3313 17.7444 26.2634 17.7682 26.2087 17.812L18.748 23.9886C18.6905 24.0313 18.6207 24.0544 18.549 24.0544C18.4773 24.0544 18.4075 24.0313 18.35 23.9886L14.6003 20.9324C14.5468 20.8918 14.4814 20.8698 14.4141 20.8698C14.3469 20.8698 14.2815 20.8918 14.2279 20.9324L4.0706 28.1491C4.03144 28.1797 3.99959 28.2186 3.97737 28.263C3.95516 28.3075 3.94314 28.3563 3.94219 28.406V30.743C3.94549 30.9361 4.02366 31.1204 4.16022 31.257C4.29678 31.3935 4.48104 31.4717 4.67413 31.475H34.3115C34.5056 31.475 34.6918 31.3979 34.8291 31.2606C34.9663 31.1233 35.0434 30.9372 35.0434 30.743V24.1427C35.0447 24.0944 35.0335 24.0467 35.011 24.004C34.9885 23.9613 34.9555 23.925 34.915 23.8987Z', + 'M11.0947 18.7492C12.6904 18.7492 13.984 17.4556 13.984 15.8599C13.984 14.2642 12.6904 12.9707 11.0947 12.9707C9.49902 12.9707 8.20546 14.2642 8.20546 15.8599C8.20546 17.4556 9.49902 18.7492 11.0947 18.7492Z', + 'M40.3597 4.62408L8.19261 0.874467C7.77128 0.822682 7.34385 0.855312 6.93527 0.970455C6.52668 1.0856 6.14511 1.28095 5.81282 1.54511C5.48052 1.80927 5.20415 2.13696 4.99984 2.50905C4.79552 2.88115 4.66734 3.2902 4.62277 3.71236L4.46868 5.0992H7.03691L7.16532 4.00771C7.17565 3.92437 7.20256 3.84394 7.24446 3.77116C7.28637 3.69838 7.34241 3.63473 7.4093 3.58395C7.51881 3.496 7.65413 3.44638 7.79454 3.4427H7.85874L22.1509 5.0992H35.6855C36.4753 5.10365 37.2535 5.29018 37.9595 5.64429C38.6655 5.99841 39.2803 6.51056 39.7561 7.14095H40.0643C40.2326 7.16031 40.3865 7.24541 40.4923 7.37771C40.5981 7.51 40.6474 7.67876 40.6293 7.84721L40.5395 8.57915C40.7184 9.09576 40.8138 9.63762 40.822 10.1843V28.4958L43.1847 8.18108C43.2788 7.33533 43.0345 6.48672 42.5053 5.82036C41.976 5.154 41.2048 4.72397 40.3597 4.62408Z', + 'M35.6855 35.3016H3.30013C2.44871 35.3016 1.63216 34.9634 1.03011 34.3613C0.428069 33.7593 0.0898438 32.9427 0.0898438 32.0913V10.2614C0.0898438 9.40994 0.428069 8.59339 1.03011 7.99135C1.63216 7.3893 2.44871 7.05108 3.30013 7.05108H35.6855C36.5369 7.05108 37.3535 7.3893 37.9555 7.99135C38.5576 8.59339 38.8958 9.40994 38.8958 10.2614V32.0913C38.8958 32.9427 38.5576 33.7593 37.9555 34.3613C37.3535 34.9634 36.5369 35.3016 35.6855 35.3016ZM3.30013 9.59363C3.12985 9.59363 2.96654 9.66127 2.84613 9.78168C2.72572 9.90209 2.65807 10.0654 2.65807 10.2357V32.0656C2.65807 32.2359 2.72572 32.3992 2.84613 32.5196C2.96654 32.64 3.12985 32.7077 3.30013 32.7077H35.6855C35.8558 32.7077 36.0191 32.64 36.1395 32.5196C36.2599 32.3992 36.3276 32.2359 36.3276 32.0656V10.2357C36.3276 10.0654 36.2599 9.90209 36.1395 9.78168C36.0191 9.66127 35.8558 9.59363 35.6855 9.59363H3.30013Z', + ], + viewBox: '0 0 44 36', + ratio: 1, + }, timer00: { path: 'M11.428367,3.44328115 L10.5587469,3.94535651 C10.4906607,3.79477198 10.4145019,3.64614153 10.330127,3.5 C10.2457522,3.35385847 10.1551138,3.21358774 10.0587469,3.07933111 L10.928367,2.57725574 C11.0225793,2.71323387 11.1119641,2.85418158 11.1961524,3 C11.2803407,3.14581842 11.3577126,3.2937018 11.428367,3.44328115 Z M9.42274426,1.07163304 L8.92066889,1.94125309 C8.78641226,1.84488615 8.64614153,1.75424783 8.5,1.66987298 C8.35385847,1.58549813 8.20522802,1.50933927 8.05464349,1.44125309 L8.55671885,0.571633044 C8.7062982,0.642287382 8.85418158,0.719659271 9,0.803847577 C9.14581842,0.888035884 9.28676613,0.977420696 9.42274426,1.07163304 Z M11.9794631,6.5 L10.9753124,6.5 C10.9916403,6.33554688 11,6.1687497 11,6 C11,5.8312503 10.9916403,5.66445312 10.9753124,5.5 L11.9794631,5.5 C11.9930643,5.66486669 12,5.83162339 12,6 C12,6.16837661 11.9930643,6.33513331 11.9794631,6.5 Z M10.928367,9.42274426 L10.0587469,8.92066889 C10.1551138,8.78641226 10.2457522,8.64614153 10.330127,8.5 C10.4145019,8.35385847 10.4906607,8.20522802 10.5587469,8.05464349 L11.428367,8.55671885 C11.3577126,8.7062982 11.2803407,8.85418158 11.1961524,9 C11.1119641,9.14581842 11.0225793,9.28676613 10.928367,9.42274426 Z M8.55671885,11.428367 L8.05464349,10.5587469 C8.20522802,10.4906607 8.35385847,10.4145019 8.5,10.330127 C8.64614153,10.2457522 8.78641226,10.1551138 8.92066889,10.0587469 L9.42274426,10.928367 C9.28676613,11.0225793 9.14581842,11.1119641 9,11.1961524 C8.85418158,11.2803407 8.7062982,11.3577126 8.55671885,11.428367 Z M2.57725574,10.928367 L3.07933111,10.0587469 C3.21358774,10.1551138 3.35385847,10.2457522 3.5,10.330127 C3.64614153,10.4145019 3.79477198,10.4906607 3.94535651,10.5587469 L3.44328115,11.428367 C3.2937018,11.3577126 3.14581842,11.2803407 3,11.1961524 C2.85418158,11.1119641 2.71323387,11.0225793 2.57725574,10.928367 Z M5.5,11.9794631 L5.5,10.9753124 C5.66445312,10.9916403 5.8312503,11 6,11 C6.1687497,11 6.33554688,10.9916403 6.5,10.9753124 L6.5,11.9794631 C6.33513331,11.9930643 6.16837661,12 6,12 C5.83162339,12 5.66486669,11.9930643 5.5,11.9794631 Z M0.571633044,8.55671885 L1.44125309,8.05464349 C1.50933927,8.20522802 1.58549813,8.35385847 1.66987298,8.5 C1.75424783,8.64614153 1.84488615,8.78641226 1.94125309,8.92066889 L1.07163304,9.42274426 C0.977420696,9.28676613 0.888035884,9.14581842 0.803847577,9 C0.719659271,8.85418158 0.642287382,8.7062982 0.571633044,8.55671885 Z M0.0205368885,5.5 L1.02468762,5.5 C1.00835972,5.66445312 1,5.8312503 1,6 C1,6.1687497 1.00835972,6.33554688 1.02468762,6.5 L0.0205368885,6.5 C0.00693566443,6.33513331 -9.95062878e-13,6.16837661 -9.95093808e-13,6 C-9.95124738e-13,5.83162339 0.00693566443,5.66486669 0.0205368885,5.5 Z M1.07163304,2.57725574 L1.94125309,3.07933111 C1.84488615,3.21358774 1.75424783,3.35385847 1.66987298,3.5 C1.58549813,3.64614153 1.50933927,3.79477198 1.44125309,3.94535651 L0.571633044,3.44328115 C0.642287382,3.2937018 0.719659271,3.14581842 0.803847577,3 C0.888035884,2.85418158 0.977420696,2.71323387 1.07163304,2.57725574 Z M3.44328115,0.571633044 L3.94535651,1.44125309 C3.79477198,1.50933927 3.64614153,1.58549813 3.5,1.66987298 C3.35385847,1.75424783 3.21358774,1.84488615 3.07933111,1.94125309 L2.57725574,1.07163304 C2.71323387,0.977420696 2.85418158,0.888035884 3,0.803847577 C3.14581842,0.719659271 3.2937018,0.642287382 3.44328115,0.571633044 Z M6.5,0.0205368885 L6.5,7 L5.5,7 L5.5,0.0205368885 C5.66486669,0.00693566443 5.83162339,5.01e-14 6,5.01e-14 C6.16837661,5.01e-14 6.33513331,0.00693566443 6.5,0.0205368885 Z', From 3a0b7d1c724119bfff79a2fc4f16188fc6669822 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 16:25:21 +1000 Subject: [PATCH 18/45] feat: added upload image button if user doesn't have an avatar set --- ts/components/dialog/DisplayPictureModal.tsx | 43 ++++++++++++++++---- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index ab891b7d0..4049cc22b 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -9,11 +9,36 @@ import styled from 'styled-components'; import { clearOurAvatar, uploadOurAvatar } from '../../interactions/conversationInteractions'; import { ToastUtils } from '../../session/utils'; import { SessionSpinner } from '../basic/SessionSpinner'; +import { SessionIconButton } from '../icon'; const StyledAvatarContainer = styled.div` cursor: pointer; `; +const UploadImageButton = () => { + return ( +
+
+ +
+ +
+ ); +}; + const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { if (scaledAvatarUrl?.length) { try { @@ -99,12 +124,16 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { }} > - + {newAvatarObjectUrl || oldAvatarPath ? ( + + ) : ( + + )}
@@ -113,7 +142,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => {
Date: Tue, 23 May 2023 16:49:19 +1000 Subject: [PATCH 19/45] fix: moved all avatar logic from editProfileDialog to DisplayPictureModal --- ts/components/dialog/DisplayPictureModal.tsx | 49 ++++++++--------- ts/components/dialog/EditProfileDialog.tsx | 57 ++++---------------- 2 files changed, 31 insertions(+), 75 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 4049cc22b..7ed5b60e6 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -3,13 +3,14 @@ import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton'; import { SpacerLG } from '../basic/Text'; import { useDispatch } from 'react-redux'; -import { updateDisplayPictureModel } from '../../state/ducks/modalDialog'; -import { ProfileAvatar, ProfileAvatarProps } from './EditProfileDialog'; +import { editProfileModal, updateDisplayPictureModel } from '../../state/ducks/modalDialog'; +import { ProfileAvatar } from './EditProfileDialog'; import styled from 'styled-components'; import { clearOurAvatar, uploadOurAvatar } from '../../interactions/conversationInteractions'; import { ToastUtils } from '../../session/utils'; import { SessionSpinner } from '../basic/SessionSpinner'; import { SessionIconButton } from '../icon'; +import { pickFileForAvatar } from '../../types/attachments/VisualAttachment'; const StyledAvatarContainer = styled.div` cursor: pointer; @@ -59,8 +60,10 @@ const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { } }; -export type DisplayPictureModalProps = ProfileAvatarProps & { - avatarAction: () => Promise; +export type DisplayPictureModalProps = { + oldAvatarPath: string | null; + profileName: string | undefined; + ourId: string; }; export const DisplayPictureModal = (props: DisplayPictureModalProps) => { @@ -70,41 +73,41 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { return null; } - const { - newAvatarObjectUrl: _newAvatarObjectUrl, - oldAvatarPath: _oldAvatarPath, - profileName, - ourId, - avatarAction, - } = props; + const { oldAvatarPath, profileName, ourId } = props; - const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(_newAvatarObjectUrl); - const [oldAvatarPath, setOldAvatarPath] = useState(_oldAvatarPath); + const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(oldAvatarPath); const [loading, setLoading] = useState(false); const closeDialog = () => { dispatch(updateDisplayPictureModel(null)); + dispatch(editProfileModal({})); + }; + + const handleAvatarClick = async () => { + const updatedAvatarObjectUrl = await pickFileForAvatar(); + if (updatedAvatarObjectUrl) { + setNewAvatarObjectUrl(updatedAvatarObjectUrl); + } }; const handleUpload = async () => { setLoading(true); - if (newAvatarObjectUrl === _newAvatarObjectUrl) { + if (newAvatarObjectUrl === oldAvatarPath) { window.log.debug(`Avatar Object URL has not changed!`); return; } await uploadProfileAvatar(newAvatarObjectUrl); setLoading(false); - closeDialog(); + dispatch(updateDisplayPictureModel(null)); }; const handleRemove = async () => { setLoading(true); await clearOurAvatar(); setNewAvatarObjectUrl(null); - setOldAvatarPath(null); setLoading(false); - closeDialog(); + dispatch(updateDisplayPictureModel(null)); }; return ( @@ -114,15 +117,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { showHeader={true} showExitIcon={true} > -
{ - const updatedAvatarObjectUrl = await avatarAction(); - if (updatedAvatarObjectUrl) { - setNewAvatarObjectUrl(updatedAvatarObjectUrl); - } - }} - > +
{newAvatarObjectUrl || oldAvatarPath ? ( { text={window.i18n('save')} buttonType={SessionButtonType.Simple} onClick={handleUpload} - disabled={loading || _newAvatarObjectUrl === newAvatarObjectUrl} + disabled={loading || newAvatarObjectUrl === oldAvatarPath} /> { event.preventDefault(); @@ -48,32 +49,12 @@ const QRView = ({ sessionID }: { sessionID: string }) => { ); }; -const commitProfileEdits = async (newName: string, scaledAvatarUrl: string | null) => { +const updateDisplayName = async (newName: string) => { const ourNumber = UserUtils.getOurPubKeyStrFromCache(); const conversation = await getConversationController().getOrCreateAndWait( ourNumber, ConversationTypeEnum.PRIVATE ); - - if (scaledAvatarUrl?.length) { - try { - const blobContent = await (await fetch(scaledAvatarUrl)).blob(); - if (!blobContent || !blobContent.size) { - throw new Error('Failed to fetch blob content from scaled avatar'); - } - await uploadOurAvatar(await blobContent.arrayBuffer()); - } catch (error) { - if (error.message && error.message.length) { - ToastUtils.pushToastError('edit-profile', error.message); - } - window.log.error( - 'showEditProfileDialog Error ensuring that image is properly sized:', - error && error.stack ? error.stack : error - ); - } - return; - } - // do not update the avatar if it did not change conversation.setSessionDisplayNameNoCommit(newName); // might be good to not trigger a sync if the name did not change @@ -82,8 +63,8 @@ const commitProfileEdits = async (newName: string, scaledAvatarUrl: string | nul await SyncUtils.forceSyncConfigurationNowIfNeeded(true); }; -export type ProfileAvatarProps = { - newAvatarObjectUrl: string | null; +type ProfileAvatarProps = { + newAvatarObjectUrl?: string | null; oldAvatarPath: string | null; profileName: string | undefined; ourId: string; @@ -107,17 +88,12 @@ type ProfileHeaderProps = ProfileAvatarProps & { }; const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { - const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId, onClick, setMode } = props; + const { oldAvatarPath, profileName, ourId, onClick, setMode } = props; return (
- +
{ const [profileName, setProfileName] = useState(_profileName); const [updatedProfileName, setUpdateProfileName] = useState(profileName); const oldAvatarPath = useOurAvatarPath() || ''; - const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(null); const [mode, setMode] = useState('default'); const [loading, setLoading] = useState(false); @@ -190,7 +165,7 @@ export const EditProfileDialog = (): ReactElement => { setUpdateProfileName(trimName); setLoading(true); - await commitProfileEdits(newName, newAvatarObjectUrl); + await updateDisplayName(newName); setMode('default'); setUpdateProfileName(profileName); setLoading(false); @@ -214,25 +189,13 @@ export const EditProfileDialog = (): ReactElement => { } }; - const fireInputEvent = async () => { - const scaledAvatarUrl = await pickFileForAvatar(); - if (scaledAvatarUrl) { - setNewAvatarObjectUrl(scaledAvatarUrl); - setMode('edit'); - } - - return scaledAvatarUrl; - }; - const handleProfileHeaderClick = () => { closeDialog(); dispatch( updateDisplayPictureModel({ - newAvatarObjectUrl, oldAvatarPath, profileName, ourId, - avatarAction: fireInputEvent, }) ); }; @@ -260,7 +223,6 @@ export const EditProfileDialog = (): ReactElement => { {mode === 'default' && ( <> { {mode === 'edit' && ( <> Date: Tue, 23 May 2023 16:56:25 +1000 Subject: [PATCH 20/45] fix: rename oldAvatarPath to avatarPath for clarity --- ts/components/dialog/DisplayPictureModal.tsx | 52 +++++++++++--------- ts/components/dialog/EditProfileDialog.tsx | 21 ++++---- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/DisplayPictureModal.tsx index 7ed5b60e6..47a124bbf 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/DisplayPictureModal.tsx @@ -61,7 +61,7 @@ const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { }; export type DisplayPictureModalProps = { - oldAvatarPath: string | null; + avatarPath: string | null; profileName: string | undefined; ourId: string; }; @@ -73,9 +73,9 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { return null; } - const { oldAvatarPath, profileName, ourId } = props; + const { avatarPath, profileName, ourId } = props; - const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(oldAvatarPath); + const [newAvatarObjectUrl, setNewAvatarObjectUrl] = useState(avatarPath); const [loading, setLoading] = useState(false); const closeDialog = () => { @@ -92,7 +92,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { const handleUpload = async () => { setLoading(true); - if (newAvatarObjectUrl === oldAvatarPath) { + if (newAvatarObjectUrl === avatarPath) { window.log.debug(`Avatar Object URL has not changed!`); return; } @@ -119,10 +119,10 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { >
- {newAvatarObjectUrl || oldAvatarPath ? ( + {newAvatarObjectUrl || avatarPath ? ( @@ -132,24 +132,28 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => {
- - - -
- - -
+ {loading ? ( + + ) : ( + <> + +
+ + +
+ + )} ); }; diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 1742d64e1..bf5f80343 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -64,17 +64,17 @@ const updateDisplayName = async (newName: string) => { }; type ProfileAvatarProps = { + avatarPath: string | null; newAvatarObjectUrl?: string | null; - oldAvatarPath: string | null; profileName: string | undefined; ourId: string; }; export const ProfileAvatar = (props: ProfileAvatarProps): ReactElement => { - const { newAvatarObjectUrl, oldAvatarPath, profileName, ourId } = props; + const { newAvatarObjectUrl, avatarPath, profileName, ourId } = props; return ( { - const { oldAvatarPath, profileName, ourId, onClick, setMode } = props; + const { avatarPath, profileName, ourId, onClick, setMode } = props; return (
- +
{ const _profileName = useOurConversationUsername() || ''; const [profileName, setProfileName] = useState(_profileName); const [updatedProfileName, setUpdateProfileName] = useState(profileName); - const oldAvatarPath = useOurAvatarPath() || ''; + const avatarPath = useOurAvatarPath() || ''; + const ourId = UserUtils.getOurPubKeyStrFromCache(); const [mode, setMode] = useState('default'); const [loading, setLoading] = useState(false); - const ourId = UserUtils.getOurPubKeyStrFromCache(); - const closeDialog = () => { window.removeEventListener('keyup', handleOnKeyUp); window.inboxStore?.dispatch(editProfileModal(null)); @@ -193,7 +192,7 @@ export const EditProfileDialog = (): ReactElement => { closeDialog(); dispatch( updateDisplayPictureModel({ - oldAvatarPath, + avatarPath, profileName, ourId, }) @@ -223,7 +222,7 @@ export const EditProfileDialog = (): ReactElement => { {mode === 'default' && ( <> { {mode === 'edit' && ( <> Date: Tue, 23 May 2023 17:01:56 +1000 Subject: [PATCH 21/45] refactor: rename DisplayPictureModal to EditProfilePictureModal --- ts/components/dialog/EditProfileDialog.tsx | 4 ++-- ...yPictureModal.tsx => EditProfilePictureModal.tsx} | 12 ++++++------ ts/components/dialog/ModalContainer.tsx | 10 ++++++---- ts/state/ducks/modalDialog.tsx | 10 +++++----- ts/state/selectors/modal.ts | 6 +++--- 5 files changed, 22 insertions(+), 20 deletions(-) rename ts/components/dialog/{DisplayPictureModal.tsx => EditProfilePictureModal.tsx} (92%) diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index bf5f80343..3b5b4e848 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -7,7 +7,7 @@ import { SyncUtils, ToastUtils, UserUtils } from '../../session/utils'; import { YourSessionIDPill, YourSessionIDSelectable } from '../basic/YourSessionIDPill'; import { getConversationController } from '../../session/conversations'; -import { editProfileModal, updateDisplayPictureModel } from '../../state/ducks/modalDialog'; +import { editProfileModal, updateEditProfilePictureModel } from '../../state/ducks/modalDialog'; import { saveQRCode } from '../../util/saveQRCode'; import { setLastProfileUpdateTimestamp } from '../../util/storage'; import { SessionWrapperModal } from '../SessionWrapperModal'; @@ -191,7 +191,7 @@ export const EditProfileDialog = (): ReactElement => { const handleProfileHeaderClick = () => { closeDialog(); dispatch( - updateDisplayPictureModel({ + updateEditProfilePictureModel({ avatarPath, profileName, ourId, diff --git a/ts/components/dialog/DisplayPictureModal.tsx b/ts/components/dialog/EditProfilePictureModal.tsx similarity index 92% rename from ts/components/dialog/DisplayPictureModal.tsx rename to ts/components/dialog/EditProfilePictureModal.tsx index 47a124bbf..187ddb604 100644 --- a/ts/components/dialog/DisplayPictureModal.tsx +++ b/ts/components/dialog/EditProfilePictureModal.tsx @@ -3,7 +3,7 @@ import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton'; import { SpacerLG } from '../basic/Text'; import { useDispatch } from 'react-redux'; -import { editProfileModal, updateDisplayPictureModel } from '../../state/ducks/modalDialog'; +import { editProfileModal, updateEditProfilePictureModel } from '../../state/ducks/modalDialog'; import { ProfileAvatar } from './EditProfileDialog'; import styled from 'styled-components'; import { clearOurAvatar, uploadOurAvatar } from '../../interactions/conversationInteractions'; @@ -60,13 +60,13 @@ const uploadProfileAvatar = async (scaledAvatarUrl: string | null) => { } }; -export type DisplayPictureModalProps = { +export type EditProfilePictureModalProps = { avatarPath: string | null; profileName: string | undefined; ourId: string; }; -export const DisplayPictureModal = (props: DisplayPictureModalProps) => { +export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => { const dispatch = useDispatch(); if (!props) { @@ -79,7 +79,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { const [loading, setLoading] = useState(false); const closeDialog = () => { - dispatch(updateDisplayPictureModel(null)); + dispatch(updateEditProfilePictureModel(null)); dispatch(editProfileModal({})); }; @@ -99,7 +99,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { await uploadProfileAvatar(newAvatarObjectUrl); setLoading(false); - dispatch(updateDisplayPictureModel(null)); + dispatch(updateEditProfilePictureModel(null)); }; const handleRemove = async () => { @@ -107,7 +107,7 @@ export const DisplayPictureModal = (props: DisplayPictureModalProps) => { await clearOurAvatar(); setNewAvatarObjectUrl(null); setLoading(false); - dispatch(updateDisplayPictureModel(null)); + dispatch(updateEditProfilePictureModel(null)); }; return ( diff --git a/ts/components/dialog/ModalContainer.tsx b/ts/components/dialog/ModalContainer.tsx index 131f81495..b7f5f32a3 100644 --- a/ts/components/dialog/ModalContainer.tsx +++ b/ts/components/dialog/ModalContainer.tsx @@ -7,7 +7,7 @@ import { getChangeNickNameDialog, getConfirmModal, getDeleteAccountModalState, - getDisplayPictureModalState, + getEditProfilePictureModalState, getEditProfileDialog, getInviteContactModal, getOnionPathDialog, @@ -37,7 +37,7 @@ import { SessionNicknameDialog } from './SessionNicknameDialog'; import { BanOrUnBanUserDialog } from './BanOrUnbanUserDialog'; import { ReactListModal } from './ReactListModal'; import { ReactClearAllModal } from './ReactClearAllModal'; -import { DisplayPictureModal } from './DisplayPictureModal'; +import { EditProfilePictureModal } from './EditProfilePictureModal'; export const ModalContainer = () => { const confirmModalState = useSelector(getConfirmModal); @@ -57,7 +57,7 @@ export const ModalContainer = () => { const banOrUnbanUserModalState = useSelector(getBanOrUnbanUserModalState); const reactListModalState = useSelector(getReactListDialog); const reactClearAllModalState = useSelector(getReactClearAllDialog); - const DisplayPictureModalState = useSelector(getDisplayPictureModalState); + const EditProfilePictureModalState = useSelector(getEditProfilePictureModalState); return ( <> @@ -82,7 +82,9 @@ export const ModalContainer = () => { {confirmModalState && } {reactListModalState && } {reactClearAllModalState && } - {DisplayPictureModalState && } + {EditProfilePictureModalState && ( + + )} ); }; diff --git a/ts/state/ducks/modalDialog.tsx b/ts/state/ducks/modalDialog.tsx index 238bf54ac..8cd86097a 100644 --- a/ts/state/ducks/modalDialog.tsx +++ b/ts/state/ducks/modalDialog.tsx @@ -1,7 +1,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { SessionConfirmDialogProps } from '../../components/dialog/SessionConfirm'; import { PasswordAction } from '../../components/dialog/SessionPasswordDialog'; -import { DisplayPictureModalProps } from '../../components/dialog/DisplayPictureModal'; +import { EditProfilePictureModalProps } from '../../components/dialog/EditProfilePictureModal'; export type BanType = 'ban' | 'unban'; export type ConfirmModalState = SessionConfirmDialogProps | null; @@ -35,7 +35,7 @@ export type ReactModalsState = { messageId: string; } | null; -export type DisplayPictureModalState = DisplayPictureModalProps | null; +export type EditProfilePictureModalState = EditProfilePictureModalProps | null; export type ModalState = { confirmModal: ConfirmModalState; @@ -55,7 +55,7 @@ export type ModalState = { deleteAccountModal: DeleteAccountModalState; reactListModalState: ReactModalsState; reactClearAllModalState: ReactModalsState; - displayPictureModalState: DisplayPictureModalState; + displayPictureModalState: EditProfilePictureModalState; }; export const initialModalState: ModalState = { @@ -134,7 +134,7 @@ const ModalSlice = createSlice({ updateReactClearAllModal(state, action: PayloadAction) { return { ...state, reactClearAllModalState: action.payload }; }, - updateDisplayPictureModel(state, action: PayloadAction) { + updateEditProfilePictureModel(state, action: PayloadAction) { return { ...state, displayPictureModalState: action.payload }; }, }, @@ -159,6 +159,6 @@ export const { updateBanOrUnbanUserModal, updateReactListModal, updateReactClearAllModal, - updateDisplayPictureModel, + updateEditProfilePictureModel, } = actions; export const modalReducer = reducer; diff --git a/ts/state/selectors/modal.ts b/ts/state/selectors/modal.ts index efb38e1a5..8b12869c5 100644 --- a/ts/state/selectors/modal.ts +++ b/ts/state/selectors/modal.ts @@ -8,7 +8,7 @@ import { ChangeNickNameModalState, ConfirmModalState, DeleteAccountModalState, - DisplayPictureModalState, + EditProfilePictureModalState, EditProfileModalState, InviteContactModalState, ModalState, @@ -111,7 +111,7 @@ export const getReactClearAllDialog = createSelector( (state: ModalState): ReactModalsState => state.reactClearAllModalState ); -export const getDisplayPictureModalState = createSelector( +export const getEditProfilePictureModalState = createSelector( getModal, - (state: ModalState): DisplayPictureModalState => state.displayPictureModalState + (state: ModalState): EditProfilePictureModalState => state.displayPictureModalState ); From b00eb52d358135f963c4144d7f7fe5982ae1661a Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 17:31:41 +1000 Subject: [PATCH 22/45] fix: pass yarn ready --- ts/components/dialog/EditProfileDialog.tsx | 13 ++++++++++--- ts/components/dialog/EditProfilePictureModal.tsx | 7 +++---- ts/components/dialog/ModalContainer.tsx | 2 +- ts/state/selectors/modal.ts | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 3b5b4e848..d1c1b28fb 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -15,8 +15,12 @@ import { SessionButton, SessionButtonType } from '../basic/SessionButton'; import { SessionSpinner } from '../basic/SessionSpinner'; import { SessionIconButton } from '../icon'; import { sanitizeSessionUsername } from '../../session/utils/String'; -import { useOurConversationUsername } from '../../hooks/useParamSelector'; -import { useOurAvatarPath } from '../../hooks/useParamSelector'; +import { setLastProfileUpdateTimestamp } from '../../util/storage'; +import { ConversationTypeEnum } from '../../models/conversationAttributes'; +import { MAX_USERNAME_BYTES } from '../../session/constants'; +import styled from 'styled-components'; +import { saveQRCode } from '../../util/saveQRCode'; +import { useOurAvatarPath, useOurConversationUsername } from '../../hooks/useParamSelector'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { ConversationTypeEnum } from '../../models/conversationAttributes'; @@ -116,6 +120,7 @@ const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { type ProfileDialogModes = 'default' | 'edit' | 'qr'; +// tslint:disable-next-line: max-func-body-length export const EditProfileDialog = (): ReactElement => { const dispatch = useDispatch(); @@ -177,7 +182,7 @@ export const EditProfileDialog = (): ReactElement => { switch (event.key) { case 'Enter': if (mode === 'edit') { - onClickOK(); + void onClickOK(); } break; case 'Esc': @@ -211,6 +216,8 @@ export const EditProfileDialog = (): ReactElement => { }; return ( + /* The
element has a child element that allows keyboard interaction */ + /* tslint:disable-next-line: react-a11y-event-has-role */
{ return (
@@ -93,7 +92,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => const handleUpload = async () => { setLoading(true); if (newAvatarObjectUrl === avatarPath) { - window.log.debug(`Avatar Object URL has not changed!`); + window.log.debug('Avatar Object URL has not changed!'); return; } @@ -117,7 +116,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => showHeader={true} showExitIcon={true} > -
+
{newAvatarObjectUrl || avatarPath ? ( Date: Tue, 23 May 2023 17:42:03 +1000 Subject: [PATCH 23/45] fix: cleanup --- _locales/en/messages.json | 3 +-- ts/state/ducks/modalDialog.tsx | 6 +++--- ts/state/selectors/modal.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ec19331bd..50e40ecb0 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -508,6 +508,5 @@ "reactionPopupMany": "$name$, $name2$, $name3$ &", "reactionListCountSingular": "And $otherSingular$ has reacted $emoji$ to this message", "reactionListCountPlural": "And $otherPlural$ have reacted $emoji$ to this message", - "setDisplayPicture": "Set Display Picture", - "upload": "Upload" + "setDisplayPicture": "Set Display Picture" } diff --git a/ts/state/ducks/modalDialog.tsx b/ts/state/ducks/modalDialog.tsx index 8cd86097a..27007b962 100644 --- a/ts/state/ducks/modalDialog.tsx +++ b/ts/state/ducks/modalDialog.tsx @@ -55,7 +55,7 @@ export type ModalState = { deleteAccountModal: DeleteAccountModalState; reactListModalState: ReactModalsState; reactClearAllModalState: ReactModalsState; - displayPictureModalState: EditProfilePictureModalState; + editProfilePictureModalState: EditProfilePictureModalState; }; export const initialModalState: ModalState = { @@ -76,7 +76,7 @@ export const initialModalState: ModalState = { deleteAccountModal: null, reactListModalState: null, reactClearAllModalState: null, - displayPictureModalState: null, + editProfilePictureModalState: null, }; const ModalSlice = createSlice({ @@ -135,7 +135,7 @@ const ModalSlice = createSlice({ return { ...state, reactClearAllModalState: action.payload }; }, updateEditProfilePictureModel(state, action: PayloadAction) { - return { ...state, displayPictureModalState: action.payload }; + return { ...state, editProfilePictureModalState: action.payload }; }, }, }); diff --git a/ts/state/selectors/modal.ts b/ts/state/selectors/modal.ts index e2ccd6e52..259aad8b5 100644 --- a/ts/state/selectors/modal.ts +++ b/ts/state/selectors/modal.ts @@ -113,5 +113,5 @@ export const getReactClearAllDialog = createSelector( export const getEditProfilePictureModalState = createSelector( getModal, - (state: ModalState): EditProfilePictureModalState => state.displayPictureModalState + (state: ModalState): EditProfilePictureModalState => state.editProfilePictureModalState ); From 7cc5cd0440a55dda8074cd341426d5945e2de18c Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 25 May 2023 12:01:48 +1000 Subject: [PATCH 24/45] fix: EditProfilePictureModalState should be camel case --- ts/components/dialog/ModalContainer.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/components/dialog/ModalContainer.tsx b/ts/components/dialog/ModalContainer.tsx index 0a79048a3..9a0d7b6b7 100644 --- a/ts/components/dialog/ModalContainer.tsx +++ b/ts/components/dialog/ModalContainer.tsx @@ -57,7 +57,7 @@ export const ModalContainer = () => { const banOrUnbanUserModalState = useSelector(getBanOrUnbanUserModalState); const reactListModalState = useSelector(getReactListDialog); const reactClearAllModalState = useSelector(getReactClearAllDialog); - const EditProfilePictureModalState = useSelector(getEditProfilePictureModalState); + const editProfilePictureModalState = useSelector(getEditProfilePictureModalState); return ( <> @@ -82,8 +82,8 @@ export const ModalContainer = () => { {confirmModalState && } {reactListModalState && } {reactClearAllModalState && } - {EditProfilePictureModalState && ( - + {editProfilePictureModalState && ( + )} ); From 534080ddd7b18ca3919524eea5ffd6e9d5fb2637 Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 25 May 2023 12:10:28 +1000 Subject: [PATCH 25/45] fix: compressed and flattened thumbail svg path --- ts/components/icon/Icons.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ts/components/icon/Icons.tsx b/ts/components/icon/Icons.tsx index ebc5ff38b..670acec97 100644 --- a/ts/components/icon/Icons.tsx +++ b/ts/components/icon/Icons.tsx @@ -478,12 +478,8 @@ export const icons: Record< ratio: 1, }, thumbnail: { - path: [ - 'M34.915 23.8987L26.594 17.812C26.5393 17.7682 26.4714 17.7444 26.4014 17.7444C26.3313 17.7444 26.2634 17.7682 26.2087 17.812L18.748 23.9886C18.6905 24.0313 18.6207 24.0544 18.549 24.0544C18.4773 24.0544 18.4075 24.0313 18.35 23.9886L14.6003 20.9324C14.5468 20.8918 14.4814 20.8698 14.4141 20.8698C14.3469 20.8698 14.2815 20.8918 14.2279 20.9324L4.0706 28.1491C4.03144 28.1797 3.99959 28.2186 3.97737 28.263C3.95516 28.3075 3.94314 28.3563 3.94219 28.406V30.743C3.94549 30.9361 4.02366 31.1204 4.16022 31.257C4.29678 31.3935 4.48104 31.4717 4.67413 31.475H34.3115C34.5056 31.475 34.6918 31.3979 34.8291 31.2606C34.9663 31.1233 35.0434 30.9372 35.0434 30.743V24.1427C35.0447 24.0944 35.0335 24.0467 35.011 24.004C34.9885 23.9613 34.9555 23.925 34.915 23.8987Z', - 'M11.0947 18.7492C12.6904 18.7492 13.984 17.4556 13.984 15.8599C13.984 14.2642 12.6904 12.9707 11.0947 12.9707C9.49902 12.9707 8.20546 14.2642 8.20546 15.8599C8.20546 17.4556 9.49902 18.7492 11.0947 18.7492Z', - 'M40.3597 4.62408L8.19261 0.874467C7.77128 0.822682 7.34385 0.855312 6.93527 0.970455C6.52668 1.0856 6.14511 1.28095 5.81282 1.54511C5.48052 1.80927 5.20415 2.13696 4.99984 2.50905C4.79552 2.88115 4.66734 3.2902 4.62277 3.71236L4.46868 5.0992H7.03691L7.16532 4.00771C7.17565 3.92437 7.20256 3.84394 7.24446 3.77116C7.28637 3.69838 7.34241 3.63473 7.4093 3.58395C7.51881 3.496 7.65413 3.44638 7.79454 3.4427H7.85874L22.1509 5.0992H35.6855C36.4753 5.10365 37.2535 5.29018 37.9595 5.64429C38.6655 5.99841 39.2803 6.51056 39.7561 7.14095H40.0643C40.2326 7.16031 40.3865 7.24541 40.4923 7.37771C40.5981 7.51 40.6474 7.67876 40.6293 7.84721L40.5395 8.57915C40.7184 9.09576 40.8138 9.63762 40.822 10.1843V28.4958L43.1847 8.18108C43.2788 7.33533 43.0345 6.48672 42.5053 5.82036C41.976 5.154 41.2048 4.72397 40.3597 4.62408Z', - 'M35.6855 35.3016H3.30013C2.44871 35.3016 1.63216 34.9634 1.03011 34.3613C0.428069 33.7593 0.0898438 32.9427 0.0898438 32.0913V10.2614C0.0898438 9.40994 0.428069 8.59339 1.03011 7.99135C1.63216 7.3893 2.44871 7.05108 3.30013 7.05108H35.6855C36.5369 7.05108 37.3535 7.3893 37.9555 7.99135C38.5576 8.59339 38.8958 9.40994 38.8958 10.2614V32.0913C38.8958 32.9427 38.5576 33.7593 37.9555 34.3613C37.3535 34.9634 36.5369 35.3016 35.6855 35.3016ZM3.30013 9.59363C3.12985 9.59363 2.96654 9.66127 2.84613 9.78168C2.72572 9.90209 2.65807 10.0654 2.65807 10.2357V32.0656C2.65807 32.2359 2.72572 32.3992 2.84613 32.5196C2.96654 32.64 3.12985 32.7077 3.30013 32.7077H35.6855C35.8558 32.7077 36.0191 32.64 36.1395 32.5196C36.2599 32.3992 36.3276 32.2359 36.3276 32.0656V10.2357C36.3276 10.0654 36.2599 9.90209 36.1395 9.78168C36.0191 9.66127 35.8558 9.59363 35.6855 9.59363H3.30013Z', - ], + path: + 'm34.915 23.899-8.321-6.087a.308.308 0 0 0-.385 0l-7.461 6.177a.334.334 0 0 1-.398 0l-3.75-3.057a.308.308 0 0 0-.372 0L4.07 28.15a.335.335 0 0 0-.129.257v2.337a.745.745 0 0 0 .732.732h29.638a.732.732 0 0 0 .731-.732v-6.6a.281.281 0 0 0-.128-.244Zm-23.82-5.15a2.89 2.89 0 1 0 0-5.778 2.89 2.89 0 0 0 0 5.778ZM40.36 4.624 8.193.874a3.197 3.197 0 0 0-3.57 2.838L4.469 5.1h2.568l.128-1.091a.63.63 0 0 1 .244-.424.642.642 0 0 1 .386-.141h.064L22.15 5.099h13.534a5.137 5.137 0 0 1 4.071 2.042h.308a.642.642 0 0 1 .565.706l-.09.732a5.14 5.14 0 0 1 .283 1.605v18.312L43.185 8.18a3.223 3.223 0 0 0-2.825-3.557Zm-4.675 30.678H3.3a3.21 3.21 0 0 1-3.21-3.21v-21.83a3.21 3.21 0 0 1 3.21-3.21h32.385a3.21 3.21 0 0 1 3.21 3.21v21.83a3.21 3.21 0 0 1-3.21 3.21ZM3.3 9.594a.642.642 0 0 0-.642.642v21.83a.642.642 0 0 0 .642.642h32.385a.642.642 0 0 0 .643-.642v-21.83a.642.642 0 0 0-.643-.642H3.3Z', viewBox: '0 0 44 36', ratio: 1, }, From 69a50cdcc87b28e91163046512cf847125cf955a Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 25 May 2023 13:12:02 +1000 Subject: [PATCH 26/45] fix: sort localised keys generated by updateI18nKeysType --- tools/updateI18nKeysType.py | 7 +- ts/types/LocalizerKeys.ts | 647 +++++++++++++++++++++--------------- 2 files changed, 385 insertions(+), 269 deletions(-) diff --git a/tools/updateI18nKeysType.py b/tools/updateI18nKeysType.py index 585a07490..bcd61e8d8 100755 --- a/tools/updateI18nKeysType.py +++ b/tools/updateI18nKeysType.py @@ -6,6 +6,7 @@ from os import path, listdir from glob import glob import json import sys +from collections import OrderedDict LOCALES_FOLDER = './_locales' @@ -16,10 +17,10 @@ LOCALIZED_KEYS_FILE = './ts/types/LocalizerKeys.ts' stringToWrite = "export type LocalizerKeys =\n | " with open(EN_FILE,'r') as jsonFile: - data = json.load(jsonFile) - keys = data.keys() + data = json.loads(jsonFile.read(), object_pairs_hook=OrderedDict) + keys = sorted(list(data.keys())) - stringToWrite += json.dumps(list(keys), sort_keys=True).replace(',', '\n |').replace('"', '\'')[1:-1] + stringToWrite += json.dumps(keys, sort_keys=True).replace(',', '\n |').replace('"', '\'')[1:-1] stringToWrite += ';\n' diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts index e8d58a0c5..100809db0 100644 --- a/ts/types/LocalizerKeys.ts +++ b/ts/types/LocalizerKeys.ts @@ -1,14 +1,19 @@ export type LocalizerKeys = - | 'copyErrorAndQuit' - | 'unknown' - | 'databaseError' - | 'mainMenuFile' - | 'mainMenuEdit' - | 'mainMenuView' - | 'mainMenuWindow' - | 'mainMenuHelp' + | 'ByUsingThisService...' + | 'about' + | 'accept' + | 'activeMembers' + | 'add' + | 'addACaption' + | 'addAsModerator' + | 'addModerators' + | 'addingContacts' + | 'allUsersAreRandomly...' + | 'anonymous' + | 'answeredACall' | 'appMenuHide' | 'appMenuHideOthers' + | 'appMenuQuit' | 'appMenuUnhide' | 'appMenuQuit' | 'editMenuUndo' @@ -91,154 +96,393 @@ export type LocalizerKeys = | 'photo' | 'cannotUpdate' | 'cannotUpdateDetail' - | 'ok' - | 'cancel' + | 'changeAccountPasswordDescription' + | 'changeAccountPasswordTitle' + | 'changeNickname' + | 'changeNicknameMessage' + | 'changePassword' + | 'changePasswordInvalid' + | 'changePasswordTitle' + | 'changePasswordToastDescription' + | 'chooseAnAction' + | 'classicDarkThemeTitle' + | 'classicLightThemeTitle' + | 'clear' + | 'clearAll' + | 'clearAllConfirmationBody' + | 'clearAllConfirmationTitle' + | 'clearAllData' + | 'clearAllReactions' + | 'clearDataSettingsTitle' + | 'clearDevice' + | 'clearNickname' + | 'clickToTrustContact' | 'close' + | 'closedGroupInviteFailMessage' + | 'closedGroupInviteFailMessagePlural' + | 'closedGroupInviteFailTitle' + | 'closedGroupInviteFailTitlePlural' + | 'closedGroupInviteOkText' + | 'closedGroupInviteSuccessMessage' + | 'closedGroupInviteSuccessTitle' + | 'closedGroupInviteSuccessTitlePlural' + | 'closedGroupMaxSize' + | 'confirmNewPassword' + | 'confirmPassword' + | 'connectToServerFail' + | 'connectToServerSuccess' + | 'connectingToServer' + | 'contactAvatarAlt' + | 'contactsHeader' + | 'contextMenuNoSuggestions' | 'continue' - | 'error' + | 'continueYourSession' + | 'conversationsHeader' + | 'conversationsSettingsTitle' + | 'copiedToClipboard' + | 'copyErrorAndQuit' + | 'copyMessage' + | 'copyOpenGroupURL' + | 'copySessionID' + | 'couldntFindServerMatching' + | 'create' + | 'createAccount' + | 'createClosedGroupNamePrompt' + | 'createClosedGroupPlaceholder' + | 'createConversationNewContact' + | 'createConversationNewGroup' + | 'createGroup' + | 'createPassword' + | 'createSessionID' + | 'databaseError' + | 'debugLog' + | 'debugLogExplanation' + | 'decline' + | 'declineRequestMessage' | 'delete' - | 'messageDeletionForbidden' - | 'deleteJustForMe' + | 'deleteAccountFromLogin' + | 'deleteAccountWarning' + | 'deleteContactConfirmation' + | 'deleteConversationConfirmation' | 'deleteForEveryone' - | 'deleteMessagesQuestion' + | 'deleteJustForMe' | 'deleteMessageQuestion' | 'deleteMessages' | 'deleteConversation' | 'deleted' - | 'messageDeletedPlaceholder' + | 'destination' + | 'device' + | 'deviceOnly' + | 'dialogClearAllDataDeletionFailedDesc' + | 'dialogClearAllDataDeletionFailedMultiple' + | 'dialogClearAllDataDeletionFailedTitle' + | 'dialogClearAllDataDeletionFailedTitleQuestion' + | 'dialogClearAllDataDeletionQuestion' + | 'disabledDisappearingMessages' + | 'disappearingMessages' + | 'disappearingMessagesDisabled' + | 'displayName' + | 'displayNameEmpty' + | 'displayNameTooLong' + | 'documents' + | 'documentsEmptyState' + | 'done' + | 'downloadAttachment' + | 'editGroup' + | 'editGroupName' + | 'editMenuCopy' + | 'editMenuCut' + | 'editMenuDeleteContact' + | 'editMenuDeleteGroup' + | 'editMenuPaste' + | 'editMenuRedo' + | 'editMenuSelectAll' + | 'editMenuUndo' + | 'editProfileModalTitle' + | 'emptyGroupNameError' + | 'enable' + | 'endCall' + | 'enterAnOpenGroupURL' + | 'enterDisplayName' + | 'enterNewPassword' + | 'enterPassword' + | 'enterRecoveryPhrase' + | 'enterSessionID' + | 'enterSessionIDOfRecipient' + | 'enterSessionIDOrONSName' + | 'entireAccount' + | 'error' + | 'establishingConnection' + | 'expandedReactionsText' + | 'failedResolveOns' + | 'failedToAddAsModerator' + | 'failedToRemoveFromModerator' + | 'faq' + | 'fileSizeWarning' | 'from' - | 'to' - | 'sent' - | 'received' - | 'sendMessage' + | 'getStarted' + | 'goToReleaseNotes' + | 'goToSupportPage' | 'groupMembers' - | 'moreInformation' - | 'resend' - | 'deleteConversationConfirmation' - | 'clear' - | 'clearAllData' - | 'deleteAccountWarning' - | 'deleteAccountFromLogin' - | 'deleteContactConfirmation' - | 'quoteThumbnailAlt' + | 'groupNamePlaceholder' + | 'helpSettingsTitle' + | 'helpUsTranslateSession' + | 'hideBanner' + | 'hideMenuBarDescription' + | 'hideMenuBarTitle' + | 'hideRequestBanner' + | 'hideRequestBannerDescription' + | 'iAmSure' | 'imageAttachmentAlt' - | 'videoAttachmentAlt' - | 'lightboxImageAlt' | 'imageCaptionIconAlt' - | 'addACaption' - | 'copySessionID' - | 'copyOpenGroupURL' - | 'save' - | 'saveLogToDesktop' - | 'saved' - | 'tookAScreenshot' - | 'savedTheFile' - | 'linkPreviewsTitle' + | 'incomingCallFrom' + | 'incomingError' + | 'invalidGroupNameTooLong' + | 'invalidGroupNameTooShort' + | 'invalidNumberError' + | 'invalidOldPassword' + | 'invalidOpenGroupUrl' + | 'invalidPassword' + | 'invalidPubkeyFormat' + | 'invalidSessionId' + | 'inviteContacts' + | 'join' + | 'joinACommunity' + | 'joinOpenGroup' + | 'joinOpenGroupAfterInvitationConfirmationDesc' + | 'joinOpenGroupAfterInvitationConfirmationTitle' + | 'joinedTheGroup' + | 'keepDisabled' + | 'kickedFromTheGroup' + | 'learnMore' + | 'leaveAndRemoveForEveryone' + | 'leaveGroup' + | 'leaveGroupConfirmation' + | 'leaveGroupConfirmationAdmin' + | 'leftTheGroup' + | 'lightboxImageAlt' + | 'linkDevice' | 'linkPreviewDescription' | 'linkPreviewsConfirmMessage' - | 'mediaPermissionsTitle' - | 'mediaPermissionsDescription' - | 'spellCheckTitle' - | 'spellCheckDescription' - | 'spellCheckDirty' - | 'readReceiptSettingDescription' - | 'readReceiptSettingTitle' - | 'typingIndicatorsSettingDescription' - | 'typingIndicatorsSettingTitle' - | 'zoomFactorSettingTitle' - | 'themesSettingTitle' - | 'primaryColor' - | 'primaryColorGreen' - | 'primaryColorBlue' - | 'primaryColorYellow' - | 'primaryColorPink' - | 'primaryColorPurple' - | 'primaryColorOrange' - | 'primaryColorRed' - | 'classicDarkThemeTitle' - | 'classicLightThemeTitle' - | 'oceanDarkThemeTitle' - | 'oceanLightThemeTitle' - | 'pruneSettingTitle' - | 'pruneSettingDescription' - | 'enable' - | 'keepDisabled' - | 'notificationSettingsDialog' - | 'nameAndMessage' - | 'noNameOrMessage' - | 'nameOnly' - | 'newMessage' - | 'createConversationNewContact' - | 'createConversationNewGroup' - | 'joinACommunity' - | 'chooseAnAction' - | 'newMessages' - | 'notificationMostRecentFrom' - | 'notificationFrom' - | 'notificationMostRecent' - | 'sendFailed' + | 'linkPreviewsTitle' + | 'linkVisitWarningMessage' + | 'linkVisitWarningTitle' + | 'loading' + | 'mainMenuEdit' + | 'mainMenuFile' + | 'mainMenuHelp' + | 'mainMenuView' + | 'mainMenuWindow' + | 'markAllAsRead' + | 'maxPasswordAttempts' + | 'maximumAttachments' + | 'media' + | 'mediaEmptyState' | 'mediaMessage' - | 'messageBodyMissing' - | 'messageBody' - | 'unblockToSend' - | 'unblockGroupToSend' - | 'youChangedTheTimer' - | 'timerSetOnSync' + | 'mediaPermissionsDescription' + | 'mediaPermissionsTitle' + | 'members' + | 'message' + | 'messageBody' + | 'messageBodyMissing' + | 'messageDeletedPlaceholder' + | 'messageDeletionForbidden' + | 'messageRequestAccepted' + | 'messageRequestAcceptedOurs' + | 'messageRequestAcceptedOursNoName' + | 'messageRequestPending' + | 'messageRequests' + | 'messagesHeader' + | 'moreInformation' + | 'multipleJoinedTheGroup' + | 'multipleKickedFromTheGroup' + | 'multipleLeftTheGroup' + | 'mustBeApproved' + | 'nameAndMessage' + | 'nameOnly' + | 'newMessage' + | 'newMessages' + | 'next' + | 'nicknamePlaceholder' + | 'noAudioInputFound' + | 'noAudioOutputFound' + | 'noBlockedContacts' + | 'noCameraFound' + | 'noContactsForGroup' + | 'noContactsToAdd' + | 'noGivenPassword' + | 'noMediaUntilApproved' + | 'noMembersInThisGroup' + | 'noMessageRequestsPending' + | 'noModeratorsToRemove' + | 'noNameOrMessage' + | 'noSearchResults' + | 'noteToSelf' + | 'notificationForConvo' + | 'notificationForConvo_all' + | 'notificationForConvo_disabled' + | 'notificationForConvo_mentions_only' + | 'notificationFrom' + | 'notificationMostRecent' + | 'notificationMostRecentFrom' + | 'notificationPreview' + | 'notificationSettingsDialog' + | 'notificationSubtitle' + | 'notificationsSettingsContent' + | 'notificationsSettingsTitle' + | 'oceanDarkThemeTitle' + | 'oceanLightThemeTitle' + | 'offline' + | 'ok' + | 'oneNonImageAtATimeToast' + | 'onionPathIndicatorDescription' + | 'onionPathIndicatorTitle' + | 'onlyAdminCanRemoveMembers' + | 'onlyAdminCanRemoveMembersDesc' + | 'open' + | 'openGroupInvitation' + | 'openGroupURL' + | 'openMessageRequestInbox' + | 'openMessageRequestInboxDescription' + | 'or' + | 'orJoinOneOfThese' + | 'originalMessageNotFound' + | 'otherPlural' + | 'otherSingular' + | 'password' + | 'passwordCharacterError' + | 'passwordLengthError' + | 'passwordTypeError' + | 'passwordViewTitle' + | 'passwordsDoNotMatch' + | 'permissionsSettingsTitle' + | 'photo' + | 'pickClosedGroupMember' + | 'pinConversation' + | 'pleaseWaitOpenAndOptimizeDb' + | 'previewThumbnail' + | 'primaryColor' + | 'primaryColorBlue' + | 'primaryColorGreen' + | 'primaryColorOrange' + | 'primaryColorPink' + | 'primaryColorPurple' + | 'primaryColorRed' + | 'primaryColorYellow' + | 'privacySettingsTitle' + | 'pruneSettingDescription' + | 'pruneSettingTitle' + | 'publicChatExists' + | 'quoteThumbnailAlt' + | 'rateLimitReactMessage' + | 'reactionListCountPlural' + | 'reactionListCountSingular' + | 'reactionNotification' + | 'reactionPopup' + | 'reactionPopupMany' + | 'reactionPopupOne' + | 'reactionPopupThree' + | 'reactionPopupTwo' + | 'readReceiptSettingDescription' + | 'readReceiptSettingTitle' + | 'received' + | 'recoveryPhrase' + | 'recoveryPhraseEmpty' + | 'recoveryPhraseRevealButtonText' + | 'recoveryPhraseRevealMessage' + | 'recoveryPhraseSavePromptMain' + | 'recoveryPhraseSecureTitle' + | 'remove' + | 'removeAccountPasswordDescription' + | 'removeAccountPasswordTitle' + | 'removeFromModerators' + | 'removeModerators' + | 'removePassword' + | 'removePasswordInvalid' + | 'removePasswordTitle' + | 'removePasswordToastDescription' + | 'removeResidueMembers' + | 'replyToMessage' + | 'replyingToMessage' + | 'reportIssue' + | 'requestsPlaceholder' + | 'requestsSubtitle' + | 'resend' + | 'respondingToRequestWarning' + | 'restoreUsingRecoveryPhrase' + | 'ringing' + | 'save' + | 'saveLogToDesktop' + | 'saved' + | 'savedTheFile' + | 'searchFor...' + | 'searchForContactsOnly' + | 'selectMessage' + | 'sendFailed' + | 'sendMessage' + | 'sendRecoveryPhraseMessage' + | 'sendRecoveryPhraseTitle' + | 'sent' + | 'sessionMessenger' + | 'setAccountPasswordDescription' + | 'setAccountPasswordTitle' + | 'setDisplayPicture' + | 'setPassword' + | 'setPasswordFail' + | 'setPasswordInvalid' + | 'setPasswordTitle' + | 'setPasswordToastDescription' + | 'settingsHeader' + | 'shareBugDetails' + | 'show' + | 'showDebugLog' + | 'showRecoveryPhrase' + | 'showRecoveryPhrasePasswordRequest' + | 'showUserDetails' + | 'spellCheckDescription' + | 'spellCheckDirty' + | 'spellCheckTitle' + | 'stagedImageAttachment' + | 'stagedPreviewThumbnail' + | 'startConversation' + | 'startInTrayDescription' + | 'startInTrayTitle' + | 'startNewConversationBy...' + | 'startedACall' + | 'support' + | 'surveyTitle' + | 'themesSettingTitle' | 'theyChangedTheTimer' + | 'thisMonth' + | 'thisWeek' | 'timerOption_0_seconds' - | 'timerOption_5_seconds' + | 'timerOption_0_seconds_abbreviated' | 'timerOption_10_seconds' - | 'timerOption_30_seconds' - | 'timerOption_1_minute' - | 'timerOption_5_minutes' - | 'timerOption_30_minutes' - | 'timerOption_1_hour' - | 'timerOption_6_hours' + | 'timerOption_10_seconds_abbreviated' | 'timerOption_12_hours' + | 'timerOption_12_hours_abbreviated' | 'timerOption_1_day' + | 'timerOption_1_day_abbreviated' + | 'timerOption_1_hour' + | 'timerOption_1_hour_abbreviated' + | 'timerOption_1_minute' + | 'timerOption_1_minute_abbreviated' | 'timerOption_1_week' + | 'timerOption_1_week_abbreviated' | 'timerOption_2_weeks' - | 'disappearingMessages' - | 'changeNickname' - | 'clearNickname' - | 'nicknamePlaceholder' - | 'changeNicknameMessage' - | 'timerOption_0_seconds_abbreviated' - | 'timerOption_5_seconds_abbreviated' - | 'timerOption_10_seconds_abbreviated' + | 'timerOption_2_weeks_abbreviated' + | 'timerOption_30_minutes' + | 'timerOption_30_minutes_abbreviated' + | 'timerOption_30_seconds' | 'timerOption_30_seconds_abbreviated' - | 'timerOption_1_minute_abbreviated' + | 'timerOption_5_minutes' | 'timerOption_5_minutes_abbreviated' - | 'timerOption_30_minutes_abbreviated' - | 'timerOption_1_hour_abbreviated' + | 'timerOption_5_seconds' + | 'timerOption_5_seconds_abbreviated' + | 'timerOption_6_hours' | 'timerOption_6_hours_abbreviated' - | 'timerOption_12_hours_abbreviated' - | 'timerOption_1_day_abbreviated' - | 'timerOption_1_week_abbreviated' - | 'timerOption_2_weeks_abbreviated' - | 'disappearingMessagesDisabled' - | 'disabledDisappearingMessages' - | 'youDisabledDisappearingMessages' + | 'timerSetOnSync' | 'timerSetTo' - | 'noteToSelf' - | 'hideMenuBarTitle' - | 'hideMenuBarDescription' - | 'startConversation' - | 'invalidNumberError' - | 'failedResolveOns' - | 'autoUpdateSettingTitle' - | 'autoUpdateSettingDescription' - | 'autoUpdateNewVersionTitle' - | 'autoUpdateNewVersionMessage' - | 'autoUpdateNewVersionInstructions' - | 'autoUpdateRestartButtonLabel' - | 'autoUpdateLaterButtonLabel' - | 'autoUpdateDownloadButtonLabel' - | 'autoUpdateDownloadedMessage' - | 'autoUpdateDownloadInstructions' - | 'leftTheGroup' - | 'multipleLeftTheGroup' - | 'updatedTheGroup' | 'titleIsNow' | 'joinedTheGroup' | 'multipleJoinedTheGroup' @@ -247,144 +491,15 @@ export type LocalizerKeys = | 'block' | 'unblock' | 'unblocked' - | 'blocked' - | 'blockedSettingsTitle' - | 'conversationsSettingsTitle' - | 'unbanUser' - | 'userUnbanned' - | 'userUnbanFailed' - | 'banUser' - | 'banUserAndDeleteAll' - | 'userBanned' - | 'userBanFailed' - | 'leaveGroup' - | 'leaveAndRemoveForEveryone' - | 'leaveGroupConfirmation' - | 'leaveGroupConfirmationAdmin' - | 'cannotRemoveCreatorFromGroup' - | 'cannotRemoveCreatorFromGroupDesc' - | 'noContactsForGroup' - | 'failedToAddAsModerator' - | 'failedToRemoveFromModerator' - | 'copyMessage' - | 'selectMessage' - | 'editGroup' - | 'editGroupName' + | 'unknown' + | 'unknownCountry' + | 'unpinConversation' + | 'unreadMessages' | 'updateGroupDialogTitle' - | 'showRecoveryPhrase' - | 'yourSessionID' - | 'setAccountPasswordTitle' - | 'setAccountPasswordDescription' - | 'changeAccountPasswordTitle' - | 'changeAccountPasswordDescription' - | 'removeAccountPasswordTitle' - | 'removeAccountPasswordDescription' - | 'enterPassword' - | 'confirmPassword' - | 'enterNewPassword' - | 'confirmNewPassword' - | 'showRecoveryPhrasePasswordRequest' - | 'recoveryPhraseSavePromptMain' - | 'invalidOpenGroupUrl' - | 'copiedToClipboard' - | 'passwordViewTitle' - | 'password' - | 'setPassword' - | 'changePassword' - | 'createPassword' - | 'removePassword' - | 'maxPasswordAttempts' - | 'typeInOldPassword' - | 'invalidOldPassword' - | 'invalidPassword' - | 'noGivenPassword' - | 'passwordsDoNotMatch' - | 'setPasswordInvalid' - | 'changePasswordInvalid' - | 'removePasswordInvalid' - | 'setPasswordTitle' - | 'changePasswordTitle' - | 'removePasswordTitle' - | 'setPasswordToastDescription' - | 'changePasswordToastDescription' - | 'removePasswordToastDescription' - | 'publicChatExists' - | 'connectToServerFail' - | 'connectingToServer' - | 'connectToServerSuccess' - | 'setPasswordFail' - | 'passwordLengthError' - | 'passwordTypeError' - | 'passwordCharacterError' - | 'remove' - | 'invalidSessionId' - | 'invalidPubkeyFormat' - | 'emptyGroupNameError' - | 'editProfileModalTitle' - | 'groupNamePlaceholder' - | 'inviteContacts' - | 'addModerators' - | 'removeModerators' - | 'addAsModerator' - | 'removeFromModerators' - | 'add' - | 'addingContacts' - | 'noContactsToAdd' - | 'noMembersInThisGroup' - | 'noModeratorsToRemove' - | 'onlyAdminCanRemoveMembers' - | 'onlyAdminCanRemoveMembersDesc' - | 'createAccount' - | 'startInTrayTitle' - | 'startInTrayDescription' - | 'yourUniqueSessionID' - | 'allUsersAreRandomly...' - | 'getStarted' - | 'createSessionID' - | 'recoveryPhrase' - | 'enterRecoveryPhrase' - | 'displayName' - | 'anonymous' - | 'removeResidueMembers' - | 'enterDisplayName' - | 'continueYourSession' - | 'linkDevice' - | 'restoreUsingRecoveryPhrase' - | 'or' - | 'ByUsingThisService...' - | 'beginYourSession' - | 'welcomeToYourSession' - | 'searchFor...' - | 'searchForContactsOnly' - | 'enterSessionID' - | 'enterSessionIDOfRecipient' - | 'message' - | 'appearanceSettingsTitle' - | 'privacySettingsTitle' - | 'notificationsSettingsTitle' - | 'audioNotificationsSettingsTitle' - | 'notificationsSettingsContent' - | 'notificationPreview' - | 'recoveryPhraseEmpty' - | 'displayNameEmpty' - | 'displayNameTooLong' - | 'members' - | 'activeMembers' - | 'join' - | 'joinOpenGroup' - | 'createGroup' - | 'create' - | 'createClosedGroupNamePrompt' - | 'createClosedGroupPlaceholder' - | 'openGroupURL' - | 'enterAnOpenGroupURL' - | 'next' - | 'invalidGroupNameTooShort' - | 'invalidGroupNameTooLong' - | 'pickClosedGroupMember' - | 'closedGroupMaxSize' - | 'noBlockedContacts' + | 'updatedTheGroup' | 'userAddedToModerators' + | 'userBanFailed' + | 'userBanned' | 'userRemovedFromModerators' | 'orJoinOneOfThese' | 'helpUsTranslateSession' From cb2328bcd00f8e8176a72f12e801ff98d3ec33cb Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 10 Jul 2023 17:32:46 +1000 Subject: [PATCH 27/45] fix: icon path typing error --- ts/components/icon/Icons.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ts/components/icon/Icons.tsx b/ts/components/icon/Icons.tsx index 670acec97..d00ddd0fd 100644 --- a/ts/components/icon/Icons.tsx +++ b/ts/components/icon/Icons.tsx @@ -82,10 +82,7 @@ export type SessionIconType = export type SessionIconSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | 'huge2' | 'max'; -export const icons: Record< - string, - { path: string | Array; viewBox: string; ratio: number } -> = { +export const icons: Record = { addUser: { path: 'M8.85,2.17c-1.73,0-3.12,1.4-3.12,3.12s1.4,3.12,3.12,3.12c1.73,0,3.13-1.4,3.13-3.12S10.58,2.17,8.85,2.17z M8.85,0.08c2.88,0,5.21,2.33,5.21,5.21s-2.33,5.21-5.21,5.21s-5.2-2.33-5.2-5.21C3.65,2.42,5.98,0.08,8.85,0.08z M20.83,5.29 c0.54,0,0.98,0.41,1.04,0.93l0.01,0.11v2.08h2.08c0.54,0,0.98,0.41,1.04,0.93v0.12c0,0.54-0.41,0.98-0.93,1.04l-0.11,0.01h-2.08 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08h-2.08c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11 c0-0.54,0.41-0.98,0.93-1.04l0.11-0.01h2.08V6.34C19.79,5.76,20.26,5.29,20.83,5.29z M12.5,12.58c2.8,0,5.09,2.21,5.2,4.99v0.22 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08c0-1.67-1.3-3.03-2.95-3.12h-0.18H5.21 c-1.67,0-3.03,1.3-3.12,2.95v0.18v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93L0,19.88V17.8 c0-2.8,2.21-5.09,4.99-5.2h0.22h7.29V12.58z', @@ -544,10 +541,8 @@ export const icons: Record< ratio: 1, }, timer50: { - path: [ - 'M8.49999998,1.66987313 L8.99999998,0.80384773 C10.3298113,1.57161469 11.3667294,2.84668755 11.7955548,4.4470858 C12.6532057,7.64788242 10.7537107,10.9379042 7.5529141,11.795555 C4.35211748,12.6532059 1.06209574,10.753711 0.204444873,7.55291434 C-0.27253249,5.77281059 0.103264647,3.96510985 1.08141192,2.56355986 L1.94944135,3.0683506 L1.94144625,3.07944279 L6.25000012,5.56698754 L5.75000012,6.43301294 L1.44144624,3.9454682 C0.98322086,4.96059039 0.85962347,6.13437085 1.1703707,7.29409529 C1.88507976,9.96142581 4.62676454,11.5443383 7.29409506,10.8296292 C9.96142557,10.1149201 11.544338,7.37323536 10.829629,4.70590484 C10.4722744,3.37223964 9.60817605,2.30967894 8.49999998,1.66987313 Z', - 'M6.00250506,1.00000061 L6,1 C5.8312503,1 5.66445312,1.00835972 5.5,1.02468762 L5.5,0.0205368885 C5.66486669,0.00693566443 5.83162339,0 6,0 L6.00250686,5.12480482e-07 C9.31506271,0.0013544265 12,2.68712686 12,6 L11,6 C11,3.23941132 8.76277746,1.00135396 6.00250506,1.00000061 Z M3.44328115,0.571633044 L3.94535651,1.44125309 C3.79477198,1.50933927 3.64614153,1.58549813 3.5,1.66987298 C3.35385847,1.75424783 3.21358774,1.84488615 3.07933111,1.94125309 L2.57725574,1.07163304 C2.71323387,0.977420696 2.85418158,0.888035884 3,0.803847577 C3.14581842,0.719659271 3.2937018,0.642287382 3.44328115,0.571633044 Z', - ], + path: + 'M8.49999998,1.66987313 L8.99999998,0.80384773 C10.3298113,1.57161469 11.3667294,2.84668755 11.7955548,4.4470858 C12.6532057,7.64788242 10.7537107,10.9379042 7.5529141,11.795555 C4.35211748,12.6532059 1.06209574,10.753711 0.204444873,7.55291434 C-0.27253249,5.77281059 0.103264647,3.96510985 1.08141192,2.56355986 L1.94944135,3.0683506 L1.94144625,3.07944279 L6.25000012,5.56698754 L5.75000012,6.43301294 L1.44144624,3.9454682 C0.98322086,4.96059039 0.85962347,6.13437085 1.1703707,7.29409529 C1.88507976,9.96142581 4.62676454,11.5443383 7.29409506,10.8296292 C9.96142557,10.1149201 11.544338,7.37323536 10.829629,4.70590484 C10.4722744,3.37223964 9.60817605,2.30967894 8.49999998,1.66987313 Z M6.00250506,1.00000061 L6,1 C5.8312503,1 5.66445312,1.00835972 5.5,1.02468762 L5.5,0.0205368885 C5.66486669,0.00693566443 5.83162339,0 6,0 L6.00250686,5.12480482e-07 C9.31506271,0.0013544265 12,2.68712686 12,6 L11,6 C11,3.23941132 8.76277746,1.00135396 6.00250506,1.00000061 Z M3.44328115,0.571633044 L3.94535651,1.44125309 C3.79477198,1.50933927 3.64614153,1.58549813 3.5,1.66987298 C3.35385847,1.75424783 3.21358774,1.84488615 3.07933111,1.94125309 L2.57725574,1.07163304 C2.71323387,0.977420696 2.85418158,0.888035884 3,0.803847577 C3.14581842,0.719659271 3.2937018,0.642287382 3.44328115,0.571633044 Z', viewBox: '0 0 12 12', ratio: 1, }, From 41d27609279d990a3b4cd50a6cf6585180b140a5 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 10 Jul 2023 17:49:57 +1000 Subject: [PATCH 28/45] fix: removed duplicate imports and ordered localised keys --- ts/components/dialog/EditProfileDialog.tsx | 5 - ts/types/LocalizerKeys.ts | 324 ++++++--------------- 2 files changed, 91 insertions(+), 238 deletions(-) diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index d1c1b28fb..96f62af5a 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -15,16 +15,11 @@ import { SessionButton, SessionButtonType } from '../basic/SessionButton'; import { SessionSpinner } from '../basic/SessionSpinner'; import { SessionIconButton } from '../icon'; import { sanitizeSessionUsername } from '../../session/utils/String'; -import { setLastProfileUpdateTimestamp } from '../../util/storage'; import { ConversationTypeEnum } from '../../models/conversationAttributes'; import { MAX_USERNAME_BYTES } from '../../session/constants'; import styled from 'styled-components'; -import { saveQRCode } from '../../util/saveQRCode'; import { useOurAvatarPath, useOurConversationUsername } from '../../hooks/useParamSelector'; import { useDispatch } from 'react-redux'; -import styled from 'styled-components'; -import { ConversationTypeEnum } from '../../models/conversationAttributes'; -import { MAX_USERNAME_BYTES } from '../../session/constants'; const handleSaveQRCode = (event: MouseEvent) => { event.preventDefault(); diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts index 100809db0..9f6118474 100644 --- a/ts/types/LocalizerKeys.ts +++ b/ts/types/LocalizerKeys.ts @@ -15,85 +15,46 @@ export type LocalizerKeys = | 'appMenuHideOthers' | 'appMenuQuit' | 'appMenuUnhide' - | 'appMenuQuit' - | 'editMenuUndo' - | 'editMenuRedo' - | 'editMenuCut' - | 'editMenuCopy' - | 'editMenuPaste' - | 'editMenuDeleteContact' - | 'editMenuDeleteGroup' - | 'editMenuSelectAll' - | 'windowMenuClose' - | 'windowMenuMinimize' - | 'windowMenuZoom' - | 'viewMenuResetZoom' - | 'viewMenuZoomIn' - | 'viewMenuZoomOut' - | 'viewMenuToggleFullScreen' - | 'viewMenuToggleDevTools' - | 'contextMenuNoSuggestions' - | 'openGroupInvitation' - | 'joinOpenGroupAfterInvitationConfirmationTitle' - | 'joinOpenGroupAfterInvitationConfirmationDesc' - | 'couldntFindServerMatching' - | 'enterSessionIDOrONSName' - | 'startNewConversationBy...' - | 'loading' - | 'done' - | 'youLeftTheGroup' - | 'youGotKickedFromGroup' - | 'unreadMessages' - | 'debugLogExplanation' - | 'reportIssue' - | 'markAllAsRead' - | 'incomingError' - | 'media' - | 'mediaEmptyState' - | 'document' - | 'documents' - | 'documentsEmptyState' - | 'today' - | 'yesterday' - | 'thisWeek' - | 'thisMonth' - | 'voiceMessage' - | 'stagedPreviewThumbnail' - | 'previewThumbnail' - | 'stagedImageAttachment' - | 'oneNonImageAtATimeToast' - | 'cannotMixImageAndNonImageAttachments' - | 'maximumAttachments' - | 'fileSizeWarning' - | 'unableToLoadAttachment' - | 'offline' - | 'debugLog' - | 'showDebugLog' - | 'shareBugDetails' - | 'goToReleaseNotes' - | 'goToSupportPage' - | 'about' - | 'show' - | 'sessionMessenger' - | 'noSearchResults' - | 'conversationsHeader' - | 'contactsHeader' - | 'messagesHeader' - | 'searchMessagesHeader' - | 'settingsHeader' - | 'typingAlt' - | 'contactAvatarAlt' - | 'downloadAttachment' - | 'replyToMessage' - | 'replyingToMessage' - | 'originalMessageNotFound' - | 'you' - | 'audioPermissionNeededTitle' - | 'audioPermissionNeeded' - | 'image' + | 'appearanceSettingsTitle' + | 'areYouSureClearDevice' + | 'areYouSureDeleteDeviceOnly' + | 'areYouSureDeleteEntireAccount' | 'audio' - | 'video' - | 'photo' + | 'audioMessageAutoplayDescription' + | 'audioMessageAutoplayTitle' + | 'audioNotificationsSettingsTitle' + | 'audioPermissionNeeded' + | 'audioPermissionNeededTitle' + | 'autoUpdateDownloadButtonLabel' + | 'autoUpdateDownloadInstructions' + | 'autoUpdateDownloadedMessage' + | 'autoUpdateLaterButtonLabel' + | 'autoUpdateNewVersionInstructions' + | 'autoUpdateNewVersionMessage' + | 'autoUpdateNewVersionTitle' + | 'autoUpdateRestartButtonLabel' + | 'autoUpdateSettingDescription' + | 'autoUpdateSettingTitle' + | 'banUser' + | 'banUserAndDeleteAll' + | 'beginYourSession' + | 'block' + | 'blocked' + | 'blockedSettingsTitle' + | 'callMediaPermissionsDescription' + | 'callMediaPermissionsDialogContent' + | 'callMediaPermissionsDialogTitle' + | 'callMediaPermissionsTitle' + | 'callMissed' + | 'callMissedCausePermission' + | 'callMissedNotApproved' + | 'callMissedTitle' + | 'cameraPermissionNeeded' + | 'cameraPermissionNeededTitle' + | 'cancel' + | 'cannotMixImageAndNonImageAttachments' + | 'cannotRemoveCreatorFromGroup' + | 'cannotRemoveCreatorFromGroupDesc' | 'cannotUpdate' | 'cannotUpdateDetail' | 'changeAccountPasswordDescription' @@ -163,12 +124,13 @@ export type LocalizerKeys = | 'deleteAccountFromLogin' | 'deleteAccountWarning' | 'deleteContactConfirmation' + | 'deleteConversation' | 'deleteConversationConfirmation' | 'deleteForEveryone' | 'deleteJustForMe' | 'deleteMessageQuestion' | 'deleteMessages' - | 'deleteConversation' + | 'deleteMessagesQuestion' | 'deleted' | 'destination' | 'device' @@ -184,6 +146,7 @@ export type LocalizerKeys = | 'displayName' | 'displayNameEmpty' | 'displayNameTooLong' + | 'document' | 'documents' | 'documentsEmptyState' | 'done' @@ -233,6 +196,7 @@ export type LocalizerKeys = | 'hideRequestBanner' | 'hideRequestBannerDescription' | 'iAmSure' + | 'image' | 'imageAttachmentAlt' | 'imageCaptionIconAlt' | 'incomingCallFrom' @@ -274,6 +238,7 @@ export type LocalizerKeys = | 'mainMenuView' | 'mainMenuWindow' | 'markAllAsRead' + | 'markUnread' | 'maxPasswordAttempts' | 'maximumAttachments' | 'media' @@ -314,6 +279,9 @@ export type LocalizerKeys = | 'noMediaUntilApproved' | 'noMembersInThisGroup' | 'noMessageRequestsPending' + | 'noMessagesInEverythingElse' + | 'noMessagesInNoteToSelf' + | 'noMessagesInReadOnly' | 'noModeratorsToRemove' | 'noNameOrMessage' | 'noSearchResults' @@ -417,6 +385,7 @@ export type LocalizerKeys = | 'savedTheFile' | 'searchFor...' | 'searchForContactsOnly' + | 'searchMessagesHeader' | 'selectMessage' | 'sendFailed' | 'sendMessage' @@ -439,6 +408,7 @@ export type LocalizerKeys = | 'showRecoveryPhrase' | 'showRecoveryPhrasePasswordRequest' | 'showUserDetails' + | 'someOfYourDeviceUseOutdatedVersion' | 'spellCheckDescription' | 'spellCheckDirty' | 'spellCheckTitle' @@ -484,12 +454,26 @@ export type LocalizerKeys = | 'timerSetOnSync' | 'timerSetTo' | 'titleIsNow' - | 'joinedTheGroup' - | 'multipleJoinedTheGroup' - | 'kickedFromTheGroup' - | 'multipleKickedFromTheGroup' - | 'block' + | 'to' + | 'today' + | 'tookAScreenshot' + | 'trimDatabase' + | 'trimDatabaseConfirmationBody' + | 'trimDatabaseDescription' + | 'trustThisContactDialogDescription' + | 'trustThisContactDialogTitle' + | 'tryAgain' + | 'typeInOldPassword' + | 'typingAlt' + | 'typingIndicatorsSettingDescription' + | 'typingIndicatorsSettingTitle' + | 'unableToCall' + | 'unableToCallTitle' + | 'unableToLoadAttachment' + | 'unbanUser' | 'unblock' + | 'unblockGroupToSend' + | 'unblockToSend' | 'unblocked' | 'unknown' | 'unknownCountry' @@ -501,153 +485,27 @@ export type LocalizerKeys = | 'userBanFailed' | 'userBanned' | 'userRemovedFromModerators' - | 'orJoinOneOfThese' - | 'helpUsTranslateSession' - | 'closedGroupInviteFailTitle' - | 'closedGroupInviteFailTitlePlural' - | 'closedGroupInviteFailMessage' - | 'closedGroupInviteFailMessagePlural' - | 'closedGroupInviteOkText' - | 'closedGroupInviteSuccessTitlePlural' - | 'closedGroupInviteSuccessTitle' - | 'closedGroupInviteSuccessMessage' - | 'notificationForConvo' - | 'notificationForConvo_all' - | 'notificationForConvo_disabled' - | 'notificationForConvo_mentions_only' - | 'onionPathIndicatorTitle' - | 'onionPathIndicatorDescription' - | 'unknownCountry' - | 'device' - | 'destination' - | 'learnMore' - | 'linkVisitWarningTitle' - | 'linkVisitWarningMessage' - | 'open' - | 'audioMessageAutoplayTitle' - | 'audioMessageAutoplayDescription' - | 'clickToTrustContact' - | 'trustThisContactDialogTitle' - | 'trustThisContactDialogDescription' - | 'pinConversation' - | 'unpinConversation' - | 'markUnread' - | 'showUserDetails' - | 'sendRecoveryPhraseTitle' - | 'sendRecoveryPhraseMessage' - | 'dialogClearAllDataDeletionFailedTitle' - | 'dialogClearAllDataDeletionFailedDesc' - | 'dialogClearAllDataDeletionFailedTitleQuestion' - | 'dialogClearAllDataDeletionFailedMultiple' - | 'dialogClearAllDataDeletionQuestion' - | 'clearDevice' - | 'tryAgain' - | 'areYouSureClearDevice' - | 'deviceOnly' - | 'entireAccount' - | 'areYouSureDeleteDeviceOnly' - | 'areYouSureDeleteEntireAccount' - | 'iAmSure' - | 'recoveryPhraseSecureTitle' - | 'recoveryPhraseRevealMessage' - | 'recoveryPhraseRevealButtonText' - | 'notificationSubtitle' - | 'surveyTitle' - | 'faq' - | 'support' - | 'clearAll' - | 'clearDataSettingsTitle' - | 'messageRequests' - | 'requestsSubtitle' - | 'requestsPlaceholder' - | 'hideRequestBannerDescription' - | 'incomingCallFrom' - | 'ringing' - | 'establishingConnection' - | 'accept' - | 'decline' - | 'endCall' - | 'permissionsSettingsTitle' - | 'helpSettingsTitle' - | 'cameraPermissionNeededTitle' - | 'cameraPermissionNeeded' - | 'unableToCall' - | 'unableToCallTitle' - | 'callMissed' - | 'callMissedTitle' - | 'noCameraFound' - | 'noAudioInputFound' - | 'noAudioOutputFound' - | 'callMediaPermissionsTitle' - | 'callMissedCausePermission' - | 'callMissedNotApproved' - | 'callMediaPermissionsDescription' - | 'callMediaPermissionsDialogContent' - | 'callMediaPermissionsDialogTitle' - | 'startedACall' - | 'answeredACall' - | 'trimDatabase' - | 'trimDatabaseDescription' - | 'trimDatabaseConfirmationBody' - | 'pleaseWaitOpenAndOptimizeDb' - | 'messageRequestPending' - | 'messageRequestAccepted' - | 'messageRequestAcceptedOurs' - | 'messageRequestAcceptedOursNoName' - | 'declineRequestMessage' - | 'respondingToRequestWarning' - | 'hideRequestBanner' - | 'openMessageRequestInbox' - | 'noMessageRequestsPending' - | 'noMediaUntilApproved' - | 'mustBeApproved' - | 'youHaveANewFriendRequest' - | 'clearAllConfirmationTitle' - | 'clearAllConfirmationBody' - | 'noMessagesInReadOnly' - | 'noMessagesInNoteToSelf' - | 'noMessagesInEverythingElse' - | 'hideBanner' - | 'someOfYourDeviceUseOutdatedVersion' - | 'openMessageRequestInboxDescription' - | 'clearAllReactions' - | 'expandedReactionsText' - | 'reactionNotification' - | 'rateLimitReactMessage' - | 'otherSingular' - | 'otherPlural' - | 'reactionPopup' - | 'reactionPopupOne' - | 'reactionPopupTwo' - | 'reactionPopupThree' - | 'reactionPopupMany' - | 'timerSetTo' - | 'iAmSure' - | 'primaryColorRed' - | 'selectMessage' - | 'enterAnOpenGroupURL' - | 'delete' - | 'changePasswordInvalid' - | 'themesSettingTitle' - | 'timerOption_6_hours' - | 'confirmPassword' - | 'downloadAttachment' - | 'trimDatabaseDescription' - | 'showUserDetails' - | 'titleIsNow' - | 'removePasswordToastDescription' - | 'recoveryPhrase' - | 'deleteAccountFromLogin' - | 'newMessages' + | 'userUnbanFailed' + | 'userUnbanned' + | 'video' + | 'videoAttachmentAlt' + | 'viewMenuResetZoom' + | 'viewMenuToggleDevTools' + | 'viewMenuToggleFullScreen' + | 'viewMenuZoomIn' + | 'viewMenuZoomOut' + | 'voiceMessage' + | 'welcomeToYourSession' + | 'windowMenuClose' + | 'windowMenuMinimize' + | 'windowMenuZoom' + | 'yesterday' | 'you' - | 'pruneSettingTitle' - | 'unbanUser' - | 'notificationForConvo_mentions_only' - | 'trustThisContactDialogDescription' - | 'unknownCountry' - | 'searchFor...' - | 'displayNameTooLong' - | 'joinedTheGroup' - | 'editGroupName' - | 'reportIssue' - | 'setDisplayPicture'; + | 'youChangedTheTimer' + | 'youDisabledDisappearingMessages' + | 'youGotKickedFromGroup' + | 'youHaveANewFriendRequest' + | 'youLeftTheGroup' + | 'yourSessionID' + | 'yourUniqueSessionID' + | 'zoomFactorSettingTitle'; From 853c9a21074cf642fd8053cb06d239b8a23010f9 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 18 Jul 2023 17:05:19 +1000 Subject: [PATCH 29/45] feat: fixed integration tests except for linked device profile sync, need to update avatar-update-blue files for linux --- .../dialog/EditProfilePictureModal.tsx | 8 +++++++- ts/test/automation/linked_device_user.spec.ts | 6 ++---- .../avatar-updated-blue-darwin.jpeg | Bin 1320 -> 1998 bytes ts/test/automation/setup/beforeEach.ts | 8 ++++---- ts/test/automation/user_actions.spec.ts | 8 +++----- .../avatar-updated-blue-darwin.jpeg | Bin 1014 -> 1112 bytes 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ts/components/dialog/EditProfilePictureModal.tsx b/ts/components/dialog/EditProfilePictureModal.tsx index 7f69082f6..2c21bf535 100644 --- a/ts/components/dialog/EditProfilePictureModal.tsx +++ b/ts/components/dialog/EditProfilePictureModal.tsx @@ -116,7 +116,12 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => showHeader={true} showExitIcon={true} > -
+
{newAvatarObjectUrl || avatarPath ? ( buttonType={SessionButtonType.Simple} onClick={handleUpload} disabled={newAvatarObjectUrl === avatarPath} + dataTestId="save-button-profile-update" /> { await waitForTestIdWithText(windowA, 'copy-button-profile-update', 'Copy'); await clickOnTestIdWithText(windowA, 'image-upload-section'); + await clickOnTestIdWithText(windowA, 'image-upload-click'); await clickOnTestIdWithText(windowA, 'save-button-profile-update'); await waitForTestIdWithText(windowA, 'loading-spinner'); - await waitForTestIdWithText(windowA, 'copy-button-profile-update', 'Copy'); - await clickOnTestIdWithText(windowA, 'modal-close-button'); - - await sleepFor(500); + await sleepFor(5000); const leftpaneAvatarContainer = await waitForTestIdWithText(windowB, 'leftpane-primary-avatar'); await sleepFor(500); const screenshot = await leftpaneAvatarContainer.screenshot({ diff --git a/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg b/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg index 06f76803d05b50a2e18257fe21ad2158ff2d3c60..1cd8d20b1a19f57aabadf1c415cb7d66580ee226 100644 GIT binary patch delta 1347 zcmZ{kdsNbQ7>B<<5ou&9c{^Uxm7pCjG_85fYbih7{@kv>QTX z0|M{|e)NK!^h+l6OS+6j2+62~y!ADbk^oq00$@uF0Qv&}AW4i@&@Amo;0l9w01Xrb zLqY40fjNKx1cxB-cOf7RxYj0^=En3(JpjRA5L^omefDVq0va$)IBKgFV!I<=-^n*2 zi*AS^6g)I`_9GTD>bPyQxS@^S%_DSf(cJmuY>bOo!VC5l$E3e4=VUD3z5YjomuK~AS-)r+|_gtTXy)!V+L zbr71{dTaO{GqH(kk>5@^egW^VO)WQab{+j<==RsTKCO{rN&1WX)(6Al+xap=yt-T5 z_kmvh=PYv4F!ZhtUUG*x=D3r!Vf%wU<# zM~E4^jdeZ6wV{`mmd*1kmv4s%B|KI_svIC9g3;xknG4>f6GJSm2D05`bLrr&T$zvt zf41hiqcAmEAuzZ|OZO18pmm8Ecz#qduGdq+h;<5LIER+Io0+42Wd}wvjaU;;@npqJpAZlsyDSiDVqJgyn-w4%1$pvwkPvu zmdoqK-E&6p;OqHpgO7NvRka-^cIg{E>($(>s!nN?Ep5M6cvLdU-};H0y4-7)y+ujj z)hDE3J~s{*nwNPxEqGVhFV+z_iaV@uGJ9gNC$1~X_ui>SX@# zh^1%8u(y@JxyQZf?5jT)H-C>>PvNK>crDYFgCheoeQi4NGbL@T*K^j54DwzHZY?q5 zh=Z$&hMe3g8s4^(-<*-GLS8nZ_UDl%S5)ZpJp-`|s$ZI#3u7=v@P-Si+UOI9FT!&u zc9hZ0AtD`ndPBMQ(*SSz{$oP4#67U~H9Bvr!kqEp&^|0t%)LON1V@YJaU6(Wa{_xP z>?IR1oWxqrTkUr9l6bm=Q02E=wlqAio~K=&h^@}^vC2#_t?`|56sKNRw&97w5a(LS z?jp8q7w!C5_t{7qc~W)yUm^l`p4Z+(-9txU=ded|1dS7Kb5lsO*Qs6)rMLi{YgMkJ z?$e{)2Ke7sbIX{)(#TQ&l4l1Mq!OEelWHA{*=wrJM5ZULtHYFPT@vaff4NE*#>Gy( zsxa5_wLm71FTYQy*wmu--<52)zlvBpUsB8|>GzwxE2g_+o@(B_8MIW_BY2myM(Eu` ztuW>Vj5!VOky-k+#?__q$Eh~*JILxRC07xsJ{Hq0rQUd>JRLJKKhn#}cZ(Dc-gt4} z=wO&{yBAHyh*!5hmpBQ{9XkSRM`lulH8bCO29>%Lb&VtzlFo>NM}wvtREZtpnWpCV z_>dv>#)DpsvrY4teE7j?p)WBaqbxK$E}e8H@JhA4Ez{$W&1?A*QH0IPK8LkIvkW4> Tij4oCfY^u)T$1|~s9W|h(}!6YNl96=#P*1!+KB8G_< zAAbCQi-Ct3XuKe^AcH-_xfdM`OiBt2-J6$wd0V$+M@4isoAjAU``g^CCjSZ5(p|94 zOh7x&bdztNkK&rVYJvK!Ws19gMsYi7+B6IHi}TmA1d3{h<)(&io94CK9_K5Ba0`_^6c>kkem%rmI`Wx;%RM`+n=``Ll| z-AnnF|LmP4wwdvau0qfJc-0HhEthPVu9knY^ocZ|^Vxm(_4W02hfm+hY?ZC`H7Gx( zH1W)jjXe(@Yn$gCU8NniaZd0SBduv>OH3-69y$KmGQV_r{?roD&308DTFUbxx$mV^ z=ssV-n5KJU*U{2z#bO;^M{6;^M&m|0V!^$OQWU diff --git a/ts/test/automation/setup/beforeEach.ts b/ts/test/automation/setup/beforeEach.ts index f47f97418..6ba353549 100644 --- a/ts/test/automation/setup/beforeEach.ts +++ b/ts/test/automation/setup/beforeEach.ts @@ -1,5 +1,5 @@ import { Page } from '@playwright/test'; -import { readdirSync, rmdirSync } from 'fs-extra'; +import { readdirSync, rm } from 'fs-extra'; import { join } from 'path'; import { homedir } from 'os'; import { isLinux, isMacOS } from '../../../OS'; @@ -25,9 +25,9 @@ function cleanUpOtherTest() { alreadyCleanedWaiting = true; const parentFolderOfAllDataPath = isMacOS() - ? '~/Library/Application Support/' + ? join(homedir(), 'Library', 'Application Support') : isLinux() - ? `${homedir()}/.config/` + ? join(homedir(), '.config') : null; if (!parentFolderOfAllDataPath) { throw new Error('Only macOS is currrently supported '); @@ -43,7 +43,7 @@ function cleanUpOtherTest() { allAppDataPath.map(folder => { const pathToRemove = join(parentFolderOfAllDataPath, folder); - rmdirSync(pathToRemove, { recursive: true }); + rm(pathToRemove, { recursive: true }, () => pathToRemove); }); console.info('...done'); } diff --git a/ts/test/automation/user_actions.spec.ts b/ts/test/automation/user_actions.spec.ts index d26476440..cc93bdd3f 100644 --- a/ts/test/automation/user_actions.spec.ts +++ b/ts/test/automation/user_actions.spec.ts @@ -132,7 +132,7 @@ sessionTestOneWindow('Change username', async ([window]) => { await window.click('.session-icon-button.small'); }); -sessionTestOneWindow('Change avatar', async ([window]) => { +sessionTestOneWindow('Change profile picture', async ([window]) => { await newUser(window, 'Alice'); // Open profile await clickOnTestIdWithText(window, 'leftpane-primary-avatar'); @@ -140,13 +140,11 @@ sessionTestOneWindow('Change avatar', async ([window]) => { await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy'); await clickOnTestIdWithText(window, 'image-upload-section'); + await clickOnTestIdWithText(window, 'image-upload-click'); await clickOnTestIdWithText(window, 'save-button-profile-update'); await waitForTestIdWithText(window, 'loading-spinner'); - await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy'); - await clickOnTestIdWithText(window, 'modal-close-button'); - - await sleepFor(500); + await sleepFor(5000); const leftpaneAvatarContainer = await waitForTestIdWithText(window, 'leftpane-primary-avatar'); await sleepFor(500); const screenshot = await leftpaneAvatarContainer.screenshot({ diff --git a/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg b/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg index 079323ef7cceff940f71519c5a4c6ef4300767fb..79defdd42effc9c516bf577f443c4b92e59d026c 100644 GIT binary patch delta 371 zcmeyyeuHDfIi~sr3>M6cN(@YbjLd?J|Bo<;F)%VRGN1rP4v@G2rnn$bTnea~i5W!) zGYbc}Q!_)t+fv9M8i;=+UfZ!z!yO<)pa7G$tz zID24XplE&4*S7glzm}`2zWe58G^^`0o5pL+f~BnTM!EZa^dBpf-aFB>%=A_}&y|JZ zL3cl^Zu@)Yail#PL(!2#n(WJ7gl*iuxy|Zi>Ys0#SEr>ga9Ny>;$f72dr(Z)foR Wx?_clrgt+~CM8S^6k%rme-i+8 Date: Tue, 18 Jul 2023 12:11:07 +0200 Subject: [PATCH 30/45] test: fix update profile picture snapshots - loop until match when validating screenshot - wait 15s and take screenshot when updating screenshot --- ts/test/automation/linked_device_user.spec.ts | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/ts/test/automation/linked_device_user.spec.ts b/ts/test/automation/linked_device_user.spec.ts index f74679585..b171e4684 100644 --- a/ts/test/automation/linked_device_user.spec.ts +++ b/ts/test/automation/linked_device_user.spec.ts @@ -70,7 +70,7 @@ test('Check changed username syncs', async () => { await waitForTestIdWithText(windowB, 'your-profile-name', newUsername); }); -test('Check profile picture syncs', async () => { +test('Check profile picture syncs', async ({}, testinfo) => { const [windowA] = await openApp(1); // not using sessionTest here as we need to close and reopen one of the window const userA = await newUser(windowA, 'Alice'); const [windowB] = await linkedDevice(userA.recoveryPhrase); // not using sessionTest here as we need to close and reopen one of the window @@ -83,14 +83,36 @@ test('Check profile picture syncs', async () => { await clickOnTestIdWithText(windowA, 'save-button-profile-update'); await waitForTestIdWithText(windowA, 'loading-spinner'); - await sleepFor(5000); + if (testinfo.config.updateSnapshots === 'all') { + await sleepFor(15000, true); // long time to be sure a poll happened when we want to update the snapshot + } else { + await sleepFor(2000); // short time as we will loop right below until the snapshot is what we expect + } + const leftpaneAvatarContainer = await waitForTestIdWithText(windowB, 'leftpane-primary-avatar'); - await sleepFor(500); - const screenshot = await leftpaneAvatarContainer.screenshot({ - type: 'jpeg', - // path: 'avatar-updated-blue', - }); - expect(screenshot).toMatchSnapshot({ name: 'avatar-updated-blue.jpeg' }); + const start = Date.now(); + let correctScreenshot = false; + let tryNumber = 0; + do { + try { + await sleepFor(500); + + const screenshot = await leftpaneAvatarContainer.screenshot({ + type: 'jpeg', + // path: 'avatar-updated-blue', + }); + expect(screenshot).toMatchSnapshot({ name: 'avatar-updated-blue.jpeg' }); + correctScreenshot = true; + console.warn( + `screenshot matching of "Check profile picture syncs" passed after "${tryNumber}" retries!` + ); + } catch (e) { + console.warn( + `screenshot matching of "Check profile picture syncs" try "${tryNumber}" failed with: ${e.message}` + ); + } + tryNumber++; + } while (Date.now() - start <= 20000 && !correctScreenshot); }); test('Check contacts syncs', async () => { From 5d73e4e0f1df99dc11c6c824094f2ef553c32031 Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 19 Jul 2023 10:27:52 +1000 Subject: [PATCH 31/45] fix: updated avatar to correct image --- .../avatar-updated-blue-darwin.jpeg | Bin 1998 -> 1174 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg b/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg index 1cd8d20b1a19f57aabadf1c415cb7d66580ee226..3c94dc5842a6d080f1051aa88bea8c1cee43aa7a 100644 GIT binary patch delta 418 zcmX@dKaF$4J*Ikb21X!YKn9FV9RH6nND2UjnNegInG6F3fl^XH875RIR(56-wm{=db*12ln&Ly%dJ!JgrH!^A+* z`YgYt25Xd_i?05%_PWgWLtp>NsRue{ov4fwW94biTKs+0$^F+lD}An%2fgW8oS80g zW1Gj?Z1%8o(U;!dzy0~)ubG;6R@$mwIKd}yOHWtj(z-uulevA&W_z!>_Wb?vLl=72 z>t0S^cS&SmIOlYiE8INd(0QRr%eDl2#aq38YUFjVK6>F5Uu}ymn~b)8(fe>K({4j_ z{C0V5XTLpVXB%V%TNs#PIVUVFF8!i!sA-iS%Ch+5x_!|qYaefu^|-P(#Vs*n?>W)% zSGV_7`nSLSYkO|itc$ZHZC5k3)om^OePzk~*KT{ZWLZa+rA@l0q_{EXebg(ysdLKI f@9*FK`1BW};BA5IRi{@l9+GyL7%0Nb{{JQbEqk13 delta 1281 zcmbQnd5(X>J*IjY21W)(Rz^k!1Yl=mVrAoCX8C`F!Bl{Ok(rs1m5r5=6QY2Tfr*)g zRZxhHUC}U5*vK)laH6PcP~#zSGpEp|$qP4bx(L)J2{exx#Y_ekRyJlPpp=#%0}~S? zGb1|-GswVt5WxsBQc+mR&@nLap{UWui-nC7|KDQZVFp?!$SlZU&+xp(#X(Sz!NrA9 zP=EzHGc?{#)dKwEw(ffp6!&}o#gpHoMXz0|OU+-oOg{KV$^8AQy|MK= zfoG)`&+MIK&SSYwlKqOt;tK0cZ62ySa-PJ_St~W)!+M>ZRh4|bsJ#_Wxub(vnyR>#LU8h^1c;G?vgRV7uRB}(}Jl31OGA}fTf7!xgZS(vleEKF+ zJLTIJ-_w`2%}>mH%D^7ttq&HVbTq-6xpFYyeYE;j$(iKlPGHm5E&`@1dI z@X7Jr{xdEW{+-_OY^CLrefRl`?|iw=8l3+w(?0iXTEvppr;|2b+*6$0#1D$ z>(ZV~9+iree%8`d?bKV`zUTOKCNAx>KjmTn)UD{W$|Wn$c`sGUg`Uey{vPkF7kY7H zPim@n#JSfl>lpXVsnCn}e>9!_dfNPN<-hh@+Fi0W_sxB}*_?Oj%~`Lf-iw-5?x0+d zAvMSGf#Jo>`l(+w1%{sXHJf+IxOvGF{rc`Z`#ZwwWAA^hL9-}mG8 zmsfgp*}eB=8PP9R<=P#(;^M)#Vw%M*tB1Gtiv<4rRn|M*`%2g?_x8&H&!gMbJt}|m z$-P+dl{<90?VepyxoYixMo%C8ns_=U>OuXpNiuwna$M Date: Thu, 20 Jul 2023 14:29:09 +1000 Subject: [PATCH 32/45] fix: revert rm to rmdirSync so we don't remove config files before a test has been completed --- ts/test/automation/setup/beforeEach.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/test/automation/setup/beforeEach.ts b/ts/test/automation/setup/beforeEach.ts index 6ba353549..016cf072d 100644 --- a/ts/test/automation/setup/beforeEach.ts +++ b/ts/test/automation/setup/beforeEach.ts @@ -1,5 +1,5 @@ import { Page } from '@playwright/test'; -import { readdirSync, rm } from 'fs-extra'; +import { readdirSync, rmdirSync } from 'fs-extra'; import { join } from 'path'; import { homedir } from 'os'; import { isLinux, isMacOS } from '../../../OS'; @@ -43,7 +43,7 @@ function cleanUpOtherTest() { allAppDataPath.map(folder => { const pathToRemove = join(parentFolderOfAllDataPath, folder); - rm(pathToRemove, { recursive: true }, () => pathToRemove); + rmdirSync(pathToRemove, { recursive: true }); }); console.info('...done'); } From 9d4201aa95e0a359b0a1ce9a493ecf6e99e01580 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 21 Aug 2023 10:19:57 +1000 Subject: [PATCH 33/45] fix: void rather than eslint disable --- ts/components/dialog/EditProfilePictureModal.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ts/components/dialog/EditProfilePictureModal.tsx b/ts/components/dialog/EditProfilePictureModal.tsx index 046844807..35d9f1f4a 100644 --- a/ts/components/dialog/EditProfilePictureModal.tsx +++ b/ts/components/dialog/EditProfilePictureModal.tsx @@ -119,8 +119,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) =>
void handleAvatarClick} data-testid={'image-upload-click'} > From 73070d4e0ee515c4eb7ef87d726acdcaf0f9e858 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 21 Aug 2023 10:36:29 +1000 Subject: [PATCH 34/45] fix: trim pubkey before starting a convo with them Fixes #2868 --- ts/components/leftpane/overlay/OverlayMessage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/leftpane/overlay/OverlayMessage.tsx b/ts/components/leftpane/overlay/OverlayMessage.tsx index 914016968..df54dd314 100644 --- a/ts/components/leftpane/overlay/OverlayMessage.tsx +++ b/ts/components/leftpane/overlay/OverlayMessage.tsx @@ -86,7 +86,7 @@ export const OverlayMessage = () => { const pubkeyorOnsTrimmed = pubkeyOrOns.trim(); if (!PubKey.validateWithErrorNoBlinding(pubkeyorOnsTrimmed)) { - await openConvoOnceResolved(pubkeyOrOns); + await openConvoOnceResolved(pubkeyorOnsTrimmed); return; } From ada549788c657c6706d5874c93aea51d613a74c2 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 21 Aug 2023 12:07:19 +1000 Subject: [PATCH 35/45] fix: rtl support for registration screen too --- stylesheets/_session_signin.scss | 7 ------- ts/components/basic/SessionInput.tsx | 13 ++++++++++++- ts/mains/main_renderer.tsx | 7 ++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/stylesheets/_session_signin.scss b/stylesheets/_session_signin.scss index 46fe3ff0a..8a7872f54 100644 --- a/stylesheets/_session_signin.scss +++ b/stylesheets/_session_signin.scss @@ -145,13 +145,6 @@ position: absolute; bottom: 0px; } - - .session-icon-button { - position: absolute; - top: 50%; - transform: translateY(-50%); - right: 0px; - } } &-terms-conditions-agreement { diff --git a/ts/components/basic/SessionInput.tsx b/ts/components/basic/SessionInput.tsx index 2143b7413..0c33a22b0 100644 --- a/ts/components/basic/SessionInput.tsx +++ b/ts/components/basic/SessionInput.tsx @@ -3,6 +3,7 @@ import React, { useState } from 'react'; import classNames from 'classnames'; import { SessionIconButton } from '../icon'; import { Noop } from '../../types/Util'; +import { useHTMLDirection } from '../../util/i18n'; type Props = { label?: string; @@ -46,7 +47,17 @@ const ErrorItem = (props: { error: string | undefined }) => { }; const ShowHideButton = (props: { toggleForceShow: Noop }) => { - return ; + const htmlDirection = useHTMLDirection(); + const position = htmlDirection === 'ltr' ? { right: '0px' } : { left: '0px' }; + + return ( + + ); }; export const SessionInput = (props: Props) => { diff --git a/ts/mains/main_renderer.tsx b/ts/mains/main_renderer.tsx index e66c8fb0a..ba2a7b516 100644 --- a/ts/mains/main_renderer.tsx +++ b/ts/mains/main_renderer.tsx @@ -267,13 +267,17 @@ async function start() { await connect(); }); - function openInbox() { + function switchBodyToRtlIfNeeded() { const rtlLocales = ['fa', 'ar', 'he']; const loc = (window.i18n as any).getLocale(); if (rtlLocales.includes(loc) && !document.getElementById('body')?.classList.contains('rtl')) { document.getElementById('body')?.classList.add('rtl'); } + } + + function openInbox() { + switchBodyToRtlIfNeeded(); const hideMenuBar = Storage.get('hide-menu-bar', true) as boolean; window.setAutoHideMenuBar(hideMenuBar); window.setMenuBarVisibility(!hideMenuBar); @@ -287,6 +291,7 @@ async function start() { function showRegistrationView() { ReactDOM.render(, document.getElementById('root')); + switchBodyToRtlIfNeeded(); } ExpirationTimerOptions.initExpiringMessageListener(); From 5c64c54ed6eb08ad1154c4377b7692c14a0c7393 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 23 Aug 2023 10:56:56 +1000 Subject: [PATCH 36/45] fix: admin actions for sogs on msg click --- .../message-content/MessageContextMenu.tsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ts/components/conversation/message/message-content/MessageContextMenu.tsx b/ts/components/conversation/message/message-content/MessageContextMenu.tsx index 7591a9ac6..c784b0722 100644 --- a/ts/components/conversation/message/message-content/MessageContextMenu.tsx +++ b/ts/components/conversation/message/message-content/MessageContextMenu.tsx @@ -24,18 +24,6 @@ import { showMessageDetailsView, toggleSelectedMessageId, } from '../../../../state/ducks/conversations'; -import { - useSelectedConversationKey, - useSelectedIsBlocked, - useSelectedIsPublic, - useSelectedWeAreAdmin, - useSelectedWeAreModerator, -} from '../../../../state/selectors/selectedConversation'; -import { saveAttachmentToDisk } from '../../../../util/attachmentsUtil'; -import { Reactions } from '../../../../util/reactions'; -import { SessionContextMenuContainer } from '../../../SessionContextMenuContainer'; -import { SessionEmojiPanel, StyledEmojiPanel } from '../../SessionEmojiPanel'; -import { MessageReactBar } from './MessageReactBar'; import { useMessageAttachments, useMessageBody, @@ -48,7 +36,18 @@ import { useMessageStatus, useMessageTimestamp, } from '../../../../state/selectors'; -import { useIsPublic } from '../../../../hooks/useParamSelector'; +import { + useSelectedConversationKey, + useSelectedIsBlocked, + useSelectedIsPublic, + useSelectedWeAreAdmin, + useSelectedWeAreModerator, +} from '../../../../state/selectors/selectedConversation'; +import { saveAttachmentToDisk } from '../../../../util/attachmentsUtil'; +import { Reactions } from '../../../../util/reactions'; +import { SessionContextMenuContainer } from '../../../SessionContextMenuContainer'; +import { SessionEmojiPanel, StyledEmojiPanel } from '../../SessionEmojiPanel'; +import { MessageReactBar } from './MessageReactBar'; export type MessageContextMenuSelectorProps = Pick< MessageRenderingProps, @@ -149,10 +148,11 @@ const SaveAttachment = ({ messageId }: MessageId) => { const AdminActionItems = ({ messageId }: MessageId) => { const convoId = useSelectedConversationKey(); - const isPublic = useIsPublic(); + const isPublic = useSelectedIsPublic(); const weAreModerator = useSelectedWeAreModerator(); const weAreAdmin = useSelectedWeAreAdmin(); const showAdminActions = (weAreAdmin || weAreModerator) && isPublic; + const sender = useMessageSender(messageId); const isSenderAdmin = useMessageSenderIsAdmin(messageId); From 539eeb19cba8b842fbba8f689abbd3953836c139 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 23 Aug 2023 12:01:58 +1000 Subject: [PATCH 37/45] fix: background of msgbox with long display name --- .../conversation/message/message-content/MessageContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/conversation/message/message-content/MessageContent.tsx b/ts/components/conversation/message/message-content/MessageContent.tsx index af4bd9c02..61724294b 100644 --- a/ts/components/conversation/message/message-content/MessageContent.tsx +++ b/ts/components/conversation/message/message-content/MessageContent.tsx @@ -86,7 +86,7 @@ const StyledMessageOpaqueContent = styled(StyledMessageHighlighter)<{ align-self: ${props => (props.messageDirection === 'incoming' ? 'flex-start' : 'flex-end')}; padding: var(--padding-message-content); border-radius: var(--border-radius-message-box); - max-width: 100%; + width: 100%; `; export const IsMessageVisibleContext = createContext(false); From 95ac1492b54e40a4cbad9746e6472a1c519a5896 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 25 Aug 2023 13:20:29 +1000 Subject: [PATCH 38/45] fix: call function to upload avatar am a dumbass, will help with dumbassing --- ts/components/dialog/EditProfilePictureModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/dialog/EditProfilePictureModal.tsx b/ts/components/dialog/EditProfilePictureModal.tsx index 35d9f1f4a..2554c420f 100644 --- a/ts/components/dialog/EditProfilePictureModal.tsx +++ b/ts/components/dialog/EditProfilePictureModal.tsx @@ -119,7 +119,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) =>
void handleAvatarClick} + onClick={() => void handleAvatarClick()} data-testid={'image-upload-click'} > From 4d60c63f840d278e6b00fd2ece4111a12f0999f2 Mon Sep 17 00:00:00 2001 From: William Grant Date: Fri, 1 Sep 2023 15:37:20 +1000 Subject: [PATCH 39/45] feat: setup lint-staged when making a commit --- .husky/pre-commit | 4 + .lintstagedrc.js | 23 ++ .yarnclean | 4 + package.json | 5 +- yarn.lock | 594 ++++++++++++++++++++++++++++++++-------------- 5 files changed, 448 insertions(+), 182 deletions(-) create mode 100755 .husky/pre-commit create mode 100644 .lintstagedrc.js diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..5a182ef10 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint-staged diff --git a/.lintstagedrc.js b/.lintstagedrc.js new file mode 100644 index 000000000..f42943d40 --- /dev/null +++ b/.lintstagedrc.js @@ -0,0 +1,23 @@ +const ignoredFiles = ['package.json', 'yarn.lock', 'tsconfig.json', '.lintstagedrc.js']; + +const path = require('path'); + +const buildFormatCommand = filenames => { + const results = filenames + .map(f => path.relative(process.cwd(), f)) + .filter(f => !ignoredFiles.includes(f)); + + return results.length ? `prettier --list-different --write ${results.join(' ')}` : ''; +}; + +const buildLintCommand = filenames => { + const results = filenames + .map(f => path.relative(process.cwd(), f)) + .filter(f => !ignoredFiles.includes(f)); + + return results.length ? `eslint ${results.join(' ')}`: ''; +}; + +module.exports = { + '*.{css,js,json,scss,ts,tsx}': [buildFormatCommand, buildLintCommand], +}; diff --git a/.yarnclean b/.yarnclean index 8cd6c20d9..d802553e1 100644 --- a/.yarnclean +++ b/.yarnclean @@ -37,3 +37,7 @@ Gruntfile.js !istanbul-reports/lib/html/assets !istanbul-api/node_modules/istanbul-reports/lib/html/assets + +# lint-staged fix +# https://github.com/eemeli/yaml/issues/384#issuecomment-1368496106 +!**/yaml/dist/**/doc diff --git a/package.json b/package.json index 9ee4947b6..8fc6f5e62 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,8 @@ "postinstall": "yarn patch-package && yarn electron-builder install-app-deps", "update-git-info": "node ./build/updateLocalConfig.js", "worker:utils": "webpack --config=./utils.worker.config.js", - "worker:libsession": "rimraf 'ts/webworker/workers/node/libsession/*.node' && webpack --config=./libsession.worker.config.js" + "worker:libsession": "rimraf 'ts/webworker/workers/node/libsession/*.node' && webpack --config=./libsession.worker.config.js", + "prepare": "husky install" }, "dependencies": { "@emoji-mart/data": "^1.1.2", @@ -182,8 +183,10 @@ "eslint-plugin-react": "^7.33.0", "eslint-plugin-react-hooks": "^4.6.0", "events": "^3.3.0", + "husky": "^8.0.0", "jsdom": "^22.1.0", "jsdom-global": "^3.0.2", + "lint-staged": "^14.0.1", "mini-css-extract-plugin": "^2.7.5", "mocha": "10.0.0", "node-loader": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 94940ec04..e1fc95875 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,12 +20,13 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== +"@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" + integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== dependencies: - "@babel/highlight" "^7.22.5" + "@babel/highlight" "^7.22.10" + chalk "^2.4.2" "@babel/compat-data@^7.22.9": version "7.22.9" @@ -33,32 +34,32 @@ integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.14.8": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" - integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.9" - "@babel/helper-compilation-targets" "^7.22.9" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.6" - "@babel/parser" "^7.22.7" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.8" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.1" -"@babel/generator@^7.22.7", "@babel/generator@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" - integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== +"@babel/generator@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" + integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.22.10" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -70,10 +71,10 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" - integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== +"@babel/helper-compilation-targets@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz#01d648bbc25dd88f513d862ee0df27b7d4e67024" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== dependencies: "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" @@ -81,10 +82,10 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.9.tgz#c36ea240bb3348f942f08b0fbe28d6d979fab236" - integrity sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ== +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.10.tgz#dd2612d59eac45588021ac3d6fa976d08f4e95a3" + integrity sha512-5IBb77txKYQPpOEdUdIhBx8VrZyDCQ+H82H0+5dX1TmuscP5vJKEE3cKurjtIw/vFwzbVH48VweE78kVDBrqjA== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.5" @@ -198,28 +199,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helpers@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd" - integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA== +"@babel/helpers@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a" + integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== dependencies: "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.6" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== +"@babel/highlight@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" + integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== dependencies: "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.20.15", "@babel/parser@^7.22.5", "@babel/parser@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== +"@babel/parser@^7.20.15", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" + integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ== "@babel/plugin-proposal-class-properties@^7.14.5": version "7.18.6" @@ -397,12 +398,12 @@ "@babel/helper-simple-access" "^7.22.5" "@babel/plugin-transform-typescript@^7.22.5": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.9.tgz#91e08ad1eb1028ecc62662a842e93ecfbf3c7234" - integrity sha512-BnVR1CpKiuD0iobHPaM1iLvcwPYN2uVFAqoLVSpEDKWuOikoCv5HbKLxclhKYUXlWkX86DoZGtqI4XhbOsyrMg== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.10.tgz#aadd98fab871f0bb5717bcc24c31aaaa455af923" + integrity sha512-7++c8I/ymsDo4QQBAgbraXLzIM6jmfao11KgIBEYZRReWzNWH9NtNgJcyrZiXsOPh523FQm6LfpLyy/U5fn46A== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.22.9" + "@babel/helper-create-class-features-plugin" "^7.22.10" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-typescript" "^7.22.5" @@ -425,11 +426,11 @@ regenerator-runtime "^0.13.2" "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.18.3", "@babel/runtime@^7.3.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" - integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" + integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== dependencies: - regenerator-runtime "^0.13.11" + regenerator-runtime "^0.14.0" "@babel/template@^7.22.5": version "7.22.5" @@ -440,26 +441,26 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.4.5": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" - integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== +"@babel/traverse@^7.22.10", "@babel/traverse@^7.4.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa" + integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig== dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/types" "^7.22.5" + "@babel/parser" "^7.22.10" + "@babel/types" "^7.22.10" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@babel/types@^7.22.10", "@babel/types@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" + integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.5" @@ -628,10 +629,10 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== "@jridgewell/set-array@^1.0.1": version "1.1.2" @@ -646,23 +647,18 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@jsdoc/salty@^0.2.1": version "0.2.5" @@ -974,9 +970,9 @@ "@types/estree" "*" "@types/eslint@*": - version "8.44.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.1.tgz#d1811559bb6bcd1a76009e3f7883034b78a0415e" - integrity sha512-XpNDc4Z5Tb4x+SW1MriMVeIsMoONHCkWFMkR/aPJbzEsxqHy+4Glu/BqTdPrApfDeMaXbtNh6bseNgl5KaWrSg== + version "8.44.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" + integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -1153,14 +1149,14 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>=13.7.0": - version "20.4.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69" - integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg== + version "20.4.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85" + integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg== "@types/node@^18.11.18": - version "18.17.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.1.tgz#84c32903bf3a09f7878c391d31ff08f6fe7d8335" - integrity sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw== + version "18.17.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.3.tgz#409febdc84478b452306a8112c692e800ad9f6fe" + integrity sha512-2x8HWtFk0S99zqVQABU9wTpr8wPoaDHZUcAkoTKH+nL7kPv3WUI9cRi/Kk5Mz4xdqXSqTkKP7IWNoQQYCnDsTA== "@types/pify@3.0.2": version "3.0.2" @@ -1212,21 +1208,21 @@ "@types/prop-types" "*" "@types/react" "*" -"@types/react@*", "@types/react@^17", "@types/react@^17.0.2": - version "17.0.62" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3" - integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw== +"@types/react@*", "@types/react@17.0.2", "@types/react@^17": + version "17.0.2" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8" + integrity sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA== dependencies: "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@17.0.2": - version "17.0.2" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8" - integrity sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA== +"@types/react@^17.0.2": + version "17.0.62" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.62.tgz#2efe8ddf8533500ec44b1334dd1a97caa2f860e3" + integrity sha512-eANCyz9DG8p/Vdhr0ZKST8JV12PhH2ACCDYlFw6DIO+D+ca+uP4jtEDEpVqXZrh/uZdXQGwk7whJa3ah5DtyLw== dependencies: "@types/prop-types" "*" + "@types/scheduler" "*" csstype "^3.0.2" "@types/redux-logger@3.0.7": @@ -1354,15 +1350,15 @@ "@types/node" "*" "@typescript-eslint/eslint-plugin@^6.1.0": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.1.tgz#41b79923fee46a745a3a50cba1c33c622aa3c79a" - integrity sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw== + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.3.0.tgz#e751e148aab7ccaf8a7bfd370f7ce9e6bdd1f3f4" + integrity sha512-IZYjYZ0ifGSLZbwMqIip/nOamFiWJ9AH+T/GYNZBWkVcyNQOFGtSMoWV7RvY4poYCMZ/4lHzNl796WOSNxmk8A== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/type-utils" "6.2.1" - "@typescript-eslint/utils" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/type-utils" "6.3.0" + "@typescript-eslint/utils" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -1372,71 +1368,71 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.1.0": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.2.1.tgz#e18a31eea1cca8841a565f1701960c8123ed07f9" - integrity sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg== + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.3.0.tgz#359684c443f4f848db3c4f14674f544f169c8f46" + integrity sha512-ibP+y2Gr6p0qsUkhs7InMdXrwldjxZw66wpcQq9/PzAroM45wdwyu81T+7RibNCh8oc0AgrsyCwJByncY0Ongg== dependencies: - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/typescript-estree" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/typescript-estree" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz#b6f43a867b84e5671fe531f2b762e0b68f7cf0c4" - integrity sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q== +"@typescript-eslint/scope-manager@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.3.0.tgz#6b74e338c4b88d5e1dfc1a28c570dd5cf8c86b09" + integrity sha512-WlNFgBEuGu74ahrXzgefiz/QlVb+qg8KDTpknKwR7hMH+lQygWyx0CQFoUmMn1zDkQjTBBIn75IxtWss77iBIQ== dependencies: - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" -"@typescript-eslint/type-utils@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.2.1.tgz#8eb8a2cccdf39cd7cf93e02bd2c3782dc90b0525" - integrity sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ== +"@typescript-eslint/type-utils@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.3.0.tgz#3bf89ccd36621ddec1b7f8246afe467c67adc247" + integrity sha512-7Oj+1ox1T2Yc8PKpBvOKWhoI/4rWFd1j7FA/rPE0lbBPXTKjdbtC+7Ev0SeBjEKkIhKWVeZSP+mR7y1Db1CdfQ== dependencies: - "@typescript-eslint/typescript-estree" "6.2.1" - "@typescript-eslint/utils" "6.2.1" + "@typescript-eslint/typescript-estree" "6.3.0" + "@typescript-eslint/utils" "6.3.0" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.2.1.tgz#7fcdeceb503aab601274bf5e210207050d88c8ab" - integrity sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ== +"@typescript-eslint/types@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.3.0.tgz#84517f1427923e714b8418981e493b6635ab4c9d" + integrity sha512-K6TZOvfVyc7MO9j60MkRNWyFSf86IbOatTKGrpTQnzarDZPYPVy0oe3myTMq7VjhfsUAbNUW8I5s+2lZvtx1gg== -"@typescript-eslint/typescript-estree@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz#2af6e90c1e91cb725a5fe1682841a3f74549389e" - integrity sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q== +"@typescript-eslint/typescript-estree@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.3.0.tgz#20e1e10e2f51cdb9e19a2751215cac92c003643c" + integrity sha512-Xh4NVDaC4eYKY4O3QGPuQNp5NxBAlEvNQYOqJquR2MePNxO11E5K3t5x4M4Mx53IZvtpW+mBxIT0s274fLUocg== dependencies: - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/visitor-keys" "6.2.1" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.2.1.tgz#2aa4279ec13053d05615bcbde2398e1e8f08c334" - integrity sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ== +"@typescript-eslint/utils@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.3.0.tgz#0898c5e374372c2092ca1b979ea7ee9cc020ce84" + integrity sha512-hLLg3BZE07XHnpzglNBG8P/IXq/ZVXraEbgY7FM0Cnc1ehM8RMdn9mat3LubJ3KBeYXXPxV1nugWbQPjGeJk6Q== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.2.1" - "@typescript-eslint/types" "6.2.1" - "@typescript-eslint/typescript-estree" "6.2.1" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/typescript-estree" "6.3.0" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz#442e7c09fe94b715a54ebe30e967987c3c41fbf4" - integrity sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA== +"@typescript-eslint/visitor-keys@6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.3.0.tgz#8d09aa3e389ae0971426124c155ac289afbe450a" + integrity sha512-kEhRRj7HnvaSjux1J9+7dBen15CdWmDnwrpyiHsFX6Qx2iW5LOBUgNefOFeh2PjWPlNwN8TOn6+4eBU3J/gupw== dependencies: - "@typescript-eslint/types" "6.2.1" + "@typescript-eslint/types" "6.3.0" eslint-visitor-keys "^3.4.1" "@ungap/promise-all-settled@1.1.2": @@ -1690,7 +1686,14 @@ ansi-colors@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-regex@^2.0.0, ansi-regex@^4.1.1, ansi-regex@^5.0.1: +ansi-escapes@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-5.0.0.tgz#b6a0caf0eef0c41af190e9a749e0c00ec04bb2a6" + integrity sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA== + dependencies: + type-fest "^1.0.2" + +ansi-regex@^2.0.0, ansi-regex@^4.1.1, ansi-regex@^5.0.1, ansi-regex@^6.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== @@ -1719,6 +1722,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.0.0, ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" @@ -2261,9 +2269,9 @@ camelize@^1.0.0: integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== caniuse-lite@^1.0.30001517: - version "1.0.30001518" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz#b3ca93904cb4699c01218246c4d77a71dbe97150" - integrity sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA== + version "1.0.30001519" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601" + integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== catharsis@^0.9.0: version "0.9.0" @@ -2297,6 +2305,11 @@ chai@^4.3.4: pathval "^1.1.1" type-detect "^4.0.5" +chalk@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2308,7 +2321,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2385,6 +2398,13 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -2393,6 +2413,14 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" +cli-truncate@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== + dependencies: + slice-ansi "^5.0.0" + string-width "^5.0.0" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -2480,7 +2508,7 @@ color-support@^1.1.3: resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -colorette@^2.0.14: +colorette@^2.0.14, colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -2502,6 +2530,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" + integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== + commander@2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" @@ -2928,6 +2961,11 @@ dtrace-provider@~0.8: dependencies: nan "^2.14.0" +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ejs@^3.1.7: version "3.1.9" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" @@ -3007,9 +3045,9 @@ electron-publish@23.6.0: mime "^2.5.2" electron-to-chromium@^1.4.477: - version "1.4.480" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.480.tgz#40e32849ca50bc23ce29c1516c5adb3fddac919d" - integrity sha512-IXTgg+bITkQv/FLP9FjX6f9KFCs5hQWeh5uNSKxB9mqYj/JXhHDbu+ekS43LVvbkL3eW6/oZy4+r9Om6lan1Uw== + version "1.4.487" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.487.tgz#e2ef8b15f2791bf68fa6f38f2656f1a551d360ae" + integrity sha512-XbCRs/34l31np/p33m+5tdBrdXu9jJkZxSbNxj5I0H1KtV2ZMSB+i/HYqDiRzHaFx2T5EdytjoBRe8QRJE2vQg== electron-updater@^4.2.2: version "4.6.5" @@ -3026,9 +3064,9 @@ electron-updater@^4.2.2: semver "^7.3.5" electron@*: - version "25.3.2" - resolved "https://registry.yarnpkg.com/electron/-/electron-25.3.2.tgz#4ca096ea85abf05cbbc42e60da9e2c3a7b87dd80" - integrity sha512-xiktJvXraaE/ARf2OVHFyTze1TksSbsbJgOaBtdIiBvUduez6ipATEPIec8Msz1n6eQ+xqYb6YF8tDuIZtJSPw== + version "25.4.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-25.4.0.tgz#d45b1cf3e4e96eb5bff5fee704d7aa13b532f3a5" + integrity sha512-VLTRxDhL4UvQbqM7pTNENnJo62cdAPZT92N+B7BZQ5Xfok1wuVPEewIjBot4K7U3EpLUuHn1veeLzho3ihiP+Q== dependencies: "@electron/get" "^2.0.0" "@types/node" "^18.11.18" @@ -3053,6 +3091,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" @@ -3240,18 +3283,18 @@ eslint-config-airbnb-base@^15.0.0: semver "^6.3.0" eslint-config-prettier@^8.8.0: - version "8.9.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.9.0.tgz#094b6254b2804b0544f7cee535f802b6d29ee10b" - integrity sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" eslint-module-utils@^2.8.0: version "2.8.0" @@ -3447,11 +3490,31 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +execa@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + execa@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" @@ -3796,6 +3859,11 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -4092,6 +4160,16 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== + +husky@^8.0.0: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== + hyphenate-style-name@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" @@ -4147,9 +4225,9 @@ immer@^9.0.7: integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== immutable@^4.0.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.1.tgz#17988b356097ab0719e2f741d56f3ec6c317f9dc" - integrity sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A== + version "4.3.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.2.tgz#f89d910f8dfb6e15c03b2cae2faaf8c1f66455fe" + integrity sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA== import-fresh@^3.2.1: version "3.3.0" @@ -4291,10 +4369,10 @@ is-ci@^3.0.0: dependencies: ci-info "^3.2.0" -is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.12.1, is-core-module@^2.9.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.9.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -4320,6 +4398,11 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + is-glob@^4.0.0, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -4404,6 +4487,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -4812,6 +4900,11 @@ libsodium-wrappers-sumo@^0.7.9: dependencies: libsodium-sumo "^0.7.11" +lilconfig@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" + integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== + linkify-it@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" @@ -4826,6 +4919,34 @@ linkify-it@^4.0.1: dependencies: uc.micro "^1.0.1" +lint-staged@^14.0.1: + version "14.0.1" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-14.0.1.tgz#57dfa3013a3d60762d9af5d9c83bdb51291a6232" + integrity sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw== + dependencies: + chalk "5.3.0" + commander "11.0.0" + debug "4.3.4" + execa "7.2.0" + lilconfig "2.1.0" + listr2 "6.6.1" + micromatch "4.0.5" + pidtree "0.6.0" + string-argv "0.3.2" + yaml "2.3.1" + +listr2@6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-6.6.1.tgz#08b2329e7e8ba6298481464937099f4a2cd7f95d" + integrity sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg== + dependencies: + cli-truncate "^3.1.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^5.0.1" + rfdc "^1.3.0" + wrap-ansi "^8.1.0" + loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" @@ -4897,6 +5018,17 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-update@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-5.0.1.tgz#9e928bf70cb183c1f0c9e91d9e6b7115d597ce09" + integrity sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw== + dependencies: + ansi-escapes "^5.0.0" + cli-cursor "^4.0.0" + slice-ansi "^5.0.0" + strip-ansi "^7.0.1" + wrap-ansi "^8.0.1" + long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" @@ -5030,7 +5162,7 @@ mic-recorder-to-mp3@^2.2.2: dependencies: lamejs "^1.2.0" -micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: +micromatch@4.0.5, micromatch@^4.0.0, micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -5060,6 +5192,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -5294,6 +5431,13 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + npmlog@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -5393,6 +5537,13 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -5573,6 +5724,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -5610,6 +5766,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pidtree@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== + pify@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" @@ -5898,9 +6059,9 @@ rc-slider@^10.2.1: rc-util "^5.27.0" rc-util@^5.27.0: - version "5.35.0" - resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.35.0.tgz#bed1986248b7be525cc0894109e609ac60207f29" - integrity sha512-MTXlixb3EoSTEchsOc7XWsVyoUQqoCsh2Z1a2IptwNgqleMF6ZgQeY52UzUbNj5CcVBg9YljOWjuOV07jSSm4Q== + version "5.36.0" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.36.0.tgz#be21995071e148f81141edb6f767062db5170224" + integrity sha512-a4uUvT+UNHvYL+awzbN8H8zAjfduwY4KAp2wQy40wOz3NyBdo3Xhx/EAAPyDkHLoGm535jIACaMhIqExGiAjHw== dependencies: "@babel/runtime" "^7.18.3" react-is "^16.12.0" @@ -6152,11 +6313,16 @@ redux@^4.0.0, redux@^4.1.2: dependencies: "@babel/runtime" "^7.9.2" -regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2: +regenerator-runtime@^0.13.2: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" @@ -6234,12 +6400,12 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.3: - version "1.22.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283" - integrity sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw== +resolve@^1.20.0, resolve@^1.22.3, resolve@^1.22.4: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: - is-core-module "^2.12.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -6259,6 +6425,14 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -6274,6 +6448,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + rimraf@2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" @@ -6591,6 +6770,14 @@ slice-ansi@^3.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + smart-buffer@^4.0.2, smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -6699,6 +6886,11 @@ stat-mode@^1.0.0: resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-1.0.0.tgz#68b55cb61ea639ff57136f36b216a291800d1465" integrity sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg== +string-argv@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -6708,6 +6900,15 @@ stat-mode@^1.0.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.0, string-width@^5.0.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -6770,6 +6971,13 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -6780,6 +6988,11 @@ 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-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-json-comments@3.1.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" @@ -7054,6 +7267,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^1.0.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== + typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -7435,6 +7653,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7500,6 +7727,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" + integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== + yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" From 22036000a665532820904ab3ffc2df83c88f1369 Mon Sep 17 00:00:00 2001 From: William Grant Date: Fri, 1 Sep 2023 15:50:34 +1000 Subject: [PATCH 40/45] feat: added conventional commit requirement use npx for husky hooks --- .husky/commit-msg | 4 + .husky/pre-commit | 2 +- CONTRIBUTING.md | 18 +- commitlint.config.js | 1 + package.json | 3 + yarn.lock | 772 +++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 764 insertions(+), 36 deletions(-) create mode 100755 .husky/commit-msg create mode 100644 commitlint.config.js diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..b56767669 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no -- commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit index 5a182ef10..d24fdfc60 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn lint-staged +npx lint-staged diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20772c6be..55805cf13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ It's a good idea to gauge interest in your intended work by finding the current for it or creating a new one yourself. Use Github issues as a place to signal your intentions and get feedback from the users most likely to appreciate your changes. -You're most likely to have your pull request accepted if it addresses an existing Github issue marked with the [good-first-issue](https://github.com/oxen-io/session-desktop/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) tag, these issues are specifically tagged, because they are generally features/bug fixes which can be cleanly merged on a single platform without requiring cross platform work, are generally of lower complexity than larger features and are non contentious, meaning that the core team doesn't need to try and assess the community desire for such a feature before merging. +You're most likely to have your pull request accepted if it addresses an existing Github issue marked with the [good-first-issue](https://github.com/oxen-io/session-desktop/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) tag, these issues are specifically tagged, because they are generally features/bug fixes which can be cleanly merged on a single platform without requiring cross platform work, are generally of lower complexity than larger features and are non contentious, meaning that the core team doesn't need to try and assess the community desire for such a feature before merging. Of course we encourage community developers to work on ANY issue filed on our Github regardless of how it’s tagged, however if you pick up or create an issue without the “Good first issue” tag it would be best if you leave a comment on the issue so that the core team can give you any guidance required, especially around UI heavy features or issues which require cross platform integration. @@ -45,10 +45,10 @@ Building on Windows versions 8+ is supported out of the box 1. Install `make` 1. Depending on your distro, you might need to install `hunspell` and `hunspell-` (e.g. `hunspell-en-au`) -If you are using a Debian based Linux distribution gcc, g++ and make can be installed as part of the `build-essential` package using +If you are using a Debian based Linux distribution gcc, g++ and make can be installed as part of the `build-essential` package using -``` -apt install build-essential +``` +apt install build-essential ``` ### All platforms @@ -129,6 +129,16 @@ Please write tests! Our testing framework is The easiest way to run all tests at once is `yarn test`. +## Committing your changes + +Before a commit is accepted the staged changes will be formatted using [prettier](https://prettier.io/) and linted using [eslint](https://eslint.org/). The commit will be reverted if files are formatted or lint errors are returned. + +### Commit Message Convention + +This project follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) + +Commit messages will be checked using [husky](https://typicode.github.io/husky/#/) and [commitlint](https://commitlint.js.org/). + ## Pull requests So you wanna make a pull request? Please observe the following guidelines. diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..422b19445 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = { extends: ['@commitlint/config-conventional'] }; diff --git a/package.json b/package.json index 8fc6f5e62..a53ead86d 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,9 @@ "webrtc-adapter": "^4.1.1" }, "devDependencies": { + "@commitlint/cli": "^17.7.1", + "@commitlint/config-conventional": "^17.7.0", + "@commitlint/types": "^17.4.4", "@electron/notarize": "^2.1.0", "@types/backbone": "1.4.2", "@types/blueimp-load-image": "5.14.4", diff --git a/yarn.lock b/yarn.lock index e1fc95875..1e738901e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,6 +20,14 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@babel/code-frame@^7.0.0": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" @@ -217,6 +225,15 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.13.tgz#9cda839e5d3be9ca9e8c26b6dd69e7548f0cbf16" + integrity sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.20.15", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" @@ -466,6 +483,174 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" +"@commitlint/cli@^17.7.1": + version "17.7.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.7.1.tgz#f3ab35bd38d82fcd4ab03ec5a1e9db26d57fe1b0" + integrity sha512-BCm/AT06SNCQtvFv921iNhudOHuY16LswT0R3OeolVGLk8oP+Rk9TfQfgjH7QPMjhvp76bNqGFEcpKojxUNW1g== + dependencies: + "@commitlint/format" "^17.4.4" + "@commitlint/lint" "^17.7.0" + "@commitlint/load" "^17.7.1" + "@commitlint/read" "^17.5.1" + "@commitlint/types" "^17.4.4" + execa "^5.0.0" + lodash.isfunction "^3.0.9" + resolve-from "5.0.0" + resolve-global "1.0.0" + yargs "^17.0.0" + +"@commitlint/config-conventional@^17.7.0": + version "17.7.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.7.0.tgz#1bbf2bce7851db63c1a8aa8d924277ad4938247e" + integrity sha512-iicqh2o6et+9kWaqsQiEYZzfLbtoWv9uZl8kbI8EGfnc0HeGafQBF7AJ0ylN9D/2kj6txltsdyQs8+2fTMwWEw== + dependencies: + conventional-changelog-conventionalcommits "^6.1.0" + +"@commitlint/config-validator@^17.6.7": + version "17.6.7" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.6.7.tgz#c664d42a1ecf5040a3bb0843845150f55734df41" + integrity sha512-vJSncmnzwMvpr3lIcm0I8YVVDJTzyjy7NZAeXbTXy+MPUdAr9pKyyg7Tx/ebOQ9kqzE6O9WT6jg2164br5UdsQ== + dependencies: + "@commitlint/types" "^17.4.4" + ajv "^8.11.0" + +"@commitlint/ensure@^17.6.7": + version "17.6.7" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-17.6.7.tgz#77a77a0c05e6a1c34589f59e82e6cb937101fc4b" + integrity sha512-mfDJOd1/O/eIb/h4qwXzUxkmskXDL9vNPnZ4AKYKiZALz4vHzwMxBSYtyL2mUIDeU9DRSpEUins8SeKtFkYHSw== + dependencies: + "@commitlint/types" "^17.4.4" + lodash.camelcase "^4.3.0" + lodash.kebabcase "^4.1.1" + lodash.snakecase "^4.1.1" + lodash.startcase "^4.4.0" + lodash.upperfirst "^4.3.1" + +"@commitlint/execute-rule@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz#4518e77958893d0a5835babe65bf87e2638f6939" + integrity sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA== + +"@commitlint/format@^17.4.4": + version "17.4.4" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-17.4.4.tgz#0f6e1b4d7a301c7b1dfd4b6334edd97fc050b9f5" + integrity sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ== + dependencies: + "@commitlint/types" "^17.4.4" + chalk "^4.1.0" + +"@commitlint/is-ignored@^17.7.0": + version "17.7.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.7.0.tgz#df9b284420bdb1aed5fdb2be44f4e98cc4826014" + integrity sha512-043rA7m45tyEfW7Zv2vZHF++176MLHH9h70fnPoYlB1slKBeKl8BwNIlnPg4xBdRBVNPaCqvXxWswx2GR4c9Hw== + dependencies: + "@commitlint/types" "^17.4.4" + semver "7.5.4" + +"@commitlint/lint@^17.7.0": + version "17.7.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.7.0.tgz#33f831298dc43679e4de6b088aea63d1f884c7e7" + integrity sha512-TCQihm7/uszA5z1Ux1vw+Nf3yHTgicus/+9HiUQk+kRSQawByxZNESeQoX9ujfVd3r4Sa+3fn0JQAguG4xvvbA== + dependencies: + "@commitlint/is-ignored" "^17.7.0" + "@commitlint/parse" "^17.7.0" + "@commitlint/rules" "^17.7.0" + "@commitlint/types" "^17.4.4" + +"@commitlint/load@^17.7.1": + version "17.7.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.7.1.tgz#0723b11723a20043a304a74960602dead89b5cdd" + integrity sha512-S/QSOjE1ztdogYj61p6n3UbkUvweR17FQ0zDbNtoTLc+Hz7vvfS7ehoTMQ27hPSjVBpp7SzEcOQu081RLjKHJQ== + dependencies: + "@commitlint/config-validator" "^17.6.7" + "@commitlint/execute-rule" "^17.4.0" + "@commitlint/resolve-extends" "^17.6.7" + "@commitlint/types" "^17.4.4" + "@types/node" "20.4.7" + chalk "^4.1.0" + cosmiconfig "^8.0.0" + cosmiconfig-typescript-loader "^4.0.0" + lodash.isplainobject "^4.0.6" + lodash.merge "^4.6.2" + lodash.uniq "^4.5.0" + resolve-from "^5.0.0" + ts-node "^10.8.1" + typescript "^4.6.4 || ^5.0.0" + +"@commitlint/message@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-17.4.2.tgz#f4753a79701ad6db6db21f69076e34de6580e22c" + integrity sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q== + +"@commitlint/parse@^17.7.0": + version "17.7.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-17.7.0.tgz#aacb2d189e50ab8454154b1df150aaf20478ae47" + integrity sha512-dIvFNUMCUHqq5Abv80mIEjLVfw8QNuA4DS7OWip4pcK/3h5wggmjVnlwGCDvDChkw2TjK1K6O+tAEV78oxjxag== + dependencies: + "@commitlint/types" "^17.4.4" + conventional-changelog-angular "^6.0.0" + conventional-commits-parser "^4.0.0" + +"@commitlint/read@^17.5.1": + version "17.5.1" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.5.1.tgz#fec903b766e2c41e3cefa80630040fcaba4f786c" + integrity sha512-7IhfvEvB//p9aYW09YVclHbdf1u7g7QhxeYW9ZHSO8Huzp8Rz7m05aCO1mFG7G8M+7yfFnXB5xOmG18brqQIBg== + dependencies: + "@commitlint/top-level" "^17.4.0" + "@commitlint/types" "^17.4.4" + fs-extra "^11.0.0" + git-raw-commits "^2.0.11" + minimist "^1.2.6" + +"@commitlint/resolve-extends@^17.6.7": + version "17.6.7" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.6.7.tgz#9c53a4601c96ab2dd20b90fb35c988639307735d" + integrity sha512-PfeoAwLHtbOaC9bGn/FADN156CqkFz6ZKiVDMjuC2N5N0740Ke56rKU7Wxdwya8R8xzLK9vZzHgNbuGhaOVKIg== + dependencies: + "@commitlint/config-validator" "^17.6.7" + "@commitlint/types" "^17.4.4" + import-fresh "^3.0.0" + lodash.mergewith "^4.6.2" + resolve-from "^5.0.0" + resolve-global "^1.0.0" + +"@commitlint/rules@^17.7.0": + version "17.7.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-17.7.0.tgz#b97a4933c5cba11a659a19ee467f6f000f31533e" + integrity sha512-J3qTh0+ilUE5folSaoK91ByOb8XeQjiGcdIdiB/8UT1/Rd1itKo0ju/eQVGyFzgTMYt8HrDJnGTmNWwcMR1rmA== + dependencies: + "@commitlint/ensure" "^17.6.7" + "@commitlint/message" "^17.4.2" + "@commitlint/to-lines" "^17.4.0" + "@commitlint/types" "^17.4.4" + execa "^5.0.0" + +"@commitlint/to-lines@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-17.4.0.tgz#9bd02e911e7d4eab3fb4a50376c4c6d331e10d8d" + integrity sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg== + +"@commitlint/top-level@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-17.4.0.tgz#540cac8290044cf846fbdd99f5cc51e8ac5f27d6" + integrity sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g== + dependencies: + find-up "^5.0.0" + +"@commitlint/types@^17.4.4": + version "17.4.4" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-17.4.4.tgz#1416df936e9aad0d6a7bbc979ecc31e55dade662" + integrity sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ== + dependencies: + chalk "^4.1.0" + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@develar/schema-utils@~2.6.5": version "2.6.5" resolved "https://registry.yarnpkg.com/@develar/schema-utils/-/schema-utils-2.6.5.tgz#3ece22c5838402419a6e0425f85742b961d9b6c6" @@ -629,7 +814,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== @@ -652,6 +837,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.19" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" @@ -868,6 +1061,26 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@types/backbone@1.4.2": version "1.4.2" resolved "https://registry.yarnpkg.com/@types/backbone/-/backbone-1.4.2.tgz#2af5ca6536d4cd510842eea6eeea11a42fa704b9" @@ -1130,6 +1343,11 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== +"@types/minimist@^1.2.0": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + "@types/mocha@5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.0.0.tgz#a3014921991066193f6c8e47290d4d598dfd19e6" @@ -1153,11 +1371,21 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85" integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg== +"@types/node@20.4.7": + version "20.4.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.7.tgz#74d323a93f1391a63477b27b9aec56669c98b2ab" + integrity sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g== + "@types/node@^18.11.18": version "18.17.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.3.tgz#409febdc84478b452306a8112c692e800ad9f6fe" integrity sha512-2x8HWtFk0S99zqVQABU9wTpr8wPoaDHZUcAkoTKH+nL7kPv3WUI9cRi/Kk5Mz4xdqXSqTkKP7IWNoQQYCnDsTA== +"@types/normalize-package-data@^2.4.0": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + "@types/pify@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@types/pify/-/pify-3.0.2.tgz#1bc75dac43e31dba981c37e0a08edddc1b49cd39" @@ -1601,6 +1829,14 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abab@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" @@ -1623,7 +1859,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -1664,7 +1905,7 @@ ajv@^6.10.0, ajv@^6.12.0, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.9.0: +ajv@^8.0.0, ajv@^8.11.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -1817,6 +2058,11 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -1830,6 +2076,11 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== + array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" @@ -1900,6 +2151,11 @@ arraybuffer.prototype.slice@^1.0.1: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== + asar@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/asar/-/asar-3.2.0.tgz#e6edb5edd6f627ebef04db62f771c61bea9c1221" @@ -2258,6 +2514,20 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -2562,6 +2832,14 @@ commander@^8.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +compare-func@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" + integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== + dependencies: + array-ify "^1.0.0" + dot-prop "^5.1.0" + compare-version@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080" @@ -2602,6 +2880,30 @@ console-control-strings@^1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== +conventional-changelog-angular@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz#a9a9494c28b7165889144fd5b91573c4aa9ca541" + integrity sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg== + dependencies: + compare-func "^2.0.0" + +conventional-changelog-conventionalcommits@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-6.1.0.tgz#3bad05f4eea64e423d3d90fc50c17d2c8cf17652" + integrity sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw== + dependencies: + compare-func "^2.0.0" + +conventional-commits-parser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz#02ae1178a381304839bce7cea9da5f1b549ae505" + integrity sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg== + dependencies: + JSONStream "^1.3.5" + is-text-path "^1.0.1" + meow "^8.1.2" + split2 "^3.2.2" + convert-source-map@^1.7.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" @@ -2619,6 +2921,21 @@ core-util-is@1.0.2: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== +cosmiconfig-typescript-loader@^4.0.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz#f3feae459ea090f131df5474ce4b1222912319f9" + integrity sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw== + +cosmiconfig@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== + dependencies: + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + country-code-lookup@^0.0.19: version "0.0.19" resolved "https://registry.yarnpkg.com/country-code-lookup/-/country-code-lookup-0.0.19.tgz#3fbf0192758ecf0d5eee0efbc220d62706c50fd6" @@ -2631,6 +2948,11 @@ crc@^3.8.0: dependencies: buffer "^5.1.0" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-env@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941" @@ -2727,6 +3049,11 @@ csstype@^3.0.2, csstype@^3.0.6: version "0.0.4" resolved "https://github.com/oxen-io/curve25519-js#102f8c0a31b5c58bad8606979036cf763be9f4f6" +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== + data-urls@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" @@ -2757,6 +3084,19 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +decamelize-keys@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" + integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + decamelize@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" @@ -2839,7 +3179,7 @@ diff@5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -diff@^4.0.2: +diff@^4.0.1, diff@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== @@ -2937,7 +3277,7 @@ dompurify@^2.0.7: resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.7.tgz#277adeb40a2c84be2d42a8bcd45f582bfa4d0cfc" integrity sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ== -dot-prop@^5.2.0: +dot-prop@^5.1.0, dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== @@ -3148,6 +3488,13 @@ err-code@^2.0.2: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + error-stack-parser@^2.0.6: version "2.1.4" resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" @@ -3530,6 +3877,21 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + expect@=27.2.5: version "27.2.5" resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" @@ -3670,7 +4032,7 @@ find-up@5.0.0, find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^4.0.0: +find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -3757,6 +4119,15 @@ fs-extra@^10.0.0, fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.0.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -3859,7 +4230,7 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" -get-stream@^6.0.1: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -3877,6 +4248,17 @@ getobject@^1.0.0: resolved "https://registry.yarnpkg.com/getobject/-/getobject-1.1.1.tgz#29f7858609fee7ef1c58d062f1b2335e425bdb45" integrity sha512-Rftr+NsUMxFcCmFopFmyCCfsJPaqUmf7TW61CtKMu0aE93ir62I6VjXt2koiCQgcunGgVog/U6g24tBPq67rlg== +git-raw-commits@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" + integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== + dependencies: + dargs "^7.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + glob-parent@^5.1.2, glob-parent@^6.0.1, glob-parent@^6.0.2, glob-parent@~5.1.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" @@ -3959,6 +4341,13 @@ global-agent@^3.0.0: semver "^7.3.2" serialize-error "^7.0.1" +global-dirs@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== + dependencies: + ini "^1.3.4" + global-dirs@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.1.tgz#0c488971f066baceda21447aecb1a8b911d22485" @@ -4036,6 +4425,11 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -4111,7 +4505,12 @@ hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0, hoist-non-react- dependencies: react-is "^16.7.0" -hosted-git-info@^4.1.0: +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +hosted-git-info@^4.0.1, hosted-git-info@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== @@ -4160,6 +4559,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + human-signals@^4.3.0: version "4.3.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" @@ -4229,7 +4633,7 @@ immutable@^4.0.0: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.2.tgz#f89d910f8dfb6e15c03b2cae2faaf8c1f66455fe" integrity sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA== -import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -4255,6 +4659,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -4268,7 +4677,7 @@ inherits@2, inherits@^2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@2.0.0, ini@^1.3.6, ini@~1.3.0: +ini@2.0.0, ini@^1.3.4, ini@^1.3.6, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -4328,6 +4737,11 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -4369,7 +4783,7 @@ is-ci@^3.0.0: dependencies: ci-info "^3.2.0" -is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.9.0: +is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -4450,6 +4864,11 @@ is-path-inside@^3.0.2, is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== + is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" @@ -4506,6 +4925,13 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-text-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w== + dependencies: + text-extensions "^1.0.0" + is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.12" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" @@ -4742,7 +5168,7 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-even-better-errors@^2.3.1: +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -4788,6 +5214,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + "jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" @@ -4820,7 +5251,7 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" -kind-of@^6.0.2: +kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -4905,6 +5336,11 @@ lilconfig@2.1.0: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + linkify-it@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" @@ -4980,6 +5416,11 @@ lodash-es@^4.2.1: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.escaperegexp@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" @@ -4995,16 +5436,51 @@ lodash.isequal@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== +lodash.isfunction@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" + integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== + lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== +lodash.kebabcase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.mergewith@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== + +lodash.snakecase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== + +lodash.startcase@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" + integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== + +lodash.upperfirst@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== + lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -5084,6 +5560,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + map-age-cleaner@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" @@ -5091,6 +5572,16 @@ map-age-cleaner@^0.1.3: dependencies: p-defer "^1.0.0" +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== + +map-obj@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== + markdown-it-anchor@^8.4.1: version "8.6.7" resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" @@ -5145,6 +5636,23 @@ memory-stream@^1.0.0: dependencies: readable-stream "^3.4.0" +meow@^8.0.0, meow@^8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "4.1.0" + normalize-package-data "^3.0.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.18.0" + yargs-parser "^20.2.3" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -5207,6 +5715,11 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + mini-css-extract-plugin@^2.7.5: version "2.7.6" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz#282a3d38863fddcd2e0c220aaed5b90bc156564d" @@ -5221,6 +5734,15 @@ mini-css-extract-plugin@^2.7.5: dependencies: brace-expansion "^1.1.7" +minimist-options@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + kind-of "^6.0.3" + minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -5414,6 +5936,26 @@ node-releases@^2.0.13: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-package-data@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== + dependencies: + hosted-git-info "^4.0.1" + is-core-module "^2.5.0" + semver "^7.3.4" + validate-npm-package-license "^3.0.1" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -5424,7 +5966,7 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -5530,7 +6072,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -5677,6 +6219,16 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + parse5@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" @@ -6032,6 +6584,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -6244,7 +6801,26 @@ read-last-lines-ts@^1.2.1: resolved "https://registry.yarnpkg.com/read-last-lines-ts/-/read-last-lines-ts-1.2.1.tgz#99e46288c5373c06e16e90e666a46b595dad80a1" integrity sha512-1VcCrAU38DILYiF4sbNY13zdrMGwrFqjGQnXJy28G1zLJItvnWtgCbqoAJlnZZSiEICMKdM4Ol7LYvVMEoKrAg== -readable-stream@^3.4.0, readable-stream@^3.6.0: +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -6267,6 +6843,14 @@ rechoir@^0.8.0: dependencies: resolve "^1.20.0" +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== + dependencies: + indent-string "^4.0.0" + strip-indent "^3.0.0" + redux-logger@3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-3.0.6.tgz#f7555966f3098f3c88604c449cf0baf5778274bf" @@ -6390,17 +6974,24 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-from@5.0.0, resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-global@1.0.0, resolve-global@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255" + integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw== + dependencies: + global-dirs "^0.1.1" -resolve@^1.20.0, resolve@^1.22.3, resolve@^1.22.4: +resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.3, resolve@^1.22.4: version "1.22.4" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== @@ -6640,23 +7231,23 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.4: +semver@7.5.4, semver@^7.1.2, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + serialize-error@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" @@ -6733,7 +7324,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -6840,6 +7431,39 @@ sourcemap-codec@^1.4.8: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + +split2@^3.0.0, split2@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + sprintf-js@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" @@ -6993,6 +7617,13 @@ strip-final-newline@^3.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + strip-json-comments@3.1.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" @@ -7126,6 +7757,11 @@ terser@^5.14.2, terser@^5.16.8: commander "^2.20.0" source-map-support "~0.5.20" +text-extensions@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -7136,6 +7772,18 @@ throttle-debounce@^3.0.1: resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" integrity sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg== +through2@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== + dependencies: + readable-stream "3" + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + tmp-promise@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -7196,6 +7844,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +trim-newlines@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" + integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== + truncate-utf8-bytes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b" @@ -7223,6 +7876,25 @@ ts-loader@^9.4.2: micromatch "^4.0.0" semver "^7.3.4" +ts-node@^10.8.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -7262,11 +7934,26 @@ type-fest@^0.13.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.18.0: + version "0.18.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== + type-fest@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + type-fest@^1.0.2: version "1.4.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" @@ -7318,6 +8005,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +"typescript@^4.6.4 || ^5.0.0": + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + typescript@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" @@ -7448,6 +8140,19 @@ uuid@8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + verror@^1.10.0: version "1.10.1" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.1.tgz#4bf09eeccf4563b109ed4b3d458380c972b0cdeb" @@ -7742,7 +8447,7 @@ yargs-parser@20.2.4: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== @@ -7775,7 +8480,7 @@ yargs@16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.1, yargs@^17.6.0: +yargs@^17.0.0, yargs@^17.0.1, yargs@^17.6.0: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -7803,6 +8508,11 @@ yazl@^2.5.1: dependencies: buffer-crc32 "~0.2.3" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From db8c309954c61a0bcade1ffdc2ae08fb426f154c Mon Sep 17 00:00:00 2001 From: William Grant Date: Fri, 1 Sep 2023 16:08:20 +1000 Subject: [PATCH 41/45] fix: no longer need to run yarn watch to fix eslint unresolved imports in vs code --- .eslintrc.js | 5 +++++ .lintstagedrc.js | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6b9ace6d5..20c5dcbfe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,6 +2,11 @@ module.exports = { root: true, settings: { 'import/core-modules': ['electron'], + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + }, react: { version: 'detect', }, diff --git a/.lintstagedrc.js b/.lintstagedrc.js index f42943d40..3ce2ca9d5 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,4 +1,10 @@ -const ignoredFiles = ['package.json', 'yarn.lock', 'tsconfig.json', '.lintstagedrc.js']; +const ignoredFiles = [ + 'package.json', + 'yarn.lock', + 'tsconfig.json', + '.lintstagedrc.js', + '.eslintrc.js', +]; const path = require('path'); @@ -15,7 +21,7 @@ const buildLintCommand = filenames => { .map(f => path.relative(process.cwd(), f)) .filter(f => !ignoredFiles.includes(f)); - return results.length ? `eslint ${results.join(' ')}`: ''; + return results.length ? `eslint ${results.join(' ')}` : ''; }; module.exports = { From 4cd4193b6bb6e2f5e609ac21eb969b4ce865316a Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 4 Sep 2023 10:50:56 +1000 Subject: [PATCH 42/45] chore: add caching to eslint on git commit --- .lintstagedrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 3ce2ca9d5..61152b6fb 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -21,7 +21,7 @@ const buildLintCommand = filenames => { .map(f => path.relative(process.cwd(), f)) .filter(f => !ignoredFiles.includes(f)); - return results.length ? `eslint ${results.join(' ')}` : ''; + return results.length ? `eslint --cache ${results.join(' ')}` : ''; }; module.exports = { From ff656de82b26d23e0618bfb351650e52656ad0f2 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 4 Sep 2023 16:33:59 +1000 Subject: [PATCH 43/45] fix: lint-staged ignores files using eslintignore --- .lintstagedrc.js | 53 ++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 61152b6fb..d1b83dbc7 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,25 +1,38 @@ -const ignoredFiles = [ - 'package.json', - 'yarn.lock', - 'tsconfig.json', - '.lintstagedrc.js', - '.eslintrc.js', -]; - -const path = require('path'); - -const buildFormatCommand = filenames => { - const results = filenames - .map(f => path.relative(process.cwd(), f)) - .filter(f => !ignoredFiles.includes(f)); - - return results.length ? `prettier --list-different --write ${results.join(' ')}` : ''; +const { ESLint } = require('eslint'); + +const removeIgnoredFiles = async files => { + const eslint = new ESLint(); + const isIgnored = await Promise.all( + files.map(file => { + return eslint.isPathIgnored(file); + }) + ); + const filteredFiles = files.filter((_, i) => !isIgnored[i]); + return filteredFiles.join(' '); +}; + +const buildFormatCommand = async files => { + const filesToLint = await removeIgnoredFiles(files); + + if (!filesToLint || !filesToLint.length) { + return ''; + } + + const results = filesToLint.map(f => path.relative(process.cwd(), f)); + + return results.length + ? `prettier --ignore-unknown --list-different --write ${results.join(' ')}` + : ''; }; -const buildLintCommand = filenames => { - const results = filenames - .map(f => path.relative(process.cwd(), f)) - .filter(f => !ignoredFiles.includes(f)); +const buildLintCommand = async files => { + const filesToLint = await removeIgnoredFiles(files); + + if (!filesToLint || !filesToLint.length) { + return ''; + } + + const results = filesToLint.map(f => path.relative(process.cwd(), f)); return results.length ? `eslint --cache ${results.join(' ')}` : ''; }; From 153a6499ef2c8137cb32d1521185dc0707b7b204 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 4 Sep 2023 16:37:46 +1000 Subject: [PATCH 44/45] chore: disable pre commit lint-staged hook for now buildLintCommand is broken if you have a lint error in a file the commit fails silently --- .husky/pre-commit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d24fdfc60..9d4f45ace 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npx lint-staged +# Disabling this hook for now because the BuildLintCommand has issues. If you have an error in a file that eslint catches the commit fails silently instead of explaining the error (Will 04/09/2023) +# npx lint-staged From a973f62f6375e44a0b84c3b6eb68e265f60f97f6 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 5 Sep 2023 10:51:48 +1000 Subject: [PATCH 45/45] chore: add supported platforms in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3e2dd66d3..3c938cad6 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about Please search for any [existing issues](https://github.com/oxen-io/session-desktop/issues) that describe your bug in order to avoid duplicate submissions.

Submissions can be made by making a pull request to our development branch.If you don't know where to start contributing please read [Contributing.md](CONTRIBUTING.md) and refer to issues tagged with the [Good-first-issue](https://github.com/oxen-io/session-desktop/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) tag. +## Supported platforms + +Session requires Windows 10 or later, macOS Catalina (10.15) or later, or a linux distribution with glibc 2.28 or later like Debian 10 or Ubuntu 20.04. + ## Build instruction Build instructions can be found in [Contributing.md](CONTRIBUTING.md).