Skip to content

Commit d44e37f

Browse files
committed
Merge branch 'main' into feat/migrate-issue-new-card-confirm-page-to-use-navigation
2 parents a40dca0 + 51e330f commit d44e37f

359 files changed

Lines changed: 6735 additions & 3796 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/composite/setupNode/action.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ inputs:
66
description: "Indicates if node is set up for hybrid app"
77
required: false
88
default: 'false'
9+
IS_DESKTOP_BUILD:
10+
description: "Indicates if node is set up for desktop app"
11+
required: false
12+
default: 'false'
913

1014
outputs:
1115
cache-hit:
@@ -23,7 +27,9 @@ runs:
2327
with:
2428
node-version-file: '.nvmrc'
2529
cache: npm
26-
cache-dependency-path: normalized-package-lock.json
30+
cache-dependency-path: |
31+
normalized-package-lock.json
32+
desktop/package-lock.json
2733
2834
- id: cache-node-modules
2935
# v4
@@ -40,6 +46,14 @@ runs:
4046
path: Mobile-Expensify/node_modules
4147
key: ${{ runner.os }}-node-modules-${{ hashFiles('Mobile-Expensify/package-lock.json', 'Mobile-Expensify/patches/**') }}
4248

49+
- id: cache-desktop-node-modules
50+
if: inputs.IS_DESKTOP_BUILD == 'true'
51+
# v4
52+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
53+
with:
54+
path: desktop/node_modules
55+
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }}
56+
4357
- name: Remove ND node_modules if needed for hybrid app build
4458
if: inputs.IS_HYBRID_BUILD == 'true' && steps.cache-node-modules.outputs.cache-hit == 'true' && steps.cache-old-dot-node-modules.outputs.cache-hit != 'true'
4559
shell: bash
@@ -51,4 +65,12 @@ runs:
5165
with:
5266
timeout_minutes: 30
5367
max_attempts: 3
54-
command: npm ci
68+
command: npm ci
69+
70+
- name: Install node packages for desktop submodule
71+
if: inputs.IS_DESKTOP_BUILD == 'true' && steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
72+
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
73+
with:
74+
timeout_minutes: 30
75+
max_attempts: 3
76+
command: cd desktop && npm ci

.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,21 @@ async function run(): Promise<IssuesCreateResponse | void> {
164164
});
165165

166166
// Then make sure we include any demoted or closed blockers as well, and just check them off automatically
167-
// eslint-disable-next-line unicorn/no-array-for-each
168-
currentChecklistData?.deployBlockers.forEach((deployBlocker) => {
167+
for (const deployBlocker of currentChecklistData?.deployBlockers ?? []) {
169168
const isResolved = deployBlockers.findIndex((openBlocker) => openBlocker.number === deployBlocker.number) < 0;
170169
deployBlockers.push({
171170
...deployBlocker,
172171
isResolved,
173172
});
174-
});
173+
}
175174

176175
// Include any existing Mobile-Expensify PRs from the current checklist that aren't in the new merged list
177-
// eslint-disable-next-line unicorn/no-array-for-each
178-
currentChecklistData?.PRListMobileExpensify.forEach((existingPR) => {
176+
for (const existingPR of currentChecklistData?.PRListMobileExpensify ?? []) {
179177
const isAlreadyIncluded = PRListMobileExpensify.findIndex((pr) => pr.number === existingPR.number) >= 0;
180178
if (!isAlreadyIncluded) {
181179
PRListMobileExpensify.push(existingPR);
182180
}
183-
});
181+
}
184182

