Skip to content

Commit e857669

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into parasharrajat/early-discount
2 parents 47440ab + 476b8d5 commit e857669

File tree

98 files changed

+6797
-5753
lines changed

Some content is hidden

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

98 files changed

+6797
-5753
lines changed

.github/actions/javascript/authorChecklist/index.js

Lines changed: 2074 additions & 1297 deletions
Large diffs are not rendered by default.

.github/actions/javascript/checkAndroidStatus/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9771,14 +9771,16 @@ function useColors() {
97719771
return false;
97729772
}
97739773

9774+
let m;
9775+
97749776
// Is webkit? http://stackoverflow.com/a/16459606/376773
97759777
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
97769778
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
97779779
// Is firebug? http://stackoverflow.com/a/398120/376773
97789780
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
97799781
// Is firefox >= v31?
97809782
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
9781-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
9783+
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
97829784
// Double check webkit in userAgent just in case we are in a worker
97839785
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
97849786
}
@@ -10407,11 +10409,11 @@ function getDate() {
1040710409
}
1040810410

1040910411
/**
10410-
* Invokes `util.format()` with the specified arguments and writes to stderr.
10412+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
1041110413
*/
1041210414

1041310415
function log(...args) {
10414-
return process.stderr.write(util.format(...args) + '\n');
10416+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
1041510417
}
1041610418

1041710419
/**
@@ -729342,7 +729344,7 @@ var y = d * 365.25;
729342729344
* @api public
729343729345
*/
729344729346

