Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ tests/e2e/results/

# Typescript
tsconfig.tsbuildinfo
tsconfig.tsgo.tsbuildinfo

# Mock-github
/repo/
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@
"Transpiles",
"trivago",
"trustcacerts",
"tsgo",
"twocards",
"Typeform",
"uatp",
Expand Down
118 changes: 118 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand",
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",
"typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc",
"typecheck-tsgo": "tsgo --project tsconfig.tsgo.json",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=383 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto",
"lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh",
"check-lazy-loading": "ts-node scripts/checkLazyLoading.ts",
Expand Down Expand Up @@ -279,6 +280,7 @@
"@types/setimmediate": "^1.0.2",
"@types/webpack": "^5.28.5",
"@types/webpack-bundle-analyzer": "^4.7.0",
"@typescript/native-preview": "^7.0.0-dev.20260219.1",
"@vercel/ncc": "0.38.1",
"@vitest/mocker": "4.0.16",
"@vue/preload-webpack-plugin": "^2.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,6 @@ type OnyxValuesMapping = {
[ONYXKEYS.ONBOARDING_LAST_VISITED_PATH]: string;
[ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: boolean;
[ONYXKEYS.LAST_VISITED_PATH]: string | undefined;
[ONYXKEYS.VERIFY_3DS_SUBSCRIPTION]: string;
[ONYXKEYS.RECENTLY_USED_REPORT_FIELDS]: OnyxTypes.RecentlyUsedReportFields;
[ONYXKEYS.UPDATE_REQUIRED]: boolean;
[ONYXKEYS.SUPPORTAL_PERMISSION_DENIED]: OnyxTypes.SupportalPermissionDenied | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable rulesdir/prefer-early-return */
import type {ListRenderItemInfo} from '@react-native/virtualized-lists/Lists/VirtualizedList';
import type {ListRenderItemInfo} from '@react-native/virtualized-lists';
import {useIsFocused, useRoute} from '@react-navigation/native';
import {isUserValidatedSelector} from '@selectors/Account';
import {tierNameSelector} from '@selectors/UserWallet';
Expand Down Expand Up @@ -299,7 +299,7 @@
}
return option;
});
}, [originalSelectedTransactionsOptions, dismissedRejectUseExplanation]);

Check warning on line 302 in src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useMemo has missing dependencies: 'isDelegateAccessRestricted' and 'showDelegateNoAccessModal'. Either include them or remove the dependency array

Check warning on line 302 in src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

React Hook useMemo has missing dependencies: 'isDelegateAccessRestricted' and 'showDelegateNoAccessModal'. Either include them or remove the dependency array