185183
const didVersionChange = newVersion !== currentChecklistData?.version;
186184
const stagingDeployCashBodyAndAssignees = await GithubUtils.generateStagingDeployCashBodyAndAssignees(

.github/actions/javascript/createOrUpdateStagingDeploy/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11674,22 +11674,20 @@ async function run() {
1167411674
};
1167511675
});
1167611676
// Then make sure we include any demoted or closed blockers as well, and just check them off automatically
11677-
// eslint-disable-next-line unicorn/no-array-for-each
11678-
currentChecklistData?.deployBlockers.forEach((deployBlocker) => {
11677+
for (const deployBlocker of currentChecklistData?.deployBlockers ?? []) {
1167911678
const isResolved = deployBlockers.findIndex((openBlocker) => openBlocker.number === deployBlocker.number) < 0;
1168011679
deployBlockers.push({
1168111680
...deployBlocker,
1168211681
isResolved,
1168311682
});
11684-
});
11683+
}
1168511684
// Include any existing Mobile-Expensify PRs from the current checklist that aren't in the new merged list
11686-
// eslint-disable-next-line unicorn/no-array-for-each
11687-
currentChecklistData?.PRListMobileExpensify.forEach((existingPR) => {
11685+
for (const existingPR of currentChecklistData?.PRListMobileExpensify ?? []) {
1168811686
const isAlreadyIncluded = PRListMobileExpensify.findIndex((pr) => pr.number === existingPR.number) >= 0;
1168911687
if (!isAlreadyIncluded) {
1169011688
PRListMobileExpensify.push(existingPR);
1169111689
}
11692-
});
11690+
}
1169311691
const didVersionChange = newVersion !== currentChecklistData?.version;
1169411692
const stagingDeployCashBodyAndAssignees = await GithubUtils_1.default.generateStagingDeployCashBodyAndAssignees(newVersion, PRList.map((pr) => pr.url), PRListMobileExpensify.map((pr) => pr.url), PRList.filter((pr) => pr.isVerified).map((pr) => pr.url), PRListMobileExpensify.filter((pr) => pr.isVerified).map((pr) => pr.url), deployBlockers.map((blocker) => blocker.url), deployBlockers.filter((blocker) => blocker.isResolved).map((blocker) => blocker.url), currentChecklistData?.internalQAPRList.filter((pr) => pr.isResolved).map((pr) => pr.url), didVersionChange ? false : currentChecklistData.isFirebaseChecked, didVersionChange ? false : currentChecklistData.isGHStatusChecked);
1169511693
if (stagingDeployCashBodyAndAssignees) {

.github/actions/javascript/getGraphiteString/getGraphiteString.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ const run = () => {
2323

2424
// Initialize string to store Graphite metrics
2525
let graphiteString = '';
26-
let timestamp: number;
26+
let timestamp: number | null = null;
2727

2828
// Iterate over each entry
29-
// eslint-disable-next-line unicorn/no-array-for-each
30-
regressionEntries.forEach((entry) => {
29+
for (const entry of regressionEntries) {
3130
// Skip empty lines
3231
if (entry.trim() === '') {
33-
return;
32+
continue;
3433
}
3534

3635
try {
@@ -56,7 +55,7 @@ const run = () => {
5655
console.error(error.message);
5756
core.setFailed(error);
5857
}
59-
});
58+
}
6059

6160
// Set generated graphite string to the github variable
6261
core.setOutput('GRAPHITE_STRING', graphiteString);

.github/actions/javascript/getGraphiteString/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,13 +2745,12 @@ const run = () => {
27452745
const regressionEntries = regressionFile.split('\n');
27462746
// Initialize string to store Graphite metrics
27472747
let graphiteString = '';
2748-
let timestamp;
2748+
let timestamp = null;
27492749
// Iterate over each entry
2750-
// eslint-disable-next-line unicorn/no-array-for-each
2751-
regressionEntries.forEach((entry) => {
2750+
for (const entry of regressionEntries) {
27522751
// Skip empty lines
27532752
if (entry.trim() === '') {
2754-
return;
2753+
continue;
27552754
}
27562755
try {
27572756
const current = JSON.parse(entry);
@@ -2773,7 +2772,7 @@ const run = () => {
27732772
console.error(error.message);
27742773
core.setFailed(error);
27752774
}
2776-
});
2775+
}
27772776
// Set generated graphite string to the github variable
27782777
core.setOutput('GRAPHITE_STRING', graphiteString);
27792778
};

.github/actions/javascript/markPullRequestsAsDeployed/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ inputs:
2020
ANDROID:
2121
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
2222
required: true
23+
DESKTOP:
24+
description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')"
25+
required: true
2326
IOS:
2427
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
2528
required: true

.github/actions/javascript/markPullRequestsAsDeployed/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12840,6 +12840,7 @@ async function run() {
1284012840
const isProd = ActionUtils.getJSONInput('IS_PRODUCTION_DEPLOY', { required: true });
1284112841
const version = core.getInput('DEPLOY_VERSION', { required: true });
1284212842
const androidResult = getDeployTableMessage(core.getInput('ANDROID', { required: true }));
12843+
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true }));
1284312844
const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true }));
1284412845
const webResult = getDeployTableMessage(core.getInput('WEB', { required: true }));
1284512846
const date = core.getInput('DATE');
@@ -12851,7 +12852,7 @@ async function run() {
1285112852
message += `on ${date}`;
1285212853
}
1285312854
message += `🚀`;
12854-
message += `\n\nplatform | result\n---|---`;
12855+
message += `\n\nplatform | result\n---|---\n🖥 desktop 🖥|${desktopResult}`;
1285512856
message += `\n🕸 web 🕸|${webResult}`;
1285612857
message += `\n🤖 android 🤖|${androidResult}\n🍎 iOS 🍎|${iOSResult}`;
1285712858
if (note) {

.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async function run() {
103103
const version = core.getInput('DEPLOY_VERSION', {required: true});
104104

105105
const androidResult = getDeployTableMessage(core.getInput('ANDROID', {required: true}) as PlatformResult);
106+
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', {required: true}) as PlatformResult);
106107
const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult);
107108
const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult);
108109

