Skip to content

Commit 8eea604

Browse files
committed
Merge branch 'main' into fix/94561-part-1
2 parents d7e6689 + c8716e2 commit 8eea604

679 files changed

Lines changed: 16848 additions & 12022 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.

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,12 @@ jobs:
918918
--target "${{ env.DEPLOY_ENV }}"; then
919919
break
920920
fi
921+
922+
# A transient GitHub error during create doesn't necessarily mean the release failed; it may have been created anyway, so a later "already exists" error means it's present.
923+
if gh release view "${{ needs.prep.outputs.TAG }}" --repo "${{ github.repository }}" &> /dev/null; then
924+
echo "Release ${{ needs.prep.outputs.TAG }} exists despite a create error (likely a transient 502), treating as success."
925+
break
926+
fi
921927
if [[ $i -lt $CREATE_MAX_RETRIES ]]; then
922928
echo "Failed to create release. Retrying in 3 seconds... ($((CREATE_MAX_RETRIES - i)) attempts left)"
923929
sleep 3

Mobile-Expensify

__mocks__/d3-scale.ts

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
/**
4+
* CJS-compatible mock of d3-scale for Jest.
5+
*
6+
* d3-scale is ESM-only ("type": "module") so it cannot be require()'d in Jest's CJS runtime.
7+
* Verbatim copy of the relevant parts of d3-array/src/ticks.js and d3-scale/src/linear.js.
8+
*/
9+
10+
// d3-array/src/ticks.js
11+
const e10 = Math.sqrt(50),
12+
e5 = Math.sqrt(10),
13+
e2 = Math.sqrt(2);
14+
15+
function tickSpec(start, stop, count) {
16+
const step = (stop - start) / Math.max(0, count),
17+
power = Math.floor(Math.log10(step)),
18+
error = step / Math.pow(10, power),
19+
factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
20+
let i1, i2, inc;
21+
if (power < 0) {
22+
inc = Math.pow(10, -power) / factor;
23+
i1 = Math.round(start * inc);
24+
i2 = Math.round(stop * inc);
25+
if (i1 / inc < start) ++i1;
26+
if (i2 / inc > stop) --i2;
27+
inc = -inc;
28+
} else {
29+
inc = Math.pow(10, power) * factor;
30+
i1 = Math.round(start / inc);
31+
i2 = Math.round(stop / inc);
32+
if (i1 * inc < start) ++i1;
33+
if (i2 * inc > stop) --i2;
34+
}
35+
if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
36+
return [i1, i2, inc];
37+
}
38+
39+
function ticks(start, stop, count) {
40+
((stop = +stop), (start = +start), (count = +count));
41+
if (!(count > 0)) return [];
42+
if (start === stop) return [start];
43+
const reverse = stop < start,
44+
[i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
45+
if (!(i2 >= i1)) return [];
46+
const n = i2 - i1 + 1,
47+
ticks = new Array(n);
48+
if (reverse) {
49+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;
50+
else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
51+
} else {
52+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;
53+
else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
54+
}
55+
return ticks;
56+
}
57+
58+
function tickIncrement(start, stop, count) {
59+
((stop = +stop), (start = +start), (count = +count));
60+
return tickSpec(start, stop, count)[2];
61+
}
62+
63+
// d3-scale/src/linear.js
64+
function scaleLinear() {
65+
let domain = [0, 1];
66+
67+
const scale = {
68+
domain(d) {
69+
if (!d) return domain;
70+
domain = [...d];
71+
return scale;
72+
},
73+
nice(count = 10) {
74+
var d = domain;
75+
var i0 = 0;
76+
var i1 = d.length - 1;
77+
var start = d[i0];
78+
var stop = d[i1];
79+
var prestep;
80+
var step;
81+
var maxIter = 10;
82+
83+
if (stop < start) {
84+
((step = start), (start = stop), (stop = step));
85+
((step = i0), (i0 = i1), (i1 = step));
86+
}
87+
88+
while (maxIter-- > 0) {
89+
step = tickIncrement(start, stop, count);
90+
if (step === prestep) {
91+
d[i0] = start;
92+
d[i1] = stop;
93+
domain = d;
94+
return scale;
95+
} else if (step > 0) {
96+
start = Math.floor(start / step) * step;
97+
stop = Math.ceil(stop / step) * step;
98+
} else if (step < 0) {
99+
start = Math.ceil(start * step) / step;
100+
stop = Math.floor(stop * step) / step;
101+
} else {
102+
break;
103+
}
104+
prestep = step;
105+
}
106+
return scale;
107+
},
108+
ticks(count = 10) {
109+
var d = domain;
110+
return ticks(d[0], d[d.length - 1], count);
111+
},
112+
};
113+
114+
return scale;
115+
}
116+
117+
module.exports = {scaleLinear};

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ android {
111111
minSdkVersion rootProject.ext.minSdkVersion
112112
targetSdkVersion rootProject.ext.targetSdkVersion
113113
multiDexEnabled rootProject.ext.multiDexEnabled
114-
versionCode 1009042000
115-
versionName "9.4.20-0"
114+
versionCode 1009042400
115+
versionName "9.4.24-0"
116116
// Supported language variants must be declared here to avoid from being removed during the compilation.
117117
// This also helps us to not include unnecessary language variants in the APK.
118118
resConfigs "en", "es"

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import androidx.multidex.MultiDexApplication
1414
import com.expensify.chat.bootsplash.BootSplashPackage
1515
import com.expensify.chat.navbar.NavBarManagerPackage
1616
import com.expensify.chat.shortcutManagerModule.ShortcutManagerPackage
17+
import com.margelo.nitro.nitrofetch.AutoPrefetcher
1718
import com.facebook.react.PackageList
1819
import com.facebook.react.ReactApplication
1920
import com.facebook.react.ReactHost
@@ -73,6 +74,13 @@ class MainApplication : MultiDexApplication(), ReactApplication {
7374
return
7475
}
7576

77+
// This is the entrypoint for prefetching with `react-native-nitro-fetch`.
78+
try {
79+
AutoPrefetcher.prefetchOnStart(this)
80+
} catch (_: Throwable) {
81+
System.err.println("Error initializing Nitro `AutoPrefetcher`")
82+
}
83+
7684
loadReactNative(this)
7785

7886
// Force the app to LTR mode.
-36.6 KB
Loading
-58.6 KB
Loading
-38.2 KB
Loading
-29.6 KB
Loading
-38.1 KB
Loading

0 commit comments

Comments
 (0)