Skip to content

Commit 148f547

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into revert-68157-revert-67496-revert-67361-chuckdries/revert-66049
2 parents 3851002 + eb438cf commit 148f547

543 files changed

Lines changed: 16871 additions & 33881 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: 95 additions & 35 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,12 +15896,18 @@ 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`;
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';
1586115911
// Warn deployers about potential bugs with the new process
1586215912
issueBody +=
1586315913
'> 💡 **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';
@@ -15870,6 +15920,15 @@ class GithubUtils {
1587015920
});
1587115921
issueBody += '\r\n\r\n';
1587215922
}
15923+
// Mobile-Expensify PR list
15924+
if (sortedPRListMobileExpensify.length > 0) {
15925+
issueBody += '**Mobile-Expensify PRs:**\r\n';
15926+
sortedPRListMobileExpensify.forEach((URL) => {
15927+
issueBody += verifiedOrNoQAPRs.includes(URL) ? '- [x]' : '- [ ]';
15928+
issueBody += ` ${URL}\r\n`;
15929+
});
15930+
issueBody += '\r\n\r\n';
15931+
}
1587315932
// Internal QA PR list
1587415933
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1587515934
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
@@ -15927,7 +15986,7 @@ class GithubUtils {
1592715986
}
1592815987
return data;
1592915988
})
15930-
.then((prList) => prList.filter((pr) => pullRequestNumbers.includes(pr.number)))
15989+
.then((prList) => prList?.filter((pr) => pullRequestNumbers.includes(pr.number)) ?? [])
1593115990
.catch((err) => console.error('Failed to get PR list', err));
1593215991
}
1593315992
static getPullRequestMergerLogin(pullRequestNumber) {
@@ -16012,8 +16071,8 @@ class GithubUtils {
1601216071
/**
1601316072
* Generate the URL of an New Expensify pull request given the PR number.
1601416073
*/
16015-
static getPullRequestURLFromNumber(value) {
16016-
return `${CONST_1.default.APP_REPO_URL}/pull/${value}`;
16074+
static getPullRequestURLFromNumber(value, repositoryURL) {
16075+
return `${repositoryURL}/pull/${value}`;
1601716076
}
1601816077
/**
1601916078
* Parse the pull request number from a URL.
@@ -16111,7 +16170,7 @@ class GithubUtils {
1611116170
/**
1611216171
* Get commits between two tags via the GitHub API
1611316172
*/
16114-
static async getCommitHistoryBetweenTags(fromTag, toTag) {
16173+
static async getCommitHistoryBetweenTags(fromTag, toTag, repositoryName) {
1611516174
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
1611616175
core.startGroup('Fetching paginated commits:');
1611716176
try {
@@ -16123,7 +16182,7 @@ class GithubUtils {
1612316182
core.info(`📄 Fetching page ${page} of commits...`);
1612416183
const response = await this.octokit.repos.compareCommits({
1612516184
owner: CONST_1.default.GITHUB_OWNER,
16126-
repo: CONST_1.default.APP_REPO,
16185+
repo: repositoryName,
1612716186
base: fromTag,
1612816187
head: toTag,
1612916188
per_page: perPage,
@@ -16152,6 +16211,7 @@ class GithubUtils {
1615216211
}
1615316212
core.info(`🎉 Successfully fetched ${allCommits.length} total commits`);
1615416213
core.endGroup();
16214+
console.log('');
1615516215
return allCommits.map((commit) => ({
1615616216
commit: commit.sha,
1615716217
subject: commit.commit.message,
@@ -16160,9 +16220,10 @@ class GithubUtils {
1616016220
}
1616116221
catch (error) {
1616216222
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.`);
16223+
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.`);
1616416224
}
1616516225
core.endGroup();
16226+
console.log('');
1616616227
throw error;
1616716228
}
1616816229
}
@@ -16196,11 +16257,10 @@ exports["default"] = arrayDifference;
1619616257
"use strict";
1619716258

1619816259
Object.defineProperty(exports, "__esModule", ({ value: true }));
16199-
exports.isEmptyObject = void 0;
16260+
exports.isEmptyObject = isEmptyObject;
1620016261
function isEmptyObject(obj) {
1620116262
return Object.keys(obj ?? {}).length === 0;
1620216263
}
16203-
exports.isEmptyObject = isEmptyObject;
1620416264

1620516265

1620616266
/***/ }),
@@ -16211,6 +16271,7 @@ exports.isEmptyObject = isEmptyObject;
1621116271
"use strict";
1621216272

1621316273
Object.defineProperty(exports, "__esModule", ({ value: true }));
16274+
exports["default"] = promiseSome;
1621416275
/**
1621516276
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
1621616277
* It does not wait for the other promises to complete once it finds one.
@@ -16231,7 +16292,6 @@ function promiseSome(promises, callbackFn) {
1623116292
Promise.allSettled(promises).then(() => reject());
1623216293
});
1623316294
}
16234-
exports["default"] = promiseSome;
1623516295

1623616296

1623716297
/***/ }),

0 commit comments

Comments
 (0)