@@ -116,7 +117,7 @@ async function run() {
116117
message += `on ${date}`;
117118
}
118119
message += `🚀`;
119-
message += `\n\nplatform | result\n---|---`;
120+
message += `\n\nplatform | result\n---|---\n🖥 desktop 🖥|${desktopResult}`;
120121
message += `\n🕸 web 🕸|${webResult}`;
121122
message += `\n🤖 android 🤖|${androidResult}\n🍎 iOS 🍎|${iOSResult}`;
122123

.github/actions/javascript/postTestBuildComment/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ inputs:
1616
ANDROID:
1717
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
1818
required: false
19+
DESKTOP:
20+
description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')"
21+
required: false
1922
IOS:
2023
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
2124
required: false
@@ -25,6 +28,9 @@ inputs:
2528
ANDROID_LINK:
2629
description: "Link for the Android build"
2730
required: false
31+
DESKTOP_LINK:
32+
description: "Link for the desktop build"
33+
required: false
2834
IOS_LINK:
2935
description: "Link for the iOS build"
3036
required: false

.github/actions/javascript/postTestBuildComment/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11585,11 +11585,12 @@ const github_1 = __nccwpck_require__(5438);
1158511585
const CONST_1 = __importDefault(__nccwpck_require__(9873));
1158611586
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
1158711587
function getTestBuildMessage(appPr, mobileExpensifyPr) {
11588-
const inputs = ['ANDROID', 'IOS', 'WEB'];
11588+
const inputs = ['ANDROID', 'DESKTOP', 'IOS', 'WEB'];
1158911589
const names = {
1159011590
[inputs[0]]: 'Android',
11591-
[inputs[1]]: 'iOS',
11592-
[inputs[2]]: 'Web',
11591+
[inputs[1]]: 'Desktop',
11592+
[inputs[2]]: 'iOS',
11593+
[inputs[3]]: 'Web',
1159311594
};
1159411595
const result = inputs.reduce((acc, platform) => {
1159511596
const input = core.getInput(platform, { required: false });
@@ -11618,17 +11619,17 @@ function getTestBuildMessage(appPr, mobileExpensifyPr) {
1161811619
};
1161911620
return acc;
1162011621
}, {});
11621-
const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', and Web' : ''}. Happy testing! :test_tube::test_tube:
11622+
const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS${appPr ? ', Desktop, and Web' : ''}. Happy testing! :test_tube::test_tube:
1162211623
Built from${appPr ? ` App PR Expensify/App#${appPr}` : ''}${mobileExpensifyPr ? ` Mobile-Expensify PR Expensify/Mobile-Expensify#${mobileExpensifyPr}` : ''}.
1162311624
| Android :robot: | iOS :apple: |
1162411625
| ------------- | ------------- |
1162511626
| ${result.ANDROID.link} | ${result.IOS.link} |
1162611627
| ${result.ANDROID.qrCode} | ${result.IOS.qrCode} |
1162711628

11628-
| Web :spider_web: |
11629-
| ------------- |
11630-
| ${result.WEB.link} |
11631-
| ${result.WEB.qrCode} |
11629+
| Desktop :computer: | Web :spider_web: |
11630+
| ------------- | ------------- |
11631+
| ${result.DESKTOP.link} | ${result.WEB.link} |
11632+
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |
1163211633

1163311634
---
1163411635

0 commit comments

Comments
 (0)