Skip to content

Commit 22cc6af

Browse files
committed
Merge branch 'main' into mkzie2-issue/67173
2 parents f30d93a + 2e79b66 commit 22cc6af

566 files changed

Lines changed: 20961 additions & 34174 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.

.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: 96 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
}
@@ -15597,6 +15616,7 @@ const CONST = {
1559715616
POLL_RATE: 10000,
1559815617
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`,
1559915618
APP_REPO_GIT_URL: `git@github.com:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`,
15619+
MOBILE_EXPENSIFY_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.MOBILE_EXPENSIFY_REPO}`,
1560015620
NO_ACTION: 'NO_ACTION',
1560115621
ACTION_EDIT: 'ACTION_EDIT',
1560215622
ACTION_REQUIRED: 'ACTION_REQUIRED',
@@ -15628,13 +15648,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1562815648
}) : function(o, v) {
1562915649
o["default"] = v;
1563015650
});
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-
};
15651+
var __importStar = (this && this.__importStar) || (function () {
15652+
var ownKeys = function(o) {
15653+
ownKeys = Object.getOwnPropertyNames || function (o) {
15654+
var ar = [];
15655+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
15656+
return ar;
15657+
};
15658+
return ownKeys(o);
15659+
};
15660+
return function (mod) {
15661+
if (mod && mod.__esModule) return mod;
15662+
var result = {};
15663+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
15664+
__setModuleDefault(result, mod);
15665+
return result;
15666+
};
15667+
})();
1563815668
var __importDefault = (this && this.__importDefault) || function (mod) {
1563915669
return (mod && mod.__esModule) ? mod : { "default": mod };
1564015670
};
@@ -15764,6 +15794,7 @@ class GithubUtils {
1576415794
number: this.getIssueOrPullRequestNumberFromURL(issue.url),
1576515795
labels: issue.labels,
1576615796
PRList: this.getStagingDeployCashPRList(issue),
15797+
PRListMobileExpensify: this.getStagingDeployCashPRListMobileExpensify(issue),
1576715798
deployBlockers: this.getStagingDeployCashDeployBlockers(issue),
1576815799
internalQAPRList: this.getStagingDeployCashInternalQA(issue),
1576915800
isFirebaseChecked: issue.body ? /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body) : false,
@@ -15796,6 +15827,19 @@ class GithubUtils {
1579615827
}));
1579715828
return PRList.sort((a, b) => a.number - b.number);
1579815829
}
15830+
static getStagingDeployCashPRListMobileExpensify(issue) {
15831+
let mobileExpensifySection = issue.body?.match(/Mobile-Expensify PRs:\*\*\r?\n((?:-.*\r?\n)+)/) ?? null;
15832+
if (mobileExpensifySection?.length !== 2) {
15833+
return [];
15834+
}
15835+
mobileExpensifySection = mobileExpensifySection[1];
15836+
const mobileExpensifyPRs = [...mobileExpensifySection.matchAll(new RegExp(`- \\[([ x])]\\s(${CONST_1.default.ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({
15837+
url: match[2],
15838+
number: Number.parseInt(match[3], 10),
15839+
isVerified: match[1] === 'x',
15840+
}));
15841+
return mobileExpensifyPRs.sort((a, b) => a.number - b.number);
15842+
}
1579915843
/**
1580015844
* Parse DeployBlocker section of the StagingDeployCash issue body.
1580115845
*
@@ -15835,7 +15879,7 @@ class GithubUtils {
1583515879
/**
1583615880
* Generate the issue body and assignees for a StagingDeployCash.
1583715881
*/
15838-
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
15882+
static generateStagingDeployCashBodyAndAssignees(tag, PRList, PRListMobileExpensify, verifiedPRList = [], verifiedPRListMobileExpensify = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
1583915883
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
1584015884
.then((data) => {
1584115885
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 +15896,36 @@ class GithubUtils {
1585215896
console.log('Found the following Internal QA PRs:', internalQAPRMap);
1585315897
const noQAPRs = Array.isArray(data) ? data.filter((PR) => /\[No\s?QA]/i.test(PR.title)).map((item) => item.html_url) : [];
1585415898
console.log('Found the following NO QA PRs:', noQAPRs);
15855-
const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...noQAPRs])];
15899+
const verifiedOrNoQAPRs = [...new Set([...verifiedPRList, ...verifiedPRListMobileExpensify, ...noQAPRs])];
1585615900
const sortedPRList = [...new Set((0, arrayDifference_1.default)(PRList, Object.keys(internalQAPRMap)))].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b));
15901+
const sortedPRListMobileExpensify = [...new Set(PRListMobileExpensify)].sort((a, b) => GithubUtils.getPullRequestNumberFromURL(a) - GithubUtils.getPullRequestNumberFromURL(b));
1585715902
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1585815903
// Tag version and comparison URL
1585915904
// 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';
15905+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
15906+
// Add Mobile-Expensify compare link if there are Mobile-Expensify PRs
15907+
if (sortedPRListMobileExpensify.length > 0) {
15908+
issueBody += `**Mobile-Expensify Changes:** https://github.com/${CONST_1.default.GITHUB_OWNER}/${CONST_1.default.MOBILE_EXPENSIFY_REPO}/compare/production...staging\r\n`;
15909+
}
15910+
issueBody += '\r\n';
1586415911
// PR list
1586515912
if (sortedPRList.length > 0) {
15866-
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
15913+
issueBody += '**This release contains changes from the following pull requests:**\r\n';
1586715914
sortedPRList.forEach((URL) => {
1586815915
issueBody += verifiedOrNoQAPRs.includes(URL) ? '- [x]' : '- [ ]';
1586915916
issueBody += ` ${URL}\r\n`;
1587015917
});
1587115918
issueBody += '\r\n\r\n';
1587215919
}
15920+
// Mobile-Expensify PR list
15921+
if (sortedPRListMobileExpensify.length > 0) {
15922+
issueBody += '**Mobile-Expensify PRs:**\r\n';
15923+
sortedPRListMobileExpensify.forEach((URL) => {
15924+
issueBody += verifiedOrNoQAPRs.includes(URL) ? '- [x]' : '- [ ]';
15925+
issueBody += ` ${URL}\r\n`;
15926+
});
15927+
issueBody += '\r\n\r\n';
15928+
}
1587315929
// Internal QA PR list
1587415930
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1587515931
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
@@ -15927,7 +15983,7 @@ class GithubUtils {
1592715983
}
1592815984
return data;
1592915985
})
15930-
.then((prList) => prList.filter((pr) => pullRequestNumbers.includes(pr.number)))
15986+
.then((prList) => prList?.filter((pr) => pullRequestNumbers.includes(pr.number)) ?? [])
1593115987
.catch((err) => console.error('Failed to get PR list', err));
1593215988
}
1593315989
static getPullRequestMergerLogin(pullRequestNumber) {
@@ -16012,8 +16068,8 @@ class GithubUtils {
1601216068
/**
1601316069
* Generate the URL of an New Expensify pull request given the PR number.
1601416070
*/
16015-
static getPullRequestURLFromNumber(value) {
16016-
return `${CONST_1.default.APP_REPO_URL}/pull/${value}`;
16071+
static getPullRequestURLFromNumber(value, repositoryURL) {
16072+
return `${repositoryURL}/pull/${value}`;
1601716073
}
1601816074
/**
1601916075
* Parse the pull request number from a URL.
@@ -16111,7 +16167,7 @@ class GithubUtils {
1611116167
/**
1611216168
* Get commits between two tags via the GitHub API
1611316169
*/
16114-
static async getCommitHistoryBetweenTags(fromTag, toTag) {
16170+
static async getCommitHistoryBetweenTags(fromTag, toTag, repositoryName) {
1611516171
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
1611616172
core.startGroup('Fetching paginated commits:');
1611716173
try {
@@ -16123,7 +16179,7 @@ class GithubUtils {
1612316179
core.info(`📄 Fetching page ${page} of commits...`);
1612416180
const response = await this.octokit.repos.compareCommits({
1612516181
owner: CONST_1.default.GITHUB_OWNER,
16126-
repo: CONST_1.default.APP_REPO,
16182+
repo: repositoryName,
1612716183
base: fromTag,
1612816184
head: toTag,
1612916185
per_page: perPage,
@@ -16152,6 +16208,7 @@ class GithubUtils {
1615216208
}
1615316209
core.info(`🎉 Successfully fetched ${allCommits.length} total commits`);
1615416210
core.endGroup();
16211+
console.log('');
1615516212
return allCommits.map((commit) => ({
1615616213
commit: commit.sha,
1615716214
subject: commit.commit.message,
@@ -16160,9 +16217,10 @@ class GithubUtils {
1616016217
}
1616116218
catch (error) {
1616216219
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.`);
16220+
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.`);
1616416221
}
1616516222
core.endGroup();
16223+
console.log('');
1616616224
throw error;
1616716225
}
1616816226
}
@@ -16196,11 +16254,10 @@ exports["default"] = arrayDifference;
1619616254
"use strict";
1619716255

1619816256
Object.defineProperty(exports, "__esModule", ({ value: true }));
16199-
exports.isEmptyObject = void 0;
16257+
exports.isEmptyObject = isEmptyObject;
1620016258
function isEmptyObject(obj) {
1620116259
return Object.keys(obj ?? {}).length === 0;
1620216260
}
16203-
exports.isEmptyObject = isEmptyObject;
1620416261

1620516262

1620616263
/***/ }),
@@ -16211,6 +16268,7 @@ exports.isEmptyObject = isEmptyObject;
1621116268
"use strict";
1621216269

1621316270
Object.defineProperty(exports, "__esModule", ({ value: true }));
16271+
exports["default"] = promiseSome;
1621416272
/**
1621516273
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
1621616274
* It does not wait for the other promises to complete once it finds one.
@@ -16231,7 +16289,6 @@ function promiseSome(promises, callbackFn) {
1623116289
Promise.allSettled(promises).then(() => reject());
1623216290
});
1623316291
}
16234-
exports["default"] = promiseSome;
1623516292

1623616293

1623716294
/***/ }),

0 commit comments

Comments
 (0)