729345-
module.exports = function(val, options) {
729347+
module.exports = function (val, options) {
729346729348
options = options || {};
729347729349
var type = typeof val;
729348729350
if (type === 'string' && val.length > 0) {

.github/actions/javascript/getAndroidRolloutPercentage/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5097,14 +5097,16 @@ function useColors() {
50975097
return false;
50985098
}
50995099

5100+
let m;
5101+
51005102
// Is webkit? http://stackoverflow.com/a/16459606/376773
51015103
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
51025104
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
51035105
// Is firebug? http://stackoverflow.com/a/398120/376773
51045106
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
51055107
// Is firefox >= v31?
51065108
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
5107-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
5109+
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
51085110
// Double check webkit in userAgent just in case we are in a worker
51095111
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
51105112
}
@@ -5733,11 +5735,11 @@ function getDate() {
57335735
}
57345736

57355737
/**
5736-
* Invokes `util.format()` with the specified arguments and writes to stderr.
5738+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
57375739
*/
57385740

57395741
function log(...args) {
5740-
return process.stderr.write(util.format(...args) + '\n');
5742+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
57415743
}
57425744

57435745
/**
@@ -724594,7 +724596,7 @@ var y = d * 365.25;
724594724596
* @api public
724595724597
*/
724596724598

724597-
module.exports = function(val, options) {
724599+
module.exports = function (val, options) {
724598724600
options = options || {};
724599724601
var type = typeof val;
724600724602
if (type === 'string' && val.length > 0) {

.github/actions/javascript/proposalPoliceComment/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8150,7 +8150,7 @@ var y = d * 365.25;
81508150
* @api public
81518151
*/
81528152

8153-
module.exports = function(val, options) {
8153+
module.exports = function (val, options) {
81548154
options = options || {};
81558155
var type = typeof val;
81568156
if (type === 'string' && val.length > 0) {

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ruby ">= 3.3.4"
55

66
gem "cocoapods", "= 1.15.2"
77
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
8+
gem 'xcodeproj', '< 1.26.0'
89
gem "fastlane", "~> 2", ">= 2.222.0"
910
gem "xcpretty", "~> 0"
1011

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ DEPENDENCIES
298298
cocoapods (= 1.15.2)
299299
fastlane (~> 2, >= 2.222.0)
300300
fastlane-plugin-aws_s3
301+
xcodeproj (< 1.26.0)
301302
xcpretty (~> 0)
302303

303304
RUBY VERSION

android/app/src/main/java/com/expensify/chat/MainApplication.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1919
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
2020
import com.facebook.react.defaults.DefaultReactNativeHost
2121
import com.facebook.react.modules.i18nmanager.I18nUtil
22+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
2223
import com.facebook.soloader.SoLoader
2324
import com.google.firebase.crashlytics.FirebaseCrashlytics
2425
import com.oblador.performance.RNPerformance
@@ -63,10 +64,10 @@ class MainApplication : MultiDexApplication(), ReactApplication {
6364
return
6465
}
6566

66-
SoLoader.init(this, /* native exopackage */false)
67+
SoLoader.init(this, OpenSourceMergedSoMapping)
6768
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
6869
// If you opted-in for the New Architecture, we load the native entry point for this app.
69-
load(bridgelessEnabled = false)
70+
load()
7071
}
7172
if (BuildConfig.DEBUG) {
7273
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)

android/app/src/main/java/com/expensify/chat/RNTextInputResetModule.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33
import com.facebook.react.bridge.ReactApplicationContext;
44
import com.facebook.react.bridge.ReactContextBaseJavaModule;
55
import com.facebook.react.bridge.ReactMethod;
6-
import com.facebook.react.bridge.Callback;
7-
import com.facebook.react.uimanager.UIManagerModule;
8-
import com.facebook.react.uimanager.UIBlock;
9-
import com.facebook.react.uimanager.NativeViewHierarchyManager;
106
import android.content.Context;
117
import android.view.View;
12-
import android.widget.TextView;
138
import android.view.inputmethod.InputMethodManager;
14-
import android.util.Log;
159

1610
public class RNTextInputResetModule extends ReactContextBaseJavaModule {
1711

@@ -31,13 +25,12 @@ public String getName() {
3125
// https://github.com/facebook/react-native/pull/12462#issuecomment-298812731
3226
@ReactMethod
3327
public void resetKeyboardInput(final int reactTagToReset) {
34-
UIManagerModule uiManager = getReactApplicationContext().getNativeModule(UIManagerModule.class);
35-
uiManager.addUIBlock(new UIBlock() {
28+
reactContext.runOnUiQueueThread(new Runnable() {
3629
@Override
37-
public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) {
30+
public void run() {
3831
InputMethodManager imm = (InputMethodManager) getReactApplicationContext().getBaseContext().getSystemService(Context.INPUT_METHOD_SERVICE);
3932
if (imm != null) {
40-
View viewToReset = nativeViewHierarchyManager.resolveView(reactTagToReset);
33+
View viewToReset = reactContext.getFabricUIManager().resolveView(reactTagToReset);
4134
imm.restartInput(viewToReset);
4235
}
4336
}

android/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "34.0.0"
6-
minSdkVersion = 23
7-
compileSdkVersion = 34
5+
buildToolsVersion = "35.0.0"
6+
minSdkVersion = 24
7+
compileSdkVersion = 35
88
targetSdkVersion = 34
99
ndkVersion = "26.1.10909125"
1010

@@ -42,8 +42,6 @@ allprojects {
4242
configurations.all {
4343
resolutionStrategy {
4444
force 'org.xerial:sqlite-jdbc:3.34.0'
45-
//Fix Investigate App Crash MainActivity.onCreate #35655
46-
force "com.facebook.soloader:soloader:0.10.4+"
4745

4846
eachDependency { dependency ->
4947
if (dependency.requested.group == 'org.bouncycastle') {

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

android/gradlew.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

config/webpack/webpack.common.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotenv from 'dotenv';
44
import fs from 'fs';
55
import HtmlWebpackPlugin from 'html-webpack-plugin';
66
import path from 'path';
7+
import TerserPlugin from 'terser-webpack-plugin';
78
import type {Class} from 'type-fest';
89
import type {Configuration, WebpackPluginInstance} from 'webpack';
910
import {DefinePlugin, EnvironmentPlugin, IgnorePlugin, ProvidePlugin} from 'webpack';
@@ -38,7 +39,10 @@ const includeModules = [
3839
'react-native-qrcode-svg',
3940
'react-native-view-shot',
4041
'@react-native/assets',
42+
'expo',
4143
'expo-av',
44+
'expo-image-manipulator',
45+
'expo-modules-core',
4246
].join('|');
4347

4448
const environmentToLogoSuffixMap: Record<string, string> = {
@@ -283,6 +287,20 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
283287
},
284288

285289
optimization: {
290+
minimizer: [
291+
// default settings accordint to https://webpack.js.org/configuration/optimization/#optimizationminimizer
292+
// with addition of preserving the class name for ImageManipulator (expo module)
293+
new TerserPlugin({
294+
terserOptions: {
295+
compress: {
296+
passes: 2,
297+
},
298+
// eslint-disable-next-line @typescript-eslint/naming-convention
299+
keep_classnames: /ImageManipulator|ImageModule/,
300+
},
301+
}),
302+
'...',
303+
],
286304
runtimeChunk: 'single',
287305
splitChunks: {
288306
cacheGroups: {

ios/NewExpensify.xcodeproj/project.pbxproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@
11031103
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
11041104
ENABLE_BITCODE = NO;
11051105
INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist";
1106-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1106+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
11071107
LD_RUNPATH_SEARCH_PATHS = (
11081108
"$(inherited)",
11091109
"@executable_path/Frameworks",
@@ -1218,7 +1218,7 @@
12181218
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
12191219
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
12201220
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1221-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1221+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
12221222
LD_RUNPATH_SEARCH_PATHS = (
12231223
"$(inherited)",
12241224
"@executable_path/Frameworks",
@@ -1260,7 +1260,7 @@
12601260
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
12611261
ENABLE_BITCODE = NO;
12621262
INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist";
1263-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1263+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
12641264
LD_RUNPATH_SEARCH_PATHS = (
12651265
"$(inherited)",
12661266
"@executable_path/Frameworks",
@@ -1299,7 +1299,7 @@
12991299
DEVELOPMENT_TEAM = 368M544MTT;
13001300
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
13011301
INFOPLIST_FILE = NewExpensify/Info.plist;
1302-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1302+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
13031303
LD_RUNPATH_SEARCH_PATHS = (
13041304
"$(inherited)",
13051305
"@executable_path/Frameworks",
@@ -1383,7 +1383,7 @@
13831383
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
13841384
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
13851385
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1386-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1386+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
13871387
LD_RUNPATH_SEARCH_PATHS = (
13881388
"$(inherited)",
13891389
"@executable_path/Frameworks",
@@ -1469,7 +1469,7 @@
14691469
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
14701470
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
14711471
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1472-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1472+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
14731473
LD_RUNPATH_SEARCH_PATHS = (
14741474
"$(inherited)",
14751475
"@executable_path/Frameworks",
@@ -1556,7 +1556,7 @@
15561556
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
15571557
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
15581558
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1559-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1559+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
15601560
LD_RUNPATH_SEARCH_PATHS = (
15611561
"$(inherited)",
15621562
"@executable_path/Frameworks",
@@ -1637,7 +1637,7 @@
16371637
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
16381638
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
16391639
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1640-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1640+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
16411641
LD_RUNPATH_SEARCH_PATHS = (
16421642
"$(inherited)",
16431643
"@executable_path/Frameworks",
@@ -1716,7 +1716,7 @@
17161716
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
17171717
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
17181718
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1719-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1719+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
17201720
LD_RUNPATH_SEARCH_PATHS = (
17211721
"$(inherited)",
17221722
"@executable_path/Frameworks",
@@ -1796,7 +1796,7 @@
17961796
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
17971797
INFOPLIST_KEY_CFBundleDisplayName = NotificationServiceExtension;
17981798
INFOPLIST_KEY_NSHumanReadableCopyright = "";
1799-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
1799+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
18001800
LD_RUNPATH_SEARCH_PATHS = (
18011801
"$(inherited)",
18021802
"@executable_path/Frameworks",
@@ -2071,7 +2071,7 @@
20712071
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
20722072
ENABLE_BITCODE = NO;
20732073
INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist";
2074-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
2074+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
20752075
LD_RUNPATH_SEARCH_PATHS = (
20762076
"$(inherited)",
20772077
"@executable_path/Frameworks",
@@ -2220,7 +2220,7 @@
22202220
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
22212221
ENABLE_BITCODE = NO;
22222222
INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist";
2223-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
2223+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
22242224
LD_RUNPATH_SEARCH_PATHS = (
22252225
"$(inherited)",
22262226
"@executable_path/Frameworks",
@@ -2362,7 +2362,7 @@
23622362
DEVELOPMENT_TEAM = 368M544MTT;
23632363
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
23642364
INFOPLIST_FILE = NewExpensify/Info.plist;
2365-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
2365+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
23662366
LD_RUNPATH_SEARCH_PATHS = (
23672367
"$(inherited)",
23682368
"@executable_path/Frameworks",
@@ -2501,7 +2501,7 @@
25012501
DEVELOPMENT_TEAM = 368M544MTT;
25022502
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT;
25032503
INFOPLIST_FILE = NewExpensify/Info.plist;
2504-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
2504+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
25052505
LD_RUNPATH_SEARCH_PATHS = (
25062506
"$(inherited)",
25072507
"@executable_path/Frameworks",

ios/Podfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ end
1717
node_require('react-native/scripts/react_native_pods.rb')
1818
node_require('react-native-permissions/scripts/setup.rb')
1919

20-
# Our min supported iOS version is higher than the default (min_ios_version_supported) to support libraires such as Airship
21-
platform :ios, 14.0
20+
platform :ios, min_ios_version_supported
2221
prepare_react_native_project!
2322

2423

0 commit comments

Comments
 (0)