Skip to content

Commit

Permalink
chore: merge current main
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLewicki committed Jul 26, 2024
2 parents c1e0494 + 4adf0c5 commit 149203c
Show file tree
Hide file tree
Showing 487 changed files with 15,476 additions and 9,277 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ const restrictedImportPaths = [
"For 'ExpensiMark', please use '@libs/Parser' instead.",
].join('\n'),
},
{
name: 'lodash/memoize',
message: "Please use '@src/libs/memoize' instead.",
},
{
name: 'lodash',
importNames: ['memoize'],
message: "Please use '@src/libs/memoize' instead.",
},
];

const restrictedImportPatterns = [
Expand Down Expand Up @@ -97,7 +106,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
ignorePatterns: ['lib/**'],
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/composite/buildAndroidE2EAPK/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ runs:
- name: Build APK
run: npm run ${{ inputs.PACKAGE_SCRIPT_NAME }}
shell: bash
env:
RUBYOPT: '-rostruct'

- name: Upload APK
uses: actions/upload-artifact@v4
Expand Down
13 changes: 11 additions & 2 deletions .github/scripts/createDocsRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {ValueOf} from 'type-fest';
type Article = {
href: string;
title: string;
order?: number;
};

type Section = {
Expand Down Expand Up @@ -60,11 +61,12 @@ function toTitleCase(str: string): string {
/**
* @param filename - The name of the file
*/
function getArticleObj(filename: string): Article {
function getArticleObj(filename: string, order?: number): Article {
const href = filename.replace('.md', '');
return {
href,
title: toTitleCase(href.replaceAll('-', ' ')),
order,
};
}

Expand All @@ -90,6 +92,12 @@ function pushOrCreateEntry<TKey extends HubEntriesKey>(hubs: Hub[], hub: string,
}
}

function getOrderFromArticleFrontMatter(path: string): number | undefined {
const frontmatter = fs.readFileSync(path, 'utf8').split('---')[1];
const frontmatterObject = yaml.load(frontmatter) as Record<string, unknown>;
return frontmatterObject.order as number | undefined;
}

/**
* Add articles and sections to hubs
* @param hubs - The hubs inside docs/articles/ for a platform
Expand All @@ -113,7 +121,8 @@ function createHubsWithArticles(hubs: string[], platformName: ValueOf<typeof pla

// Each subfolder will be a section containing articles
fs.readdirSync(`${docsDir}/articles/${platformName}/${hub}/${section}`).forEach((subArticle) => {
articles.push(getArticleObj(subArticle));
const order = getOrderFromArticleFrontMatter(`${docsDir}/articles/${platformName}/${hub}/${section}/${subArticle}`);
articles.push(getArticleObj(subArticle, order));
});

pushOrCreateEntry(routeHubs, hub, 'sections', {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ jobs:
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{ env.S3_URL }}/.well-known/apple-app-site-association
aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE ${{ env.S3_URL }}/.well-known/apple-app-site-association ${{env.S3_URL }}/apple-app-site-association
env:
S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash
S3_URL: s3://${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' && 'staging-' || '' }}expensify-cash

- name: Purge Cloudflare cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging.' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ env.SHOULD_DEPLOY_PRODUCTION != 'true' && 'staging.' || '' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:

- name: Exit failed workflow
if: ${{ needs.typecheck.result == 'failure' || needs.lint.result == 'failure' || needs.test.result == 'failure' }}
run: exit 1
run: |
echo "Checks failed, exiting ~ typecheck: ${{ needs.typecheck.result }}, lint: ${{ needs.lint.result }}, test: ${{ needs.test.result }}"
exit 1
chooseDeployActions:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
BASELINE_BRANCH=${BASELINE_BRANCH:="main"}
git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1
git switch "$BASELINE_BRANCH"
npm install --force
npm install --force || (rm -rf node_modules && npm install --force)
NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline
git switch --force --detach -
git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours
git checkout --ours .
npm install --force
npm install --force || (rm -rf node_modules && npm install --force)
NODE_OPTIONS=--experimental-vm-modules npx reassure --branch
- name: Validate output.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
with:
timeout_minutes: 10
max_attempts: 5
command: cd ios && bundle exec pod install
command: cd ios && bundle exec pod install --verbose

- name: Decrypt AdHoc profile
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AdHoc.mobileprovision NewApp_AdHoc.mobileprovision.gpg
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009000803
versionName "9.0.8-3"
versionCode 1009001200
versionName "9.0.12-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Loading

0 comments on commit 149203c

Please sign in to comment.