Skip to content

Commit

Permalink
Merge branch 'main' into update-account-settings/preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-solecki committed Feb 13, 2024
2 parents 4f30355 + 1f1867a commit 404b3c5
Show file tree
Hide file tree
Showing 140 changed files with 1,967 additions and 1,113 deletions.
1 change: 0 additions & 1 deletion __mocks__/@react-native-async-storage/async-storage.js

This file was deleted.

3 changes: 3 additions & 0 deletions __mocks__/@react-native-clipboard/clipboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import MockClipboard from '@react-native-clipboard/clipboard/jest/clipboard-mock';

export default MockClipboard;
1 change: 0 additions & 1 deletion __mocks__/fileMock.js

This file was deleted.

3 changes: 3 additions & 0 deletions __mocks__/fileMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const fileMock = 'test-file-stub';

export default fileMock;
6 changes: 0 additions & 6 deletions __mocks__/react-native-config.js

This file was deleted.

8 changes: 8 additions & 0 deletions __mocks__/react-native-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import dotenv from 'dotenv';
import path from 'path';

type ReactNativeConfigMock = dotenv.DotenvParseOutput | undefined;

const reactNativeConfigMock: ReactNativeConfigMock = dotenv.config({path: path.resolve('./.env.example')}).parsed;

export default reactNativeConfigMock;
23 changes: 23 additions & 0 deletions __mocks__/react-native-document-picker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {
getConstants: jest.fn(),
pick: jest.fn(),
releaseSecureAccess: jest.fn(),
pickDirectory: jest.fn(),

types: Object.freeze({
allFiles: 'public.item',
audio: 'public.audio',
csv: 'public.comma-separated-values-text',
doc: 'com.microsoft.word.doc',
docx: 'org.openxmlformats.wordprocessingml.document',
images: 'public.image',
pdf: 'com.adobe.pdf',
plainText: 'public.plain-text',
ppt: 'com.microsoft.powerpoint.ppt',
pptx: 'org.openxmlformats.presentationml.presentation',
video: 'public.movie',
xls: 'com.microsoft.excel.xls',
xlsx: 'org.openxmlformats.spreadsheetml.sheet',
zip: 'public.zip-archive',
}),
};
5 changes: 0 additions & 5 deletions __mocks__/react-native-image-picker.js

This file was deleted.

7 changes: 0 additions & 7 deletions __mocks__/react-native-key-command.js

This file was deleted.

9 changes: 9 additions & 0 deletions __mocks__/react-native-key-command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {addListener as _addListener, constants as _constants} from 'react-native-key-command';

const registerKeyCommands = () => {};
const unregisterKeyCommands = () => {};
const constants: Partial<typeof _constants> = {};
const eventEmitter = () => {};
const addListener: typeof _addListener = () => () => {};

export {addListener, constants, eventEmitter, registerKeyCommands, unregisterKeyCommands};
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001043907
versionName "1.4.39-7"
versionCode 1001044002
versionName "1.4.40-2"
}

flavorDimensions "default"
Expand Down
Binary file added android/app/src/main/res/raw/attention.mp3
Binary file not shown.
Binary file added android/app/src/main/res/raw/done.mp3
Binary file not shown.
Binary file added android/app/src/main/res/raw/receive.mp3
Binary file not shown.
Binary file added android/app/src/main/res/raw/success.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions assets/css/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
}

@font-face {
font-family: Windows Segoe UI Emoji;
src: url('/fonts/seguiemj.ttf');
font-family: Noto Color Emoji;
src: url('/fonts/NotoColorEmoji-Regular.woff2') format('woff2'), url('/fonts/NotoColorEmoji-Regular.woff') format('woff');
}

