Skip to content

Commit 6363886

Browse files
committed
Merge branch 'main' into fix-ecard-transaction-date-field-editable
2 parents e449083 + 004b3af commit 6363886

File tree

583 files changed

+16791
-9880
lines changed

Some content is hidden

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

583 files changed

+16791
-9880
lines changed

.eslintrc.js

+22-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const restrictedImportPatterns = [
7878

7979
module.exports = {
8080
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
81-
plugins: ['react-native-a11y'],
81+
plugins: ['react-native-a11y', 'testing-library'],
8282
parser: 'babel-eslint',
8383
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'],
8484
env: {
@@ -122,13 +122,28 @@ module.exports = {
122122
},
123123
},
124124
],
125+
'rulesdir/avoid-anonymous-functions': 'off',
125126
},
126127
},
127128
// This helps disable the `prefer-alias` rule to be enabled for specific directories
128129
{
129130
files: ['tests/**/*.js', 'tests/**/*.ts', 'tests/**/*.jsx', 'assets/**/*.js', '.storybook/**/*.js'],
130131
rules: {'@dword-design/import-alias/prefer-alias': ['off']},
131132
},
133+
{
134+
files: ['tests/**/*.js', 'tests/**/*.ts', 'tests/**/*.jsx', 'tests/**/*.tsx'],
135+
extends: ['plugin:testing-library/react'],
136+
rules: {
137+
'testing-library/await-async-queries': 'error',
138+
'testing-library/await-async-utils': 'error',
139+
'testing-library/no-debugging-utils': 'error',
140+
'testing-library/no-manual-cleanup': 'error',
141+
'testing-library/no-unnecessary-act': 'error',
142+
'testing-library/prefer-find-by': 'error',
143+
'testing-library/prefer-presence-queries': 'error',
144+
'testing-library/prefer-screen-queries': 'error',
145+
},
146+
},
132147
{
133148
files: ['*.js', '*.jsx'],
134149
settings: {
@@ -276,5 +291,11 @@ module.exports = {
276291
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
277292
},
278293
},
294+
{
295+
files: ['en.ts', 'es.ts'],
296+
rules: {
297+
'rulesdir/use-periods-for-error-messages': 'error',
298+
},
299+
},
279300
],
280301
};

.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {promiseDoWhile} from '@github/libs/promiseWhile';
88
type CurrentStagingDeploys = Awaited<ReturnType<typeof GitHubUtils.octokit.actions.listWorkflowRuns>>['data']['workflow_runs'];
99

1010
function run() {
11+
console.info('[awaitStagingDeploys] POLL RATE', CONST.POLL_RATE);
1112
console.info('[awaitStagingDeploys] run()');
1213
console.info('[awaitStagingDeploys] getStringInput', getStringInput);
1314
console.info('[awaitStagingDeploys] GitHubUtils', GitHubUtils);

.github/actions/javascript/awaitStagingDeploys/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -12131,6 +12131,7 @@ const CONST_1 = __importDefault(__nccwpck_require__(9873));
1213112131
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
1213212132
const promiseWhile_1 = __nccwpck_require__(9438);
1213312133
function run() {
12134+
console.info('[awaitStagingDeploys] POLL RATE', CONST_1.default.POLL_RATE);
1213412135
console.info('[awaitStagingDeploys] run()');
1213512136
console.info('[awaitStagingDeploys] getStringInput', ActionUtils_1.getStringInput);
1213612137
console.info('[awaitStagingDeploys] GitHubUtils', GithubUtils_1.default);
@@ -12742,7 +12743,12 @@ function promiseWhile(condition, action) {
1274212743
resolve();
1274312744
return;
1274412745
}
12745-
Promise.resolve(actionResult).then(loop).catch(reject);
12746+
Promise.resolve(actionResult)
12747+
.then(() => {
12748+
// Set a timeout to delay the next loop iteration
12749+
setTimeout(loop, 1000); // 1000 ms delay
12750+
})
12751+
.catch(reject);
1274612752
}
1274712753
};
1274812754
loop();

.github/libs/promiseWhile.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ function promiseWhile(condition: () => boolean, action: (() => Promise<void>) |
1919
return;
2020
}
2121

22-
Promise.resolve(actionResult).then(loop).catch(reject);
22+
Promise.resolve(actionResult)
23+
.then(() => {
24+
// Set a timeout to delay the next loop iteration
25+
setTimeout(loop, 1000); // 1000 ms delay
26+
})
27+
.catch(reject);
2328
}
2429
};
2530
loop();

.github/workflows/failureNotifier.yml

