From d3997ed49108c262b803ffd96bc42091ecb7bcd8 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Mon, 20 May 2024 11:21:31 +0200 Subject: [PATCH 1/9] Use new version of expensify-common --- .../AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx | 2 +- src/components/AttachmentModal.tsx | 2 +- src/components/AttachmentPicker/index.native.tsx | 2 +- src/components/Attachments/AttachmentView/index.tsx | 2 +- src/components/AutoEmailLink.tsx | 6 +++--- src/components/CurrencySelectionList/index.tsx | 2 +- src/components/DatePicker/CalendarPicker/index.tsx | 2 +- src/components/DeeplinkWrapper/index.website.tsx | 2 +- src/components/DragAndDrop/Provider/index.tsx | 2 +- .../HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx | 2 +- .../HTMLRenderers/MentionUserRenderer.tsx | 2 +- src/components/LHNOptionsList/OptionRowLHN.tsx | 2 +- src/components/MenuItem.tsx | 2 +- src/components/MoneyRequestConfirmationList.tsx | 2 +- src/components/ReportActionItem/MoneyReportView.tsx | 2 +- src/components/ReportActionItem/ReportActionItemImage.tsx | 2 +- src/components/ReportActionItem/TaskPreview.tsx | 2 +- src/components/SelectionList/InviteMemberListItem.tsx | 2 +- src/components/SelectionList/UserListItem.tsx | 2 +- src/components/StateSelector.tsx | 2 +- src/components/TextInput/BaseTextInput/index.native.tsx | 2 +- src/components/TextInput/BaseTextInput/index.tsx | 2 +- src/components/UnitPicker.tsx | 2 +- .../UserDetailsTooltip/BaseUserDetailsTooltip/index.tsx | 2 +- src/components/createOnyxContext.tsx | 2 +- src/hooks/useCopySelectionHelper.ts | 2 +- src/hooks/useGeographicalStateFromRoute.ts | 2 +- src/hooks/useHtmlPaste/index.ts | 2 +- src/languages/en.ts | 3 +-- src/languages/es.ts | 2 +- src/libs/ActiveClientManager/index.ts | 2 +- src/libs/BankAccountUtils.ts | 2 +- src/libs/EmojiUtils.ts | 2 +- src/libs/GetStyledTextArray.ts | 2 +- src/libs/KeyboardShortcut/index.ts | 2 +- src/libs/LocalePhoneNumber.ts | 2 +- src/libs/Log.ts | 2 +- src/libs/LoginUtils.ts | 3 +-- src/libs/NextStepUtils.ts | 2 +- .../Notification/LocalNotification/BrowserNotifications.ts | 2 +- src/libs/OptionsListUtils.ts | 2 +- src/libs/PersonalDetailsUtils.ts | 2 +- src/libs/PhoneNumber.ts | 2 +- src/libs/PolicyUtils.ts | 2 +- src/libs/ReceiptUtils.ts | 2 +- src/libs/ReportActionsUtils.ts | 2 +- src/libs/ReportUtils.ts | 3 +-- src/libs/SelectionScraper/index.ts | 2 +- src/libs/SidebarUtils.ts | 2 +- src/libs/UserUtils.ts | 2 +- src/libs/ValidationUtils.ts | 5 ++--- src/libs/actions/App.ts | 2 +- src/libs/actions/Device/generateDeviceID/index.android.ts | 2 +- src/libs/actions/Device/generateDeviceID/index.ts | 2 +- .../Device/getDeviceInfo/getOSAndName/index.native.ts | 2 +- src/libs/actions/Device/getDeviceInfo/getOSAndName/index.ts | 5 ++--- src/libs/actions/IOU.ts | 3 +-- src/libs/actions/Policy.ts | 4 +--- src/libs/actions/Report.ts | 3 +-- src/libs/fileDownload/FileUtils.ts | 2 +- src/libs/isReportMessageAttachment.ts | 2 +- src/libs/models/BankAccount.ts | 2 +- src/pages/DetailsPage.tsx | 2 +- src/pages/EditReportFieldPage.tsx | 2 +- src/pages/PrivateNotes/PrivateNotesEditPage.tsx | 3 +-- src/pages/ProfilePage.tsx | 2 +- src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx | 2 +- .../BusinessInfo/substeps/ConfirmationBusiness.tsx | 2 +- .../components/BankAccountValidationForm.tsx | 2 +- src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx | 2 +- src/pages/RoomDescriptionPage.tsx | 2 +- src/pages/RoomInvitePage.tsx | 2 +- src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx | 2 +- src/pages/TeachersUnite/KnowATeacherPage.tsx | 2 +- src/pages/home/report/ContextMenu/ContextMenuActions.tsx | 3 +-- src/pages/home/report/ReactionList/BaseReactionList.tsx | 2 +- .../ComposerWithSuggestions/ComposerWithSuggestions.tsx | 2 +- .../home/report/ReportActionCompose/SuggestionMention.tsx | 2 +- src/pages/home/report/ReportActionItemBasicMessage.tsx | 2 +- src/pages/home/report/ReportActionItemMessageEdit.tsx | 2 +- src/pages/home/report/comment/TextCommentFragment.tsx | 2 +- .../home/report/comment/shouldRenderAsText/index.native.ts | 2 +- src/pages/home/report/comment/shouldRenderAsText/index.ts | 2 +- .../settings/Profile/Contacts/ContactMethodDetailsPage.tsx | 2 +- src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx | 2 +- .../settings/Profile/Contacts/NewContactMethodPage.tsx | 2 +- .../settings/Profile/PersonalDetails/StateSelectionPage.tsx | 2 +- src/pages/settings/Security/CloseAccountPage.tsx | 2 +- src/pages/signin/EmailDeliveryFailurePage.tsx | 2 +- src/pages/signin/LoginForm/BaseLoginForm.tsx | 2 +- src/pages/signin/SignInPage.tsx | 2 +- src/pages/signin/UnlinkLoginForm.tsx | 2 +- src/pages/tasks/NewTaskDescriptionPage.tsx | 2 +- src/pages/tasks/NewTaskDetailsPage.tsx | 2 +- src/pages/tasks/TaskDescriptionPage.tsx | 2 +- src/pages/wallet/WalletStatementPage.tsx | 2 +- src/pages/workspace/WorkspaceInviteMessagePage.tsx | 2 +- src/pages/workspace/WorkspaceProfileDescriptionPage.tsx | 2 +- src/pages/workspace/WorkspaceProfilePage.tsx | 2 +- src/pages/workspace/bills/WorkspaceBillsFirstSection.tsx | 2 +- src/pages/workspace/distanceRates/UnitSelector/index.tsx | 2 +- .../reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx | 2 +- src/pages/workspace/taxes/NamePage.tsx | 2 +- src/stories/Composer.stories.tsx | 2 +- tests/utils/TestHelper.ts | 2 +- 105 files changed, 109 insertions(+), 120 deletions(-) diff --git a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx index 99a0ee3bf683..d07cf1b474a9 100644 --- a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx +++ b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect, useRef} from 'react'; // eslint-disable-next-line no-restricted-imports import type {Text as RNText} from 'react-native'; diff --git a/src/components/AttachmentModal.tsx b/src/components/AttachmentModal.tsx index fb6a8e911e87..f3954eff4683 100644 --- a/src/components/AttachmentModal.tsx +++ b/src/components/AttachmentModal.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {memo, useCallback, useEffect, useMemo, useState} from 'react'; import {Animated, Keyboard, View} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; diff --git a/src/components/AttachmentPicker/index.native.tsx b/src/components/AttachmentPicker/index.native.tsx index ad4cf023c096..9249eb79d368 100644 --- a/src/components/AttachmentPicker/index.native.tsx +++ b/src/components/AttachmentPicker/index.native.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback, useMemo, useRef, useState} from 'react'; import {Alert, View} from 'react-native'; import RNFetchBlob from 'react-native-blob-util'; diff --git a/src/components/Attachments/AttachmentView/index.tsx b/src/components/Attachments/AttachmentView/index.tsx index cee2264894a7..a7409e57f846 100644 --- a/src/components/Attachments/AttachmentView/index.tsx +++ b/src/components/Attachments/AttachmentView/index.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {memo, useEffect, useState} from 'react'; import type {GestureResponderEvent, StyleProp, ViewStyle} from 'react-native'; import {View} from 'react-native'; diff --git a/src/components/AutoEmailLink.tsx b/src/components/AutoEmailLink.tsx index e1a9bdd2794b..d64c665a020f 100644 --- a/src/components/AutoEmailLink.tsx +++ b/src/components/AutoEmailLink.tsx @@ -1,4 +1,4 @@ -import {CONST} from 'expensify-common/lib/CONST'; +import {CONST as COMMON_CONST} from 'expensify-common'; import React from 'react'; import type {StyleProp, TextStyle} from 'react-native'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -20,8 +20,8 @@ function AutoEmailLink({text, style}: AutoEmailLinkProps) { const styles = useThemeStyles(); return ( - {text.split(CONST.REG_EXP.EXTRACT_EMAIL).map((str, index) => { - if (CONST.REG_EXP.EMAIL.test(str)) { + {text.split(COMMON_CONST.REG_EXP.EXTRACT_EMAIL).map((str, index) => { + if (COMMON_CONST.REG_EXP.EMAIL.test(str)) { return ( >; type State = keyof typeof COMMON_CONST.STATES; diff --git a/src/hooks/useHtmlPaste/index.ts b/src/hooks/useHtmlPaste/index.ts index 925a3db518ae..a6d8993888cc 100644 --- a/src/hooks/useHtmlPaste/index.ts +++ b/src/hooks/useHtmlPaste/index.ts @@ -1,5 +1,5 @@ import {useNavigation} from '@react-navigation/native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import {useCallback, useEffect} from 'react'; import type UseHtmlPaste from './types'; diff --git a/src/languages/en.ts b/src/languages/en.ts index f8d122f3b69a..fa65aadc1a43 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1,5 +1,4 @@ -import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; -import Str from 'expensify-common/lib/str'; +import {CONST as COMMON_CONST, Str} from 'expensify-common'; import CONST from '@src/CONST'; import type {Country} from '@src/CONST'; import type {ConnectionName, PolicyConnectionSyncStage} from '@src/types/onyx/Policy'; diff --git a/src/languages/es.ts b/src/languages/es.ts index 536a6182f393..f3d7ea521424 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import CONST from '@src/CONST'; import type {ConnectionName, PolicyConnectionSyncStage} from '@src/types/onyx/Policy'; import type { diff --git a/src/libs/ActiveClientManager/index.ts b/src/libs/ActiveClientManager/index.ts index 69bd3a848e0b..e93cdb07d084 100644 --- a/src/libs/ActiveClientManager/index.ts +++ b/src/libs/ActiveClientManager/index.ts @@ -3,7 +3,7 @@ * only one tab is processing those saved requests or we would be duplicating data (or creating errors). * This file ensures exactly that by tracking all the clientIDs connected, storing the most recent one last and it considers that last clientID the "leader". */ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import Onyx from 'react-native-onyx'; import * as ActiveClients from '@userActions/ActiveClients'; import ONYXKEYS from '@src/ONYXKEYS'; diff --git a/src/libs/BankAccountUtils.ts b/src/libs/BankAccountUtils.ts index a7fbc5f3bd4e..d3c5bb4998a8 100644 --- a/src/libs/BankAccountUtils.ts +++ b/src/libs/BankAccountUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {OnyxEntry} from 'react-native-onyx'; import type * as OnyxTypes from '@src/types/onyx'; diff --git a/src/libs/EmojiUtils.ts b/src/libs/EmojiUtils.ts index 3b189dbb084f..18bc5f5fb576 100644 --- a/src/libs/EmojiUtils.ts +++ b/src/libs/EmojiUtils.ts @@ -1,5 +1,5 @@ import {getUnixTime} from 'date-fns'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import memoize from 'lodash/memoize'; import Onyx from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/libs/GetStyledTextArray.ts b/src/libs/GetStyledTextArray.ts index 9bc6ccc33b4c..04094c1ee61f 100644 --- a/src/libs/GetStyledTextArray.ts +++ b/src/libs/GetStyledTextArray.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; type StyledText = { text: string; diff --git a/src/libs/KeyboardShortcut/index.ts b/src/libs/KeyboardShortcut/index.ts index b349c43b5715..4f89d44da959 100644 --- a/src/libs/KeyboardShortcut/index.ts +++ b/src/libs/KeyboardShortcut/index.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import * as KeyCommand from 'react-native-key-command'; import getOperatingSystem from '@libs/getOperatingSystem'; import localeCompare from '@libs/LocaleCompare'; diff --git a/src/libs/LocalePhoneNumber.ts b/src/libs/LocalePhoneNumber.ts index 460d5fc0fe9f..7249912e6f58 100644 --- a/src/libs/LocalePhoneNumber.ts +++ b/src/libs/LocalePhoneNumber.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import Onyx from 'react-native-onyx'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; diff --git a/src/libs/Log.ts b/src/libs/Log.ts index 101996870e1d..0612dcff9223 100644 --- a/src/libs/Log.ts +++ b/src/libs/Log.ts @@ -2,7 +2,7 @@ // action would likely cause confusion about which one to use. But most other API methods should happen inside an action file. /* eslint-disable rulesdir/no-api-in-views */ -import Logger from 'expensify-common/lib/Logger'; +import {Logger} from 'expensify-common'; import Onyx from 'react-native-onyx'; import type {Merge} from 'type-fest'; import CONST from '@src/CONST'; diff --git a/src/libs/LoginUtils.ts b/src/libs/LoginUtils.ts index 2d49cb992717..ded60ab3e800 100644 --- a/src/libs/LoginUtils.ts +++ b/src/libs/LoginUtils.ts @@ -1,5 +1,4 @@ -import {PUBLIC_DOMAINS} from 'expensify-common/lib/CONST'; -import Str from 'expensify-common/lib/str'; +import {PUBLIC_DOMAINS, Str} from 'expensify-common'; import Onyx from 'react-native-onyx'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; diff --git a/src/libs/NextStepUtils.ts b/src/libs/NextStepUtils.ts index 66f63ddfd27f..e7dd903f9502 100644 --- a/src/libs/NextStepUtils.ts +++ b/src/libs/NextStepUtils.ts @@ -1,5 +1,5 @@ import {format, lastDayOfMonth, setDate} from 'date-fns'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import Onyx from 'react-native-onyx'; import type {OnyxCollection} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; diff --git a/src/libs/Notification/LocalNotification/BrowserNotifications.ts b/src/libs/Notification/LocalNotification/BrowserNotifications.ts index ee6d00ee2208..9980a1d0e1b9 100644 --- a/src/libs/Notification/LocalNotification/BrowserNotifications.ts +++ b/src/libs/Notification/LocalNotification/BrowserNotifications.ts @@ -1,5 +1,5 @@ // Web and desktop implementation only. Do not import for direct use. Use LocalNotification. -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {ImageSourcePropType} from 'react-native'; import EXPENSIFY_ICON_URL from '@assets/images/expensify-logo-round-clearspace.png'; import * as AppUpdate from '@libs/actions/AppUpdate'; diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 544ced533e82..a5c6f2c7300f 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1,5 +1,5 @@ /* eslint-disable no-continue */ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; // eslint-disable-next-line you-dont-need-lodash-underscore/get import lodashGet from 'lodash/get'; import lodashOrderBy from 'lodash/orderBy'; diff --git a/src/libs/PersonalDetailsUtils.ts b/src/libs/PersonalDetailsUtils.ts index ffa0605f1eba..26547583f644 100644 --- a/src/libs/PersonalDetailsUtils.ts +++ b/src/libs/PersonalDetailsUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {OnyxEntry, OnyxUpdate} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import type {CurrentUserPersonalDetails} from '@components/withCurrentUserPersonalDetails'; diff --git a/src/libs/PhoneNumber.ts b/src/libs/PhoneNumber.ts index 787b3634030a..84ef35a18489 100644 --- a/src/libs/PhoneNumber.ts +++ b/src/libs/PhoneNumber.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line no-restricted-imports import {parsePhoneNumber as originalParsePhoneNumber} from 'awesome-phonenumber'; import type {ParsedPhoneNumber, ParsedPhoneNumberInvalid, PhoneNumberParseOptions} from 'awesome-phonenumber'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import CONST from '@src/CONST'; /** diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 6a26b1a6cfc2..fca803e03790 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; diff --git a/src/libs/ReceiptUtils.ts b/src/libs/ReceiptUtils.ts index 849bc50e77b0..b3892d20162f 100644 --- a/src/libs/ReceiptUtils.ts +++ b/src/libs/ReceiptUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import _ from 'lodash'; import type {OnyxEntry} from 'react-native-onyx'; import CONST from '@src/CONST'; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 906a2963baa8..ca45ba79fa23 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1,4 +1,4 @@ -import fastMerge from 'expensify-common/lib/fastMerge'; +import {fastMerge} from 'expensify-common'; import _ from 'lodash'; import lodashFindLast from 'lodash/findLast'; import type {OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index b8e4c448fdc2..ef646a169358 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1,6 +1,5 @@ import {format} from 'date-fns'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; +import {ExpensiMark, Str} from 'expensify-common'; import {isEmpty} from 'lodash'; import lodashEscape from 'lodash/escape'; import lodashFindLastIndex from 'lodash/findLastIndex'; diff --git a/src/libs/SelectionScraper/index.ts b/src/libs/SelectionScraper/index.ts index eda38a43507c..88726aa633b6 100644 --- a/src/libs/SelectionScraper/index.ts +++ b/src/libs/SelectionScraper/index.ts @@ -1,7 +1,7 @@ import render from 'dom-serializer'; import type {Node} from 'domhandler'; import {DataNode, Element} from 'domhandler'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import {parseDocument} from 'htmlparser2'; import CONST from '@src/CONST'; import type GetCurrentSelection from './types'; diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index b4ae942547a1..aae4fc3e729c 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import type {ChatReportSelector, PolicySelector, ReportActionsSelector} from '@hooks/useReportIDs'; diff --git a/src/libs/UserUtils.ts b/src/libs/UserUtils.ts index ce7e4963afc7..cdbbb96e777f 100644 --- a/src/libs/UserUtils.ts +++ b/src/libs/UserUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {OnyxEntry} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import * as defaultAvatars from '@components/Icon/DefaultAvatars'; diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index d5a87fc07e28..3f95f1aa2b70 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -1,6 +1,5 @@ import {addYears, endOfMonth, format, isAfter, isBefore, isSameDay, isValid, isWithinInterval, parse, parseISO, startOfDay, subYears} from 'date-fns'; -import Str from 'expensify-common/lib/str'; -import {URL_REGEX_WITH_REQUIRED_PROTOCOL} from 'expensify-common/lib/Url'; +import {Str, Url} from 'expensify-common'; import isDate from 'lodash/isDate'; import isEmpty from 'lodash/isEmpty'; import isObject from 'lodash/isObject'; @@ -241,7 +240,7 @@ function getDatePassedError(inputDate: string): string { */ function isValidWebsite(url: string): boolean { const isLowerCase = url === url.toLowerCase(); - return new RegExp(`^${URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i').test(url) && isLowerCase; + return new RegExp(`^${Url.URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i').test(url) && isLowerCase; } function validateIdentity(identity: Record): Record { diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts index 2657ea04d9e5..61bd1c2b235c 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -1,5 +1,5 @@ // Issue - https://github.com/Expensify/App/issues/26719 -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {AppStateStatus} from 'react-native'; import {AppState} from 'react-native'; import type {OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; diff --git a/src/libs/actions/Device/generateDeviceID/index.android.ts b/src/libs/actions/Device/generateDeviceID/index.android.ts index d662967a9f76..17563e039e6a 100644 --- a/src/libs/actions/Device/generateDeviceID/index.android.ts +++ b/src/libs/actions/Device/generateDeviceID/index.android.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import DeviceInfo from 'react-native-device-info'; import type GenerateDeviceID from './types'; diff --git a/src/libs/actions/Device/generateDeviceID/index.ts b/src/libs/actions/Device/generateDeviceID/index.ts index 82ea72ba8180..a88457463f34 100644 --- a/src/libs/actions/Device/generateDeviceID/index.ts +++ b/src/libs/actions/Device/generateDeviceID/index.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type GenerateDeviceID from './types'; const uniqueID = Str.guid(); diff --git a/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.native.ts b/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.native.ts index 16a48348df71..06c425438053 100644 --- a/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.native.ts +++ b/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.native.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import RNDeviceInfo from 'react-native-device-info'; import type {GetOSAndName} from './types'; diff --git a/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.ts b/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.ts index 29b004412f64..7111cab41ad1 100644 --- a/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.ts +++ b/src/libs/actions/Device/getDeviceInfo/getOSAndName/index.ts @@ -1,4 +1,3 @@ -// Don't import this file with '* as Device'. It's known to make VSCode IntelliSense crash. -import {getOSAndName} from 'expensify-common/lib/Device'; +import {Device} from 'expensify-common'; -export default getOSAndName; +export default Device.getOSAndName; diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 2464dbff7dbd..a9beaa410696 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -1,6 +1,5 @@ import {format} from 'date-fns'; -import fastMerge from 'expensify-common/lib/fastMerge'; -import Str from 'expensify-common/lib/str'; +import {fastMerge, Str} from 'expensify-common'; import type {OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; diff --git a/src/libs/actions/Policy.ts b/src/libs/actions/Policy.ts index 3e09524e1dd1..09c1bf35a25a 100644 --- a/src/libs/actions/Policy.ts +++ b/src/libs/actions/Policy.ts @@ -1,6 +1,4 @@ -import {PUBLIC_DOMAINS} from 'expensify-common/lib/CONST'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; +import {ExpensiMark, PUBLIC_DOMAINS, Str} from 'expensify-common'; import {escapeRegExp} from 'lodash'; import lodashClone from 'lodash/clone'; import lodashUnion from 'lodash/union'; diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 91a0ce5da930..8ff0484946d3 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -1,6 +1,5 @@ import {format as timezoneFormat, utcToZonedTime} from 'date-fns-tz'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; +import {ExpensiMark, Str} from 'expensify-common'; import isEmpty from 'lodash/isEmpty'; import {DeviceEventEmitter, InteractionManager, Linking} from 'react-native'; import type {NullishDeep, OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; diff --git a/src/libs/fileDownload/FileUtils.ts b/src/libs/fileDownload/FileUtils.ts index 6517a7a28642..f058ce0f80d8 100644 --- a/src/libs/fileDownload/FileUtils.ts +++ b/src/libs/fileDownload/FileUtils.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import {Alert, Linking, Platform} from 'react-native'; import ImageSize from 'react-native-image-size'; import type {FileObject} from '@components/AttachmentModal'; diff --git a/src/libs/isReportMessageAttachment.ts b/src/libs/isReportMessageAttachment.ts index 330ba4470097..9ef4125ee8bf 100644 --- a/src/libs/isReportMessageAttachment.ts +++ b/src/libs/isReportMessageAttachment.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import CONST from '@src/CONST'; import type {Message} from '@src/types/onyx/ReportAction'; diff --git a/src/libs/models/BankAccount.ts b/src/libs/models/BankAccount.ts index 611d77c99927..44b2122d8091 100644 --- a/src/libs/models/BankAccount.ts +++ b/src/libs/models/BankAccount.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {ValueOf} from 'type-fest'; import CONST from '@src/CONST'; import type {AdditionalData} from '@src/types/onyx/BankAccount'; diff --git a/src/pages/DetailsPage.tsx b/src/pages/DetailsPage.tsx index 49b3e856c65d..1e0cb71f020c 100755 --- a/src/pages/DetailsPage.tsx +++ b/src/pages/DetailsPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/EditReportFieldPage.tsx b/src/pages/EditReportFieldPage.tsx index 6cc93d05ebbc..be5ba4f6e486 100644 --- a/src/pages/EditReportFieldPage.tsx +++ b/src/pages/EditReportFieldPage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useState} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx index f9560edf7486..83a72bfe7ff8 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx @@ -1,7 +1,6 @@ import {useFocusEffect} from '@react-navigation/native'; import type {StackScreenProps} from '@react-navigation/stack'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; +import {ExpensiMark, Str} from 'expensify-common'; import lodashDebounce from 'lodash/debounce'; import React, {useCallback, useMemo, useRef, useState} from 'react'; import {Keyboard} from 'react-native'; diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index d5e556b25dd0..cd942edc474b 100755 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect, useMemo} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx b/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx index 10b05e58deb7..07c76542f49f 100644 --- a/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx +++ b/src/pages/ReimbursementAccount/BeneficialOwnersStep.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useState} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/ReimbursementAccount/BusinessInfo/substeps/ConfirmationBusiness.tsx b/src/pages/ReimbursementAccount/BusinessInfo/substeps/ConfirmationBusiness.tsx index 6311a63a4059..4c8331a23d8f 100644 --- a/src/pages/ReimbursementAccount/BusinessInfo/substeps/ConfirmationBusiness.tsx +++ b/src/pages/ReimbursementAccount/BusinessInfo/substeps/ConfirmationBusiness.tsx @@ -1,4 +1,4 @@ -import type {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; +import type {CONST as COMMON_CONST} from 'expensify-common'; import React, {useMemo} from 'react'; import type {OnyxEntry} from 'react-native-onyx'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx b/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx index a83e18d119c9..9c539cbef6fa 100644 --- a/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx +++ b/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import FormProvider from '@components/Form/FormProvider'; diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx index 8c59e98f7218..dde820368447 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx @@ -1,6 +1,6 @@ import type {RouteProp} from '@react-navigation/native'; import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import lodashPick from 'lodash/pick'; import React, {useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; diff --git a/src/pages/RoomDescriptionPage.tsx b/src/pages/RoomDescriptionPage.tsx index 3992dff188e2..46a10483fd08 100644 --- a/src/pages/RoomDescriptionPage.tsx +++ b/src/pages/RoomDescriptionPage.tsx @@ -1,5 +1,5 @@ import {useFocusEffect} from '@react-navigation/native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useCallback, useRef, useState} from 'react'; import {View} from 'react-native'; import type {OnyxCollection} from 'react-native-onyx'; diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index c78094594f16..633623fc16f3 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import type {SectionListData} from 'react-native'; import {View} from 'react-native'; diff --git a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx index 6e8c3b340f4e..eabd8642c287 100644 --- a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx +++ b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/TeachersUnite/KnowATeacherPage.tsx b/src/pages/TeachersUnite/KnowATeacherPage.tsx index cb58009c40f0..aaca679e49b8 100644 --- a/src/pages/TeachersUnite/KnowATeacherPage.tsx +++ b/src/pages/TeachersUnite/KnowATeacherPage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 105eadffd436..69c56f82d4f4 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -1,5 +1,4 @@ -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; +import {ExpensiMark, Str} from 'expensify-common'; import type {MutableRefObject} from 'react'; import React from 'react'; import {InteractionManager} from 'react-native'; diff --git a/src/pages/home/report/ReactionList/BaseReactionList.tsx b/src/pages/home/report/ReactionList/BaseReactionList.tsx index 6f56f8f09632..b90d1561c77c 100755 --- a/src/pages/home/report/ReactionList/BaseReactionList.tsx +++ b/src/pages/home/report/ReactionList/BaseReactionList.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React from 'react'; import {FlatList} from 'react-native'; import type {FlatListProps} from 'react-native'; diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index 29b25828d24b..260f81ca0c3b 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -1,5 +1,5 @@ import {useIsFocused, useNavigation} from '@react-navigation/native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import lodashDebounce from 'lodash/debounce'; import type {ForwardedRef, MutableRefObject, RefAttributes, RefObject} from 'react'; import React, {forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; diff --git a/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx b/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx index 05e1163da200..75c4632c86b1 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx +++ b/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import lodashSortBy from 'lodash/sortBy'; import type {ForwardedRef} from 'react'; import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; diff --git a/src/pages/home/report/ReportActionItemBasicMessage.tsx b/src/pages/home/report/ReportActionItemBasicMessage.tsx index a28f2af24448..20098933b02e 100644 --- a/src/pages/home/report/ReportActionItemBasicMessage.tsx +++ b/src/pages/home/report/ReportActionItemBasicMessage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React from 'react'; import {View} from 'react-native'; import Text from '@components/Text'; diff --git a/src/pages/home/report/ReportActionItemMessageEdit.tsx b/src/pages/home/report/ReportActionItemMessageEdit.tsx index 6cb03e8dae05..b972ef270aaa 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.tsx +++ b/src/pages/home/report/ReportActionItemMessageEdit.tsx @@ -1,4 +1,4 @@ -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import lodashDebounce from 'lodash/debounce'; import type {ForwardedRef} from 'react'; import React, {forwardRef, useCallback, useEffect, useMemo, useRef, useState} from 'react'; diff --git a/src/pages/home/report/comment/TextCommentFragment.tsx b/src/pages/home/report/comment/TextCommentFragment.tsx index cf1ab6f8aa19..f29acf8d35fc 100644 --- a/src/pages/home/report/comment/TextCommentFragment.tsx +++ b/src/pages/home/report/comment/TextCommentFragment.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import {isEmpty} from 'lodash'; import React, {memo} from 'react'; import type {StyleProp, TextStyle} from 'react-native'; diff --git a/src/pages/home/report/comment/shouldRenderAsText/index.native.ts b/src/pages/home/report/comment/shouldRenderAsText/index.native.ts index 7c5758f8720d..ac68a9e660cf 100644 --- a/src/pages/home/report/comment/shouldRenderAsText/index.native.ts +++ b/src/pages/home/report/comment/shouldRenderAsText/index.native.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; /** * Whether to render the report action as text diff --git a/src/pages/home/report/comment/shouldRenderAsText/index.ts b/src/pages/home/report/comment/shouldRenderAsText/index.ts index f26f43c528eb..7e8200671c1a 100644 --- a/src/pages/home/report/comment/shouldRenderAsText/index.ts +++ b/src/pages/home/report/comment/shouldRenderAsText/index.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; /** * Whether to render the report action as text diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx index 8aaeb7151563..28562c5e8d00 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {InteractionManager, Keyboard, View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx index 8970df59f856..e38f1a029d51 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index 20e12f71664e..52fea78bb69e 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx index bf1bb8ad197e..f16cfcc8f9ff 100644 --- a/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx @@ -1,5 +1,5 @@ import {useNavigation, useRoute} from '@react-navigation/native'; -import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; +import {CONST as COMMON_CONST} from 'expensify-common'; import _ from 'lodash'; import React, {useCallback, useMemo, useState} from 'react'; import {View} from 'react-native'; diff --git a/src/pages/settings/Security/CloseAccountPage.tsx b/src/pages/settings/Security/CloseAccountPage.tsx index 0fc0f5b7790a..c9ad13b17e45 100644 --- a/src/pages/settings/Security/CloseAccountPage.tsx +++ b/src/pages/settings/Security/CloseAccountPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/signin/EmailDeliveryFailurePage.tsx b/src/pages/signin/EmailDeliveryFailurePage.tsx index e2e12dbd0c1c..0a294e3a6b86 100644 --- a/src/pages/signin/EmailDeliveryFailurePage.tsx +++ b/src/pages/signin/EmailDeliveryFailurePage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect, useMemo} from 'react'; import {Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/signin/LoginForm/BaseLoginForm.tsx b/src/pages/signin/LoginForm/BaseLoginForm.tsx index 4286a2603341..31c77d3db989 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.tsx +++ b/src/pages/signin/LoginForm/BaseLoginForm.tsx @@ -1,5 +1,5 @@ import {useIsFocused} from '@react-navigation/native'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import type {ForwardedRef} from 'react'; import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; diff --git a/src/pages/signin/SignInPage.tsx b/src/pages/signin/SignInPage.tsx index 16aeb7053726..1b51911cbc33 100644 --- a/src/pages/signin/SignInPage.tsx +++ b/src/pages/signin/SignInPage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect, useRef, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/signin/UnlinkLoginForm.tsx b/src/pages/signin/UnlinkLoginForm.tsx index c2e62e3b80f3..2fa43fbe61b2 100644 --- a/src/pages/signin/UnlinkLoginForm.tsx +++ b/src/pages/signin/UnlinkLoginForm.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/tasks/NewTaskDescriptionPage.tsx b/src/pages/tasks/NewTaskDescriptionPage.tsx index 93ad5e63f3d7..410dd9c6e137 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.tsx +++ b/src/pages/tasks/NewTaskDescriptionPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/tasks/NewTaskDetailsPage.tsx b/src/pages/tasks/NewTaskDetailsPage.tsx index 52fdbf5523a2..7cad3d5f844b 100644 --- a/src/pages/tasks/NewTaskDetailsPage.tsx +++ b/src/pages/tasks/NewTaskDetailsPage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/tasks/TaskDescriptionPage.tsx b/src/pages/tasks/TaskDescriptionPage.tsx index c48746c81239..35e954bad2f1 100644 --- a/src/pages/tasks/TaskDescriptionPage.tsx +++ b/src/pages/tasks/TaskDescriptionPage.tsx @@ -1,5 +1,5 @@ import {useFocusEffect} from '@react-navigation/native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; diff --git a/src/pages/wallet/WalletStatementPage.tsx b/src/pages/wallet/WalletStatementPage.tsx index ac1b6d428d52..40f69d809618 100644 --- a/src/pages/wallet/WalletStatementPage.tsx +++ b/src/pages/wallet/WalletStatementPage.tsx @@ -1,6 +1,6 @@ import type {StackScreenProps} from '@react-navigation/stack'; import {format, getMonth, getYear} from 'date-fns'; -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.tsx b/src/pages/workspace/WorkspaceInviteMessagePage.tsx index 2eaa38b865e6..dfa121cdd509 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx +++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import lodashDebounce from 'lodash/debounce'; import React, {useEffect, useMemo, useState} from 'react'; import {Keyboard, View} from 'react-native'; diff --git a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx index 00b11bf64697..faa2415713fd 100644 --- a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx +++ b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx @@ -1,4 +1,4 @@ -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useCallback, useState} from 'react'; import {Keyboard, View} from 'react-native'; import FormProvider from '@components/Form/FormProvider'; diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx index 2b826e89e850..fd7aa2f6e398 100644 --- a/src/pages/workspace/WorkspaceProfilePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePage.tsx @@ -1,4 +1,4 @@ -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useCallback, useState} from 'react'; import type {ImageStyle, StyleProp} from 'react-native'; import {Image, StyleSheet, View} from 'react-native'; diff --git a/src/pages/workspace/bills/WorkspaceBillsFirstSection.tsx b/src/pages/workspace/bills/WorkspaceBillsFirstSection.tsx index 638ab9d58c31..f30d90f5a063 100644 --- a/src/pages/workspace/bills/WorkspaceBillsFirstSection.tsx +++ b/src/pages/workspace/bills/WorkspaceBillsFirstSection.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/workspace/distanceRates/UnitSelector/index.tsx b/src/pages/workspace/distanceRates/UnitSelector/index.tsx index e6511e7d6418..166d0df786a1 100644 --- a/src/pages/workspace/distanceRates/UnitSelector/index.tsx +++ b/src/pages/workspace/distanceRates/UnitSelector/index.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useState} from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; import {View} from 'react-native'; diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx index 684b4be37d44..8027300357f2 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import React, {useEffect} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index dfcad933b7b0..f338d9813350 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -1,5 +1,5 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useCallback, useState} from 'react'; import {View} from 'react-native'; import FormProvider from '@components/Form/FormProvider'; diff --git a/src/stories/Composer.stories.tsx b/src/stories/Composer.stories.tsx index b60568003bd2..7244479b4c58 100644 --- a/src/stories/Composer.stories.tsx +++ b/src/stories/Composer.stories.tsx @@ -1,5 +1,5 @@ import type {Meta} from '@storybook/react'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import {ExpensiMark} from 'expensify-common'; import React, {useState} from 'react'; import {Image, View} from 'react-native'; import Composer from '@components/Composer'; diff --git a/tests/utils/TestHelper.ts b/tests/utils/TestHelper.ts index bd107ba6ed56..6bcee9763dde 100644 --- a/tests/utils/TestHelper.ts +++ b/tests/utils/TestHelper.ts @@ -1,4 +1,4 @@ -import Str from 'expensify-common/lib/str'; +import {Str} from 'expensify-common'; import Onyx from 'react-native-onyx'; import CONST from '@src/CONST'; import * as Session from '@src/libs/actions/Session'; From 783e8957f0788dad4220dcaeacc7f8f1beb4a30a Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 28 May 2024 10:10:33 +0200 Subject: [PATCH 2/9] Install expensify-common --- package-lock.json | 40 +++++++++---------- package.json | 4 +- ...useGeographicalStateAndCountryFromRoute.ts | 2 +- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a5e486ab8ae..9db72e13843b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#1713f28214f0e7176c4fd13433fb0ea15491ebf9", + "expensify-common": "^2.0.1", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -214,7 +214,7 @@ "eslint-plugin-react-native-a11y": "^3.3.0", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-testing-library": "^6.2.2", - "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0", + "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0", "html-webpack-plugin": "^5.5.0", "jest": "29.4.1", "jest-circus": "29.4.1", @@ -1852,19 +1852,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-object-assign": { - "version": "7.18.6", - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-object-rest-spread": { "version": "7.24.1", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.1.tgz", @@ -19807,8 +19794,9 @@ }, "node_modules/eslint-plugin-you-dont-need-lodash-underscore": { "version": "6.12.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-you-dont-need-lodash-underscore/-/eslint-plugin-you-dont-need-lodash-underscore-6.12.0.tgz", + "integrity": "sha512-WF4mNp+k2532iswT6iUd1BX6qjd3AV4cFy/09VC82GY9SsRtvkxhUIx7JNGSe0/bLyd57oTr4inPFiIaENXhGw==", "dev": true, - "license": "MIT", "dependencies": { "kebab-case": "^1.0.0" }, @@ -20300,13 +20288,13 @@ } }, "node_modules/expensify-common": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/Expensify/expensify-common.git#1713f28214f0e7176c4fd13433fb0ea15491ebf9", - "integrity": "sha512-uy1+axUTTuPKwAR06xNG/tGIJ+uaavmSQgKiNU7pQVR94ibNzDD2WESn2E7OEP9/QrHa61lfFlluTjFvvz5I8Q==", - "license": "MIT", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.1.tgz", + "integrity": "sha512-heVo562pRoFYc7CFzqQi6FNvQsMneNmxoioc7oh5GoGOTYp3xeg4t+bQL4E1vAURMXzBxbroUkUMxBUuWMUoWQ==", "dependencies": { "classnames": "2.5.0", "clipboard": "2.0.11", + "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", "html-entities": "^2.5.2", "jquery": "3.6.0", "localforage": "^1.10.0", @@ -20320,6 +20308,17 @@ "underscore": "1.13.6" } }, + "node_modules/expensify-common/node_modules/eslint-plugin-you-dont-need-lodash-underscore": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-you-dont-need-lodash-underscore/-/eslint-plugin-you-dont-need-lodash-underscore-6.14.0.tgz", + "integrity": "sha512-3zkkU/O1agczP7szJGHmisZJS/AknfVl6mb0Zqoc95dvFsdmfK+cbhrn+Ffy0UWB1pgDJwQr7kIO3rPstWs3Dw==", + "dependencies": { + "kebab-case": "^1.0.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/expensify-common/node_modules/react": { "version": "16.12.0", "license": "MIT", @@ -26845,7 +26844,6 @@ }, "node_modules/kebab-case": { "version": "1.0.2", - "dev": true, "license": "MIT" }, "node_modules/keyv": { diff --git a/package.json b/package.json index c8853005c863..50cd8cd96d19 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#1713f28214f0e7176c4fd13433fb0ea15491ebf9", + "expensify-common": "^2.0.1", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -266,7 +266,7 @@ "eslint-plugin-react-native-a11y": "^3.3.0", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-testing-library": "^6.2.2", - "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0", + "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0", "html-webpack-plugin": "^5.5.0", "jest": "29.4.1", "jest-circus": "29.4.1", diff --git a/src/hooks/useGeographicalStateAndCountryFromRoute.ts b/src/hooks/useGeographicalStateAndCountryFromRoute.ts index c29ea585eebf..b94644bdd287 100644 --- a/src/hooks/useGeographicalStateAndCountryFromRoute.ts +++ b/src/hooks/useGeographicalStateAndCountryFromRoute.ts @@ -1,5 +1,5 @@ import {useRoute} from '@react-navigation/native'; -import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; +import {CONST as COMMON_CONST} from 'expensify-common'; import CONST from '@src/CONST'; type State = keyof typeof COMMON_CONST.STATES; From e808900902982f77daa7d9563942e0bbe571a47f Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 28 May 2024 10:27:27 +0200 Subject: [PATCH 3/9] Fix prettier diff --- src/hooks/useCopySelectionHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useCopySelectionHelper.ts b/src/hooks/useCopySelectionHelper.ts index cacbd78a71d2..2018a2b178a8 100644 --- a/src/hooks/useCopySelectionHelper.ts +++ b/src/hooks/useCopySelectionHelper.ts @@ -1,4 +1,4 @@ -import {ExpensiMark} from 'expensify-common' +import {ExpensiMark} from 'expensify-common'; import {useEffect} from 'react'; import Clipboard from '@libs/Clipboard'; import KeyboardShortcut from '@libs/KeyboardShortcut'; From 192255c73fece1e87e8880bf25cd05871e9da12e Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 28 May 2024 17:40:04 +0200 Subject: [PATCH 4/9] Bump expensify-common --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9db72e13843b..9787efbdb086 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.1", + "expensify-common": "^2.0.2", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -20288,9 +20288,9 @@ } }, "node_modules/expensify-common": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.1.tgz", - "integrity": "sha512-heVo562pRoFYc7CFzqQi6FNvQsMneNmxoioc7oh5GoGOTYp3xeg4t+bQL4E1vAURMXzBxbroUkUMxBUuWMUoWQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.2.tgz", + "integrity": "sha512-Bt9jx11DxAnkazVAZ6YBO9uuf39gec1cLJqR/bhMwkL6FjRRXVsCFCpbO6dtsF+4HEyljgemMmClaKFU/7sT5w==", "dependencies": { "classnames": "2.5.0", "clipboard": "2.0.11", diff --git a/package.json b/package.json index 50cd8cd96d19..4db3b3571fff 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.1", + "expensify-common": "^2.0.2", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", From 2269f4162d6f7565db7f87b57896cddaae866a52 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 4 Jun 2024 11:17:25 +0200 Subject: [PATCH 5/9] Add ExpensiMark logger --- src/libs/Log.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/Log.ts b/src/libs/Log.ts index 0612dcff9223..c0bbbfd3f60a 100644 --- a/src/libs/Log.ts +++ b/src/libs/Log.ts @@ -2,7 +2,7 @@ // action would likely cause confusion about which one to use. But most other API methods should happen inside an action file. /* eslint-disable rulesdir/no-api-in-views */ -import {Logger} from 'expensify-common'; +import {ExpensiMark, Logger} from 'expensify-common'; import Onyx from 'react-native-onyx'; import type {Merge} from 'type-fest'; import CONST from '@src/CONST'; @@ -80,5 +80,6 @@ const Log = new Logger({ isDebug: true, }); timeout = setTimeout(() => Log.info('Flushing logs older than 10 minutes', true, {}, true), 10 * 60 * 1000); +ExpensiMark.setLogger(Log); export default Log; From a499a832be04a25896d91aeae367c72b77d39170 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Wed, 5 Jun 2024 16:55:24 +0200 Subject: [PATCH 6/9] Update expensify-common to 2.0.7 --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 782ca76b0d91..69be56c3ac2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,7 +59,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.2", + "expensify-common": "^2.0.7", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -20336,11 +20336,11 @@ } }, "node_modules/expensify-common": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.2.tgz", - "integrity": "sha512-Bt9jx11DxAnkazVAZ6YBO9uuf39gec1cLJqR/bhMwkL6FjRRXVsCFCpbO6dtsF+4HEyljgemMmClaKFU/7sT5w==", - "license": "MIT", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.7.tgz", + "integrity": "sha512-QVJkycuv1OfUQZ43PtlOmIqD8Y9sGW/KD0h3LdeqYozulBT4tPbfI4Mghk9IZzxqfByoM3Hm1haUqiE/7qpT2g==", "dependencies": { + "awesome-phonenumber": "^5.4.0", "classnames": "2.5.0", "clipboard": "2.0.11", "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", diff --git a/package.json b/package.json index 69646b6ca2d8..cbeb65de28f9 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.2", + "expensify-common": "^2.0.7", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", From d9956060f6216b0c50fd2177eb2c9d064b1625d2 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Wed, 5 Jun 2024 16:56:21 +0200 Subject: [PATCH 7/9] Bring back you-dont-need-lodash to ^6.12.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69be56c3ac2b..5ce71c6a0d84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -216,7 +216,7 @@ "eslint-plugin-react-native-a11y": "^3.3.0", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-testing-library": "^6.2.2", - "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0", + "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0", "html-webpack-plugin": "^5.5.0", "jest": "29.4.1", "jest-circus": "29.4.1", diff --git a/package.json b/package.json index cbeb65de28f9..13342abfd78a 100644 --- a/package.json +++ b/package.json @@ -268,7 +268,7 @@ "eslint-plugin-react-native-a11y": "^3.3.0", "eslint-plugin-storybook": "^0.8.0", "eslint-plugin-testing-library": "^6.2.2", - "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0", + "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0", "html-webpack-plugin": "^5.5.0", "jest": "29.4.1", "jest-circus": "29.4.1", From a6a5d98222bf6cf86abc1cb3b1cd4c59bc717826 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Wed, 5 Jun 2024 17:32:43 +0200 Subject: [PATCH 8/9] Update expensify-common to 2.0.9 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ce71c6a0d84..f345a6712f13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,7 +59,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.7", + "expensify-common": "^2.0.9", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -20336,9 +20336,9 @@ } }, "node_modules/expensify-common": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.7.tgz", - "integrity": "sha512-QVJkycuv1OfUQZ43PtlOmIqD8Y9sGW/KD0h3LdeqYozulBT4tPbfI4Mghk9IZzxqfByoM3Hm1haUqiE/7qpT2g==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.9.tgz", + "integrity": "sha512-KIuhFqvlSv+9TOeP7ipXgXe1fx2IEEtOmSkxIfLtpeblQcQuQ1r6NfVand6tNp6sCA5ZI35ubolucu0v5TDPHw==", "dependencies": { "awesome-phonenumber": "^5.4.0", "classnames": "2.5.0", diff --git a/package.json b/package.json index 13342abfd78a..b4c94b01a4cf 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.7", + "expensify-common": "^2.0.9", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", From 57d8b2be0cfb15e23ca3dcdd93bab39abaff183e Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Wed, 5 Jun 2024 18:35:24 +0200 Subject: [PATCH 9/9] Update expensify-common to 2.0.10 --- package-lock.json | 21 +++++---------------- package.json | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index f345a6712f13..b3e909419dc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,7 +59,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.9", + "expensify-common": "^2.0.10", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0", @@ -20336,14 +20336,13 @@ } }, "node_modules/expensify-common": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.9.tgz", - "integrity": "sha512-KIuhFqvlSv+9TOeP7ipXgXe1fx2IEEtOmSkxIfLtpeblQcQuQ1r6NfVand6tNp6sCA5ZI35ubolucu0v5TDPHw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.10.tgz", + "integrity": "sha512-+8LCtnR+VxmCjKKkfeR6XGAhVxvwZtQAw3386c1EDGNK1C0bvz3I1kLVMFbulSeibZv6/G33aO6SiW/kwum6Nw==", "dependencies": { "awesome-phonenumber": "^5.4.0", "classnames": "2.5.0", "clipboard": "2.0.11", - "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", "html-entities": "^2.5.2", "jquery": "3.6.0", "localforage": "^1.10.0", @@ -20357,17 +20356,6 @@ "underscore": "1.13.6" } }, - "node_modules/expensify-common/node_modules/eslint-plugin-you-dont-need-lodash-underscore": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-you-dont-need-lodash-underscore/-/eslint-plugin-you-dont-need-lodash-underscore-6.14.0.tgz", - "integrity": "sha512-3zkkU/O1agczP7szJGHmisZJS/AknfVl6mb0Zqoc95dvFsdmfK+cbhrn+Ffy0UWB1pgDJwQr7kIO3rPstWs3Dw==", - "dependencies": { - "kebab-case": "^1.0.0" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/expensify-common/node_modules/react": { "version": "16.12.0", "license": "MIT", @@ -26893,6 +26881,7 @@ }, "node_modules/kebab-case": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "node_modules/keyv": { diff --git a/package.json b/package.json index b4c94b01a4cf..223bd81eb106 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "^2.0.9", + "expensify-common": "^2.0.10", "expo": "^50.0.3", "expo-av": "~13.10.4", "expo-image": "1.11.0",