* {
Expand Down
Binary file added assets/fonts/web/NotoColorEmoji-Regular.woff
Binary file not shown.
Binary file added assets/fonts/web/NotoColorEmoji-Regular.woff2
Binary file not shown.
Binary file added assets/sounds/attention.mp3
Binary file not shown.
Binary file added assets/sounds/done.mp3
Binary file not shown.
Binary file added assets/sounds/receive.mp3
Binary file not shown.
Binary file added assets/sounds/success.mp3
Binary file not shown.
8 changes: 6 additions & 2 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
publicPath: '/',
},
stats: {
warningsFilter: [],
// We can ignore the "module not installed" warning from lottie-react-native
// because we are not using the library for JSON format of Lottie animations.
warningsFilter: ['./node_modules/lottie-react-native/lib/module/LottieView/index.web.js'],
},
plugins: [
new CleanWebpackPlugin(),
Expand Down Expand Up @@ -97,6 +99,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
{from: 'web/manifest.json'},
{from: 'assets/css', to: 'css'},
{from: 'assets/fonts/web', to: 'fonts'},
{from: 'assets/sounds', to: 'sounds'},
{from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'},
{from: 'node_modules/react-pdf/dist/esm/Page/TextLayer.css', to: 'css/TextLayer.css'},
{from: 'assets/images/shadow.png', to: 'images/shadow.png'},
Expand Down Expand Up @@ -200,7 +203,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
alias: {
'react-native-config': 'react-web-config',
'react-native$': 'react-native-web',

'react-native-sound': 'react-native-web-sound',
// Module alias for web & desktop
// https://webpack.js.org/configuration/resolve/#resolvealias
'@assets': path.resolve(__dirname, '../../assets'),
Expand Down Expand Up @@ -239,6 +242,7 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
'process/browser': require.resolve('process/browser'),
},
},

optimization: {
runtimeChunk: 'single',
splitChunks: {
Expand Down
14 changes: 7 additions & 7 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.8",
"electron-serve": "^1.2.0",
"electron-serve": "^1.3.0",
"electron-updater": "^6.1.7",
"node-machine-id": "^1.1.12"
},
Expand Down
16 changes: 16 additions & 0 deletions ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

/* Begin PBXBuildFile section */
059DC4EFD39EF39437E6823D /* libPods-NotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A997AA8204EA3D90907FA80 /* libPods-NotificationServiceExtension.a */; };
083353EB2B5AB22A00C603C0 /* attention.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 083353E72B5AB22900C603C0 /* attention.mp3 */; };
083353EC2B5AB22A00C603C0 /* done.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 083353E82B5AB22900C603C0 /* done.mp3 */; };
083353ED2B5AB22A00C603C0 /* receive.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 083353E92B5AB22900C603C0 /* receive.mp3 */; };
083353EE2B5AB22A00C603C0 /* success.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 083353EA2B5AB22900C603C0 /* success.mp3 */; };
0C7C65547D7346EB923BE808 /* ExpensifyMono-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = E704648954784DDFBAADF568 /* ExpensifyMono-Regular.otf */; };
0CDA8E34287DD650004ECBEC /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0CDA8E33287DD650004ECBEC /* AppDelegate.mm */; };
0CDA8E35287DD650004ECBEC /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0CDA8E33287DD650004ECBEC /* AppDelegate.mm */; };
Expand Down Expand Up @@ -79,6 +83,10 @@
00E356EE1AD99517003FC87E /* NewExpensifyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NewExpensifyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
076FD9E41E08971BBF51D580 /* libPods-NewExpensify-NewExpensifyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NewExpensify-NewExpensifyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
083353E72B5AB22900C603C0 /* attention.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = attention.mp3; path = ../assets/sounds/attention.mp3; sourceTree = "<group>"; };
083353E82B5AB22900C603C0 /* done.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = done.mp3; path = ../assets/sounds/done.mp3; sourceTree = "<group>"; };
083353E92B5AB22900C603C0 /* receive.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = receive.mp3; path = ../assets/sounds/receive.mp3; sourceTree = "<group>"; };
083353EA2B5AB22900C603C0 /* success.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = success.mp3; path = ../assets/sounds/success.mp3; sourceTree = "<group>"; };
0CDA8E33287DD650004ECBEC /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = NewExpensify/AppDelegate.mm; sourceTree = "<group>"; };
0CDA8E36287DD6A0004ECBEC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = NewExpensify/Images.xcassets; sourceTree = "<group>"; };
0F5BE0CD252686320097D869 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -311,6 +319,10 @@
A9EA265D209D4558995C9BD4 /* Resources */ = {
isa = PBXGroup;
children = (
083353E72B5AB22900C603C0 /* attention.mp3 */,
083353E82B5AB22900C603C0 /* done.mp3 */,
083353E92B5AB22900C603C0 /* receive.mp3 */,
083353EA2B5AB22900C603C0 /* success.mp3 */,
44BF435285B94E5B95F90994 /* ExpensifyNewKansas-Medium.otf */,
D2AFB39EC1D44BF9B91D3227 /* ExpensifyNewKansas-MediumItalic.otf */,
DCF33E34FFEC48128CDD41D4 /* ExpensifyMono-Bold.otf */,
Expand Down Expand Up @@ -496,13 +508,17 @@
0F5BE0CE252686330097D869 /* GoogleService-Info.plist in Resources */,
E9DF872D2525201700607FDC /* AirshipConfig.plist in Resources */,
F0C450EA2705020500FD2970 /* colors.json in Resources */,
083353EB2B5AB22A00C603C0 /* attention.mp3 in Resources */,
0CDA8E37287DD6A0004ECBEC /* Images.xcassets in Resources */,
70CF6E82262E297300711ADC /* BootSplash.storyboard in Resources */,
FF941A8D48F849269AB85C9A /* ExpensifyNewKansas-Medium.otf in Resources */,
BDB853621F354EBB84E619C2 /* ExpensifyNewKansas-MediumItalic.otf in Resources */,
26AF3C3540374A9FACB6C19E /* ExpensifyMono-Bold.otf in Resources */,
083353EE2B5AB22A00C603C0 /* success.mp3 in Resources */,
0C7C65547D7346EB923BE808 /* ExpensifyMono-Regular.otf in Resources */,
2A9F8CDA983746B0B9204209 /* ExpensifyNeue-Bold.otf in Resources */,
083353EC2B5AB22A00C603C0 /* done.mp3 in Resources */,
083353ED2B5AB22A00C603C0 /* receive.mp3 in Resources */,
ED222ED90E074A5481A854FA /* ExpensifyNeue-BoldItalic.otf in Resources */,
30581EA8AAFD4FCE88C5D191 /* ExpensifyNeue-Italic.otf in Resources */,
1246A3EF20E54E7A9494C8B9 /* ExpensifyNeue-Regular.otf in Resources */,
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.39</string>
<string>1.4.40</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.39.7</string>
<string>1.4.40.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.39</string>
<string>1.4.40</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.39.7</string>
<string>1.4.40.2</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>1.4.39</string>
<string>1.4.40</string>
<key>CFBundleVersion</key>
<string>1.4.39.7</string>
<string>1.4.40.2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
17 changes: 13 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ PODS:
- react-native-config/App (= 1.4.6)
- react-native-config/App (1.4.6):
- React-Core
- react-native-document-picker (8.2.1):
- react-native-document-picker (9.1.1):
- React-Core
- react-native-geolocation (3.0.6):
- React-Core
Expand Down Expand Up @@ -1372,7 +1372,7 @@ PODS:
- React-Core
- RNCAsyncStorage (1.21.0):
- React-Core
- RNCClipboard (1.12.1):
- RNCClipboard (1.13.2):
- React-Core
- RNCPicker (2.5.1):
- React-Core
Expand Down Expand Up @@ -1438,6 +1438,11 @@ PODS:
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNSound (0.11.2):
- React-Core
- RNSound/Core (= 0.11.2)
- RNSound/Core (0.11.2):
- React-Core
- RNSVG (14.0.0):
- React-Core
- SDWebImage (5.17.0):
Expand Down Expand Up @@ -1580,6 +1585,7 @@ DEPENDENCIES:
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSound (from `../node_modules/react-native-sound`)
- RNSVG (from `../node_modules/react-native-svg`)
- VisionCamera (from `../node_modules/react-native-vision-camera`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
Expand Down Expand Up @@ -1827,6 +1833,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSound:
:path: "../node_modules/react-native-sound"
RNSVG:
:path: "../node_modules/react-native-svg"
VisionCamera:
Expand Down Expand Up @@ -1916,7 +1924,7 @@ SPEC CHECKSUMS:
react-native-blob-util: 30a6c9fd067aadf9177e61a998f2c7efb670598d
react-native-cameraroll: 8ffb0af7a5e5de225fd667610e2979fc1f0c2151
react-native-config: 7cd105e71d903104e8919261480858940a6b9c0e
react-native-document-picker: 69ca2094d8780cfc1e7e613894d15290fdc54bba
react-native-document-picker: 3599b238843369026201d2ef466df53f77ae0452
react-native-geolocation: 0f7fe8a4c2de477e278b0365cce27d089a8c5903
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
react-native-image-picker: c33d4e79f0a14a2b66e5065e14946ae63749660b
Expand Down Expand Up @@ -1954,7 +1962,7 @@ SPEC CHECKSUMS:
ReactCommon: 45b5d4f784e869c44a6f5a8fad5b114ca8f78c53
RNAppleAuthentication: 0571c08da8c327ae2afc0261b48b4a515b0286a6
RNCAsyncStorage: 618d03a5f52fbccb3d7010076bc54712844c18ef
RNCClipboard: d77213bfa269013bf4b857b7a9ca37ee062d8ef1
RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d
RNCPicker: 529d564911e93598cc399b56cc0769ce3675f8c8
RNDeviceInfo: 4701f0bf2a06b34654745053db0ce4cb0c53ada7
RNDevMenu: 72807568fe4188bd4c40ce32675d82434b43c45d
Expand All @@ -1973,6 +1981,7 @@ SPEC CHECKSUMS:
RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c
RNReanimated: 57f436e7aa3d277fbfed05e003230b43428157c0
RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2
RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852
RNSVG: 255767813dac22db1ec2062c8b7e7b856d4e5ae6
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
SDWebImageAVIFCoder: 8348fef6d0ec69e129c66c9fe4d74fbfbf366112
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ module.exports = {
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect', '<rootDir>/jest/setupAfterEnv.ts', '<rootDir>/tests/perf-test/setupAfterEnv.js'],
cacheDirectory: '<rootDir>/.jest-cache',
moduleNameMapper: {
'\\.(lottie)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(lottie)$': '<rootDir>/__mocks__/fileMock.ts',
},
};
8 changes: 8 additions & 0 deletions jest/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ jest.mock('react-native-fs', () => ({
unlink: jest.fn(() => new Promise<void>((res) => res())),
CachesDirectoryPath: jest.fn(),
}));

jest.mock('react-native-sound', () => {
class SoundMock {
play = jest.fn();
}

return SoundMock;
});
Loading

0 comments on commit 404b3c5

Please sign in to comment.