Files
zeekay 55a7f247ca init: extract wallet from lux/exchange monorepo
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config,
utilities, sessions, gating, notifications, analytics, eslint-config,
prices) into a standalone pnpm workspace.  Resolves merge conflict
markers in extension and mobile package.json files, strips build
artifacts (.wxt, .output, Pods).
2026-04-11 01:59:19 -07:00

28 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
<<<<<<< HEAD
MAX_SIZE=25.50
=======
# Bumped 25.50 -> 26.00: security dep audit (elliptic 6.6.1, qs 6.14.2, etc.) added ~4KB via transitive deps
MAX_SIZE=26.00
>>>>>>> upstream/main
MAX_BUFFER=0.5
# Check OS type and use appropriate stat command
if [[ $OSTYPE == "darwin"* ]]; then
# MacOS
BUNDLE_SIZE=$(stat -f %z ios/main.jsbundle | awk '{print $1/1024/1024}')
else
# Linux and others
BUNDLE_SIZE=$(stat --format=%s ios/main.jsbundle | awk '{print $1/1024/1024}')
fi
if (($(echo "$BUNDLE_SIZE > $MAX_SIZE" | bc -l))); then
echo "Bundle size ($BUNDLE_SIZE MB) exceeds limit ($MAX_SIZE MB). If you are adding new dependencies or files and see an increase of the bundle size by > 0.5MB, please check with the team. Otherwise you can bump the max size in the script by 0.5MB."
exit 1
elif (($(echo "$BUNDLE_SIZE + $MAX_BUFFER < $MAX_SIZE" | bc -l))); then
echo "Bundle size ($BUNDLE_SIZE MB) has too much buffer (Max buffer is $MAX_BUFFER MB)! Please bump down the limit to be within $MAX_BUFFER of the current bundle size to ensure we retain our bundle size gains!"
exit 1
else
echo "✅ Bundle size ($BUNDLE_SIZE MB) is within limit ($MAX_SIZE MB)"
fi