From ca090a701cfd42e80015cfb236fd437ea040362f Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 12 Mar 2024 05:23:14 +0530 Subject: [PATCH 01/53] setup theme for helpdot --- docs/_sass/_colors.scss | 58 +++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index f0c89d31c580..c9473925d791 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,22 +1,46 @@ -// Product Color Spectrum -$color-product-dark-100: #061B09; -$color-product-dark-200: #072419; -$color-product-dark-300: #0A2E25; -$color-product-dark-400: #1A3D32; -$color-product-dark-500: #224F41; -$color-product-dark-600: #2A604F; -$color-product-dark-700: #8B9C8F; -$color-product-dark-800: #AFBBB0; -$color-product-dark-900: #E7ECE9; +@media (prefers-color-scheme: dark) { + // Product Color Spectrum + $color-product-dark-100: #061B09; + $color-product-dark-200: #072419; + $color-product-dark-300: #0A2E25; + $color-product-dark-400: #1A3D32; + $color-product-dark-500: #224F41; + $color-product-dark-600: #2A604F; + $color-product-dark-700: #8B9C8F; + $color-product-dark-800: #AFBBB0; + $color-product-dark-900: #E7ECE9; -// Colors for Links and Success -$color-blue200: #B0D9FF; -$color-blue300: #5AB0FF; -$color-green400: #03D47C; -$color-green500: #00a862; + // Colors for Links and Success + $color-blue200: #B0D9FF; + $color-blue300: #5AB0FF; + $color-green400: #03D47C; + $color-green500: #00a862; -// Overlay BG color -$color-overlay-background: rgba(26, 61, 50, 0.72); + // Overlay BG color + $color-overlay-background: rgba(26, 61, 50, 0.72); +} + +@media (prefers-color-scheme: light) { + // Product Color Spectrum + $color-product-dark-100: #061B09; + $color-product-dark-200: #072419; + $color-product-dark-300: #0A2E25; + $color-product-dark-400: #1A3D32; + $color-product-dark-500: #224F41; + $color-product-dark-600: #2A604F; + $color-product-dark-700: #8B9C8F; + $color-product-dark-800: #AFBBB0; + $color-product-dark-900: #E7ECE9; + + // Colors for Links and Success + $color-blue200: #B0D9FF; + $color-blue300: #5AB0FF; + $color-green400: #03D47C; + $color-green500: #00a862; + + // Overlay BG color + $color-overlay-background: rgba(26, 61, 50, 0.72); +} // UI Colors $color-text: $color-product-dark-900; From 283c4de6983d0fe856e280d068a2e2b320b329e1 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 12 Mar 2024 05:23:21 +0530 Subject: [PATCH 02/53] setup theme for helpdot --- docs/_sass/_colors.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index c9473925d791..22af28974281 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -58,3 +58,4 @@ $color-button-background: $color-product-dark-400; $color-button-background-hover: $color-product-dark-500; $color-button-success-background: $color-green400; $color-button-success-background-hover: $color-green500; +$color-overlay: $color-overlay-background; From efaa96a5f02d592032bb7ed48d2850dbd65a5be0 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 12 Mar 2024 05:23:25 +0530 Subject: [PATCH 03/53] setup theme for helpdot --- docs/_sass/_search-bar.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index f414d25fc266..5c58d70b5851 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -67,7 +67,7 @@ left: 0; right: 0; bottom: 0; - background-color: $color-overlay-background; + background-color: $color-overlay; z-index: 1; } From 6ab4523d8d089c491b657a5b0cb1500e8c5429f0 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 13 Mar 2024 11:09:46 +0700 Subject: [PATCH 04/53] add optimistic created action for iou report and create created action for chat report --- src/libs/actions/IOU.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index af5c40836c74..781d0025c94a 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3249,6 +3249,7 @@ function getSendMoneyParams( true, ); + const optimisticCreatedActionForChatReport = ReportUtils.buildOptimisticCreatedReportAction(recipientEmail); const reportPreviewAction = ReportUtils.buildOptimisticReportPreview(chatReport, optimisticIOUReport); // Change the method to set for new reports because it doesn't exist yet, is faster, @@ -3296,6 +3297,9 @@ function getSendMoneyParams( ...(optimisticIOUReportAction as OnyxTypes.ReportAction), pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, }, + [optimisticCreatedActionForIOUReport.reportActionID]: { + ...(optimisticCreatedActionForIOUReport as OnyxTypes.ReportAction), + }, }, }; const optimisticChatReportActionsData: OnyxUpdate = { @@ -3424,7 +3428,7 @@ function getSendMoneyParams( if (optimisticChatReportActionsData.value) { // Add an optimistic created action to the optimistic chat reportActions data - optimisticChatReportActionsData.value[optimisticCreatedActionForIOUReport.reportActionID] = optimisticCreatedActionForIOUReport; + optimisticChatReportActionsData.value[optimisticCreatedActionForChatReport.reportActionID] = optimisticCreatedActionForChatReport; } } else { failureData.push({ @@ -3460,7 +3464,7 @@ function getSendMoneyParams( paymentMethodType, transactionID: optimisticTransaction.transactionID, newIOUReportDetails, - createdReportActionID: isNewChat ? optimisticCreatedActionForIOUReport.reportActionID : '0', + createdReportActionID: isNewChat ? optimisticCreatedActionForChatReport.reportActionID : '0', reportPreviewReportActionID: reportPreviewAction.reportActionID, transactionThreadReportID: optimisticTransactionThread.reportID, createdReportActionIDForThread: optimisticCreatedActionForTransactionThread.reportActionID, From f327edf4601b3a28029893bb4e7850e1fe40b22b Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 14 Mar 2024 14:45:11 +0700 Subject: [PATCH 05/53] create created action for report report in buildOptimisticMoneyRequestEntities function --- src/libs/ReportUtils.ts | 14 ++++--- src/libs/actions/IOU.ts | 89 ++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 52 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 8dc1c9967f13..851f8960cb50 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -3958,10 +3958,11 @@ function buildTransactionThread(reportAction: OnyxEntry): boolean { diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 781d0025c94a..6fe41cff87fa 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -914,22 +914,22 @@ function getMoneyRequestInformation( // 4. The transaction thread, which requires the iouAction, and CREATED action for the transaction thread // 5. REPORTPREVIEW action for the chatReport // Note: The CREATED action for the IOU report must be optimistically generated before the IOU action so there's no chance that it appears after the IOU action in the chat - const optimisticCreatedActionForChat = ReportUtils.buildOptimisticCreatedReportAction(payeeEmail); - const [optimisticCreatedActionForIOUReport, iouAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = ReportUtils.buildOptimisticMoneyRequestEntities( - iouReport, - CONST.IOU.REPORT_ACTION_TYPE.CREATE, - amount, - currency, - comment, - payeeEmail, - [participant], - optimisticTransaction.transactionID, - undefined, - false, - false, - receiptObject, - false, - ); + const [optimisticCreatedActionForChat, optimisticCreatedActionForIOUReport, iouAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = + ReportUtils.buildOptimisticMoneyRequestEntities( + iouReport, + CONST.IOU.REPORT_ACTION_TYPE.CREATE, + amount, + currency, + comment, + payeeEmail, + [participant], + optimisticTransaction.transactionID, + undefined, + false, + false, + receiptObject, + false, + ); let reportPreviewAction = shouldCreateNewMoneyRequestReport ? null : ReportActionsUtils.getReportPreviewAction(chatReport.reportID, iouReport.reportID); if (reportPreviewAction) { @@ -1887,17 +1887,17 @@ function createSplitsAndOnyxData( // 3. IOU action for the iouReport // 4. Transaction Thread and the CREATED action for it // 5. REPORTPREVIEW action for the chatReport - const oneOnOneCreatedActionForChat = ReportUtils.buildOptimisticCreatedReportAction(currentUserEmailForIOUSplit); - const [oneOnOneCreatedActionForIOU, oneOnOneIOUAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = ReportUtils.buildOptimisticMoneyRequestEntities( - oneOnOneIOUReport, - CONST.IOU.REPORT_ACTION_TYPE.CREATE, - splitAmount, - currency, - comment, - currentUserEmailForIOUSplit, - [participant], - oneOnOneTransaction.transactionID, - ); + const [oneOnOneCreatedActionForChat, oneOnOneCreatedActionForIOU, oneOnOneIOUAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = + ReportUtils.buildOptimisticMoneyRequestEntities( + oneOnOneIOUReport, + CONST.IOU.REPORT_ACTION_TYPE.CREATE, + splitAmount, + currency, + comment, + currentUserEmailForIOUSplit, + [participant], + oneOnOneTransaction.transactionID, + ); // Add optimistic personal details for new participants const oneOnOnePersonalDetailListAction: OnyxTypes.PersonalDetailsList = shouldCreateOptimisticPersonalDetails @@ -2507,18 +2507,18 @@ function completeSplitBill(chatReportID: string, reportAction: OnyxTypes.ReportA updatedTransaction.billable, ); - const oneOnOneCreatedActionForChat = ReportUtils.buildOptimisticCreatedReportAction(currentUserEmailForIOUSplit); - const [oneOnOneCreatedActionForIOU, oneOnOneIOUAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = ReportUtils.buildOptimisticMoneyRequestEntities( - oneOnOneIOUReport, - CONST.IOU.REPORT_ACTION_TYPE.CREATE, - splitAmount, - currency ?? '', - updatedTransaction.comment.comment ?? '', - currentUserEmailForIOUSplit, - [participant], - oneOnOneTransaction.transactionID, - undefined, - ); + const [oneOnOneCreatedActionForChat, oneOnOneCreatedActionForIOU, oneOnOneIOUAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = + ReportUtils.buildOptimisticMoneyRequestEntities( + oneOnOneIOUReport, + CONST.IOU.REPORT_ACTION_TYPE.CREATE, + splitAmount, + currency ?? '', + updatedTransaction.comment.comment ?? '', + currentUserEmailForIOUSplit, + [participant], + oneOnOneTransaction.transactionID, + undefined, + ); let oneOnOneReportPreviewAction = ReportActionsUtils.getReportPreviewAction(oneOnOneChatReport?.reportID ?? '', oneOnOneIOUReport?.reportID ?? ''); if (oneOnOneReportPreviewAction) { @@ -3234,7 +3234,7 @@ function getSendMoneyParams( value: optimisticTransaction, }; - const [optimisticCreatedActionForIOUReport, optimisticIOUReportAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = + const [optimisticCreatedActionForChat, optimisticCreatedActionForIOUReport, optimisticIOUReportAction, optimisticTransactionThread, optimisticCreatedActionForTransactionThread] = ReportUtils.buildOptimisticMoneyRequestEntities( optimisticIOUReport, CONST.IOU.REPORT_ACTION_TYPE.PAY, @@ -3249,7 +3249,6 @@ function getSendMoneyParams( true, ); - const optimisticCreatedActionForChatReport = ReportUtils.buildOptimisticCreatedReportAction(recipientEmail); const reportPreviewAction = ReportUtils.buildOptimisticReportPreview(chatReport, optimisticIOUReport); // Change the method to set for new reports because it doesn't exist yet, is faster, @@ -3293,13 +3292,11 @@ function getSendMoneyParams( onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticIOUReport.reportID}`, value: { + [optimisticCreatedActionForIOUReport.reportActionID]: optimisticCreatedActionForIOUReport, [optimisticIOUReportAction.reportActionID]: { ...(optimisticIOUReportAction as OnyxTypes.ReportAction), pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, }, - [optimisticCreatedActionForIOUReport.reportActionID]: { - ...(optimisticCreatedActionForIOUReport as OnyxTypes.ReportAction), - }, }, }; const optimisticChatReportActionsData: OnyxUpdate = { @@ -3428,7 +3425,7 @@ function getSendMoneyParams( if (optimisticChatReportActionsData.value) { // Add an optimistic created action to the optimistic chat reportActions data - optimisticChatReportActionsData.value[optimisticCreatedActionForChatReport.reportActionID] = optimisticCreatedActionForChatReport; + optimisticChatReportActionsData.value[optimisticCreatedActionForChat.reportActionID] = optimisticCreatedActionForChat; } } else { failureData.push({ @@ -3464,7 +3461,7 @@ function getSendMoneyParams( paymentMethodType, transactionID: optimisticTransaction.transactionID, newIOUReportDetails, - createdReportActionID: isNewChat ? optimisticCreatedActionForChatReport.reportActionID : '0', + createdReportActionID: isNewChat ? optimisticCreatedActionForChat.reportActionID : '0', reportPreviewReportActionID: reportPreviewAction.reportActionID, transactionThreadReportID: optimisticTransactionThread.reportID, createdReportActionIDForThread: optimisticCreatedActionForTransactionThread.reportActionID, From d9eecf19085af720332cb6fda634bf90bd4cc505 Mon Sep 17 00:00:00 2001 From: nkdengineer <161821005+nkdengineer@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:33:20 +0700 Subject: [PATCH 06/53] Update src/libs/ReportUtils.ts Co-authored-by: Pavlo Tsimura --- src/libs/ReportUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 851f8960cb50..3e7e9cf92e91 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -3979,10 +3979,10 @@ function buildOptimisticMoneyRequestEntities( receipt: Receipt = {}, isOwnPolicyExpenseChat = false, ): [OptimisticCreatedReportAction, OptimisticCreatedReportAction, OptimisticIOUReportAction, OptimisticChatReport, OptimisticCreatedReportAction] { - const iouActionCreationTime = DateUtils.getDBTime(); + const createdActionForChat = buildOptimisticCreatedReportAction(payeeEmail); // The `CREATED` action must be optimistically generated before the IOU action so that it won't appear after the IOU action in the chat. - const createdActionForChat = buildOptimisticCreatedReportAction(payeeEmail); + const iouActionCreationTime = DateUtils.getDBTime(); const createdActionForIOUReport = buildOptimisticCreatedReportAction(payeeEmail, DateUtils.subtractMillisecondsFromDateTime(iouActionCreationTime, 1)); const iouAction = buildOptimisticIOUReportAction( type, From e89a1e46de212181b30ec34dfd39c9dece488342 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Mon, 18 Mar 2024 01:26:17 +0530 Subject: [PATCH 07/53] fix: Workspace - Error message is left and bottom aligned in WS menus. Signed-off-by: Krishna Gupta --- src/components/SelectionList/BaseListItem.tsx | 2 ++ .../SelectionList/TableListItem.tsx | 1 + src/components/SelectionList/types.ts | 3 ++ src/pages/workspace/WorkspacesListPage.tsx | 35 ++++++++++--------- src/styles/index.ts | 1 - 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 303b90a682e6..6acb9284db6b 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -16,6 +16,7 @@ function BaseListItem({ item, pressableStyle, wrapperStyle, + containerStyle, selectMultipleStyle, isDisabled = false, shouldPreventDefaultFocusOnSelectRow = false, @@ -62,6 +63,7 @@ function BaseListItem({ pendingAction={pendingAction} errors={errors} errorRowStyles={styles.ph5} + style={containerStyle} > = { /** Styles for the wrapper view */ wrapperStyle?: StyleProp; + /** Styles for the container view */ + containerStyle?: StyleProp; + /** Styles for the checkbox wrapper view if select multiple option is on */ selectMultipleStyle?: StyleProp; diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 02fe06e29ab3..549d307b2a2f 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -182,21 +182,22 @@ function WorkspacesListPage({policies, allPolicyMembers, reimbursementAccount, r } return ( - - {({hovered}) => ( - + + {({hovered}) => ( - - )} - + )} + + ); }, [isLessThanMediumScreen, styles.mb3, styles.mh5, styles.ph5, styles.hoveredComponentBG, translate], diff --git a/src/styles/index.ts b/src/styles/index.ts index df89cd823fa4..fc8b3427498a 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -4307,7 +4307,6 @@ const styles = (theme: ThemeColors) => paddingHorizontal: 16, paddingVertical: 16, marginHorizontal: 20, - marginBottom: 12, backgroundColor: theme.highlightBG, borderRadius: 8, }, From 3538559827fde2534c649051bce20c2fe8288397 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Mon, 18 Mar 2024 12:09:58 +0700 Subject: [PATCH 08/53] add createdIOUReportActionID param to sendMoney API --- src/libs/API/parameters/SendMoneyParams.ts | 1 + src/libs/actions/IOU.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libs/API/parameters/SendMoneyParams.ts b/src/libs/API/parameters/SendMoneyParams.ts index ac6f42de5aa5..449a87fb5313 100644 --- a/src/libs/API/parameters/SendMoneyParams.ts +++ b/src/libs/API/parameters/SendMoneyParams.ts @@ -9,6 +9,7 @@ type SendMoneyParams = { newIOUReportDetails: string; createdReportActionID: string; reportPreviewReportActionID: string; + createdIOUReportActionID: string; transactionThreadReportID: string; createdReportActionIDForThread: string; }; diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 6fe41cff87fa..fccc87f0b4ed 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3463,6 +3463,7 @@ function getSendMoneyParams( newIOUReportDetails, createdReportActionID: isNewChat ? optimisticCreatedActionForChat.reportActionID : '0', reportPreviewReportActionID: reportPreviewAction.reportActionID, + createdIOUReportActionID: optimisticCreatedActionForIOUReport.reportActionID, transactionThreadReportID: optimisticTransactionThread.reportID, createdReportActionIDForThread: optimisticCreatedActionForTransactionThread.reportActionID, }, From 204c59b80b8085c9007ad8abd6faeae3f984d1f3 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 18 Mar 2024 13:00:16 +0100 Subject: [PATCH 09/53] [TS migration] Migrate 'cherryPick.test.js' and 'authorChecklist.test.js' workflow tests --- package-lock.json | 1328 +++-------------- package.json | 3 +- tsconfig.json | 2 +- ...cklist.test.js => authorChecklist.test.ts} | 50 +- ...{cherryPick.test.js => cherryPick.test.ts} | 55 +- workflow_tests/jest.config.js | 2 +- 6 files changed, 262 insertions(+), 1178 deletions(-) rename workflow_tests/{authorChecklist.test.js => authorChecklist.test.ts} (79%) rename workflow_tests/{cherryPick.test.js => cherryPick.test.ts} (89%) diff --git a/package-lock.json b/package-lock.json index a84a72dd5167..f37509d05c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -235,6 +235,7 @@ "shellcheck": "^1.1.0", "style-loader": "^2.0.0", "time-analytics-webpack-plugin": "^0.1.17", + "ts-jest": "^29.1.2", "ts-node": "^10.9.2", "type-fest": "^4.10.2", "typescript": "^5.3.2", @@ -5411,28 +5412,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/console/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/console/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -5536,28 +5515,6 @@ } } }, - "node_modules/@jest/core/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -5626,86 +5583,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { - "version": "17.0.31", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/@jest/create-cache-key-function/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "license": "MIT", @@ -5719,86 +5596,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/environment/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/environment/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/environment/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/environment/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/environment/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/environment/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/@jest/environment/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/environment/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/expect": { "version": "29.6.2", "license": "MIT", @@ -5835,86 +5632,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/fake-timers/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/fake-timers/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/fake-timers/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/fake-timers/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/@jest/fake-timers/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/fake-timers/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/globals": { "version": "29.5.0", "license": "MIT", @@ -5928,86 +5645,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/globals/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/globals/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/globals/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/globals/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/globals/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/@jest/globals/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/globals/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/reporters": { "version": "29.4.1", "license": "MIT", @@ -6049,28 +5686,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/reporters/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -6190,86 +5805,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/test-result/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/test-result/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/test-result/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@jest/test-result/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/test-result/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/@jest/test-result/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/test-result/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/test-sequencer": { "version": "29.4.1", "license": "MIT", @@ -6307,28 +5842,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/transform/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -6403,17 +5916,19 @@ } }, "node_modules/@jest/types": { - "version": "26.6.2", - "license": "MIT", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dependencies": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^15.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types/node_modules/ansi-styles": { @@ -8364,6 +7879,29 @@ "ws": "^7.5.1" } }, + "node_modules/@react-native-community/cli-server-api/node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@react-native-community/cli-server-api/node_modules/@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@react-native-community/cli-server-api/node_modules/ansi-regex": { "version": "5.0.1", "license": "MIT", @@ -8384,6 +7922,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/@react-native-community/cli-server-api/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@react-native-community/cli-server-api/node_modules/color-convert": { "version": "2.0.1", "license": "MIT", @@ -8398,6 +7951,14 @@ "version": "1.1.4", "license": "MIT" }, + "node_modules/@react-native-community/cli-server-api/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/@react-native-community/cli-server-api/node_modules/pretty-format": { "version": "26.6.2", "license": "MIT", @@ -8415,6 +7976,17 @@ "version": "17.0.2", "license": "MIT" }, + "node_modules/@react-native-community/cli-server-api/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@react-native-community/cli-server-api/node_modules/ws": { "version": "7.5.9", "license": "MIT", @@ -18840,15 +18412,17 @@ } }, "node_modules/@types/yargs": { - "version": "15.0.15", - "license": "MIT", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "license": "MIT" + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, "node_modules/@types/yauzl": { "version": "2.10.0", @@ -22181,6 +21755,18 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bser": { "version": "2.1.1", "license": "Apache-2.0", @@ -31380,28 +30966,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-circus/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -31492,28 +31056,6 @@ } } }, - "node_modules/jest-cli/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -31615,28 +31157,6 @@ } } }, - "node_modules/jest-config/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-config/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -31790,28 +31310,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-each/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -31895,28 +31393,6 @@ } } }, - "node_modules/jest-environment-jsdom/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-environment-jsdom/node_modules/acorn": { "version": "8.11.3", "license": "MIT", @@ -31927,47 +31403,6 @@ "node": ">=0.4.0" } }, - "node_modules/jest-environment-jsdom/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-environment-jsdom/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-environment-jsdom/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, "node_modules/jest-environment-jsdom/node_modules/cssstyle": { "version": "2.3.0", "license": "MIT", @@ -32016,13 +31451,6 @@ "node": ">= 6" } }, - "node_modules/jest-environment-jsdom/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/jest-environment-jsdom/node_modules/html-encoding-sniffer": { "version": "3.0.0", "license": "MIT", @@ -32086,16 +31514,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/jest-environment-jsdom/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-environment-jsdom/node_modules/tr46": { "version": "3.0.0", "license": "MIT", @@ -32166,86 +31584,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-node/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/@types/yargs": { - "version": "17.0.31", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-environment-node/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-environment-node/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-environment-node/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-environment-node/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/jest-environment-node/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-node/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-expo": { "version": "50.0.1", "license": "MIT", @@ -32313,69 +31651,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/jest-haste-map/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-haste-map/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-haste-map/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-haste-map/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, "node_modules/jest-haste-map/node_modules/has-flag": { "version": "4.0.0", "license": "MIT", @@ -32409,16 +31684,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-haste-map/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-leak-detector": { "version": "29.4.1", "license": "MIT", @@ -32519,28 +31784,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-message-util/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -32611,86 +31854,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-mock/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-mock/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-mock/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-mock/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-mock/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/jest-mock/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-mock/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-pnp-resolver": { "version": "1.2.3", "license": "MIT", @@ -32830,28 +31993,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-runner/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -32976,28 +32117,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-runtime/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -33085,28 +32204,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-snapshot/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -33189,28 +32286,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-util/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -33284,28 +32359,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-validate/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -33599,28 +32652,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-watcher/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", @@ -33718,86 +32749,6 @@ "node": ">=8" } }, - "node_modules/jest/node_modules/@jest/types": { - "version": "29.6.3", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest/node_modules/@types/yargs": { - "version": "17.0.24", - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/jest/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jimp-compact": { "version": "0.16.1", "license": "MIT" @@ -34455,6 +33406,12 @@ "license": "MIT", "peer": true }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "dev": true, @@ -39536,6 +38493,29 @@ "node": ">=8" } }, + "node_modules/react-native/node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/react-native/node_modules/@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/react-native/node_modules/ansi-regex": { "version": "5.0.1", "license": "MIT", @@ -39556,6 +38536,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/react-native/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/react-native/node_modules/color-convert": { "version": "2.0.1", "license": "MIT", @@ -39582,6 +38577,14 @@ "node": ">=18" } }, + "node_modules/react-native/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/react-native/node_modules/mkdirp": { "version": "0.5.6", "license": "MIT", @@ -39630,6 +38633,17 @@ "loose-envify": "^1.1.0" } }, + "node_modules/react-native/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/react-native/node_modules/ws": { "version": "6.2.2", "license": "MIT", @@ -43843,6 +42857,58 @@ "version": "0.1.13", "license": "Apache-2.0" }, + "node_modules/ts-jest": { + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/ts-node": { "version": "10.9.2", "devOptional": true, diff --git a/package.json b/package.json index e0f357fd0f8a..54d6b10caf95 100644 --- a/package.json +++ b/package.json @@ -157,8 +157,8 @@ "react-native-plaid-link-sdk": "10.8.0", "react-native-qrcode-svg": "^6.2.0", "react-native-quick-sqlite": "^8.0.0-beta.2", - "react-native-release-profiler": "^0.1.6", "react-native-reanimated": "^3.7.2", + "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", "react-native-screens": "3.29.0", @@ -286,6 +286,7 @@ "shellcheck": "^1.1.0", "style-loader": "^2.0.0", "time-analytics-webpack-plugin": "^0.1.17", + "ts-jest": "^29.1.2", "ts-node": "^10.9.2", "type-fest": "^4.10.2", "typescript": "^5.3.2", diff --git a/tsconfig.json b/tsconfig.json index 30708f63d12b..79413fdd2ca7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -48,6 +48,6 @@ } }, "exclude": ["**/node_modules/*", "**/dist/*", ".github/actions/**/index.js", "**/docs/*"], - "include": ["src", "desktop", "web", "website", "docs", "assets", "config", "tests", "jest", "__mocks__", ".github/**/*", ".storybook/**/*"], + "include": ["src", "desktop", "web", "website", "docs", "assets", "config", "tests", "jest", "__mocks__", ".github/**/*", ".storybook/**/*", "workflow_tests"], "extends": "expo/tsconfig.base" } diff --git a/workflow_tests/authorChecklist.test.js b/workflow_tests/authorChecklist.test.ts similarity index 79% rename from workflow_tests/authorChecklist.test.js rename to workflow_tests/authorChecklist.test.ts index 831e7f695ba4..0a6193198546 100644 --- a/workflow_tests/authorChecklist.test.js +++ b/workflow_tests/authorChecklist.test.ts @@ -1,13 +1,15 @@ -const path = require('path'); -const kieMockGithub = require('@kie/mock-github'); -const utils = require('./utils/utils'); -const assertions = require('./assertions/authorChecklistAssertions'); -const mocks = require('./mocks/authorChecklistMocks'); -const eAct = require('./utils/ExtendedAct'); +import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; +import * as kieMockGithub from '@kie/mock-github'; +import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; +import path from 'path'; +import assertions from './assertions/authorChecklistAssertions'; +import mocks from './mocks/authorChecklistMocks'; +import eAct from './utils/ExtendedAct'; +import utils from './utils/utils'; jest.setTimeout(90 * 1000); -let mockGithub; -const FILES_TO_COPY_INTO_TEST_REPO = [ +let mockGithub: MockGithub; +const FILES_TO_COPY_INTO_TEST_REPO: CreateRepositoryFile[] = [ ...utils.deepCopy(utils.FILES_TO_COPY_INTO_TEST_REPO), { src: path.resolve(__dirname, '..', '.github', 'workflows', 'authorChecklist.yml'), @@ -18,7 +20,7 @@ const FILES_TO_COPY_INTO_TEST_REPO = [ describe('test workflow authorChecklist', () => { const githubToken = 'dummy_github_token'; - beforeAll(async () => { + beforeAll(() => { // in case of the tests being interrupted without cleanup the mock repo directory may be left behind // which breaks the next test run, this removes any possible leftovers utils.removeMockRepoDir(); @@ -47,11 +49,12 @@ describe('test workflow authorChecklist', () => { }; describe('actor is not OSBotify', () => { it('executes workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { @@ -66,11 +69,12 @@ describe('test workflow authorChecklist', () => { }); describe('actor is OSBotify', () => { it('does not execute workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { @@ -91,11 +95,12 @@ describe('test workflow authorChecklist', () => { }; describe('actor is not OSBotify', () => { it('executes workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { @@ -110,11 +115,12 @@ describe('test workflow authorChecklist', () => { }); describe('actor is OSBotify', () => { it('does not execute workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { @@ -135,11 +141,12 @@ describe('test workflow authorChecklist', () => { }; describe('actor is not OSBotify', () => { it('executes workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { @@ -154,11 +161,12 @@ describe('test workflow authorChecklist', () => { }); describe('actor is OSBotify', () => { it('does not execute workflow', async () => { - const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); - const testMockSteps = { + const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, }; const result = await act.runEvent(event, { diff --git a/workflow_tests/cherryPick.test.js b/workflow_tests/cherryPick.test.ts similarity index 89% rename from workflow_tests/cherryPick.test.js rename to workflow_tests/cherryPick.test.ts index 592170a7c64e..8d9a1c76a0fc 100644 --- a/workflow_tests/cherryPick.test.js +++ b/workflow_tests/cherryPick.test.ts @@ -1,13 +1,15 @@ -const path = require('path'); -const kieMockGithub = require('@kie/mock-github'); -const utils = require('./utils/utils'); -const assertions = require('./assertions/cherryPickAssertions'); -const mocks = require('./mocks/cherryPickMocks'); -const eAct = require('./utils/ExtendedAct'); +import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; +import * as kieMockGithub from '@kie/mock-github'; +import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; +import path from 'path'; +import assertions from './assertions/cherryPickAssertions'; +import mocks from './mocks/cherryPickMocks'; +import eAct from './utils/ExtendedAct'; +import utils from './utils/utils'; jest.setTimeout(90 * 1000); -let mockGithub; -const FILES_TO_COPY_INTO_TEST_REPO = [ +let mockGithub: MockGithub; +const FILES_TO_COPY_INTO_TEST_REPO: CreateRepositoryFile[] = [ ...utils.deepCopy(utils.FILES_TO_COPY_INTO_TEST_REPO), { src: path.resolve(__dirname, '..', '.github', 'workflows', 'cherryPick.yml'), @@ -16,7 +18,7 @@ const FILES_TO_COPY_INTO_TEST_REPO = [ ]; describe('test workflow cherryPick', () => { - beforeAll(async () => { + beforeAll(() => { // in case of the tests being interrupted without cleanup the mock repo directory may be left behind // which breaks the next test run, this removes any possible leftovers utils.removeMockRepoDir(); @@ -43,11 +45,12 @@ describe('test workflow cherryPick', () => { describe('actor is not deployer', () => { const actor = 'Dummy Author'; it('workflow ends after validate job', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -61,7 +64,7 @@ describe('test workflow cherryPick', () => { PULL_REQUEST_NUMBER: '1234', }, ); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(true, false), }; @@ -93,10 +96,10 @@ describe('test workflow cherryPick', () => { const mergeConflicts = false; const versionsMatch = true; it('behaviour is the same as with actor being the deployer', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts), }; @@ -112,6 +115,7 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -145,10 +149,10 @@ describe('test workflow cherryPick', () => { describe('version match', () => { const versionsMatch = true; it('workflow executes, PR approved and merged automatically', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); @@ -164,6 +168,7 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -193,10 +198,10 @@ describe('test workflow cherryPick', () => { describe('version does not match', () => { const versionsMatch = false; it('workflow executes, PR auto-assigned and commented, approved and merged automatically', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); @@ -212,6 +217,7 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -244,10 +250,10 @@ describe('test workflow cherryPick', () => { describe('version match', () => { const versionsMatch = true; it('workflow executes, PR auto-assigned and commented, not merged automatically', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); @@ -263,6 +269,7 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -292,10 +299,10 @@ describe('test workflow cherryPick', () => { describe('version does not match', () => { const versionsMatch = false; it('workflow executes, PR auto-assigned and commented, not merged automatically', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); @@ -311,6 +318,7 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -343,11 +351,12 @@ describe('test workflow cherryPick', () => { describe('automatic trigger', () => { const event = 'pull_request'; it('workflow does not execute', async () => { - const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') || ''; + const repoPath = mockGithub.repo.getPath('testCherryPickWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'cherryPick.yml'); let act = new eAct.ExtendedAct(repoPath, workflowPath); act = utils.setUpActParams( act, + // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -361,7 +370,7 @@ describe('test workflow cherryPick', () => { PULL_REQUEST_NUMBER: '1234', }, ); - const testMockSteps = { + const testMockSteps: MockStep = { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(true, false), }; diff --git a/workflow_tests/jest.config.js b/workflow_tests/jest.config.js index c8a4534764e3..1fe7e5d82440 100644 --- a/workflow_tests/jest.config.js +++ b/workflow_tests/jest.config.js @@ -1,7 +1,7 @@ module.exports = { verbose: true, transform: { - '^.+\\.jsx?$': 'babel-jest', + '^.+\\.tsx?$': 'ts-jest', }, clearMocks: true, resetMocks: true, From a53bdcc9bce7128043b9f390047199f1e74cbe12 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 18 Mar 2024 15:34:17 +0100 Subject: [PATCH 10/53] Re-run performance check From 6aae16a54e7d9d489f7b4142199541ac5d6339fc Mon Sep 17 00:00:00 2001 From: VickyStash Date: Tue, 19 Mar 2024 09:51:41 +0100 Subject: [PATCH 11/53] Code improvements, jest config update --- workflow_tests/authorChecklist.test.ts | 2 ++ workflow_tests/cherryPick.test.ts | 2 ++ workflow_tests/jest.config.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/workflow_tests/authorChecklist.test.ts b/workflow_tests/authorChecklist.test.ts index 0a6193198546..399ddeec3ffc 100644 --- a/workflow_tests/authorChecklist.test.ts +++ b/workflow_tests/authorChecklist.test.ts @@ -8,7 +8,9 @@ import eAct from './utils/ExtendedAct'; import utils from './utils/utils'; jest.setTimeout(90 * 1000); + let mockGithub: MockGithub; + const FILES_TO_COPY_INTO_TEST_REPO: CreateRepositoryFile[] = [ ...utils.deepCopy(utils.FILES_TO_COPY_INTO_TEST_REPO), { diff --git a/workflow_tests/cherryPick.test.ts b/workflow_tests/cherryPick.test.ts index 8d9a1c76a0fc..d0ff4a269d99 100644 --- a/workflow_tests/cherryPick.test.ts +++ b/workflow_tests/cherryPick.test.ts @@ -8,7 +8,9 @@ import eAct from './utils/ExtendedAct'; import utils from './utils/utils'; jest.setTimeout(90 * 1000); + let mockGithub: MockGithub; + const FILES_TO_COPY_INTO_TEST_REPO: CreateRepositoryFile[] = [ ...utils.deepCopy(utils.FILES_TO_COPY_INTO_TEST_REPO), { diff --git a/workflow_tests/jest.config.js b/workflow_tests/jest.config.js index 1fe7e5d82440..73780de981fc 100644 --- a/workflow_tests/jest.config.js +++ b/workflow_tests/jest.config.js @@ -1,7 +1,7 @@ module.exports = { verbose: true, transform: { - '^.+\\.tsx?$': 'ts-jest', + '^.+\\.(js|jsx|ts|tsx)$': ['ts-jest', {babelConfig: true}], }, clearMocks: true, resetMocks: true, From 5ae33e4ef520ebf2f63e49eee2042889ff465ead Mon Sep 17 00:00:00 2001 From: hurali97 Date: Tue, 19 Mar 2024 15:16:01 +0500 Subject: [PATCH 12/53] perf: remove not needed Intl polyfills by separating iOS and android --- src/libs/IntlPolyfill/index.android.ts | 17 +++++++++++++++++ src/libs/IntlPolyfill/index.ios.ts | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/libs/IntlPolyfill/index.android.ts create mode 100644 src/libs/IntlPolyfill/index.ios.ts diff --git a/src/libs/IntlPolyfill/index.android.ts b/src/libs/IntlPolyfill/index.android.ts new file mode 100644 index 000000000000..7a21ae26bfa4 --- /dev/null +++ b/src/libs/IntlPolyfill/index.android.ts @@ -0,0 +1,17 @@ +import polyfillListFormat from './polyfillListFormat'; +import type IntlPolyfill from './types'; + +/** + * Polyfill the Intl API, always performed for native devices. + */ +const intlPolyfill: IntlPolyfill = () => { + // Native devices require extra polyfills which are + // not yet implemented in hermes. + // see support: https://hermesengine.dev/docs/intl/ + + require('@formatjs/intl-locale/polyfill'); + + polyfillListFormat(); +}; + +export default intlPolyfill; diff --git a/src/libs/IntlPolyfill/index.ios.ts b/src/libs/IntlPolyfill/index.ios.ts new file mode 100644 index 000000000000..0660dfbc3fa3 --- /dev/null +++ b/src/libs/IntlPolyfill/index.ios.ts @@ -0,0 +1,23 @@ +import polyfillListFormat from './polyfillListFormat'; +import polyfillNumberFormat from './polyfillNumberFormat'; +import type IntlPolyfill from './types'; + +/** + * Polyfill the Intl API, always performed for native devices. + */ +const intlPolyfill: IntlPolyfill = () => { + // Native devices require extra polyfills which are + // not yet implemented in hermes. + // see support: https://hermesengine.dev/docs/intl/ + + require('@formatjs/intl-locale/polyfill'); + + // Required to polyfill NumberFormat on iOS + // see: https://github.com/facebook/hermes/issues/1172#issuecomment-1776156538 + require('@formatjs/intl-pluralrules/polyfill'); + polyfillNumberFormat(); + + polyfillListFormat(); +}; + +export default intlPolyfill; From 16ff03c6d324e3dc934da0660856ef2cc32e0fe6 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Tue, 19 Mar 2024 16:12:45 +0100 Subject: [PATCH 13/53] Simplify jest config for future updates --- workflow_tests/jest.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow_tests/jest.config.js b/workflow_tests/jest.config.js index 73780de981fc..cecdf8589d7f 100644 --- a/workflow_tests/jest.config.js +++ b/workflow_tests/jest.config.js @@ -1,7 +1,8 @@ module.exports = { verbose: true, transform: { - '^.+\\.(js|jsx|ts|tsx)$': ['ts-jest', {babelConfig: true}], + '^.+\\.jsx?$': 'babel-jest', + '^.+\\.tsx?$': 'ts-jest', }, clearMocks: true, resetMocks: true, From b29cc145da2abde09e6949127678ed220bced2ac Mon Sep 17 00:00:00 2001 From: Github Date: Tue, 19 Mar 2024 16:39:08 +0100 Subject: [PATCH 14/53] Fix deleted messages are shown until revisit page --- src/libs/Network/SequentialQueue.ts | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/libs/Network/SequentialQueue.ts b/src/libs/Network/SequentialQueue.ts index b22a9612a23f..fee8a0b437c7 100644 --- a/src/libs/Network/SequentialQueue.ts +++ b/src/libs/Network/SequentialQueue.ts @@ -1,5 +1,6 @@ import Onyx from 'react-native-onyx'; import * as ActiveClientManager from '@libs/ActiveClientManager'; +import {WRITE_COMMANDS} from '@libs/API/types'; import * as Request from '@libs/Request'; import * as RequestThrottle from '@libs/RequestThrottle'; import * as PersistedRequests from '@userActions/PersistedRequests'; @@ -45,6 +46,47 @@ function flushOnyxUpdatesQueue() { QueuedOnyxUpdates.flushQueue(); } +/** + * Identifies and removes conflicting requests from the queue + */ +function reconcileRequests(persistedRequests: OnyxRequest[], commands: string[]) { + const requestsByActionID: Record = {}; + + // Group requests by reportActionID + persistedRequests.forEach((request) => { + const {data} = request; + const reportActionID = data?.reportActionID as string; + if (reportActionID) { + if (!requestsByActionID[reportActionID]) { + requestsByActionID[reportActionID] = []; + } + requestsByActionID[reportActionID].push(request); + } + }); + + // Process requests with conflicting actions + Object.values(requestsByActionID).forEach((requests) => { + const conflictingRequests: OnyxRequest[] = []; + commands.forEach((command) => { + const conflictingRequest = requests.find((request) => request.command === command); + if (conflictingRequest) { + conflictingRequests.push(conflictingRequest); + } + }); + + if (conflictingRequests.length > 1) { + // Remove all requests as they cancel each other out + conflictingRequests.forEach((request) => { + // Perform action: Remove request from persisted requests + const index = persistedRequests.findIndex((req) => req === request); + if (index !== -1) { + persistedRequests.splice(index, 1); + } + }); + } + }); +} + /** * Process any persisted requests, when online, one at a time until the queue is empty. * @@ -63,6 +105,11 @@ function process(): Promise { if (persistedRequests.length === 0 || NetworkStore.isOffline()) { return Promise.resolve(); } + + // Remove conflicting requests from the queue to avoid processing them + const commands = [WRITE_COMMANDS.ADD_COMMENT, WRITE_COMMANDS.DELETE_COMMENT]; + reconcileRequests(persistedRequests, commands); + const requestToProcess = persistedRequests[0]; // Set the current request to a promise awaiting its processing so that getCurrentRequest can be used to take some action after the current request has processed. From f18cd852e1d94fef6884c26a736c5d4559973d0a Mon Sep 17 00:00:00 2001 From: hurali97 Date: Wed, 20 Mar 2024 13:02:43 +0500 Subject: [PATCH 15/53] refactor: remove index.native.ts from IntlPolyfill --- src/libs/IntlPolyfill/index.native.ts | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/libs/IntlPolyfill/index.native.ts diff --git a/src/libs/IntlPolyfill/index.native.ts b/src/libs/IntlPolyfill/index.native.ts deleted file mode 100644 index ca1c8f4c250e..000000000000 --- a/src/libs/IntlPolyfill/index.native.ts +++ /dev/null @@ -1,19 +0,0 @@ -import polyfillDateTimeFormat from './polyfillDateTimeFormat'; -import polyfillListFormat from './polyfillListFormat'; -import polyfillNumberFormat from './polyfillNumberFormat'; -import type IntlPolyfill from './types'; - -/** - * Polyfill the Intl API, always performed for native devices. - */ -const intlPolyfill: IntlPolyfill = () => { - // Native devices require extra polyfills - require('@formatjs/intl-getcanonicallocales/polyfill'); - require('@formatjs/intl-locale/polyfill'); - require('@formatjs/intl-pluralrules/polyfill'); - polyfillNumberFormat(); - polyfillDateTimeFormat(); - polyfillListFormat(); -}; - -export default intlPolyfill; From 91e40a3599cfd18bc5677e32801190c9fad10175 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Wed, 20 Mar 2024 13:12:24 +0500 Subject: [PATCH 16/53] fix: add DateTimeFormat polyfill --- src/libs/IntlPolyfill/index.ios.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/IntlPolyfill/index.ios.ts b/src/libs/IntlPolyfill/index.ios.ts index 0660dfbc3fa3..569b666eb434 100644 --- a/src/libs/IntlPolyfill/index.ios.ts +++ b/src/libs/IntlPolyfill/index.ios.ts @@ -1,3 +1,4 @@ +import polyfillDateTimeFormat from './polyfillDateTimeFormat'; import polyfillListFormat from './polyfillListFormat'; import polyfillNumberFormat from './polyfillNumberFormat'; import type IntlPolyfill from './types'; @@ -17,6 +18,10 @@ const intlPolyfill: IntlPolyfill = () => { require('@formatjs/intl-pluralrules/polyfill'); polyfillNumberFormat(); + // Required to polyfill DateTimeFormat on iOS + // see: https://github.com/facebook/hermes/issues/1172#issuecomment-1776156538 + polyfillDateTimeFormat(); + polyfillListFormat(); }; From 8f2f32312dd6dca33bc392ccab0687c25cf291f5 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Thu, 21 Mar 2024 23:37:12 +0530 Subject: [PATCH 17/53] use css vars for theme --- docs/_sass/_colors.scss | 96 +++++++++++++++---------------------- docs/_sass/_main.scss | 80 +++++++++++++++---------------- docs/_sass/_search-bar.scss | 54 ++++++++++----------- docs/assets/css/styles.scss | 1 + 4 files changed, 106 insertions(+), 125 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 22af28974281..37f5fc518f71 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,61 +1,41 @@ -@media (prefers-color-scheme: dark) { - // Product Color Spectrum - $color-product-dark-100: #061B09; - $color-product-dark-200: #072419; - $color-product-dark-300: #0A2E25; - $color-product-dark-400: #1A3D32; - $color-product-dark-500: #224F41; - $color-product-dark-600: #2A604F; - $color-product-dark-700: #8B9C8F; - $color-product-dark-800: #AFBBB0; - $color-product-dark-900: #E7ECE9; - - // Colors for Links and Success - $color-blue200: #B0D9FF; - $color-blue300: #5AB0FF; - $color-green400: #03D47C; - $color-green500: #00a862; - - // Overlay BG color - $color-overlay-background: rgba(26, 61, 50, 0.72); +:root { + // UI Colors + --color-text: #e7ece9; + --color-text-supporting: #afbbb0; + --color-icons: #8b9c8f; + --color-borders: #1a3d32; + --color-highlightBG: #072419; + --color-row-hover: #0a2e25; + --color-appBG: #061b09; + --color-success: #03d47c; + --color-accent: #03d47c; + --color-link: #5ab0ff; + --color-link-hovered: #b0d9ff; + --color-button-background: #1a3d32; + --color-button-background-hover: #224f41; + --color-button-success-background: #03d47c; + --color-button-success-background-hover: #00a862; + --color-overlay: rgba(26, 61, 50, 0.72); } -@media (prefers-color-scheme: light) { - // Product Color Spectrum - $color-product-dark-100: #061B09; - $color-product-dark-200: #072419; - $color-product-dark-300: #0A2E25; - $color-product-dark-400: #1A3D32; - $color-product-dark-500: #224F41; - $color-product-dark-600: #2A604F; - $color-product-dark-700: #8B9C8F; - $color-product-dark-800: #AFBBB0; - $color-product-dark-900: #E7ECE9; - - // Colors for Links and Success - $color-blue200: #B0D9FF; - $color-blue300: #5AB0FF; - $color-green400: #03D47C; - $color-green500: #00a862; - - // Overlay BG color - $color-overlay-background: rgba(26, 61, 50, 0.72); +@media (prefers-color-scheme: dark) { + :root { + // UI Colors + --color-text: #e7ece9; + --color-text-supporting: #afbbb0; + --color-icons: #8b9c8f; + --color-borders: #1a3d32; + --color-highlightBG: #072419; + --color-row-hover: #0a2e25; + --color-appBG: #061b09; + --color-success: #03d47c; + --color-accent: #03d47c; + --color-link: #5ab0ff; + --color-link-hovered: #b0d9ff; + --color-button-background: #1a3d32; + --color-button-background-hover: #224f41; + --color-button-success-background: #03d47c; + --color-button-success-background-hover: #00a862; + --color-overlay: rgba(26, 61, 50, 0.72); + } } - -// UI Colors -$color-text: $color-product-dark-900; -$color-text-supporting: $color-product-dark-800; -$color-icons: $color-product-dark-700; -$color-borders: $color-product-dark-400; -$color-highlightBG: $color-product-dark-200; -$color-row-hover: $color-product-dark-300; -$color-appBG: $color-product-dark-100; -$color-success: $color-green400; -$color-accent : $color-green400; -$color-link: $color-blue300; -$color-link-hovered: $color-blue200; -$color-button-background: $color-product-dark-400; -$color-button-background-hover: $color-product-dark-500; -$color-button-success-background: $color-green400; -$color-button-success-background-hover: $color-green500; -$color-overlay: $color-overlay-background; diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index ec0f76801bc7..d569215707ab 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -62,12 +62,12 @@ html, body { height: 100%; min-height: 100%; - background: $color-appBG; - color: $color-text-supporting; + background: var(--color-appBG); + color: var(--color-text-supporting); } hr { - background: $color-borders; + background: var(--color-borders); border: none; display: inline-block; width: 24px; @@ -84,7 +84,7 @@ em { } a { - color: $color-link; + color: var(--color-link); text-decoration: none; img { @@ -99,7 +99,7 @@ h4, h5, h6, summary { - color: $color-text; + color: var(--color-text); font-weight: bold; padding-bottom: 12px; } @@ -153,7 +153,7 @@ textarea { font-weight: 400; font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif; font-size: 16px; - color: $color-text-supporting; + color: var(--color-text-supporting); } button { @@ -164,15 +164,15 @@ button { font-weight: bold; &.success { - background-color: $color-button-success-background; - color: $color-text; + background-color: var(--color-button-success-background); + color: var(--color-text); width: 100%; border-radius: 100px; padding-left: 20px; padding-right: 20px; &:hover { - background-color: $color-button-success-background-hover; + background-color: var(--color-button-success-background-hover); cursor: pointer; } @@ -205,9 +205,9 @@ button { #lhn { position: fixed; - background-color: $color-highlightBG; + background-color: var(--color-highlightBG); box-sizing: border-box; - border-right-color: $color-borders; + border-right-color: var(--color-borders); border-right-width: 1px; border-style: solid; width: 100%; @@ -307,7 +307,7 @@ button { .selected { font-weight: bold; - color: $color-text; + color: var(--color-text); } .hide { @@ -383,7 +383,7 @@ button { // Box shadow is used here because border-radius and border-collapse don't work together. It leads to double borders. // https://stackoverflow.com/questions/628301/the-border-radius-property-and-border-collapsecollapse-dont-mix-how-can-i-use border-style: hidden; - box-shadow: 0 0 0 1px $color-borders; + box-shadow: 0 0 0 1px var(--color-borders); } th:first-child { @@ -405,12 +405,12 @@ button { th, td { padding: 6px 13px; - border: 1px solid $color-borders; + border: 1px solid var(--color-borders); } thead tr th { font-weight: bold; - background-color: $color-highlightBG; + background-color: var(--color-highlightBG); } .img-wrap { @@ -446,14 +446,14 @@ button { margin-bottom: 20px; padding-top: 20px; padding-left: 5%; - border-left: 5px solid #1B5744; + border-left: 5px solid var(--color-button-background-hover); em:before { content: "\“\a"; white-space: pre; font-size: 60px; line-height: 1em; - color: #03d47c; + color: var(--color-accent); } p:first-child { @@ -464,7 +464,7 @@ button { } .selector-container { - background-color: $color-highlightBG; + background-color: var(--color-highlightBG); display: flex; flex-direction: row-reverse; gap: 20px; @@ -485,7 +485,7 @@ button { height: 28px; border-radius: 20px; padding: 0px 26px 0px 12px; - color: $color-text; + color: var(--color-text); font-size: 11px; font-weight: 700; text-align: center; @@ -498,7 +498,7 @@ button { } select { - background: url("/assets/images/down.svg") no-repeat right $color-button-background; + background: url("/assets/images/down.svg") no-repeat right var(--color-button-background); background-size: 12px; background-position-x: 85%; appearance: none !important; @@ -510,8 +510,8 @@ button { padding: 12px; margin-bottom: 20px; border-radius: 8px; - background-color: $color-highlightBG; - color: $color-text; + background-color: var(--color-highlightBG); + color: var(--color-text); display: flex; gap: 12px; align-items: center; @@ -532,11 +532,11 @@ button { .link { display: inline; - color: $color-text-supporting; + color: var(--color-text-supporting); cursor: pointer; &:hover { - color: $color-link; + color: var(--color-link); } } @@ -565,7 +565,7 @@ button { .selected-article { font-weight: bold; - color: $color-text; + color: var(--color-text); } .home-link { @@ -601,11 +601,11 @@ button { padding: 28px; font-weight: 700; cursor: pointer; - color: $color-text; - background-color: $color-highlightBG; + color: var(--color-text); + background-color: var(--color-highlightBG); &:hover { - background-color: $color-row-hover; + background-color: var(--color-row-hover); } .row { @@ -704,14 +704,14 @@ button { } p.description { - color: $color-text-supporting; + color: var(--color-text-supporting); padding: 20px 0 20px 0; } p.url { padding: 0; font-size: 0.8em; - color: $color-text-supporting; + color: var(--color-text-supporting); } } @@ -733,7 +733,7 @@ button { p.description { padding: 0; - color: $color-text-supporting; + color: var(--color-text-supporting); &.with-min-height { min-height: 68px; @@ -818,7 +818,7 @@ button { } h3 { - color: $color-success; + color: var(--color-success); font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; font-size: 17px; font-weight: 500; @@ -836,13 +836,13 @@ button { margin: 0 0 8px; a { - color: $color-text-supporting; + color: var(--color-text-supporting); display: block; padding: 4px 0; word-break: break-word; &:hover { - color: $color-link; + color: var(--color-link); } } } @@ -852,21 +852,21 @@ button { padding-bottom: 20px; a { - color: $color-text-supporting; + color: var(--color-text-supporting); display: inline-block; &:hover { - color: $color-link; + color: var(--color-link); } } } &__fine-print { - color: $color-text-supporting; + color: var(--color-text-supporting); font-size: 10px; a { - color: $color-link; + color: var(--color-link); } } @@ -945,8 +945,8 @@ button { } #platform-tabs > .active { - color: $color-text; - background-color: $color-button-background; + color: var(--color-text); + background-color: var(--color-button-background); } .hidden { diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index 5c58d70b5851..f2b67485c466 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -7,7 +7,7 @@ } #sidebar-search { - background-color: $color-appBG; + background-color: var(--color-appBG); width: 375px; position: fixed; display: flex; @@ -67,7 +67,7 @@ left: 0; right: 0; bottom: 0; - background-color: $color-overlay; + background-color: var(--color-overlay); z-index: 1; } @@ -79,22 +79,22 @@ /* This input is in #___gcse_0 search bar */ input#gsc-i-id1.gsc-input { - background-color: $color-appBG; + background-color: var(--color-appBG); padding: 15px 0px 0px !important; pointer-events: auto; - color: #E7ECE9; + color: var(--color-text); font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji" !important; } /* These below #gsc-iw-id1, .gsc-input-box & .gsib_a are inner wrapper of search bar input */ #gsc-iw-id1 { - background-color: $color-appBG; - border-bottom: $color-borders 2px solid; + background-color: var(--color-appBG); + border-bottom: var(--color-borders) 2px solid; border-bottom-left-radius: 0px; pointer-events: none; &:focus-within { - border-bottom: $color-accent 2px solid; + border-bottom: var(--color-accent) 2px solid; } } @@ -111,12 +111,12 @@ input#gsc-i-id1.gsc-input { } /* This is the close icon on search bar */ .gsib_b .gsst_a .gscb_a { - color: $color-icons; + color: var(--color-icons); padding: 8px 6px 0px 6px !important; pointer-events: auto; &:hover { - color: $color-text; + color: var(--color-text); } } @@ -124,7 +124,7 @@ input#gsc-i-id1.gsc-input { .gsst_a:hover { .gscb_a { - color: $color-text !important; + color: var(--color-text) !important; } } @@ -144,7 +144,7 @@ label.search-label { transform: translateY(-50%); left: 20px; pointer-events: none; - color: $color-text-supporting; + color: var(--color-text-supporting); transform-origin: left top; user-select: none; transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), top 500ms; @@ -160,8 +160,8 @@ label.search-label { } .gsc-control-cse { - background-color: $color-appBG; - border: $color-appBG; + background-color: var(--color-appBG); + border: var(--color-appBG); font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important; } @@ -180,18 +180,18 @@ label.search-label { margin-left: 15px; margin-right: 20px; border-radius: 25px; - background-color: $color-button-success-background; + background-color: var(--color-button-success-background); cursor: pointer; width: 40px; height: 40px; } .gsc-search-button.gsc-search-button-v2:hover { - background-color: $color-button-success-background-hover; + background-color: var(--color-button-success-background-hover); } .gsc-search-button.gsc-search-button-v2 svg { - fill: $color-text; + fill: var(--color-text); height: auto; width: auto; } @@ -213,13 +213,13 @@ label.search-label { /* Change Font result Paragraph color */ .gsc-results .gs-webResult:not(.gs-no-results-result):not(.gs-error-result) .gs-snippet, .gs-fileFormatType { - color: $color-text-supporting; + color: var(--color-text-supporting); } /* Change the color of the Google Search Suggestion font */ .gs-spelling.gs-result { - color: $color-text; + color: var(--color-text); } /* Pagination related style */ @@ -234,7 +234,7 @@ label.search-label { border-radius: 25px; display: inline-block; line-height: 2.5; - background-color: $color-accent; + background-color: var(--color-accent); font-weight: bold; font-size: 11px; } @@ -243,28 +243,28 @@ label.search-label { /* Change the color & background of Google Search Pagination */ .gsc-cursor-next-page, .gsc-cursor-final-page { - color: $color-text; - background-color: $color-appBG; + color: var(--color-text); + background-color: var(--color-appBG); } /* Change the color & background of Google Search Current Page */ .gsc-resultsbox-visible .gsc-results .gsc-cursor-box .gsc-cursor-page.gsc-cursor-current-page { - background-color: $color-accent; - color: $color-text; + background-color: var(--color-accent); + color: var(--color-text); &:hover { text-decoration: none; - background-color: $color-accent; + background-color: var(--color-accent); } } /* Change the color & background of Google Search of Other Page */ .gsc-resultsbox-visible .gsc-results .gsc-cursor-box .gsc-cursor-page { - background-color: $color-button-background; - color: $color-text; + background-color: var(--color-button-background); + color: var(--color-text); &:hover { - background-color: $color-button-background-hover; + background-color: var(--color-button-background-hover); text-decoration: none; } } diff --git a/docs/assets/css/styles.scss b/docs/assets/css/styles.scss index 271e60fe6611..da50df3a6cb6 100644 --- a/docs/assets/css/styles.scss +++ b/docs/assets/css/styles.scss @@ -1,3 +1,4 @@ --- --- + @import 'main'; From 9e557a1f4c18c7a96e3d83de9bba02229bbee525 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 00:43:15 +0530 Subject: [PATCH 18/53] add light mode colors --- docs/_sass/_colors.scss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 37f5fc518f71..84a7c9b621f4 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,18 +1,18 @@ :root { // UI Colors - --color-text: #e7ece9; - --color-text-supporting: #afbbb0; - --color-icons: #8b9c8f; - --color-borders: #1a3d32; - --color-highlightBG: #072419; - --color-row-hover: #0a2e25; - --color-appBG: #061b09; + --color-text: #002E22; + --color-text-supporting: #76847E; + --color-icons: #A2A9A3; + --color-borders: #E6E1DA; + --color-highlightBG: #F8F4F0; + --color-row-hover: #F2EDE7; + --color-appBG: #FCFBF9; --color-success: #03d47c; --color-accent: #03d47c; --color-link: #5ab0ff; --color-link-hovered: #b0d9ff; - --color-button-background: #1a3d32; - --color-button-background-hover: #224f41; + --color-button-background: #E6E1DA; + --color-button-background-hover: #D8D1C7; --color-button-success-background: #03d47c; --color-button-success-background-hover: #00a862; --color-overlay: rgba(26, 61, 50, 0.72); From 90239e800041f77bb73ca9a51a019a37fe1752b8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 00:43:43 +0530 Subject: [PATCH 19/53] override search colors --- docs/_sass/_search-bar.scss | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index f2b67485c466..55cd578c2665 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -79,10 +79,10 @@ /* This input is in #___gcse_0 search bar */ input#gsc-i-id1.gsc-input { - background-color: var(--color-appBG); + background-color: var(--color-appBG) !important; padding: 15px 0px 0px !important; pointer-events: auto; - color: var(--color-text); + color: var(--color-text) !important; font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji" !important; } @@ -160,11 +160,20 @@ label.search-label { } .gsc-control-cse { - background-color: var(--color-appBG); - border: var(--color-appBG); + background-color: var(--color-appBG) !important; + border: var(--color-appBG) !important; font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important; } +.gsc-webResult.gsc-result { + border-color: var(--color-appBG) !important; + background-color: var(--color-appBG) !important; +} + +.gs-webResult.gs-result a.gs-title:link{ + color: var(--color-link) !important; +} + /* Hide the scrollbar */ .gsc-control-cse::-webkit-scrollbar { display: none; @@ -181,6 +190,7 @@ label.search-label { margin-right: 20px; border-radius: 25px; background-color: var(--color-button-success-background); + border-color: var(--color-appBG) !important; cursor: pointer; width: 40px; height: 40px; From e7cf572fcd80b67c607d998f368b9f39ec3abb3c Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 00:58:43 +0530 Subject: [PATCH 20/53] fix search border color --- docs/_sass/_search-bar.scss | 38 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index 55cd578c2665..f660279eaa38 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -6,6 +6,10 @@ margin: auto 0px; } +.gsc-input-box { + border: 0 !important; +} + #sidebar-search { background-color: var(--color-appBG); width: 375px; @@ -61,7 +65,7 @@ /* Full width (cover the whole page) */ height: 100%; - + /* Full height (cover the whole page) */ top: 0; left: 0; @@ -83,18 +87,18 @@ input#gsc-i-id1.gsc-input { padding: 15px 0px 0px !important; pointer-events: auto; color: var(--color-text) !important; - font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji" !important; + font-family: 'ExpensifyNeue', 'Segoe UI Emoji', 'Noto Color Emoji' !important; } /* These below #gsc-iw-id1, .gsc-input-box & .gsib_a are inner wrapper of search bar input */ #gsc-iw-id1 { background-color: var(--color-appBG); - border-bottom: var(--color-borders) 2px solid; + border-bottom: var(--color-borders) 2px solid !important; border-bottom-left-radius: 0px; pointer-events: none; &:focus-within { - border-bottom: var(--color-accent) 2px solid; + border-bottom: var(--color-accent) 2px solid !important; } } @@ -106,7 +110,8 @@ input#gsc-i-id1.gsc-input { margin-left: auto; } -.gsst_b, .gsst_a { +.gsst_b, +.gsst_a { padding: 0px !important; } /* This is the close icon on search bar */ @@ -122,17 +127,16 @@ input#gsc-i-id1.gsc-input { /* This is to manage hover on parent close icon and make it the same effect on close icon */ .gsst_a:hover { - .gscb_a { color: var(--color-text) !important; } } /* Manage Google Search label animation */ -input#gsc-i-id1:focus+label.search-label, -input#gsc-i-id1:valid+label.search-label, -input#gsc-i-id1:active+label.search-label { - transform: translateY(-100%) scale(0.80); +input#gsc-i-id1:focus + label.search-label, +input#gsc-i-id1:valid + label.search-label, +input#gsc-i-id1:active + label.search-label { + transform: translateY(-100%) scale(0.8); } label.search-label { @@ -140,7 +144,7 @@ label.search-label { position: absolute; margin-top: -20px; font-size: 15px; - font-family: "ExpensifyNeue", "Segoe UI Emoji", "Noto Color Emoji"; + font-family: 'ExpensifyNeue', 'Segoe UI Emoji', 'Noto Color Emoji'; transform: translateY(-50%); left: 20px; pointer-events: none; @@ -162,7 +166,7 @@ label.search-label { .gsc-control-cse { background-color: var(--color-appBG) !important; border: var(--color-appBG) !important; - font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important; + font-family: 'ExpensifyNeue', 'Helvetica Neue', 'Helvetica', Arial, sans-serif !important; } .gsc-webResult.gsc-result { @@ -170,7 +174,7 @@ label.search-label { background-color: var(--color-appBG) !important; } -.gs-webResult.gs-result a.gs-title:link{ +.gs-webResult.gs-result a.gs-title:link { color: var(--color-link) !important; } @@ -215,18 +219,17 @@ label.search-label { border-bottom: none; } - /* Change Font the Google Search result */ .gsc-control-cse .gsc-table-result { - font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif !important; + font-family: 'ExpensifyNeue', 'Helvetica Neue', 'Helvetica', Arial, sans-serif !important; } /* Change Font result Paragraph color */ -.gsc-results .gs-webResult:not(.gs-no-results-result):not(.gs-error-result) .gs-snippet, .gs-fileFormatType { +.gsc-results .gs-webResult:not(.gs-no-results-result):not(.gs-error-result) .gs-snippet, +.gs-fileFormatType { color: var(--color-text-supporting); } - /* Change the color of the Google Search Suggestion font */ .gs-spelling.gs-result { color: var(--color-text); @@ -249,7 +252,6 @@ label.search-label { font-size: 11px; } - /* Change the color & background of Google Search Pagination */ .gsc-cursor-next-page, .gsc-cursor-final-page { From e02017fccabf0a312744008d6bebe3b8d069c423 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 01:02:23 +0530 Subject: [PATCH 21/53] fix search bg color when clicked --- docs/_sass/_search-bar.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index f660279eaa38..8b727e5655b6 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -200,7 +200,8 @@ label.search-label { height: 40px; } -.gsc-search-button.gsc-search-button-v2:hover { +.gsc-search-button.gsc-search-button-v2:hover, +.gsc-search-button.gsc-search-button-v2:focus { background-color: var(--color-button-success-background-hover); } From 21e6420e04f318f2db9d45b3b1111434207869e8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 01:09:44 +0530 Subject: [PATCH 22/53] make button text color white --- docs/_sass/_colors.scss | 2 ++ docs/_sass/_main.scss | 4 ++-- docs/_sass/_search-bar.scss | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 84a7c9b621f4..924198236757 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,6 +1,7 @@ :root { // UI Colors --color-text: #002E22; + --color-button-text: #fff; --color-text-supporting: #76847E; --color-icons: #A2A9A3; --color-borders: #E6E1DA; @@ -22,6 +23,7 @@ :root { // UI Colors --color-text: #e7ece9; + --color-button-text: #fff; --color-text-supporting: #afbbb0; --color-icons: #8b9c8f; --color-borders: #1a3d32; diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index d569215707ab..df9e588e1220 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -165,7 +165,7 @@ button { &.success { background-color: var(--color-button-success-background); - color: var(--color-text); + color: var(--color-button-text); width: 100%; border-radius: 100px; padding-left: 20px; @@ -945,7 +945,7 @@ button { } #platform-tabs > .active { - color: var(--color-text); + color: var(--color-button-text); background-color: var(--color-button-background); } diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index 8b727e5655b6..5347dd0a5931 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -206,7 +206,7 @@ label.search-label { } .gsc-search-button.gsc-search-button-v2 svg { - fill: var(--color-text); + fill: var(--color-button-text); height: auto; width: auto; } From 7595af4f3c2df55c7571a9bea85bfa26fae9efcc Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 01:22:57 +0530 Subject: [PATCH 23/53] overlap color for light mode --- docs/_sass/_colors.scss | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 924198236757..e135d7b56e65 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,22 +1,22 @@ :root { // UI Colors - --color-text: #002E22; + --color-text: #002e22; --color-button-text: #fff; - --color-text-supporting: #76847E; - --color-icons: #A2A9A3; - --color-borders: #E6E1DA; - --color-highlightBG: #F8F4F0; - --color-row-hover: #F2EDE7; - --color-appBG: #FCFBF9; + --color-text-supporting: #76847e; + --color-icons: #a2a9a3; + --color-borders: #e6e1da; + --color-highlightBG: #f8f4f0; + --color-row-hover: #f2ede7; + --color-appBG: #fcfbf9; --color-success: #03d47c; --color-accent: #03d47c; --color-link: #5ab0ff; --color-link-hovered: #b0d9ff; - --color-button-background: #E6E1DA; - --color-button-background-hover: #D8D1C7; + --color-button-background: #e6e1da; + --color-button-background-hover: #d8d1c7; --color-button-success-background: #03d47c; --color-button-success-background-hover: #00a862; - --color-overlay: rgba(26, 61, 50, 0.72); + --color-overlay: rgba(0, 0, 0, 0.28); } @media (prefers-color-scheme: dark) { From 4def09ef6e68e7c10ef64db4bea36ee1e8d48c39 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 02:08:06 +0530 Subject: [PATCH 24/53] support light mode logo --- docs/assets/images/expensify-help.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/images/expensify-help.svg b/docs/assets/images/expensify-help.svg index 0655b947a27f..db9379fac769 100644 --- a/docs/assets/images/expensify-help.svg +++ b/docs/assets/images/expensify-help.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From b71784f266fe111f3a7ffe7a7abf782b4c47f7f5 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 02:09:00 +0530 Subject: [PATCH 25/53] run prettier --- docs/_sass/_main.scss | 50 ++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index df9e588e1220..1bccaed9132f 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -97,7 +97,7 @@ h2, h3, h4, h5, -h6, +h6, summary { color: var(--color-text); font-weight: bold; @@ -116,22 +116,22 @@ h6 { font-size: 1.5em; } -details summary { +details summary { cursor: pointer; user-select: none; } details > summary { - list-style-image: url("/assets/images/arrow-right.svg"); + list-style-image: url('/assets/images/arrow-right.svg'); } details[open] > summary { - list-style-image: url("/assets/images/down.svg"); + list-style-image: url('/assets/images/down.svg'); } -h1, +h1, summary { - font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNewKansas', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; font-weight: 500; font-size: larger; } @@ -151,7 +151,7 @@ select, textarea { line-height: 1.4; font-weight: 400; - font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNeue', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; font-size: 16px; color: var(--color-text-supporting); } @@ -159,7 +159,7 @@ textarea { button { border-radius: 12px; padding: 12px; - font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNeue', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; font-size: 15px; font-weight: bold; @@ -230,7 +230,6 @@ button { list-style: none; } - #lhn-content { overflow: auto; display: none; @@ -253,7 +252,6 @@ button { &::-webkit-scrollbar { display: none; } - } &.expanded { @@ -338,7 +336,7 @@ button { margin-left: 420px; /* On wide screens, the padding needs to be equal to the view width, minus the content size, minus the lhn size, divided by two. */ - padding: 52px calc((100vw - 1000px - 420px)/2) 0 calc((100vw - 1000px - 420px)/2); + padding: 52px calc((100vw - 1000px - 420px) / 2) 0 calc((100vw - 1000px - 420px) / 2); } ul, @@ -419,7 +417,8 @@ button { flex-wrap: wrap; } - h1, summary { + h1, + summary { font-size: 1.5em; padding: 20px 0 12px 0; } @@ -427,12 +426,12 @@ button { h2 { font-size: 1.125em; font-weight: 500; - font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNewKansas', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; } h3 { font-size: 1em; - font-family: "ExpensifyNeue", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNeue', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; } h2, @@ -449,7 +448,7 @@ button { border-left: 5px solid var(--color-button-background-hover); em:before { - content: "\“\a"; + content: '\“\a'; white-space: pre; font-size: 60px; line-height: 1em; @@ -458,7 +457,7 @@ button { p:first-child { font-size: large; - font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNewKansas', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; opacity: 0.8; } } @@ -472,7 +471,8 @@ button { padding: 20px; margin-bottom: 20px; justify-content: space-between; - * > ol, ul { + * > ol, + ul { padding: 0; } @@ -494,11 +494,10 @@ button { @include maxBreakpoint($breakpoint-tablet) { width: 100px; } - } select { - background: url("/assets/images/down.svg") no-repeat right var(--color-button-background); + background: url('/assets/images/down.svg') no-repeat right var(--color-button-background); background-size: 12px; background-position-x: 85%; appearance: none !important; @@ -515,7 +514,7 @@ button { display: flex; gap: 12px; align-items: center; - + img { height: 16px; width: 16px; @@ -527,7 +526,6 @@ button { } } } - } .link { @@ -541,7 +539,6 @@ button { } .lhn-items { - ol, ul { padding-left: 32px; @@ -585,7 +582,6 @@ button { } } - .platform-cards-group { @extend .cards-group; @@ -610,7 +606,7 @@ button { .row { display: flex; - flex-basis:100%; + flex-basis: 100%; } .body { @@ -621,7 +617,7 @@ button { } h3.title { - font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNewKansas', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; } h3.title, @@ -760,7 +756,7 @@ button { padding-top: 0px; } } - h2 { + h2 { padding-bottom: 24px; } p { @@ -819,7 +815,7 @@ button { h3 { color: var(--color-success); - font-family: "ExpensifyNewKansas", "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-family: 'ExpensifyNewKansas', 'Helvetica Neue', 'Helvetica', Arial, sans-serif; font-size: 17px; font-weight: 500; padding: 0; From 9c0724dd32d28e0a2a392f1d89821fb9c50f302e Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 02:19:55 +0530 Subject: [PATCH 26/53] make platform selector green --- docs/_sass/_main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss index 1bccaed9132f..ae19775d75df 100644 --- a/docs/_sass/_main.scss +++ b/docs/_sass/_main.scss @@ -942,7 +942,7 @@ button { #platform-tabs > .active { color: var(--color-button-text); - background-color: var(--color-button-background); + background-color: var(--color-button-success-background); } .hidden { From 538409746d72dee26db0368ba32f5a230cde744e Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 02:34:54 +0530 Subject: [PATCH 27/53] rm comment --- docs/_sass/_colors.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index e135d7b56e65..7abe75e55162 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,5 +1,4 @@ :root { - // UI Colors --color-text: #002e22; --color-button-text: #fff; --color-text-supporting: #76847e; @@ -21,7 +20,6 @@ @media (prefers-color-scheme: dark) { :root { - // UI Colors --color-text: #e7ece9; --color-button-text: #fff; --color-text-supporting: #afbbb0; From cc3b0b1a6b9c331d876f9380beafc4e10825e5bd Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Fri, 22 Mar 2024 02:36:32 +0530 Subject: [PATCH 28/53] rm comment --- docs/assets/css/styles.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/assets/css/styles.scss b/docs/assets/css/styles.scss index da50df3a6cb6..271e60fe6611 100644 --- a/docs/assets/css/styles.scss +++ b/docs/assets/css/styles.scss @@ -1,4 +1,3 @@ --- --- - @import 'main'; From 5b1132be0950270620f701287eb68c54244cf30b Mon Sep 17 00:00:00 2001 From: Ren Jones <153645623+ren-jones@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:52:40 -0500 Subject: [PATCH 29/53] Update and rename Close-Account.md to Close-or-reopen-account.md Rewrite and rename for close account article --- .../settings/Close-Account.md | 125 ------------------ .../settings/Close-or-reopen-account.md | 75 +++++++++++ 2 files changed, 75 insertions(+), 125 deletions(-) delete mode 100644 docs/articles/expensify-classic/settings/Close-Account.md create mode 100644 docs/articles/expensify-classic/settings/Close-or-reopen-account.md diff --git a/docs/articles/expensify-classic/settings/Close-Account.md b/docs/articles/expensify-classic/settings/Close-Account.md deleted file mode 100644 index 9b1e886fc94a..000000000000 --- a/docs/articles/expensify-classic/settings/Close-Account.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: Close Account -description: Close Account ---- -# Overview - -Here is a walk through of how to close an Expensify account through the website or mobile app. - -# How to close your account -On the Web: - -1. Go to **Settings** in the left hand menu. Click **Account**. -2. Click “Close Account” -3. Follow the prompts to verify your email or phone number. -4. Your account will be closed, and all data will be deleted.* - -![Close Account via Website]({{site.url}}/assets/images/ExpensifyHelp_CloseAccount_Desktop.png){:width="100%"} - -On the Mobile App: - -Open the app and tap the three horizontal lines in the upper left corner. -Select Settings from the menu. -Look for the "Close Account" option in the "Others" section. (If you don’t see this option, you have a Domain Controlled account and will need to ask your Domain Admin to delete your account.) -Complete the verification process using your email or phone number. -Your account will be closed, and all data will be deleted.* - -![Close Account on Mobile Application]({{site.url}}/assets/images/ExpensifyHelp_CloseAccount_Mobile.png){:width="100%"} - -These instructions may vary depending on the specific device you are using, so be sure to follow the steps as they appear on your screen. - -*Note: Transactions shared with other accounts will still be visible to those accounts. (Example: A report submitted to your company and reimbursed will not be deleted from your company’s account.) Additionally, we are required to retain certain records of transactions in compliance with laws in various jurisdictions. - -# How to reopen your account - -If your Expensify account is closed and not associated with a verified domain, you can reopen it with the following steps: - -1. Visit [expensify.com](https://www.expensify.com/). -2. Attempt to sign in using your email address or phone number associated with the closed account. -3. After entering your user name, you will see a prompt to reopen your account. -4. Click on **Reopen Account**. -5. A magic link will be sent to your email address. -6. Access your email and click on the magic link. This link will take you to Expensify and reopen your account. -7. Follow the prompts to create a new password associated with your account. -8. Your account is now reopened. Any previously approved expense data will still be visible in the account. - -Note: Reports submitted and closed on an Individual workspace will not be retained since they have not been approved or shared with anyone else in Expensify. - -That's it! Your account is successfully reopened, and you can access your historical data that was shared with other accounts. Remember to recreate any workspaces and adjust settings if needed. - -# How to Reopen a Domain-controlled account -Once an account has been **Closed** by a Domain Admin, it can be reopened by any Domain Admin on that domain. - -The Domain Admin will simply need to invite the previously closed account in the same manner that new accounts are invited to the Domain. The user will receive a magic link to their email account which they can use to Reopen the account. - -# How to retain a free account to keep historical expenses -If you no longer need a group workspace or have a more advanced workspace than necessary in Expensify, and you want to downgrade while retaining your historical data, here's what you should do: - -1. If you're part of a group workspace, request the Workspace Admin to remove you, or if you own the workspace, delete it to downgrade to a free version. -2. Once you've removed or been removed from a workspace, start using your free Expensify account. Your submitted expenses will still be saved, allowing you to access the historical data. -3. Domain Admins in the company will still retain access to approved and reimbursed expenses. -4. To keep your data, avoid closing your account. Account closures are irreversible and will result in the deletion of all your unapproved data. - -# Deep Dive - -## I’m unable to close my account - -If you're encountering an error message while trying to close your Expensify account, it's important to pinpoint the specific error. Encountering an error when trying to close your account is typically only experienced if the account has been an admin on a company’s Expensify workspace. (Especially if the account was involved in responsibilities like reimbursing employees or exporting expense reports.) - -In order to avoid users accidentally creating issues for their company, Expensify prevents account closure if you still have any individual responsibilities related to a Workspace within the platform. To successfully close your account, you need to ensure that your workspace no longer relies on your account to operate. - -Here are the reasons why you might encounter an error when trying to close your Expensify account, along with the actions required to address each of these issues: - -- **Account Under a Validated Domain**: If your account is associated with a validated domain, only a Domain Admin can close it. You can find this option in your Domain Admin's settings under Settings > Domains > Domain Members. Afterward, if you have a secondary personal login, you can delete it by following the instructions mentioned above. -- **Sole Domain Admin for Your Company**: If you are the only Domain Admin for your company's domain, you must appoint another Domain Admin before you can close your account. This is to avoid accidentally prohibiting your entire company from using Expensify. You can do this by going to Settings > Domains > [Domain Name] > Domain Admins and making the necessary changes, or you can reset the entire domain. -- **Workspace Billing Owner with an Annual Subscription**: If you are the Workspace Billing Owner with an Annual Subscription, you need to downgrade from the Annual subscription before closing the account. Alternatively, you can have another user take over billing for your workspaces. -- **Ownership of a Company Workspace or Outstanding Balance**: If you own a company workspace or there is an outstanding balance owed to Expensify, you must take one of the following actions before closing your account: - - - Make the payment for the outstanding balance. - - Have another user take over billing for the workspace. - - Request a refund for your initial bill. - - Delete the workspace. - -- **Preferred Exporter for Your Workspace Integration**: If you are the "Preferred Exporter" for a workspace Integration, you must update the Preferred Exporter before closing your account. You can do this by navigating to **Settings** > **Workspaces** > **Group** > [Workspace name] > **Connections** > **Configure** and selecting any Workspace Admin from the dropdown menu as the Preferred Exporter. -- **Verified Business Account with Outstanding Balance or Locked Status**: If you have a Verified Business Account with an outstanding balance or if the account is locked, you should wait for all payments to settle or unlock the account. To settle the amount owed, go to **Settings** > **Account** > **Payments** > **Bank Accounts** and take the necessary steps. - -## Validate the account to close it - -Sometimes, you may find yourself with an Expensify account that you don't need. This could be due to various reasons like a company inviting you for reimbursement, a vendor inviting you to pay, or a mistaken sign-up. - -In such cases, you have two options: - -**Option 1**: Retain the Account for Future Use -You can keep the Expensify account just in case you need it later. - -**Option 2**: Close the Account - -Start by verifying your email or phone number - -Before closing the account, you need to verify that you have access to the email or phone number associated with it. This ensures that only you can close the account. - -Here's how to do it: - -1. Go to [www.expensify.com](http://www.expensify.com/). -2. Enter your email address or phone number (whichever is associated with the unwanted account). -3. Click the **Resend Link** button. -4. Check your Home Page for the most recent email with the subject line "Please validate your Expensify login." Click the link provided in the email to validate your email address. - - If it's an account linked to a phone number, tap the link sent to your phone. -5. After clicking the validation link, you'll be directed to an Expensify Home Page. -6. Navigate to **Settings** > **Account** > **Account Details** > **Close Account**. -7. Click the **Close My Account** button. - - Re-enter the email address or phone number of the account when prompted. - - Check the box that says, "I understand all of my unsubmitted expense data will be deleted." - - Click the **Close My Account** button. - -By following these steps, you can easily verify your email or phone number and close an unwanted Expensify account. - -{% include faq-begin.md %} - -## What should I do if I'm not directed to my account when clicking the validate option from my phone or email? -It's possible your browser has blocked this, either because of some existing cache or extension. In this case, you should follow the Reset Password flow to reset the password and manually gain access with the new password, along with your email address. - -## Why don't I see the Close Account option? -It's possible your account is on a managed company domain. In this case, only the admins from that company can close it. - -{% include faq-end.md %} diff --git a/docs/articles/expensify-classic/settings/Close-or-reopen-account.md b/docs/articles/expensify-classic/settings/Close-or-reopen-account.md new file mode 100644 index 000000000000..7ef7da7137c5 --- /dev/null +++ b/docs/articles/expensify-classic/settings/Close-or-reopen-account.md @@ -0,0 +1,75 @@ +--- +title: Close or reopen account +description: Close or reopen an Expensify account +--- +
+ +# Close an account + +Closing your account will delete the data associated with the account. However, transactions shared with other accounts, including approved and reimbursed company expenses, will still be visible under those accounts. We may also be required to retain certain transaction records in compliance with laws in various jurisdictions. + +{% include info.html %} +If you no longer need a group workspace but want to keep your historical data, you can ask the Workspace Admin to remove you from the workspace, or you can delete the workspace if you own it. Once removed from the workspace, you will automatically be downgraded to a free account and will continue to have access to your Expensify account and all of your data. +{% include end-info.html %} + +{% include selector.html values="desktop, mobile" %} + +{% include option.html value="desktop" %} +1. Hover over Settings, then click **Account**. +2. Scroll down to the bottom of the page and click **Close Account**. + +{% include info.html %} +If you don’t see this option, you have a domain-controlled account and will need to ask your Domain Admin to delete your account. +{% include end-info.html %} + +3. Use your phone or email to confirm the changes. + +{% include end-option.html %} + +{% include option.html value="mobile" %} +These instructions may vary based on your device. + +1. Tap the menu in the top left. +2. Tap **Settings**. +3. Scroll down to the Others section and tap **Close Account**. + +{% include info.html %} +If you don’t see this option, you have a domain-controlled account and will need to ask your Domain Admin to delete your account. +{% include end-info.html %} + +4. Use your phone or email to confirm the changes. +{% include end-option.html %} + +{% include end-selector.html %} + +# Reopen a closed account + +If you closed your own account, follow the directions below to reopen it. However, if your Expensify account was closed by a Domain Admin, a Domain Admin for that domain must invite the closed account as a new member. + +1. Sign in to Expensify using the email address or phone number associated with the closed account. +2. Click **Reopen Account**. +3. Open your email and click the link from Expensify. + +Your account is now reopened. You can recreate any necessary workspaces, adjust your settings, and access any historical data you previously shared with other accounts. + +{% include info.html %} +Any data or reports that weren’t shared were permanently deleted when the account was closed. +{% include end-info.html %} + +# FAQs + +**I’m unable to close my account.** + +If your account has an outstanding balance or if you have been assigned a role under a company’s Expensify workspace, you may encounter an error message during the account closure process, or the Close Account button may not be available. Here are the steps to follow for each scenario: + +- **Account Under a Validated Domain**: A Domain Admin must remove your account from the domain. Then you will be able to successfully close your account. +- **Sole Domain Admin**: If you are the only Domain Admin for a company’s domain, you must assign a new Domain Admin before you can close your account. +- **Workspace Billing Owner with an annual subscription**: You must downgrade from the annual subscription before closing the account. Alternatively, you can have another user take over billing for your workspaces. +- **Company Workspace Owner**: You must assign a new workspace owner before you can close your account. +- **Account has an outstanding balance**: You must make a payment to resolve the outstanding balance before you can close your account. +- **Preferred Exporter for a workspace integration**: You must assign a new Preferred Exporter before closing your account. +- **Verified Business Account that is locked**: You must unlock the account. +- **Verified Business Account that has an outstanding balance**: You must make a payment to settle any outstanding balances before the account can be closed. +- **Unverified account**: You must first verify your account before it can be closed. + +
From f92292dd3a1090dfa827d5f30a723f715cde18f7 Mon Sep 17 00:00:00 2001 From: dragnoir Date: Fri, 22 Mar 2024 14:09:08 +0100 Subject: [PATCH 30/53] Fix: load report details when refreshing the page on request confirmation step --- src/libs/OptionsListUtils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 0f83b260c8f2..3fcb588c625c 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -741,12 +741,16 @@ function createOption( * Get the option for a given report. */ function getReportOption(participant: Participant): ReportUtils.OptionData { - const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${participant.reportID}`]; + let report = ReportUtils.getReport(participant.reportID); + + if (isEmptyObject(report)) { + report = null; + } const option = createOption( report?.visibleChatMemberAccountIDs ?? [], allPersonalDetails ?? {}, - report ?? null, + report, {}, { showChatPreviewLine: false, From 34971cbd85cfaafdf4419f45f0b51c13cef588b4 Mon Sep 17 00:00:00 2001 From: dragnoir Date: Fri, 22 Mar 2024 16:21:50 +0100 Subject: [PATCH 31/53] Fix: enhance code --- src/libs/OptionsListUtils.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 3fcb588c625c..b31b9fc280d6 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -741,16 +741,12 @@ function createOption( * Get the option for a given report. */ function getReportOption(participant: Participant): ReportUtils.OptionData { - let report = ReportUtils.getReport(participant.reportID); - - if (isEmptyObject(report)) { - report = null; - } + const report = ReportUtils.getReport(participant.reportID); const option = createOption( report?.visibleChatMemberAccountIDs ?? [], allPersonalDetails ?? {}, - report, + !isEmptyObject(report) ? report : null, {}, { showChatPreviewLine: false, From a38370f966fddfd8389e76c019ddb46d112a85bf Mon Sep 17 00:00:00 2001 From: dragnoir Date: Fri, 22 Mar 2024 16:30:16 +0100 Subject: [PATCH 32/53] Fix: remove all Reports --- src/libs/OptionsListUtils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index b31b9fc280d6..69d26f174a48 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -249,11 +249,9 @@ Onyx.connect({ }); const policyExpenseReports: OnyxCollection = {}; -const allReports: OnyxCollection = {}; Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT, callback: (report, key) => { - allReports[key] = report; if (!ReportUtils.isPolicyExpenseChat(report)) { return; } From 9029258c83ecc1b9c317160eee4bfd926739ffe8 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Mon, 25 Mar 2024 13:55:56 +0500 Subject: [PATCH 33/53] fix: use correct whitespace character --- src/CONST.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index 132b49c16ef7..ebf6ced94798 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -2922,7 +2922,7 @@ const CONST = { CURRENCY: 'XAF', FORMAT: 'symbol', SAMPLE_INPUT: '123456.789', - EXPECTED_OUTPUT: 'FCFA 123,457', + EXPECTED_OUTPUT: 'FCFA 123,457', }, PATHS_TO_TREAT_AS_EXTERNAL: ['NewExpensify.dmg', 'docs/index.html'], From 2f5a5cc9deb8c51b505dec69eb34d6f84374456c Mon Sep 17 00:00:00 2001 From: hurali97 Date: Mon, 25 Mar 2024 13:56:28 +0500 Subject: [PATCH 34/53] feat: check for formatToParts in Intl.NumberFormat API --- src/libs/IntlPolyfill/polyfillNumberFormat.ts | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/libs/IntlPolyfill/polyfillNumberFormat.ts b/src/libs/IntlPolyfill/polyfillNumberFormat.ts index 1fac01958f05..8b4ac19b7678 100644 --- a/src/libs/IntlPolyfill/polyfillNumberFormat.ts +++ b/src/libs/IntlPolyfill/polyfillNumberFormat.ts @@ -1,21 +1,30 @@ import CONST from '@src/CONST'; +const numberFormat = new Intl.NumberFormat(CONST.LOCALES.DEFAULT, { + style: CONST.POLYFILL_TEST.STYLE, + currency: CONST.POLYFILL_TEST.CURRENCY, + currencyDisplay: CONST.POLYFILL_TEST.FORMAT, +}); + /** * Check if the locale data is as expected on the device. * Ensures that the currency data is consistent across devices. */ function hasOldCurrencyData(): boolean { - return ( - new Intl.NumberFormat(CONST.LOCALES.DEFAULT, { - style: CONST.POLYFILL_TEST.STYLE, - currency: CONST.POLYFILL_TEST.CURRENCY, - currencyDisplay: CONST.POLYFILL_TEST.FORMAT, - }).format(Number(CONST.POLYFILL_TEST.SAMPLE_INPUT)) !== CONST.POLYFILL_TEST.EXPECTED_OUTPUT - ); + return numberFormat.format(Number(CONST.POLYFILL_TEST.SAMPLE_INPUT)) !== CONST.POLYFILL_TEST.EXPECTED_OUTPUT; +} + +/** + * Checks if the formatToParts function is available on the + * Intl.NumberFormat object. + * @returns boolean + */ +function hasFormatToParts(): boolean { + return typeof numberFormat.formatToParts === 'function'; } export default function () { - if (Intl && 'NumberFormat' in Intl && !hasOldCurrencyData()) { + if (Intl && 'NumberFormat' in Intl && !hasOldCurrencyData() && hasFormatToParts()) { return; } From ee2ba9ef9214831540436814414382f8a3c522c7 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 25 Mar 2024 12:41:22 +0100 Subject: [PATCH 35/53] Resolve TS issues --- workflow_tests/authorChecklist.test.ts | 8 +--- workflow_tests/cherryPick.test.ts | 24 +++++------- workflow_tests/mocks/authorChecklistMocks.ts | 2 +- workflow_tests/mocks/cherryPickMocks.ts | 38 +++++++++--------- workflow_tests/utils/JobMocker.ts | 41 +++++++++++--------- workflow_tests/utils/preGenerateTest.ts | 10 ++--- 6 files changed, 57 insertions(+), 66 deletions(-) diff --git a/workflow_tests/authorChecklist.test.ts b/workflow_tests/authorChecklist.test.ts index d55fe6611bce..1286f0c6c246 100644 --- a/workflow_tests/authorChecklist.test.ts +++ b/workflow_tests/authorChecklist.test.ts @@ -3,7 +3,7 @@ import * as kieMockGithub from '@kie/mock-github'; import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/authorChecklistAssertions'; -import mocks from './mocks/authorChecklistMocks'; +import * as mocks from './mocks/authorChecklistMocks'; import ExtendedAct from './utils/ExtendedAct'; import * as utils from './utils/utils'; @@ -54,7 +54,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, @@ -74,7 +73,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, @@ -100,7 +98,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, @@ -120,7 +117,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, @@ -146,7 +142,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, @@ -166,7 +161,6 @@ describe('test workflow authorChecklist', () => { const repoPath = mockGithub.repo.getPath('testAuthorChecklistWorkflowRepo') ?? ''; const workflowPath = path.join(repoPath, '.github', 'workflows', 'authorChecklist.yml'); let act = new ExtendedAct(repoPath, workflowPath); - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. act = utils.setUpActParams(act, event, eventOptions, {}, githubToken); const testMockSteps: MockStep = { checklist: mocks.AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS, diff --git a/workflow_tests/cherryPick.test.ts b/workflow_tests/cherryPick.test.ts index 4c68d0bca24b..e8606e6d6323 100644 --- a/workflow_tests/cherryPick.test.ts +++ b/workflow_tests/cherryPick.test.ts @@ -3,8 +3,9 @@ import * as kieMockGithub from '@kie/mock-github'; import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/cherryPickAssertions'; -import mocks from './mocks/cherryPickMocks'; +import * as mocks from './mocks/cherryPickMocks'; import ExtendedAct from './utils/ExtendedAct'; +import type {MockJobs} from './utils/JobMocker'; import * as utils from './utils/utils'; jest.setTimeout(90 * 1000); @@ -52,7 +53,6 @@ describe('test workflow cherryPick', () => { let act = new ExtendedAct(repoPath, workflowPath); act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -70,7 +70,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(true, false), }; - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -105,7 +105,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts), }; - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -117,7 +117,6 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -158,7 +157,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -170,7 +169,6 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -207,7 +205,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -219,7 +217,6 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -259,7 +256,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -271,7 +268,6 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -308,7 +304,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, }; testMockSteps.cherryPick = mocks.getCherryPickMockSteps(versionsMatch, mergeConflicts); - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { @@ -320,7 +316,6 @@ describe('test workflow cherryPick', () => { }; act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -358,7 +353,6 @@ describe('test workflow cherryPick', () => { let act = new ExtendedAct(repoPath, workflowPath); act = utils.setUpActParams( act, - // @ts-expect-error TODO: Remove this once utils (https://github.com/Expensify/App/issues/32061) is migrated to TypeScript. event, null, { @@ -376,7 +370,7 @@ describe('test workflow cherryPick', () => { validateActor: mocks.CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, cherryPick: mocks.getCherryPickMockSteps(true, false), }; - const testMockJobs = { + const testMockJobs: MockJobs = { createNewVersion: { steps: mocks.CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, outputs: { diff --git a/workflow_tests/mocks/authorChecklistMocks.ts b/workflow_tests/mocks/authorChecklistMocks.ts index b4d520eb7a1f..ff8abc00f798 100644 --- a/workflow_tests/mocks/authorChecklistMocks.ts +++ b/workflow_tests/mocks/authorChecklistMocks.ts @@ -4,7 +4,7 @@ import {createMockStep} from '../utils/utils'; // checklist const AUTHORCHECKLIST__CHECKLIST__CHECKOUT__STEP_MOCK = createMockStep('Checkout', 'Checkout', 'CHECKLIST'); const AUTHORCHECKLIST__CHECKLIST__AUTHORCHECKLIST_JS__STEP_MOCK = createMockStep('authorChecklist.js', 'Running authorChecklist.js', 'CHECKLIST', ['GITHUB_TOKEN'], []); -const AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS = [AUTHORCHECKLIST__CHECKLIST__CHECKOUT__STEP_MOCK, AUTHORCHECKLIST__CHECKLIST__AUTHORCHECKLIST_JS__STEP_MOCK] as const; +const AUTHORCHECKLIST__CHECKLIST__STEP_MOCKS = [AUTHORCHECKLIST__CHECKLIST__CHECKOUT__STEP_MOCK, AUTHORCHECKLIST__CHECKLIST__AUTHORCHECKLIST_JS__STEP_MOCK]; export { // eslint-disable-next-line import/prefer-default-export diff --git a/workflow_tests/mocks/cherryPickMocks.ts b/workflow_tests/mocks/cherryPickMocks.ts index f1508a3dc39d..7dc77b1b5a97 100644 --- a/workflow_tests/mocks/cherryPickMocks.ts +++ b/workflow_tests/mocks/cherryPickMocks.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/naming-convention */ +import type {StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import {createMockStep} from '../utils/utils'; // validateactor @@ -18,8 +19,8 @@ const CHERRYPICK__VALIDATEACTOR__CHECK_IF_USER_IS_DEPLOYER_FALSE__STEP_MOCK = cr ['GITHUB_TOKEN'], {IS_DEPLOYER: false}, ); -const CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS = [CHERRYPICK__VALIDATEACTOR__CHECK_IF_USER_IS_DEPLOYER_TRUE__STEP_MOCK] as const; -const CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS = [CHERRYPICK__VALIDATEACTOR__CHECK_IF_USER_IS_DEPLOYER_FALSE__STEP_MOCK] as const; +const CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS = [CHERRYPICK__VALIDATEACTOR__CHECK_IF_USER_IS_DEPLOYER_TRUE__STEP_MOCK]; +const CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS = [CHERRYPICK__VALIDATEACTOR__CHECK_IF_USER_IS_DEPLOYER_FALSE__STEP_MOCK]; // createnewversion const CHERRYPICK__CREATENEWVERSION__CREATE_NEW_VERSION__STEP_MOCK = createMockStep( @@ -33,7 +34,7 @@ const CHERRYPICK__CREATENEWVERSION__CREATE_NEW_VERSION__STEP_MOCK = createMockSt true, 'createNewVersion', ); -const CHERRYPICK__CREATENEWVERSION__STEP_MOCKS = [CHERRYPICK__CREATENEWVERSION__CREATE_NEW_VERSION__STEP_MOCK] as const; +const CHERRYPICK__CREATENEWVERSION__STEP_MOCKS = [CHERRYPICK__CREATENEWVERSION__CREATE_NEW_VERSION__STEP_MOCK]; // cherrypick const CHERRYPICK__CHERRYPICK__CHECKOUT_STAGING_BRANCH__STEP_MOCK = createMockStep('Checkout staging branch', 'Checking out staging branch', 'CHERRYPICK', ['ref', 'token'], []); @@ -93,21 +94,20 @@ const CHERRYPICK__CHERRYPICK__ANNOUNCES_A_CP_FAILURE_IN_THE_ANNOUNCE_SLACK_ROOM_ ['GITHUB_TOKEN', 'SLACK_WEBHOOK_URL'], ); -const getCherryPickMockSteps = (upToDate: boolean, hasConflicts: boolean) => - [ - CHERRYPICK__CHERRYPICK__CHECKOUT_STAGING_BRANCH__STEP_MOCK, - CHERRYPICK__CHERRYPICK__SET_UP_GIT_FOR_OSBOTIFY__STEP_MOCK, - CHERRYPICK__CHERRYPICK__GET_PREVIOUS_APP_VERSION__STEP_MOCK, - CHERRYPICK__CHERRYPICK__FETCH_HISTORY_OF_RELEVANT_REFS__STEP_MOCK, - CHERRYPICK__CHERRYPICK__GET_VERSION_BUMP_COMMIT__STEP_MOCK, - CHERRYPICK__CHERRYPICK__GET_MERGE_COMMIT_FOR_PULL_REQUEST_TO_CP__STEP_MOCK, - CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_VERSION_BUMP_TO_STAGING__STEP_MOCK, - hasConflicts - ? CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_MERGE_COMMIT_OF_TARGET_PR_TO_NEW_BRANCH__HAS_CONFLICTS__STEP_MOCK - : CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_MERGE_COMMIT_OF_TARGET_PR_TO_NEW_BRANCH__HAS_NO_CONFLICTS__STEP_MOCK, - CHERRYPICK__CHERRYPICK__PUSH_CHANGES__STEP_MOCK, - CHERRYPICK__CHERRYPICK__CREATE_PULL_REQUEST_TO_MANUALLY_FINISH_CP__STEP_MOCK, - CHERRYPICK__CHERRYPICK__ANNOUNCES_A_CP_FAILURE_IN_THE_ANNOUNCE_SLACK_ROOM__STEP_MOCK, - ] as const; +const getCherryPickMockSteps = (upToDate: boolean, hasConflicts: boolean): StepIdentifier[] => [ + CHERRYPICK__CHERRYPICK__CHECKOUT_STAGING_BRANCH__STEP_MOCK, + CHERRYPICK__CHERRYPICK__SET_UP_GIT_FOR_OSBOTIFY__STEP_MOCK, + CHERRYPICK__CHERRYPICK__GET_PREVIOUS_APP_VERSION__STEP_MOCK, + CHERRYPICK__CHERRYPICK__FETCH_HISTORY_OF_RELEVANT_REFS__STEP_MOCK, + CHERRYPICK__CHERRYPICK__GET_VERSION_BUMP_COMMIT__STEP_MOCK, + CHERRYPICK__CHERRYPICK__GET_MERGE_COMMIT_FOR_PULL_REQUEST_TO_CP__STEP_MOCK, + CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_VERSION_BUMP_TO_STAGING__STEP_MOCK, + hasConflicts + ? CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_MERGE_COMMIT_OF_TARGET_PR_TO_NEW_BRANCH__HAS_CONFLICTS__STEP_MOCK + : CHERRYPICK__CHERRYPICK__CHERRY_PICK_THE_MERGE_COMMIT_OF_TARGET_PR_TO_NEW_BRANCH__HAS_NO_CONFLICTS__STEP_MOCK, + CHERRYPICK__CHERRYPICK__PUSH_CHANGES__STEP_MOCK, + CHERRYPICK__CHERRYPICK__CREATE_PULL_REQUEST_TO_MANUALLY_FINISH_CP__STEP_MOCK, + CHERRYPICK__CHERRYPICK__ANNOUNCES_A_CP_FAILURE_IN_THE_ANNOUNCE_SLACK_ROOM__STEP_MOCK, +]; export {CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, getCherryPickMockSteps}; diff --git a/workflow_tests/utils/JobMocker.ts b/workflow_tests/utils/JobMocker.ts index b6dc99771dd2..41787a72226d 100644 --- a/workflow_tests/utils/JobMocker.ts +++ b/workflow_tests/utils/JobMocker.ts @@ -1,36 +1,39 @@ +import type {GithubWorkflowStep, StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; import type {PathOrFileDescriptor} from 'fs'; import fs from 'fs'; import path from 'path'; import yaml from 'yaml'; -// eslint-disable-next-line @typescript-eslint/naming-convention -type YamlMockJob = Omit & {'runs-on'?: string}; +type YamlStepIdentifier = Partial & { + name: string; + id?: string; + inputs?: string[]; + envs?: string[]; + run?: GithubWorkflowStep | string; + with?: string; +}; + +type YamlMockJob = Omit & { + steps: YamlStepIdentifier[]; + // eslint-disable-next-line @typescript-eslint/naming-convention + 'runs-on'?: string; +}; type YamlWorkflow = { jobs: Record; }; type MockJob = { - steps: MockJobStep[]; + steps: StepIdentifier[]; uses?: string; secrets?: string[]; with?: string; - outputs?: string[]; + outputs?: Record; runsOn?: string; }; type MockJobs = Record; -type MockJobStep = { - id?: string; - name: string; - run?: string; - mockWith?: string; - with?: string; - envs?: string[]; - inputs?: string[]; -}; - class JobMocker { workflowFile: string; @@ -59,12 +62,12 @@ class JobMocker { jobWith = job.with; delete job.with; } - job.steps = mockJob.steps.map((step) => { - const mockStep: MockJobStep = { - name: step.name, + job.steps = mockJob.steps.map((step: StepIdentifier) => { + const mockStep: YamlStepIdentifier = { + name: 'name' in step ? step.name : '', run: step.mockWith, }; - if (step.id) { + if ('id' in step && step.id) { mockStep.id = step.id; } if (jobWith) { @@ -114,4 +117,4 @@ class JobMocker { } export default JobMocker; -export type {MockJob, MockJobs, YamlWorkflow, YamlMockJob, MockJobStep}; +export type {MockJob, MockJobs, YamlWorkflow, YamlMockJob, YamlStepIdentifier}; diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index 7698e618432d..6b0ed0f155c4 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -4,7 +4,7 @@ import fs from 'fs'; import path from 'path'; import {exit} from 'process'; import yaml from 'yaml'; -import type {MockJobStep, YamlMockJob, YamlWorkflow} from './JobMocker'; +import type {YamlMockJob, YamlStepIdentifier, YamlWorkflow} from './JobMocker'; const workflowsDirectory = path.resolve(__dirname, '..', '..', '.github', 'workflows'); const workflowTestsDirectory = path.resolve(__dirname, '..'); @@ -97,7 +97,7 @@ describe('test workflow ${workflowName}', () => { }); `; -const mockStepTemplate = (stepMockName: string, step: MockJobStep, jobId: string | undefined) => ` +const mockStepTemplate = (stepMockName: string, step: YamlStepIdentifier, jobId: string | undefined) => ` const ${stepMockName} = utils.createMockStep( '${step.name ?? ''}', '${step.name ?? ''}', @@ -203,10 +203,10 @@ const parseWorkflowFile = (workflow: YamlWorkflow) => { steps: [], }; job.steps.forEach((step) => { - const workflowStep = { + const workflowStep: YamlStepIdentifier = { name: step.name, - inputs: Object.keys(step.with ?? {}), - envs: step.envs ?? [], + inputs: 'with' in step && step.with ? Object.keys(step.with) : [], + envs: 'envs' in step && step.envs ? step.envs : [], }; workflowJobs[jobId].steps.push(workflowStep); }); From b81c9bc2fc8204f00fb70515292c2fcd4868bf4b Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 25 Mar 2024 12:49:04 +0100 Subject: [PATCH 36/53] Code improvements --- workflow_tests/utils/JobMocker.ts | 2 +- workflow_tests/utils/preGenerateTest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow_tests/utils/JobMocker.ts b/workflow_tests/utils/JobMocker.ts index 41787a72226d..592e2a758636 100644 --- a/workflow_tests/utils/JobMocker.ts +++ b/workflow_tests/utils/JobMocker.ts @@ -62,7 +62,7 @@ class JobMocker { jobWith = job.with; delete job.with; } - job.steps = mockJob.steps.map((step: StepIdentifier) => { + job.steps = mockJob.steps.map((step) => { const mockStep: YamlStepIdentifier = { name: 'name' in step ? step.name : '', run: step.mockWith, diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index 6b0ed0f155c4..bc4867a83827 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -205,8 +205,8 @@ const parseWorkflowFile = (workflow: YamlWorkflow) => { job.steps.forEach((step) => { const workflowStep: YamlStepIdentifier = { name: step.name, - inputs: 'with' in step && step.with ? Object.keys(step.with) : [], - envs: 'envs' in step && step.envs ? step.envs : [], + inputs: Object.keys(step.with ?? {}), + envs: step.envs ?? [], }; workflowJobs[jobId].steps.push(workflowStep); }); From 7b8d0a2bcfa8555c16a028e5ff745e6e03bf451b Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 25 Mar 2024 12:53:59 +0100 Subject: [PATCH 37/53] Fix TS issue --- workflow_tests/failureNotifier.test.ts | 2 +- workflow_tests/mocks/failureNotifierMocks.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/workflow_tests/failureNotifier.test.ts b/workflow_tests/failureNotifier.test.ts index 8dfc092c7e61..d25378f8500e 100644 --- a/workflow_tests/failureNotifier.test.ts +++ b/workflow_tests/failureNotifier.test.ts @@ -3,7 +3,7 @@ import type {CreateRepositoryFile} from '@kie/mock-github'; import {MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/failureNotifierAssertions'; -import mocks from './mocks/failureNotifierMocks'; +import * as mocks from './mocks/failureNotifierMocks'; import ExtendedAct from './utils/ExtendedAct'; jest.setTimeout(90 * 1000); diff --git a/workflow_tests/mocks/failureNotifierMocks.ts b/workflow_tests/mocks/failureNotifierMocks.ts index 5c869adae21b..0758d4bf7a70 100644 --- a/workflow_tests/mocks/failureNotifierMocks.ts +++ b/workflow_tests/mocks/failureNotifierMocks.ts @@ -6,10 +6,7 @@ import {createMockStep} from '../utils/utils'; // notifyfailure const FAILURENOTIFIER__NOTIFYFAILURE__FETCH_WORKFLOW_RUN_JOBS__STEP_MOCK = createMockStep('Fetch Workflow Run Jobs', 'Fetch Workflow Run Jobs', 'NOTIFYFAILURE', [], []); const FAILURENOTIFIER__NOTIFYFAILURE__PROCESS_EACH_FAILED_JOB__STEP_MOCK = createMockStep('Process Each Failed Job', 'Process Each Failed Job', 'NOTIFYFAILURE', [], []); -const FAILURENOTIFIER__NOTIFYFAILURE__STEP_MOCKS = [ - FAILURENOTIFIER__NOTIFYFAILURE__FETCH_WORKFLOW_RUN_JOBS__STEP_MOCK, - FAILURENOTIFIER__NOTIFYFAILURE__PROCESS_EACH_FAILED_JOB__STEP_MOCK, -] as const; +const FAILURENOTIFIER__NOTIFYFAILURE__STEP_MOCKS = [FAILURENOTIFIER__NOTIFYFAILURE__FETCH_WORKFLOW_RUN_JOBS__STEP_MOCK, FAILURENOTIFIER__NOTIFYFAILURE__PROCESS_EACH_FAILED_JOB__STEP_MOCK]; export { // eslint-disable-next-line import/prefer-default-export From a4f0c614f7bae50b432b78581aacb39f5ae8eafe Mon Sep 17 00:00:00 2001 From: Ren Jones <153645623+ren-jones@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:30:42 -0500 Subject: [PATCH 38/53] Create Add-Domain-Members-and-Admins.md New article for adding domain members and admin --- .../domains/Add-Domain-Members-and-Admins.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md diff --git a/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md b/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md new file mode 100644 index 000000000000..656d0b3ad30f --- /dev/null +++ b/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md @@ -0,0 +1,54 @@ +--- +title: Add Domain Members and Admins +description: description +--- +
+ +{% include info.html %} +To add members to your domain, your domain must be verified. Once a domain is verified, only Domain Admins will have access to the domain’s settings and member information. +{% include end-info.html %} + +Your domain can include members and admins. + - **Domain Member**: Domain Members are associated with a specific domain and managed by the rules configured by the Domain Admins. They cannot see or modify any of the domain settings. A Domain Member must have an email address under the domain name (for example, an email address @yourcompany.com) listed as their primary or secondary email address. +- **Domain Admin**: Has full authority over the domain settings and can add or modify members, admin, groups, rules, and company credit cards. Domain Admins are not required to have an email address connected to the domain. + +# Add Domain Member + +There are two ways to add a member to a domain: +- The member can be automatically added to the domain if they sign up or are added to Expensify using an email address that contains their domain name (for example, an email address @yourcompany.com). +- A Domain Admin can manually add a new member to the domain. + +## Automatic Domain Member signup + +- **New Expensify members**: By creating their account using their domain email address (like yourname@yourcompany.com), they will be automatically added as a member of the domain. +- **Existing Expensify members**: Members that already have an Expensify account can add their domain email address (like yourname@yourcompany.com) as their secondary or primary email address to be automatically added as a member of the domain once they verify their email address. + +{% include info.html %} +The member’s primary email address will be the one that is listed under the domain, even if their secondary email address is the one that matches the domain. +{% include end-info.html %} + +Once the member verifies their email address, all Domain Admins will be notified and the employee will be added to the default group. + +## Manually add a Domain Member + +1. Hover over Settings, then click **Domains**. +2. Click the name of the domain. +3. Click the **Domain Members** tab on the left. +4. Under the Domain Members section, enter the first part of the member’s email address and click **Invite**. + +{% include info.html %} +This can be any email address—it does not have to be an email address under the domain. If someone who is not a Domain Admin invites a new member to a workspace, that member must validate their account via email before they will have access to it. +{% include end-info.html %} + +# Add Domain Admin + +1. Hover over Settings, then click **Domains**. +2. Click the name of the domain. +3. Click the **Domain Admins** tab on the left. +4. Under the Domain Admins section, enter the phone number or email address of the person you’re inviting as a domain admin and click **Add Admin**. + +{% include info.html %} +This can be any email address—it does not have to be an email address under the domain. +{% include end-info.html %} + +
From 99ec92022b82db5ece0b286ecec4d5559e1db808 Mon Sep 17 00:00:00 2001 From: Ren Jones <153645623+ren-jones@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:35:51 -0500 Subject: [PATCH 39/53] Create Switch-Domain-Member-to-Admin.md New article for how to change a Domain Member to an Admin --- .../domains/Switch-Domain-Member-to-Admin.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/articles/expensify-classic/domains/Switch-Domain-Member-to-Admin.md diff --git a/docs/articles/expensify-classic/domains/Switch-Domain-Member-to-Admin.md b/docs/articles/expensify-classic/domains/Switch-Domain-Member-to-Admin.md new file mode 100644 index 000000000000..8a01a3170903 --- /dev/null +++ b/docs/articles/expensify-classic/domains/Switch-Domain-Member-to-Admin.md @@ -0,0 +1,14 @@ +--- +title: Switch Domain Member to Admin +description: Change a Domain Member's role to Admin +--- +
+ +A Domain Admin can change a current member of your domain to a Domain Admin by completing the following steps: + +1. Hover over Settings, then click **Domains**. +2. Click the name of the domain. +3. Click the **Domain Admins** tab on the left. +4. Under the Domain Admins section, enter the member’s phone number or email address and click **Add Admin**. + +
From af5889a2adb62ca8fcac92168e11891845f7723a Mon Sep 17 00:00:00 2001 From: Ren Jones <153645623+ren-jones@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:37:45 -0500 Subject: [PATCH 40/53] Update Add-Domain-Members-and-Admins.md Added a description --- .../expensify-classic/domains/Add-Domain-Members-and-Admins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md b/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md index 656d0b3ad30f..03dd3d722d82 100644 --- a/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md +++ b/docs/articles/expensify-classic/domains/Add-Domain-Members-and-Admins.md @@ -1,6 +1,6 @@ --- title: Add Domain Members and Admins -description: description +description: Add members and admins to a domain ---
From dcc53e83c902a0f72657ddaef90ad392918a4af2 Mon Sep 17 00:00:00 2001 From: VickyStash Date: Mon, 25 Mar 2024 18:32:58 +0100 Subject: [PATCH 41/53] TS fixes after merging main, remove extra updates --- package.json | 2 +- src/types/modules/act.d.ts | 14 ++++++++++++ workflow_tests/authorChecklist.test.ts | 2 +- workflow_tests/cherryPick.test.ts | 2 +- workflow_tests/failureNotifier.test.ts | 2 +- workflow_tests/mocks/cherryPickMocks.ts | 2 +- workflow_tests/utils/JobMocker.ts | 30 ++++++++----------------- workflow_tests/utils/preGenerateTest.ts | 7 +++--- 8 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 src/types/modules/act.d.ts diff --git a/package.json b/package.json index 0239b2a21635..c41afac9d570 100644 --- a/package.json +++ b/package.json @@ -154,8 +154,8 @@ "react-native-plaid-link-sdk": "10.8.0", "react-native-qrcode-svg": "^6.2.0", "react-native-quick-sqlite": "^8.0.0-beta.2", - "react-native-reanimated": "^3.7.2", "react-native-release-profiler": "^0.1.6", + "react-native-reanimated": "^3.7.2", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", "react-native-screens": "3.29.0", diff --git a/src/types/modules/act.d.ts b/src/types/modules/act.d.ts new file mode 100644 index 000000000000..5fe00ec479cf --- /dev/null +++ b/src/types/modules/act.d.ts @@ -0,0 +1,14 @@ +import type {StepIdentifier as ActStepIdentifier} from '@kie/act-js'; + +declare module '@kie/act-js' { + // eslint-disable-next-line rulesdir/no-inline-named-export + export declare type StepIdentifier = { + id?: string; + name: string; + run?: string; + mockWith?: string; + with?: string; + envs?: string[]; + inputs?: string[]; + } & Omit; +} diff --git a/workflow_tests/authorChecklist.test.ts b/workflow_tests/authorChecklist.test.ts index 1286f0c6c246..c0b1c7cf7533 100644 --- a/workflow_tests/authorChecklist.test.ts +++ b/workflow_tests/authorChecklist.test.ts @@ -3,7 +3,7 @@ import * as kieMockGithub from '@kie/mock-github'; import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/authorChecklistAssertions'; -import * as mocks from './mocks/authorChecklistMocks'; +import mocks from './mocks/authorChecklistMocks'; import ExtendedAct from './utils/ExtendedAct'; import * as utils from './utils/utils'; diff --git a/workflow_tests/cherryPick.test.ts b/workflow_tests/cherryPick.test.ts index e8606e6d6323..47a1c489df70 100644 --- a/workflow_tests/cherryPick.test.ts +++ b/workflow_tests/cherryPick.test.ts @@ -3,7 +3,7 @@ import * as kieMockGithub from '@kie/mock-github'; import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/cherryPickAssertions'; -import * as mocks from './mocks/cherryPickMocks'; +import mocks from './mocks/cherryPickMocks'; import ExtendedAct from './utils/ExtendedAct'; import type {MockJobs} from './utils/JobMocker'; import * as utils from './utils/utils'; diff --git a/workflow_tests/failureNotifier.test.ts b/workflow_tests/failureNotifier.test.ts index d25378f8500e..8dfc092c7e61 100644 --- a/workflow_tests/failureNotifier.test.ts +++ b/workflow_tests/failureNotifier.test.ts @@ -3,7 +3,7 @@ import type {CreateRepositoryFile} from '@kie/mock-github'; import {MockGithub} from '@kie/mock-github'; import path from 'path'; import assertions from './assertions/failureNotifierAssertions'; -import * as mocks from './mocks/failureNotifierMocks'; +import mocks from './mocks/failureNotifierMocks'; import ExtendedAct from './utils/ExtendedAct'; jest.setTimeout(90 * 1000); diff --git a/workflow_tests/mocks/cherryPickMocks.ts b/workflow_tests/mocks/cherryPickMocks.ts index e7762731c066..c1a33be868d6 100644 --- a/workflow_tests/mocks/cherryPickMocks.ts +++ b/workflow_tests/mocks/cherryPickMocks.ts @@ -110,4 +110,4 @@ const getCherryPickMockSteps = (upToDate: boolean, hasConflicts: boolean): StepI CHERRYPICK__CHERRYPICK__ANNOUNCES_A_CP_FAILURE_IN_THE_ANNOUNCE_SLACK_ROOM__STEP_MOCK, ]; -export {CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, getCherryPickMockSteps}; +export default {CHERRYPICK__CREATENEWVERSION__STEP_MOCKS, CHERRYPICK__VALIDATEACTOR__FALSE__STEP_MOCKS, CHERRYPICK__VALIDATEACTOR__TRUE__STEP_MOCKS, getCherryPickMockSteps}; diff --git a/workflow_tests/utils/JobMocker.ts b/workflow_tests/utils/JobMocker.ts index 592e2a758636..dadb85014d01 100644 --- a/workflow_tests/utils/JobMocker.ts +++ b/workflow_tests/utils/JobMocker.ts @@ -1,23 +1,11 @@ -import type {GithubWorkflowStep, StepIdentifier} from '@kie/act-js/build/src/step-mocker/step-mocker.types'; +import type {StepIdentifier} from '@kie/act-js'; import type {PathOrFileDescriptor} from 'fs'; import fs from 'fs'; import path from 'path'; import yaml from 'yaml'; -type YamlStepIdentifier = Partial & { - name: string; - id?: string; - inputs?: string[]; - envs?: string[]; - run?: GithubWorkflowStep | string; - with?: string; -}; - -type YamlMockJob = Omit & { - steps: YamlStepIdentifier[]; - // eslint-disable-next-line @typescript-eslint/naming-convention - 'runs-on'?: string; -}; +// eslint-disable-next-line @typescript-eslint/naming-convention +type YamlMockJob = Omit & {'runs-on'?: string}; type YamlWorkflow = { jobs: Record; @@ -29,7 +17,7 @@ type MockJob = { secrets?: string[]; with?: string; outputs?: Record; - runsOn?: string; + runsOn: string; }; type MockJobs = Record; @@ -62,12 +50,12 @@ class JobMocker { jobWith = job.with; delete job.with; } - job.steps = mockJob.steps.map((step) => { - const mockStep: YamlStepIdentifier = { - name: 'name' in step ? step.name : '', + job.steps = mockJob.steps.map((step): StepIdentifier => { + const mockStep: StepIdentifier = { + name: step.name, run: step.mockWith, }; - if ('id' in step && step.id) { + if (step.id) { mockStep.id = step.id; } if (jobWith) { @@ -117,4 +105,4 @@ class JobMocker { } export default JobMocker; -export type {MockJob, MockJobs, YamlWorkflow, YamlMockJob, YamlStepIdentifier}; +export type {MockJob, MockJobs, YamlWorkflow, YamlMockJob}; diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index bc4867a83827..c5e54d9a11c0 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -1,10 +1,11 @@ /* eslint no-console: ["error", { allow: ["warn", "log"] }] */ +import type {StepIdentifier} from '@kie/act-js'; import type {PathLike} from 'fs'; import fs from 'fs'; import path from 'path'; import {exit} from 'process'; import yaml from 'yaml'; -import type {YamlMockJob, YamlStepIdentifier, YamlWorkflow} from './JobMocker'; +import type {YamlMockJob, YamlWorkflow} from './JobMocker'; const workflowsDirectory = path.resolve(__dirname, '..', '..', '.github', 'workflows'); const workflowTestsDirectory = path.resolve(__dirname, '..'); @@ -97,7 +98,7 @@ describe('test workflow ${workflowName}', () => { }); `; -const mockStepTemplate = (stepMockName: string, step: YamlStepIdentifier, jobId: string | undefined) => ` +const mockStepTemplate = (stepMockName: string, step: StepIdentifier, jobId: string | undefined) => ` const ${stepMockName} = utils.createMockStep( '${step.name ?? ''}', '${step.name ?? ''}', @@ -203,7 +204,7 @@ const parseWorkflowFile = (workflow: YamlWorkflow) => { steps: [], }; job.steps.forEach((step) => { - const workflowStep: YamlStepIdentifier = { + const workflowStep = { name: step.name, inputs: Object.keys(step.with ?? {}), envs: step.envs ?? [], From 31f1f54685461db4c0caa181a200ae419c3b0c3b Mon Sep 17 00:00:00 2001 From: Garrett Knight Date: Mon, 25 Mar 2024 17:51:31 +0000 Subject: [PATCH 42/53] Update Create-A-Report.md Updating 'Retract' section to reflect new submitter ability to edit Processing reports. --- .../expensify-classic/expenses/reports/Create-A-Report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/articles/expensify-classic/expenses/reports/Create-A-Report.md b/docs/articles/expensify-classic/expenses/reports/Create-A-Report.md index 88ec2b730d1e..e8dfdbf44bcb 100644 --- a/docs/articles/expensify-classic/expenses/reports/Create-A-Report.md +++ b/docs/articles/expensify-classic/expenses/reports/Create-A-Report.md @@ -91,7 +91,7 @@ There are three ways you can change the report layout under the Details section # How to retract your report (Undo Submit) -As long as the report is still in a Processing state, you can retract this submission to put the report back to Draft status to make corrections and re-submit. +You can edit expenses on a report in a **Processing** state so long as it hasn't been approved yet. If a report has been through a level of approval and is still in the **Processing** state, you can retract this submission to put the report back to Draft status to make corrections and re-submit. To retract a **Processing** report on the web app, click the Undo Submit button at the upper left-hand corner of the report. From 6a0fabe4f1eeb5f8531a53e0be8fc6ece597dafb Mon Sep 17 00:00:00 2001 From: Rafe Colton Date: Mon, 25 Mar 2024 17:15:14 -0700 Subject: [PATCH 43/53] Check quickAction.action is set before trying to display in popover On a fresh group chat, `props.quickAction` is `[]`, so it enters this block and then fails to get a translation for `props.quickAction.action`, which is not set --- .../sidebar/SidebarScreen/FloatingActionButtonAndPopover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js index 117083293b5d..1b6b8f41c1cd 100644 --- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js +++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js @@ -335,7 +335,7 @@ function FloatingActionButtonAndPopover(props) { }, ] : []), - ...(props.quickAction + ...(props.quickAction && props.quickAction.action ? [ { icon: getQuickActionIcon(props.quickAction.action), From 76264c1dda10c770153ea7410bd8c0038149c94e Mon Sep 17 00:00:00 2001 From: Rafe Colton Date: Mon, 25 Mar 2024 17:33:11 -0700 Subject: [PATCH 44/53] Use translation keys that match quick action names --- src/languages/en.ts | 2 +- src/languages/es.ts | 2 +- .../sidebar/SidebarScreen/FloatingActionButtonAndPopover.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 41e02692e760..358a3ce61d4f 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -589,7 +589,7 @@ export default { recordDistance: 'Record Distance', requestMoney: 'Request Money', splitBill: 'Split Bill', - splitReceipt: 'Split Receipt', + splitScan: 'Split Receipt', splitDistance: 'Split Distance', sendMoney: 'Send Money', assignTask: 'Assign Task', diff --git a/src/languages/es.ts b/src/languages/es.ts index 5e5e958ae075..16d0748eed1d 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -585,7 +585,7 @@ export default { recordDistance: 'Grabar Distancia', requestMoney: 'Solicitar Dinero', splitBill: 'Dividir Cuenta', - splitReceipt: 'Dividir Recibo', + splitScan: 'Dividir Recibo', splitDistance: 'Dividir Distancia', sendMoney: 'Enviar Dinero', assignTask: 'Assignar Tarea', diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js index 1b6b8f41c1cd..24603de5679c 100644 --- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js +++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js @@ -70,9 +70,9 @@ const getQuickActionTitle = (action) => { case CONST.QUICK_ACTIONS.SPLIT_MANUAL: return 'quickAction.splitBill'; case CONST.QUICK_ACTIONS.SPLIT_SCAN: - return 'quickAction.splitReceipt'; - case CONST.QUICK_ACTIONS.SPLIT_DISTANCE: return 'quickAction.splitScan'; + case CONST.QUICK_ACTIONS.SPLIT_DISTANCE: + return 'quickAction.splitDistance'; case CONST.QUICK_ACTIONS.SEND_MONEY: return 'quickAction.sendMoney'; case CONST.QUICK_ACTIONS.ASSIGN_TASK: From dae726a66e6117fc50dc64a2698213bf00d7047f Mon Sep 17 00:00:00 2001 From: hurali97 Date: Tue, 26 Mar 2024 13:07:16 +0500 Subject: [PATCH 45/53] refactor: remove not needed getCanonicalLocales Intl polyfill --- package-lock.json | 1 - package.json | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba15feeacae6..cfaf942936e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@expensify/react-native-live-markdown": "0.1.5", "@expo/metro-runtime": "~3.1.1", "@formatjs/intl-datetimeformat": "^6.10.0", - "@formatjs/intl-getcanonicallocales": "^2.2.0", "@formatjs/intl-listformat": "^7.2.2", "@formatjs/intl-locale": "^3.3.0", "@formatjs/intl-numberformat": "^8.5.0", diff --git a/package.json b/package.json index d1974b99b91e..9d4782ca0d7a 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "@expensify/react-native-live-markdown": "0.1.5", "@expo/metro-runtime": "~3.1.1", "@formatjs/intl-datetimeformat": "^6.10.0", - "@formatjs/intl-getcanonicallocales": "^2.2.0", "@formatjs/intl-listformat": "^7.2.2", "@formatjs/intl-locale": "^3.3.0", "@formatjs/intl-numberformat": "^8.5.0", @@ -154,8 +153,8 @@ "react-native-plaid-link-sdk": "10.8.0", "react-native-qrcode-svg": "^6.2.0", "react-native-quick-sqlite": "^8.0.0-beta.2", - "react-native-release-profiler": "^0.1.6", "react-native-reanimated": "^3.7.2", + "react-native-release-profiler": "^0.1.6", "react-native-render-html": "6.3.1", "react-native-safe-area-context": "4.8.2", "react-native-screens": "3.29.0", From 05cc46b2cb88aa7b3c1d626e9861da22faba0527 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Tue, 26 Mar 2024 13:07:31 +0500 Subject: [PATCH 46/53] refactor: adjust comments --- src/libs/IntlPolyfill/polyfillNumberFormat.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/IntlPolyfill/polyfillNumberFormat.ts b/src/libs/IntlPolyfill/polyfillNumberFormat.ts index 8b4ac19b7678..58d8adf1b761 100644 --- a/src/libs/IntlPolyfill/polyfillNumberFormat.ts +++ b/src/libs/IntlPolyfill/polyfillNumberFormat.ts @@ -17,7 +17,6 @@ function hasOldCurrencyData(): boolean { /** * Checks if the formatToParts function is available on the * Intl.NumberFormat object. - * @returns boolean */ function hasFormatToParts(): boolean { return typeof numberFormat.formatToParts === 'function'; From 36920e7e2d02a10ba52f3bef86e5fc14abf66f10 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:08:43 +0530 Subject: [PATCH 47/53] fix overlay --- docs/_sass/_colors.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 7abe75e55162..31557c6aa78c 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -15,7 +15,7 @@ --color-button-background-hover: #d8d1c7; --color-button-success-background: #03d47c; --color-button-success-background-hover: #00a862; - --color-overlay: rgba(0, 0, 0, 0.28); + --color-overlay: rgba(235, 230, 223, 0.72); } @media (prefers-color-scheme: dark) { From 1d589a203f4dbd6ce9eba2c72f1ea5092899fb60 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:09:35 +0530 Subject: [PATCH 48/53] fix button text --- docs/_sass/_colors.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 31557c6aa78c..08d027d2d406 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -1,6 +1,6 @@ :root { --color-text: #002e22; - --color-button-text: #fff; + --color-button-text: #FCFBF9; --color-text-supporting: #76847e; --color-icons: #a2a9a3; --color-borders: #e6e1da; From 86db87125fa6033daf9756d74334a46b68b2ed85 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:10:14 +0530 Subject: [PATCH 49/53] fix link color --- docs/_sass/_colors.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 08d027d2d406..5aa7da279824 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -9,7 +9,7 @@ --color-appBG: #fcfbf9; --color-success: #03d47c; --color-accent: #03d47c; - --color-link: #5ab0ff; + --color-link: #0164BF; --color-link-hovered: #b0d9ff; --color-button-background: #e6e1da; --color-button-background-hover: #d8d1c7; From 59606dee29c9dd867e9a55c8e0f02f8eea9ac3b7 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:10:35 +0530 Subject: [PATCH 50/53] fix link hover color --- docs/_sass/_colors.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 5aa7da279824..3d3c49a92caa 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -10,7 +10,7 @@ --color-success: #03d47c; --color-accent: #03d47c; --color-link: #0164BF; - --color-link-hovered: #b0d9ff; + --color-link-hovered: #0676DE; --color-button-background: #e6e1da; --color-button-background-hover: #d8d1c7; --color-button-success-background: #03d47c; From b62fc68a34baed1a82f9ef2a5e2bbffbbbaa1892 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:11:19 +0530 Subject: [PATCH 51/53] fix link hover color --- docs/_sass/_colors.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_sass/_colors.scss b/docs/_sass/_colors.scss index 3d3c49a92caa..1f5c43ac7ae2 100644 --- a/docs/_sass/_colors.scss +++ b/docs/_sass/_colors.scss @@ -21,7 +21,7 @@ @media (prefers-color-scheme: dark) { :root { --color-text: #e7ece9; - --color-button-text: #fff; + --color-button-text: #E7ECE9; --color-text-supporting: #afbbb0; --color-icons: #8b9c8f; --color-borders: #1a3d32; @@ -31,7 +31,7 @@ --color-success: #03d47c; --color-accent: #03d47c; --color-link: #5ab0ff; - --color-link-hovered: #b0d9ff; + --color-link-hovered: #8DC8FF; --color-button-background: #1a3d32; --color-button-background-hover: #224f41; --color-button-success-background: #03d47c; From 8fb7a080062e959c7939326d638c4faa61d0b404 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 14:45:30 +0530 Subject: [PATCH 52/53] fix link hover color --- docs/_sass/_search-bar.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/_sass/_search-bar.scss b/docs/_sass/_search-bar.scss index 5347dd0a5931..e26763d98c09 100644 --- a/docs/_sass/_search-bar.scss +++ b/docs/_sass/_search-bar.scss @@ -174,10 +174,6 @@ label.search-label { background-color: var(--color-appBG) !important; } -.gs-webResult.gs-result a.gs-title:link { - color: var(--color-link) !important; -} - /* Hide the scrollbar */ .gsc-control-cse::-webkit-scrollbar { display: none; From b064a8477021f6708073ca760ca263d4c51e24f8 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Tue, 26 Mar 2024 18:59:03 +0530 Subject: [PATCH 53/53] fix logo color in dark mode --- docs/assets/images/expensify-help.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/images/expensify-help.svg b/docs/assets/images/expensify-help.svg index db9379fac769..74fc63ffae96 100644 --- a/docs/assets/images/expensify-help.svg +++ b/docs/assets/images/expensify-help.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file