Skip to content

Commit a04508a

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into jsenyitko-export-status-2
2 parents c84893f + a8246a8 commit a04508a

400 files changed

Lines changed: 13130 additions & 8465 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.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Patch Tracking
3+
about: Template for tracking patches applied to third-party libraries
4+
---
5+
6+
If you haven't already, check out our [contributing guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md) and [patch guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/PATCHES.md) for information on how to manage patches.
7+
___
8+
9+
## Patch Information
10+
11+
**Library Name:** <!-- e.g., react-native-pdf -->
12+
**Library Version:** <!-- e.g., 6.7.3 -->
13+
**Patch Number:** <!-- e.g., 001 -->
14+
**Patch Description:** <!-- e.g., update-podspec-to-support-new-arch -->
15+
**Full Patch Filename:** <!-- e.g., react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch -->
16+
17+
## Patch Details
18+
19+
### Reason for Patch
20+
<!-- Explain why this patch is necessary. What issue does it solve? -->
21+
22+
### Changes Made
23+
<!-- Briefly describe the changes made in the patch -->
24+
25+
### Upstream Status
26+
**Upstream PR/Issue:** <!-- Link to the PR or issue in the upstream repository, if one exists -->
27+
28+
## Related Information
29+
30+
**PR Introducing Patch:** <!-- Link to the PR that introduced this patch -->
31+
32+
## Additional Notes
33+
<!-- Any other relevant information about this patch -->
34+
35+
## Checklist
36+
- [ ] Patch file is correctly named and placed in the appropriate directory
37+
- [ ] Patch is documented in the corresponding `details.md` file
38+
- [ ] This issue is linked in the `details.md` file
39+
- [ ] Upstream PR/issue has been created (if applicable)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Check Test Coverage'
2+
description: 'A simple action that takes a GitHub URL and prints it'
3+
inputs:
4+
GITHUB_URL:
5+
description: 'GitHub repository URL to check'
6+
required: true
7+
8+
runs:
9+
using: 'node20'
10+
main: './index.js'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const core = require('@actions/core');
2+
3+
async function run() {
4+
try {
5+
// Get the GitHub URL input
6+
const githubUrl = core.getInput('GITHUB_URL');
7+
8+
// Print the URL
9+
console.log(`GitHub URL: ${githubUrl}`);
10+
core.info(`GitHub URL: ${githubUrl}`);
11+
12+
} catch (error) {
13+
core.setFailed(error.message);
14+
}
15+
}
16+
17+
run();
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check Test Coverage
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
github_url:
7+
description: 'GitHub repository URL to check'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
check-coverage:
13+
runs-on: ubuntu-latest
14+
name: Check Test Coverage
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Check Test Coverage
20+
uses: ./.github/actions/javascript/checkTestCoverage
21+
with:
22+
GITHUB_URL: ${{ inputs.github_url }}

.storybook/webpackMockPaths.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ export default {
66
'react-native$': 'react-native-web',
77
'@react-native-community/netinfo': path.resolve(__dirname, '../__mocks__/@react-native-community/netinfo.ts'),
88
'@react-navigation/native': path.resolve(__dirname, '../__mocks__/@react-navigation/native'),
9-
'@libs/TransactionPreviewUtils': path.resolve(__dirname, '../src/libs/__mocks__/TransactionPreviewUtils.ts'),
109
};
1110
/* eslint-enable @typescript-eslint/naming-convention */

Mobile-Expensify

__mocks__/@react-navigation/native/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const realReactNavigation = isJestEnv ? jest.requireActual<typeof ReactNavigatio
88

99
const useIsFocused = isJestEnv ? realReactNavigation.useIsFocused : () => true;
1010
const useTheme = isJestEnv ? realReactNavigation.useTheme : () => ({});
11+
const useLocale = isJestEnv ? realReactNavigation.useTheme : () => ({});
1112

1213
const {triggerTransitionEnd, addListener} = isJestEnv
1314
? createAddListenerMock()
@@ -44,14 +45,14 @@ const useLinkTo = isJestEnv ? realReactNavigation.useLinkTo : () => null;
4445
const useScrollToTop = isJestEnv ? realReactNavigation.useScrollToTop : () => null;
4546
const useRoute = isJestEnv ? realReactNavigation.useRoute : () => ({params: {}});
4647
const useFocusEffect = isJestEnv ? realReactNavigation.useFocusEffect : (callback: () => void) => callback();
47-
// eslint-disable-next-line @typescript-eslint/naming-convention
48-
const UNSTABLE_usePreventRemove = isJestEnv ? jest.fn() : () => {};
48+
const usePreventRemove = isJestEnv ? jest.fn() : () => {};
4949

