Skip to content

Commit 2d38101

Browse files
authored
Merge branch 'Expensify:main' into fix/29825
2 parents 4eca3a1 + 8ad1c81 commit 2d38101

File tree

553 files changed

+20399
-8209
lines changed

Some content is hidden

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

553 files changed

+20399
-8209
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**/node_modules/*
22
**/dist/*
3+
android/**/build/*
34
.github/actions/**/index.js"
45
docs/vendor/**

.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ const restrictedImportPatterns = [
7272
];
7373

7474
module.exports = {
75-
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
76-
plugins: ['react-hooks', 'react-native-a11y'],
75+
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'],
76+
plugins: ['react-native-a11y'],
7777
parser: 'babel-eslint',
7878
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'],
7979
env: {
@@ -87,6 +87,7 @@ module.exports = {
8787
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
8888
plugins: ['react'],
8989
rules: {
90+
'prefer-regex-literals': 'off',
9091
'rulesdir/no-multiple-onyx-in-file': 'off',
9192
'rulesdir/onyx-props-must-have-default': 'off',
9293
'react-native-a11y/has-accessibility-hint': ['off'],
@@ -112,6 +113,7 @@ module.exports = {
112113
'@styles': './src/styles',
113114
// This path is provide alias for files like `ONYXKEYS` and `CONST`.
114115
'@src': './src',
116+
'@desktop': './desktop',
115117
},
116118
},
117119
],

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
8585
- [ ] I verified any copy / text shown in the product is localized by adding it to `src/languages/*` files and using the [translation method](https://github.com/Expensify/App/blob/4bd99402cebdf4d7394e0d1f260879ea238197eb/src/components/withLocalize.js#L60)
8686
- [ ] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
8787
- [ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the [localization methods](https://github.com/Expensify/App/blob/4bd99402cebdf4d7394e0d1f260879ea238197eb/src/components/withLocalize.js#L60-L68)
88-
- [ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the `Waiting for Copy` label for a copy review on the original GH to get the correct copy.
88+
- [ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
8989
- [ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
9090
- [ ] I verified the JSDocs style guidelines (in [`STYLE.md`](https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#jsdocs)) were followed
9191
- [ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers

.github/actionlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ self-hosted-runner:
44
- ubuntu-latest-xl
55
- macos-12-xl
66
- macos-13-xlarge
7+
- ubuntu-latest-reassure-tests

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ runs:
1818
desktop/package-lock.json
1919
2020
- id: cache-node-modules
21-
uses: actions/cache@v3
21+
uses: actions/cache@v4
2222
with:
2323
path: node_modules
2424
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}
2525

2626
- id: cache-desktop-node-modules
27-
uses: actions/cache@v3
27+
uses: actions/cache@v4
2828
with:
2929
path: desktop/node_modules
3030
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }}

.github/actions/javascript/bumpVersion/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,12 +2657,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
26572657

26582658
// Coercion.
26592659
// Extract anything that could conceivably be a part of a valid semver
2660-
createToken('COERCE', `${'(^|[^\\d])' +
2660+
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
26612661
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
26622662
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
2663-
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
2663+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
2664+
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
2665+
createToken('COERCEFULL', src[t.COERCEPLAIN] +
2666+
`(?:${src[t.PRERELEASE]})?` +
2667+
`(?:${src[t.BUILD]})?` +
26642668
`(?:$|[^\\d])`)
26652669
createToken('COERCERTL', src[t.COERCE], true)
2670+
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
26662671

26672672
// Tilde ranges.
26682673
// Meaning is "reasonably at or greater than"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: 'Get and Save graphite string'
2+
description: 'Parse reassure output.json file and create string which can be sent to the graphite server'
3+
outputs:
4+
GRAPHITE_STRING:
5+
description: String with reassure data which can be directly sent to the graphite server
6+
runs:
7+
using: 'node20'
8+
main: './index.js'
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
const core = require('@actions/core');
2+
const github = require('@actions/github');
3+
const fs = require('fs');
4+
5+
const run = () => {
6+
// Prefix path to the graphite metric
7+
const GRAPHITE_PATH = 'reassure';
8+
9+
let regressionOutput;
10+
try {
11+
regressionOutput = JSON.parse(fs.readFileSync('.reassure/output.json', 'utf8'));
12+
} catch (err) {
13+
// Handle errors that occur during file reading or parsing
14+
console.error('Error while parsing output.json:', err.message);
15+
core.setFailed(err);
16+
}
17+
18+
const creationDate = regressionOutput.metadata.current.creationDate;
19+
const timestampInMili = new Date(creationDate).getTime();
20+
21+
// Graphite accepts timestamp in seconds
22+
const timestamp = Math.floor(timestampInMili / 1000);
23+
24+
// Get PR number from the github context
25+
const prNumber = github.context.payload.pull_request.number;
26+
27+
// We need to combine all tests from the 4 buckets
28+
const reassureTests = [...regressionOutput.meaningless, ...regressionOutput.significant, ...regressionOutput.countChanged, ...regressionOutput.added];
29+
30+
// Map through every test and create string for meanDuration and meanCount
31+
// eslint-disable-next-line rulesdir/prefer-underscore-method
32+
const graphiteString = reassureTests
33+
.map((test) => {
34+
const current = test.current;
35+
// Graphite doesn't accept metrics name with space, we replace spaces with "-"
36+
const formattedName = current.name.split(' ').join('-');
37+
38+
const renderDurationString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`;
39+
const renderCountString = `${GRAPHITE_PATH}.PR-${prNumber}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`;
40+
41+
return `${renderDurationString}\n${renderCountString}`;
42+
})
43+
.join('\n');
44+
45+
// Set generated graphite string to the github variable
46+
core.setOutput('GRAPHITE_STRING', graphiteString);
47+
};
48+
49+
if (require.main === module) {
50+
run();
51+
}
52+
53+
module.exports = run;

0 commit comments

Comments
 (0)