+34-10
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,49 @@ jobs:
2727
});
2828
return jobsData.data;
2929
30+
- name: Fetch Previous Workflow Run
31+
id: previous-workflow-run
32+
uses: actions/github-script@v7
33+
with:
34+
script: |
35+
const runId = ${{ github.event.workflow_run.id }};
36+
const allRuns = await github.rest.actions.listWorkflowRuns({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
workflow_id: 'preDeploy.yml',
40+
});
41+
const filteredRuns = allRuns.data.workflow_runs.filter(run => run.actor.login !== 'OSBotify' && run.status !== 'cancelled');
42+
const currentIndex = filteredRuns.findIndex(run => run.id === runId);
43+
const previousRun = filteredRuns[currentIndex + 1];
44+
return previousRun;
45+
46+
- name: Fetch Previous Workflow Run Jobs
47+
id: previous-workflow-jobs
48+
uses: actions/github-script@v7
49+
with:
50+
script: |
51+
const previousRun = ${{ steps.previous-workflow-run.outputs.result }};
52+
const runId = previousRun.id;
53+
const jobsData = await github.rest.actions.listJobsForWorkflowRun({
54+
owner: context.repo.owner,
55+
repo: context.repo.repo,
56+
run_id: runId,
57+
});
58+
return jobsData.data;
59+
3060
- name: Process Each Failed Job
3161
uses: actions/github-script@v7
3262
with:
3363
script: |
3464
const jobs = ${{ steps.fetch-workflow-jobs.outputs.result }};
35-
65+
const previousRun = ${{ steps.previous-workflow-run.outputs.result }};
66+
const previousRunJobs = ${{ steps.previous-workflow-jobs.outputs.result }};
3667
const headCommit = "${{ github.event.workflow_run.head_commit.id }}";
3768
const prData = await github.rest.repos.listPullRequestsAssociatedWithCommit({
3869
owner: context.repo.owner,
3970
repo: context.repo.repo,
4071
commit_sha: headCommit,
4172
});
42-
4373
const pr = prData.data[0];
4474
const prLink = pr.html_url;
4575
const prAuthor = pr.user.login;
@@ -50,14 +80,8 @@ jobs:
5080
if (jobs.jobs[i].conclusion == 'failure') {
5181
const jobName = jobs.jobs[i].name;
5282
const jobLink = jobs.jobs[i].html_url;
53-
const issues = await github.rest.issues.listForRepo({
54-
owner: context.repo.owner,
55-
repo: context.repo.repo,
56-
labels: failureLabel,
57-
state: 'open'
58-
});
59-
const existingIssue = issues.data.find(issue => issue.title.includes(jobName));
60-
if (!existingIssue) {
83+
const previousJob = previousRunJobs.jobs.find(job => job.name === jobName);
84+
if (previousJob?.conclusion === 'success') {
6185
const annotations = await github.rest.checks.listAnnotations({
6286
owner: context.repo.owner,
6387
repo: context.repo.repo,

.github/workflows/platformDeploy.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,11 @@ jobs:
8787
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
8888
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
8989

90-
# Note: Android production deploys are temporarily disabled until https://github.com/Expensify/App/issues/40108 is resolved
91-
# - name: Run Fastlane production
92-
# if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
93-
# run: bundle exec fastlane android production
94-
# env:
95-
# VERSION: ${{ env.VERSION_CODE }}
90+
- name: Run Fastlane production
91+
if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
92+
run: bundle exec fastlane android production
93+
env:
94+
VERSION: ${{ env.VERSION_CODE }}
9695

9796
- name: Archive Android sourcemaps
9897
uses: actions/upload-artifact@v3

.github/workflows/typecheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# - git diff is used to see the files that were added on this branch
3131
# - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with main
3232
# - wc counts the words in the result of the intersection
33-
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'desktop/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' 'web/*.js' 'workflow_tests/*.js' '.github/libs/*.js' '.github/scripts/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
33+
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/*.js' '__mocks__/*.js' '.storybook/*.js' 'assets/*.js' 'config/*.js' 'desktop/*.js' 'jest/*.js' 'scripts/*.js' 'tests/*.js' 'workflow_tests/*.js' '.github/libs/*.js' '.github/scripts/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l)
3434
if [ "$count_new_js" -gt "0" ]; then
3535
echo "ERROR: Found new JavaScript files in the project; use TypeScript instead."
3636
exit 1

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#### Table of Contents
1313
* [Local Development](#local-development)
14-
* [Testing on browsers on simulators and emulators](#testing-on-browsers-on-simulators-and-emulators)
14+
* [Testing on browsers in simulators and emulators](#testing-on-browsers-in-simulators-and-emulators)
1515
* [Running The Tests](#running-the-tests)
1616
* [Debugging](#debugging)
1717
* [App Structure and Conventions](#app-structure-and-conventions)
@@ -60,6 +60,7 @@ If you're using another operating system, you will need to ensure `mkcert` is in
6060
For an M1 Mac, read this [SO](https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1) for installing cocoapods.
6161

6262
* If you haven't already, install Xcode tools and make sure to install the optional "iOS Platform" package as well. This installation may take awhile.
63+
* After installation, check in System Settings that there's no update for Xcode. Otherwise, you may encounter issues later that don't explain that you solve them by updating Xcode.
6364
* Install project gems, including cocoapods, using bundler to ensure everyone uses the same versions. In the project root, run: `bundle install`
6465
* If you get the error `Could not find 'bundler'`, install the bundler gem first: `gem install bundler` and try again.
6566
* If you are using MacOS and get the error `Gem::FilePermissionError` when trying to install the bundler gem, you're likely using system Ruby, which requires administrator permission to modify. To get around this, install another version of Ruby with a version manager like [rbenv](https://github.com/rbenv/rbenv#installation).

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ android {
9898
minSdkVersion rootProject.ext.minSdkVersion
9999
targetSdkVersion rootProject.ext.targetSdkVersion
100100
multiDexEnabled rootProject.ext.multiDexEnabled
101-
versionCode 1001046402
102-
versionName "1.4.64-2"
101+
versionCode 1001046902
102+
versionName "1.4.69-2"
103103
// Supported language variants must be declared here to avoid from being removed during the compilation.
104104
// This also helps us to not include unnecessary language variants in the APK.
105105
resConfigs "en", "es"

assets/images/all.svg

+1
Loading

assets/images/arrow-right.svg

+10-1
Loading

assets/images/back-left.svg

+10-1
Loading
File renamed without changes.

0 commit comments

Comments
 (0)