Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into arosiclair-ios-a…
Browse files Browse the repository at this point in the history
…pp-group
  • Loading branch information
arosiclair committed Aug 30, 2024
2 parents e815de9 + 6659109 commit e2195e4
Show file tree
Hide file tree
Showing 575 changed files with 35,736 additions and 18,613 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14543,6 +14543,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down Expand Up @@ -15369,9 +15370,9 @@ module.exports = require("zlib");
/***/ 3286:
/***/ ((module) => {

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
function _interopRequireDefault(e) {
return e && e.__esModule ? e : {
"default": e
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11881,6 +11881,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2959,6 +2959,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) {
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}
resolve(stdout);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core';
import type {CompareResult, PerformanceEntry} from '@callstack/reassure-compare/src/types';
import type {CompareResult, MeasureEntry} from '@callstack/reassure-compare';
import fs from 'fs';

const run = (): boolean => {
Expand All @@ -16,8 +16,8 @@ const run = (): boolean => {

for (let i = 0; i < regressionOutput.countChanged.length; i++) {
const measurement = regressionOutput.countChanged[i];
const baseline: PerformanceEntry = measurement.baseline;
const current: PerformanceEntry = measurement.current;
const baseline: MeasureEntry = measurement.baseline;
const current: MeasureEntry = measurement.current;

console.log(`Processing measurement ${i + 1}: ${measurement.name}`);

Expand Down
1 change: 1 addition & 0 deletions .github/libs/GitUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function getCommitHistoryAsJSON(fromTag: string, toTag: string): Promise<CommitT
});
spawnedProcess.on('close', (code) => {
if (code !== 0) {
console.log('code: ', code);
return reject(new Error(`${stderr}`));
}

Expand Down
31 changes: 4 additions & 27 deletions .github/scripts/createHelpRedirects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,6 @@ function checkCloudflareResult {
declare -a ITEMS_TO_ADD

while read -r line; do
# Split each line of the file into a source and destination so we can sanity check
# and compare against the current list.
read -r -a LINE_PARTS < <(echo "$line" | tr ',' ' ')
SOURCE_URL=${LINE_PARTS[0]}
DEST_URL=${LINE_PARTS[1]}

# Make sure the format of the line is as execpted.
if [[ "${#LINE_PARTS[@]}" -gt 2 ]]; then
error "Found a line with more than one comma: $line"
exit 1
fi

# Basic sanity checking to make sure that the source and destination are in expected
# subdomains.
if ! [[ $SOURCE_URL =~ ^https://(community|help)\.expensify\.com ]]; then
error "Found source URL that is not a communityDot or helpDot URL: $SOURCE_URL"
exit 1
fi

if ! [[ $DEST_URL =~ ^https://(help|use)\.expensify\.com ]]; then
error "Found destination URL that is not a helpDot or useDot URL: $DEST_URL"
exit 1
fi

info "Source: $SOURCE_URL and destination: $DEST_URL appear to be formatted correctly."

ITEMS_TO_ADD+=("$line")

# This line skips the first line in the csv because the first line is a header row.
Expand Down Expand Up @@ -83,6 +57,9 @@ done | jq -n '. |= [inputs]')

info "Adding redirects for $PUT_JSON"

# Dump $PUT_JSON into a file otherwise the curl request below will fail with too many arguments
echo "$PUT_JSON" > redirects.json

# We use PUT here instead of POST so that we replace the entire list in place. This has many benefits:
# 1. We don't have to check if items are already in the list, allowing this script to run faster
# 2. We can support deleting redirects this way by simply removing them from the list
Expand All @@ -93,7 +70,7 @@ info "Adding redirects for $PUT_JSON"
PUT_RESULT=$(curl -s --request PUT --url "https://api.cloudflare.com/client/v4/accounts/$ZONE_ID/rules/lists/$LIST_ID/items" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $CLOUDFLARE_LIST_TOKEN" \
--data "$PUT_JSON")
--data-binary @redirects.json)

checkCloudflareResult "$PUT_RESULT"
OPERATION_ID=$(echo "$PUT_RESULT" | jq -r .result.operation_id)
Expand Down
15 changes: 15 additions & 0 deletions .github/scripts/removeInvalidJson.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require 'json'

# List of JSON strings
json_strings = ARGV

# Parse each JSON string and remove any that couldn't be parsed
valid_jsons = json_strings.select do |json_string|
begin
JSON.parse(json_string)
true
rescue JSON::ParserError
false
end
end
4 changes: 3 additions & 1 deletion .github/scripts/verifyPodfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ if ! read_lines_into_array PODSPEC_PATHS < <(npx react-native config | jq --raw-
cleanupAndExit 1
fi

PODSPECS=$(./.github/scripts/printPodspec.rb "${PODSPEC_PATHS[@]}")

# Format a list of Pods based on the output of the config command
if ! FORMATTED_PODS=$( \
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$(./.github/scripts/printPodspec.rb "${PODSPEC_PATHS[@]}")" \
jq --raw-output --slurp 'map((.name + " (" + .version + ")")) | .[]' <<< "$(./.github/scripts/removeInvalidJson.rb "${PODSPECS}")" \
); then
error "Error: could not parse podspecs at paths parsed from react-native config"
cleanupAndExit 1
Expand Down
42 changes: 42 additions & 0 deletions .github/scripts/verifyRedirect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# HelpDot - Verifies that redirects.csv does not have any duplicates
# Duplicate sourceURLs break redirection on cloudflare pages

source scripts/shellUtils.sh

declare -r REDIRECTS_FILE="docs/redirects.csv"
declare -a ITEMS_TO_ADD

declare -r RED='\033[0;31m'
declare -r GREEN='\033[0;32m'
Expand All @@ -22,5 +25,44 @@ if [[ DETECT_CYCLE_EXIT_CODE -eq 1 ]]; then
exit 1
fi

while read -r line; do
# Split each line of the file into a source and destination so we can sanity check
# and compare against the current list.
read -r -a LINE_PARTS < <(echo "$line" | tr ',' ' ')
SOURCE_URL=${LINE_PARTS[0]}
DEST_URL=${LINE_PARTS[1]}

# Make sure the format of the line is as expected.
if [[ "${#LINE_PARTS[@]}" -gt 2 ]]; then
error "Found a line with more than one comma: $line"
exit 1
fi

# Basic sanity checking to make sure that the source and destination are in expected
# subdomains.
if ! [[ $SOURCE_URL =~ ^https://(community|help)\.expensify\.com ]] || [[ $SOURCE_URL =~ \# ]]; then
error "Found source URL that is not a communityDot or helpDot URL, or contains a '#': $SOURCE_URL"
exit 1
fi

if ! [[ $DEST_URL =~ ^https://(help|use|integrations)\.expensify\.com|^https://www\.expensify\.org ]]; then
error "Found destination URL that is not a supported URL: $DEST_URL"
exit 1
fi

info "Source: $SOURCE_URL and destination: $DEST_URL appear to be formatted correctly."

ITEMS_TO_ADD+=("$line")

# This line skips the first line in the csv because the first line is a header row.
done <<< "$(tail +2 $REDIRECTS_FILE)"

# Sanity check that we should actually be running this and we aren't about to delete
# every single redirect.
if [[ "${#ITEMS_TO_ADD[@]}" -lt 1 ]]; then
error "No items found to add, why are we running?"
exit 1
fi

echo -e "${GREEN}The redirects.csv is valid!${NC}"
exit 0
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ jobs:
run: echo "PRODUCTION_VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV"

- name: 🚀 Edit the release to be no longer a prerelease to deploy production 🚀
run: gh release edit ${{ env.PRODUCTION_VERSION }} --prerelease=false --latest
run: |
LATEST_RELEASE="$(gh release list --exclude-pre-releases --json tagName,isLatest --jq '.[] | select(.isLatest) | .tagName')"
gh api --method POST /repos/Expensify/App/releases/generate-notes -f "tag_name=${{ env.PRODUCTION_VERSION }}" -f "previous_tag_name=$LATEST_RELEASE" >> releaseNotes.md
gh release edit ${{ env.PRODUCTION_VERSION }} --prerelease=false --latest --notes-file releaseNotes.md
env:
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
needs: validateActor
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer
runs-on: macos-13-xlarge
steps:
- name: Checkout
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }}
env:
PULL_REQUEST_NUMBER: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }}
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer
runs-on: macos-13-xlarge
steps:
- name: Checkout
Expand All @@ -158,7 +158,7 @@ jobs:
uses: ./.github/actions/composite/setupNode

- name: Setup XCode
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select -switch /Applications/Xcode_15.2.0.app

- name: Setup Ruby
uses: ruby/setup-ruby@v1.187.0
Expand Down Expand Up @@ -298,10 +298,6 @@ jobs:
- name: Build web for testing
run: npm run build-adhoc

- name: Build docs
run: npm run storybook-build
continue-on-error: true

- name: Deploy to S3 for internal testing
run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://ad-hoc-expensify-cash/web/"$PULL_REQUEST_NUMBER"

Expand Down
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DerivedData
*.p12
*.mobileprovision
ios-fastlane-json-key.json
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -78,7 +78,7 @@ android/app/android-fastlane-json-key.json
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

# Local DEV config
Expand Down Expand Up @@ -127,5 +127,19 @@ config/webpack/*.pem
dist/
web-build/

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Storage location for downloaded app source maps (see scripts/symbolicate-profile.ts)
.sourcemaps/

# Jeykll
docs/.bundle

# Output of react compiler healthcheck dev script
react-compiler-output.txt
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"
ruby ">= 2.6.10"

gem "cocoapods", "= 1.15.2"
gem "activesupport", ">= 6.1.7.3", "< 7.1.0"
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem "fastlane", "~> 2", ">= 2.222.0"
gem "xcpretty", "~> 0"

Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GEM
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
apktools (0.7.4)
apktools (0.7.5)
rubyzip (~> 2.0)
artifactory (3.0.17)
atomos (0.1.3)
Expand Down Expand Up @@ -292,7 +292,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (= 1.15.2)
fastlane (~> 2, >= 2.222.0)
fastlane-plugin-aws_s3
Expand All @@ -302,4 +302,4 @@ RUBY VERSION
ruby 2.6.10p210

BUNDLED WITH
2.4.14
2.4.19
21 changes: 11 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ fullstory {
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down Expand Up @@ -62,6 +62,8 @@ react {
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
//
/* Autolinking */
autolinkLibrariesWithApp()
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
Expand Down Expand Up @@ -108,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009002207
versionName "9.0.22-7"
versionCode 1009002700
versionName "9.0.27-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 Expand Up @@ -246,6 +248,5 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0")
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin
apply plugin: 'com.google.firebase.crashlytics'
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
load(bridgelessEnabled = false)
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
}

// Force the app to LTR mode.
val sharedI18nUtilInstance = I18nUtil.getInstance()
val sharedI18nUtilInstance = I18nUtil.instance
sharedI18nUtilInstance.allowRTL(applicationContext, false)

// Start the "js_load" custom performance tracing metric. This timer is stopped by a native
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/res/drawable/rn_edit_text_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">

android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
Expand Down
Loading

0 comments on commit e2195e4

Please sign in to comment.