5050
export {
5151
// Overridden modules
5252
useIsFocused,
5353
useTheme,
5454
useNavigation,
55+
useLocale,
5556
triggerTransitionEnd,
5657

5758
// Theme modules are left alone
@@ -68,7 +69,7 @@ export {
6869
useScrollToTop,
6970
useRoute,
7071
useFocusEffect,
71-
UNSTABLE_usePreventRemove,
72+
usePreventRemove,
7273
};
7374

7475
export type {NativeNavigationMock};

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009017104
118-
versionName "9.1.71-4"
117+
versionCode 1009017300
118+
versionName "9.1.73-0"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

config/webpack/webpack.common.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const includeModules = [
3333
'react-native-web',
3434
'react-native-webview',
3535
'@react-native-picker',
36+
'@react-navigation/material-top-tabs',
37+
'@react-navigation/native',
38+
'@react-navigation/native-stack',
39+
'@react-navigation/stack',
3640
'react-native-modal',
3741
'react-native-gesture-handler',
3842
'react-native-google-places-autocomplete',
@@ -160,6 +164,12 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
160164
],
161165
module: {
162166
rules: [
167+
{
168+
test: /\.m?js$/,
169+
resolve: {
170+
fullySpecified: false,
171+
},
172+
},
163173
// Transpiles and lints all the JS
164174
{
165175
test: /\.(js|ts)x?$/,

contributingGuides/PATCHES.md

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@ To ensure patches remain maintainable and traceable over time, follow the guidel
66

77
---
88

9+
## 🛠️ Creating a Patch
10+
11+
To create a patch for a third-party library that you've modified:
12+
13+
1. Make your changes to the library code in the `node_modules/<edited-library>` directory
14+
2. Run the following command to generate the patch file:
15+
16+
```
17+
npx patch-package <edited-library> --append "<short-patch-description>" --patch-dir ./patches/<edited-library>
18+
```
19+
20+
For example:
21+
```
22+
npx patch-package react-native-pdf --append "fix-pdf-rendering-on-ios" --patch-dir ./patches/react-native-pdf
23+
```
24+
25+
This will create a patch file in the `patches/` directory. After creating the patch:
26+
27+
- Create or update the `details.md` file in the library's patch directory
28+
- Document the patch according to the [`details.md` format](#-detailsmd-format)
29+
30+
> 📝 **Note**
31+
>
32+
> The `--patch-dir` option should only be specified when the target library has a dedicated subdirectory within the `./patches` directory.
33+
> If no such subdirectory exists, omit this option from the command.
34+
35+
---
36+
937
## 🗂️ Folder Structure
1038

1139
Each library with patch (or patches) should have its own directory inside `patches/`. Each directory should contain:
@@ -54,23 +82,34 @@ Each patch must be listed and explained in the `details.md` file within the same
5482

5583
### [<patch-name>.patch](<patch-name>.patch)
5684

57-
- Reason: <Why this patch is needed>
58-
- Upstream PR/issue: <link or 🛑 if not raised. If no upstream issue or PR exists, explain why>
59-
- E/App issue: <link or 🛑 if none>
60-
- PR Introducing Patch: <link to internal PR that added the patch>
85+
- Reason:
86+
87+
```
88+
Please explain why the patch is necessary
89+
```
90+
91+
- Upstream PR/issue: <Please create an upstream PR fixing the patch. Link it here and if no upstream issue or PR exists, explain why>
92+
- E/App issue: <Please create an E/App issue ([template](./../.github/ISSUE_TEMPLATE/NewPatchTemplate.md)) for each introduced patch. Link it here and if patch won't be removed in the future (no upstream PR exists) explain why>
93+
- PR introducing patch: <Link to E/App (or Mobile-Expensify) PR that added the patch>
6194
```
6295

6396
### Example
6497

6598
```md
6699
# `react-native-pdf` patches
67100

68-
### [react-native-pdf+6.7.3+002+fix-incorrect-decoding.patch](react-native-pdf+6.7.3+002+fix-incorrect-decoding.patch)
101+
### [react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch](react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch)
102+
103+
- Reason:
104+
105+
```
106+
This patch updates the react-native-pdf.podspec to ensure compatibility with React Native's New Architecture on iOS by replacing manual dependency declarations
107+
with Meta's recommended `install_modules_dependencies` function
108+
```
69109

70-
- Reason: If the file name contains accented characters, the PDF load fails.
71-
- Upstream PR/issue: 🛑
72-
- E/App issue: 🛑
73-
- PR Introducing Patch: [#50043](https://github.com/Expensify/App/pull/50043)
110+
- Upstream PR/issue: https://github.com/wonday/react-native-pdf/pull/803
111+
- E/App issue: 🛑 TODO
112+
- PR Introducing Patch: https://github.com/Expensify/App/pull/13767
74113
```
75114

76115
## ✅ Patch Submission Checklist

0 commit comments

Comments
 (0)