Skip to content

Commit 3d3ed8a

Browse files
committed
Merge branch 'main' into fix/68191
2 parents 5a0182f + 9ce95b7 commit 3d3ed8a

778 files changed

Lines changed: 58609 additions & 35273 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.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ help/_scripts/**
1717
modules/ExpensifyNitroUtils/nitrogen/**
1818
Mobile-Expensify/**
1919
vendor
20+
modules/group-ib-fp/**

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const restrictedImportPaths = [
1414
'Text',
1515
'ScrollView',
1616
'Animated',
17+
'findNodeHandle',
1718
],
1819
message: [
1920
'',
@@ -105,6 +106,10 @@ const restrictedImportPaths = [
105106
importNames: ['useOnyx'],
106107
message: "Please use '@hooks/useOnyx' instead.",
107108
},
109+
{
110+
name: '@src/utils/findNodeHandle',
111+
message: "Do not use 'findNodeHandle' as it is no longer supported on web.",
112+
},
108113
];
109114

110115
const restrictedImportPatterns = [

.github/actions/javascript/authorChecklist/index.js

Lines changed: 97 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15252,13 +15252,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1525215252
}) : function(o, v) {
1525315253
o["default"] = v;
1525415254
});
15255-
var __importStar = (this && this.__importStar) || function (mod) {
15256-
if (mod && mod.__esModule) return mod;
15257-
var result = {};
15258-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
15259-
__setModuleDefault(result, mod);
15260-
return result;
15261-
};
15255+
var __importStar = (this && this.__importStar) || (function () {
15256+
var ownKeys = function(o) {
15257+
ownKeys = Object.getOwnPropertyNames || function (o) {
15258+
var ar = [];
15259+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
15260+
return ar;
15261+
};
15262+
return ownKeys(o);
15263+
};
15264+
return function (mod) {
15265+
if (mod && mod.__esModule) return mod;
15266+
var result = {};
15267+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
15268+
__setModuleDefault(result, mod);
15269+
return result;
15270+
};
15271+
})();
1526215272
var __importDefault = (this && this.__importDefault) || function (mod) {
1526315273
return (mod && mod.__esModule) ? mod : { "default": mod };
1526415274
};
@@ -15428,18 +15438,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1542815438
}) : function(o, v) {
1542915439
o["default"] = v;
1543015440
});
15431-
var __importStar = (this && this.__importStar) || function (mod) {
15432-
if (mod && mod.__esModule) return mod;
15433-
var result = {};
15434-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
15435-
__setModuleDefault(result, mod);
15436-
return result;
15437-
};
15441+
var __importStar = (this && this.__importStar) || (function () {
15442+
var ownKeys = function(o) {
15443+
ownKeys = Object.getOwnPropertyNames || function (o) {
15444+
var ar = [];
15445+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
15446+
return ar;
15447+
};
15448+
return ownKeys(o);
15449+
};
15450+
return function (mod) {
15451+
if (mod && mod.__esModule) return mod;
15452+
var result = {};
15453+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
15454+
__setModuleDefault(result, mod);
15455+
return result;
15456+
};
15457+
})();
1543815458
var __importDefault = (this && this.__importDefault) || function (mod) {
1543915459
return (mod && mod.__esModule) ? mod : { "default": mod };
1544015460
};
1544115461
Object.defineProperty(exports, "__esModule", ({ value: true }));
15442-
exports.detectReactComponent = void 0;
15462+
exports.detectReactComponent = detectReactComponent;
1544315463
const github = __importStar(__nccwpck_require__(5438));
1544415464
const parser_1 = __nccwpck_require__(5026);
1544515465
const traverse_1 = __importDefault(__nccwpck_require__(1380));
@@ -15498,7 +15518,6 @@ function detectReactComponent(code, filename) {
1549815518
});
1549915519
return isReactComponent;
1550015520
}
15501-
exports.detectReactComponent = detectReactComponent;
1550215521
function nodeBase64ToUtf8(data) {
1550315522
return Buffer.from(data, 'base64').toString('utf-8');
1550415523
}
@@ -15556,6 +15575,7 @@ const CONST = {
1555615575
LABELS: {
1555715576
STAGING_DEPLOY: 'StagingDeployCash',
1555815577
DEPLOY_BLOCKER: 'DeployBlockerCash',
15578+
LOCK_DEPLOY: '🔐 LockCashDeploys 🔐',
1555915579
INTERNAL_QA: 'InternalQA',
1556015580
HELP_WANTED: 'Help Wanted',
1556115581
CP_STAGING: 'CP Staging',
@@ -15597,6 +15617,7 @@ const CONST = {
1559715617
POLL_RATE: 10000,
1559815618
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
1559915619
APP_REPO_GIT_URL: `git@github.com:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
15620+
MOBILE_EXPENSIFY_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.MOBILE_EXPENSIFY_REPO}`,
1560015621
NO_ACTION: 'NO_ACTION',
1560115622
ACTION_EDIT: 'ACTION_EDIT',
1560215623
ACTION_REQUIRED: 'ACTION_REQUIRED',
@@ -15628,13 +15649,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1562815649
}) : function(o, v) {
1562915650
o["default"] = v;
1563015651
});
15631-
var __importStar = (this && this.__importStar) || function (mod) {
15632-
if (mod && mod.__esModule) return mod;
15633-
var result = {};
15634-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
15635-
__setModuleDefault(result, mod);
15636-
return result;
15637-
};
15652+
var __importStar = (this && this.__importStar) || (function () {
15653+
var ownKeys = function(o) {
15654+
ownKeys = Object.getOwnPropertyNames || function (o) {
15655+
var ar = [];
15656+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
15657+
return ar;
15658+
};
15659+
return ownKeys(o);
15660+
};
15661+
return function (mod) {
15662+
if (mod && mod.__esModule) return mod;
15663+
var result = {};
15664+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
15665+
__setModuleDefault(result, mod);
15666+
return result;
15667+
};
15668+
})();
1563815669
var __importDefault = (this && this.__importDefault) || function (mod) {
1563915670
return (mod && mod.__esModule) ? mod : { "default": mod };
1564015671
};
@@ -15764,6 +15795,7 @@ class GithubUtils {
1576415795
number: this.getIssueOrPullRequestNumberFromURL(issue.url),
1576515796
labels: issue.labels,
1576615797
PRList: this.getStagingDeployCashPRList(issue),
15798+
PRListMobileExpensify: this.getStagingDeployCashPRListMobileExpensify(issue),
1576715799
deployBlockers: this.getStagingDeployCashDeployBlockers(issue),
1576815800
internalQAPRList: this.getStagingDeployCashInternalQA(issue),
1576915801
isFirebaseChecked: issue.body ? /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body) : false,
@@ -15796,6 +15828,19 @@ class GithubUtils {
1579615828
}));
1579715829
return PRList.sort((a, b) => a.number - b.number);
1579815830
}
15831+
static getStagingDeployCashPRListMobileExpensify(issue) {
15832+
let mobileExpensifySection = issue.body?.match(/Mobile-Expensify PRs:\*\*\r?\n((?:-.*\r?\n)+)/) ?? null;
15833+
if (mobileExpensifySection?.length !== 2) {
15834+
return [];
15835+
}
15836+
mobileExpensifySection = mobileExpensifySection[1];
15837+
const mobileExpensifyPRs = [...mobileExpensifySection.matchAll(new RegExp(`- \\[([ x])]\\s(${CONST_1.default.ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({
15838+
url: match[2],
15839+
number: Number.parseInt(match[3], 10),
15840+
isVerified: match[1] === 'x',
15841+
}));
15842+
return mobileExpensifyPRs.sort((a, b) => a.number - b.number);
15843+
}
1579915844
/**
1580015845
* Parse DeployBlocker section of the StagingDeployCash issue body.
1580115846
*
@@ -15835,7 +15880,7 @@ class GithubUtils {
1583515880
/**
1583615881
* Generate the issue body and assignees for a StagingDeployCash.
1583715882
*/
15838-
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
15883+
static generateStagingDeployCashBodyAndAssignees(tag, PRList, PRListMobileExpensify, verifiedPRList = [], verifiedPRListMobileExpensify = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
1583915884
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
1584015885
.then((data) => {
1584115886
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
@@ -15852,24 +15897,36 @@ class GithubUtils {
1585215897
console.log('Found the following Internal QA PRs:', internalQAPRMap);
1585315898
const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : [];
1585415899
console.log('Found the following NO QA PRs:', noQAPRs);
15855-
const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...noQAPRs])];
15900+
const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])];
1585615901
const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b));
15902+
const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b));
1585715903
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1585815904
// Tag version and comparison URL
1585915905
// eslint-disable-next-line max-len
15860-
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
15861-
// Warn deployers about potential bugs with the new process
15862-
issueBody +=
15863-
'> 💡 **Deployer FYI:** This checklist was generated using a new process. PR list from original method and detail logging can be found in the most recent [deploy workflow](https://github.com/Expensify/App/actions/workflows/deploy.yml) labeled `staging`, in the `createChecklist` action. Please tag @Julesssss with any issues.\r\n\r\n';
15906+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
15907+
// Add Mobile-Expensify compare link if there are Mobile-Expensify PRs
15908+
if (sortedPRListMobileExpensify.length > 0) {
15909+
issueBody += `**Mobile-Expensify Changes:** https://github.com/${CONST_1.default.GITHUB_OWNER}/${CONST_1.default.MOBILE_EXPENSIFY_REPO}/compare/production...staging\r\n`;
15910+
}
15911+
issueBody += '\r\n';
1586415912
// PR list
1586515913
if (sortedPRList.length > 0) {
15866-
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
15914+
issueBody += '**This release contains changes from the following pull requests:**\r\n';
1586715915
sortedPRList.forEach((URL) => {
1586815916
issueBody += verifiedOrNoQAPRs.includes(URL) ? '- [x]' : '- [ ]';
1586915917
issueBody += ` ${URL}\r\n`;
1587015918
});
1587115919
issueBody += '\r\n\r\n';
1587215920
}
15921+
// Mobile-Expensify PR list
15922+
if (sortedPRListMobileExpensify.length > 0) {
15923+
issueBody += '**Mobile-Expensify PRs:**\r\n';
15924+
sortedPRListMobileExpensify.forEach((URL) => {
15925+
issueBody += verifiedOrNoQAPRs.includes(URL) ? '- [x]' : '- [ ]';
15926+
issueBody += ` ${URL}\r\n`;
15927+
});
15928+
issueBody += '\r\n\r\n';
15929+
}
1587315930
// Internal QA PR list
1587415931
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1587515932
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
@@ -15927,7 +15984,7 @@ class GithubUtils {
1592715984
}
1592815985
return data;
1592915986
})
15930-
.then((prList) => prList.filter((pr) => pullRequestNumbers.includes(pr.number)))
15987+
.then((prList) => prList?.filter((pr) => pullRequestNumbers.includes(pr.number)) ?? [])
1593115988
.catch((err) => console.error('Failed to get PR list', err));
1593215989
}
1593315990
static getPullRequestMergerLogin(pullRequestNumber) {
@@ -16012,8 +16069,8 @@ class GithubUtils {
1601216069
/**
1601316070
* Generate the URL of an New Expensify pull request given the PR number.
1601416071
*/
16015-
static getPullRequestURLFromNumber(value) {
16016-
return `${CONST_1.default.APP_REPO_URL}/pull/${value}`;
16072+
static getPullRequestURLFromNumber(value, repositoryURL) {
16073+
return `${repositoryURL}/pull/${value}`;
1601716074
}
1601816075
/**
1601916076
* Parse the pull request number from a URL.
@@ -16111,7 +16168,7 @@ class GithubUtils {
1611116168
/**
1611216169
* Get commits between two tags via the GitHub API
1611316170
*/
16114-
static async getCommitHistoryBetweenTags(fromTag, toTag) {
16171+
static async getCommitHistoryBetweenTags(fromTag, toTag, repositoryName) {
1611516172
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
1611616173
core.startGroup('Fetching paginated commits:');
1611716174
try {
@@ -16123,7 +16180,7 @@ class GithubUtils {
1612316180
core.info(`📄 Fetching page ${page} of commits...`);
1612416181
const response = await this.octokit.repos.compareCommits({
1612516182
owner: CONST_1.default.GITHUB_OWNER,
16126-
repo: CONST_1.default.APP_REPO,
16183+
repo: repositoryName,
1612716184
base: fromTag,
1612816185
head: toTag,
1612916186
per_page: perPage,
@@ -16152,6 +16209,7 @@ class GithubUtils {
1615216209
}
1615316210
core.info(`🎉 Successfully fetched ${allCommits.length} total commits`);
1615416211
core.endGroup();
16212+
console.log('');
1615516213
return allCommits.map((commit) => ({
1615616214
commit: commit.sha,
1615716215
subject: commit.commit.message,
@@ -16160,9 +16218,10 @@ class GithubUtils {
1616016218
}
1616116219
catch (error) {
1616216220
if (error instanceof request_error_1.RequestError && error.status === 404) {
16163-
console.error(`❓❓ Failed to get commits with the GitHub API. The base tag ('${fromTag}') or head tag ('${toTag}') likely doesn't exist on the remote repository. If this is the case, create or push them.`);
16221+
core.error(`❓❓ Failed to get commits with the GitHub API. The base tag ('${fromTag}') or head tag ('${toTag}') likely doesn't exist on the remote repository. If this is the case, create or push them.`);
1616416222
}
1616516223
core.endGroup();
16224+
console.log('');
1616616225
throw error;
1616716226
}
1616816227
}
@@ -16196,11 +16255,10 @@ exports["default"] = arrayDifference;
1619616255
"use strict";
1619716256

1619816257
Object.defineProperty(exports, "__esModule", ({ value: true }));
16199-
exports.isEmptyObject = void 0;
16258+
exports.isEmptyObject = isEmptyObject;
1620016259
function isEmptyObject(obj) {
1620116260
return Object.keys(obj ?? {}).length === 0;
1620216261
}
16203-
exports.isEmptyObject = isEmptyObject;
1620416262

1620516263

1620616264
/***/ }),
@@ -16211,6 +16269,7 @@ exports.isEmptyObject = isEmptyObject;
1621116269
"use strict";
1621216270

1621316271
Object.defineProperty(exports, "__esModule", ({ value: true }));
16272+
exports["default"] = promiseSome;
1621416273
/**
1621516274
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
1621616275
* It does not wait for the other promises to complete once it finds one.
@@ -16231,7 +16290,6 @@ function promiseSome(promises, callbackFn) {
1623116290
Promise.allSettled(promises).then(() => reject());
1623216291
});
1623316292
}
16234-
exports["default"] = promiseSome;
1623516293

1623616294

1623716295
/***/ }),

0 commit comments

Comments
 (0)