const dismissRejectModalBasedOnAction = useCallback(() => {
if (rejectModalAction === CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.REJECT_BULK) {
Expand Down Expand Up @@ -710,7 +710,7 @@
reportScrollManager.scrollToEnd();
readActionSkipped.current = false;
readNewestAction(report.reportID);
}, [setIsFloatingMessageCounterVisible, hasNewestReportAction, reportScrollManager, report.reportID]);

Check warning on line 713 in src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useCallback has a missing dependency: 'introSelected'. Either include it or remove the dependency array

Check warning on line 713 in src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

React Hook useCallback has a missing dependency: 'introSelected'. Either include it or remove the dependency array

const scrollToNewTransaction = useCallback(
(pageY: number) => {
Expand Down
7 changes: 0 additions & 7 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,6 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.PAY_MONEY_REQUEST]: Parameters.PayMoneyRequestParams;
[WRITE_COMMANDS.CANCEL_PAYMENT]: Parameters.CancelPaymentParams;
[WRITE_COMMANDS.ACCEPT_ACH_CONTRACT_FOR_BANK_ACCOUNT]: Parameters.AcceptACHContractForBankAccount;
[WRITE_COMMANDS.UPDATE_WORKSPACE_DESCRIPTION]: Parameters.UpdateWorkspaceDescriptionParams;
[WRITE_COMMANDS.UPDATE_WORKSPACE_CLIENT_ID]: Parameters.UpdateWorkspaceClientIDParams;
[WRITE_COMMANDS.SET_WORKSPACE_AUTO_HARVESTING]: Parameters.SetWorkspaceAutoHarvestingParams;
[WRITE_COMMANDS.SET_WORKSPACE_AUTO_REPORTING_FREQUENCY]: Parameters.SetWorkspaceAutoReportingFrequencyParams;
[WRITE_COMMANDS.SET_WORKSPACE_AUTO_REPORTING_MONTHLY_OFFSET]: Parameters.SetWorkspaceAutoReportingMonthlyOffsetParams;
Expand Down Expand Up @@ -866,8 +864,6 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.REQUEST_EXPENSIFY_CARD_LIMIT_INCREASE]: Parameters.RequestExpensifyCardLimitIncreaseParams;
[WRITE_COMMANDS.CLEAR_OUTSTANDING_BALANCE]: null;
[WRITE_COMMANDS.CANCEL_BILLING_SUBSCRIPTION]: Parameters.CancelBillingSubscriptionParams;
[WRITE_COMMANDS.SET_POLICY_RULES_ENABLED]: Parameters.SetPolicyRulesEnabledParams;
[WRITE_COMMANDS.SET_POLICY_CODING_RULE]: Parameters.SetPolicyCodingRuleParams;
[WRITE_COMMANDS.SET_POLICY_EXPENSE_MAX_AMOUNT_NO_RECEIPT]: Parameters.SetPolicyExpenseMaxAmountNoReceipt;
[WRITE_COMMANDS.SET_POLICY_EXPENSE_MAX_AMOUNT_NO_ITEMIZED_RECEIPT]: Parameters.SetPolicyExpenseMaxAmountNoItemizedReceipt;
[WRITE_COMMANDS.SET_POLICY_EXPENSE_MAX_AMOUNT]: Parameters.SetPolicyExpenseMaxAmount;
Expand Down Expand Up @@ -952,7 +948,6 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_WORKSPACE_CUSTOM_UNIT]: Parameters.UpdateWorkspaceCustomUnitParams;
[WRITE_COMMANDS.RESET_SMS_DELIVERY_FAILURE_STATUS]: Parameters.ResetSMSDeliveryFailureStatusParams;
[WRITE_COMMANDS.SAVE_CORPAY_ONBOARDING_COMPANY_DETAILS]: Parameters.SaveCorpayOnboardingCompanyDetailsParams;
[WRITE_COMMANDS.SAVE_CORPAY_ONBOARDING_BENEFICIAL_OWNER]: Parameters.SaveCorpayOnboardingBeneficialOwnerParams;
[WRITE_COMMANDS.SET_POLICY_PROHIBITED_EXPENSES]: Parameters.SetPolicyProhibitedExpensesParams;
[WRITE_COMMANDS.RETRACT_REPORT]: Parameters.RetractReportParams;
[WRITE_COMMANDS.COMPLETE_CONCIERGE_CALL]: Parameters.CompleteConciergeCallParams;
Expand Down Expand Up @@ -1087,7 +1082,6 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_XERO_IMPORT_CUSTOMERS]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_ENABLE_NEW_CATEGORIES]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_AUTO_SYNC]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_AUTO_SYNC]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_EXPORT_BILL_STATUS]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_EXPORT_BILL_DATE]: Parameters.UpdateXeroGenericTypeParams;
[WRITE_COMMANDS.UPDATE_XERO_EXPORT_EXPORTER]: Parameters.UpdateXeroGenericTypeParams;
Expand Down Expand Up @@ -1313,7 +1307,6 @@ type ReadCommandParameters = {
[READ_COMMANDS.GET_SAML_SETTINGS]: Parameters.DomainParams;
[READ_COMMANDS.GET_DOMAIN_VALIDATE_CODE]: Parameters.DomainParams;
[READ_COMMANDS.OPEN_DOMAIN_INITIAL_PAGE]: Parameters.DomainParams;
[READ_COMMANDS.GET_SAML_SETTINGS]: Parameters.DomainParams;
[READ_COMMANDS.GET_DUPLICATE_TRANSACTION_DETAILS]: Parameters.GetDuplicateTransactionDetailsParams;
[READ_COMMANDS.GET_TRANSACTIONS_MATCHING_CODING_RULE]: Parameters.GetTransactionsMatchingCodingRuleParams;
};
Expand Down
2 changes: 1 addition & 1 deletion src/libs/EmojiUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ function splitTextWithEmojis(text = ''): TextWithEmoji[] {
do {
regexResult = emojisRegex.exec(text);

if (regexResult?.indices) {
if (regexResult?.indices?.[0]) {
const matchIndexStart = regexResult.indices[0][0];
const matchIndexEnd = regexResult.indices[0][1];

Expand Down
3 changes: 0 additions & 3 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2697,9 +2697,6 @@ type WorkspaceSplitNavigatorParamList = {
[SCREENS.WORKSPACE.ACCOUNTING.QUICKBOOKS_ONLINE_LOCATIONS_DISPLAYED_AS]: {
policyID: string;
};
[SCREENS.WORKSPACE.EXPENSIFY_CARD]: {
policyID: string;
};
[SCREENS.WORKSPACE.RULES]: {
policyID: string;
};
Expand Down
6 changes: 1 addition & 5 deletions src/libs/actions/IOU/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@
};

let allPersonalDetails: OnyxTypes.PersonalDetailsList = {};
Onyx.connect({

Check warning on line 807 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
allPersonalDetails = value ?? {};
Expand Down Expand Up @@ -897,7 +897,7 @@
};

let allTransactions: NonNullable<OnyxCollection<OnyxTypes.Transaction>> = {};
Onyx.connect({

Check warning on line 900 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -911,7 +911,7 @@
});

let allTransactionDrafts: NonNullable<OnyxCollection<OnyxTypes.Transaction>> = {};
Onyx.connect({

Check warning on line 914 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION_DRAFT,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -920,7 +920,7 @@
});

let allTransactionViolations: NonNullable<OnyxCollection<OnyxTypes.TransactionViolations>> = {};
Onyx.connect({

Check warning on line 923 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -934,7 +934,7 @@
});

let allPolicyTags: OnyxCollection<OnyxTypes.PolicyTagLists> = {};
Onyx.connect({

Check warning on line 937 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.POLICY_TAGS,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -947,7 +947,7 @@
});

let allReports: OnyxCollection<OnyxTypes.Report>;
Onyx.connect({

Check warning on line 950 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -956,7 +956,7 @@
});

let allReportNameValuePairs: OnyxCollection<OnyxTypes.ReportNameValuePairs>;
Onyx.connect({

Check warning on line 959 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -966,7 +966,7 @@

let userAccountID = -1;
let currentUserEmail = '';
Onyx.connect({

Check warning on line 969 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
currentUserEmail = value?.email ?? '';
Expand Down Expand Up @@ -11216,15 +11216,11 @@
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${expenseReport.reportID}`,
value: {
// @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830
stateNum: expenseReport.stateNum,
// @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830
statusNum: expenseReport.stateNum,
// @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830
statusNum: expenseReport.statusNum,
hasReportBeenRetracted: false,
nextStep: expenseReport.nextStep ?? null,
pendingFields: {
// @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830
partial: null,
nextStep: null,
},
Expand Down
17 changes: 8 additions & 9 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,16 @@ function deleteWorkspace(params: DeleteWorkspaceActionParams) {
key: `${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`,
value: policyCardFeeds,
},
...(filteredBankAccountList !== bankAccountList
? [
{
onyxMethod: Onyx.METHOD.SET,
key: ONYXKEYS.BANK_ACCOUNT_LIST,
value: bankAccountList ?? {},
},
]
: []),
];

if (filteredBankAccountList !== bankAccountList) {
failureData.push({
onyxMethod: Onyx.METHOD.SET,
key: ONYXKEYS.BANK_ACCOUNT_LIST,
value: bankAccountList ?? {},
});
}

if (policyID === activePolicyID) {
const mostRecentlyCreatedGroupPolicy = Object.values(policies ?? {})
.filter((p) => p && p.id !== activePolicyID && p.type !== CONST.POLICY.TYPE.PERSONAL && p.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {ListRenderItemInfo} from '@react-native/virtualized-lists/Lists/VirtualizedList';
import type {ListRenderItemInfo} from '@react-native/virtualized-lists';
import {useIsFocused, useRoute} from '@react-navigation/native';
import {isUserValidatedSelector} from '@selectors/Account';
import {tierNameSelector} from '@selectors/UserWallet';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/signin/SignInPageLayout/BackgroundImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import CONST from '@src/CONST';
import type BackgroundImageProps from './types';

const BackgroundMobile = lazy(() =>
import('@assets/images/home-background--mobile.svg').catch(() => ({
import('@assets/images/home-background--mobile.svg').catch((): {default: React.FC} => ({
default: () => null,
})),
);
const BackgroundDesktop = lazy(() =>
import('@assets/images/home-background--desktop.svg').catch(() => ({
import('@assets/images/home-background--desktop.svg').catch((): {default: React.FC} => ({
default: () => null,
})),
);
Expand Down
6 changes: 0 additions & 6 deletions src/types/onyx/ReimbursementAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ type Corpay = {
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.CONSENT_TO_PRIVACY_NOTICE]: boolean;
/** Checkbox - authorized to bind to client to agreement */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.AUTHORIZED_TO_BIND_CLIENT_TO_AGREEMENT]: boolean;
/** Is user also an owner */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.OWNS_MORE_THAN_25_PERCENT]: boolean;
/** Are the more owners */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.ANY_INDIVIDUAL_OWN_25_PERCENT_OR_MORE]: boolean;
/** Stringified array of owners data */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.BENEFICIAL_OWNERS]?: string;
/** Indicates that the PDS and FSD document has been downloaded */
[INPUT_IDS.ADDITIONAL_DATA.CORPAY.DOWNLOADED_PDS_AND_FSG]?: boolean;
/** Powerform required for US and CA workspaces */
Expand Down
49 changes: 49 additions & 0 deletions tsconfig.tsgo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "expo/tsconfig.base",
"compilerOptions": {
"types": ["react-native", "react-native-web", "jest", "node"],
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"isolatedModules": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"incremental": true,
"noEmit": true,
"paths": {
"@assets/*": ["./assets/*"],
"@components/*": ["./src/components/*"],
"@github/*": ["./.github/*"],
"@hooks/*": ["./src/hooks/*"],
"@libs/*": ["./src/libs/*"],
"@navigation/*": ["./src/libs/Navigation/*"],
"@pages/*": ["./src/pages/*"],
"@prompts/*": ["./prompts/*"],
"@scripts/*": ["./scripts/*", "./.github/scripts/*"],
"@styles/*": ["./src/styles/*"],
"@src/*": ["./src/*"],
"@userActions/*": ["./src/libs/actions/*"],
"@selectors/*": ["./src/selectors/*"],
"tests/*": ["./tests/*"]
}
},
"include": [
"src",
"web",
"website",
"docs",
"assets",
"config",
"tests",
"jest",
"prompts",
"__mocks__",
".github/**/*",
".storybook/**/*",
".claude/**/*",
"scripts",
"modules",
"**/*.nitro/*.ts",
"**/*.nitro/*.tsx"
],
"exclude": ["**/node_modules/*", "**/dist/*", ".github/actions/**/index.js", "**/docs/*"]
}
Loading