From 1140ac8856ff1499d9be5af03a3a016c284d1f79 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sun, 28 Sep 2025 10:32:59 +0200 Subject: [PATCH 01/13] chore(scripts): update e2e-maestro.sh --- scripts/e2e-maestro.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index 42750e6d..0e43f7cf 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -6,7 +6,7 @@ PLATFORM=${1:-} EXAMPLE_DIR=${2:-} PACKAGE_TYPE=${3:-} -echo "๐Ÿš€ Running e2e tests for $PLATFORM" +echo "๐Ÿš€ Running e2e video recording for $PLATFORM" # Validate passed platform case $PLATFORM in @@ -121,27 +121,30 @@ echo "" test_file="e2e-tests/$PACKAGE_TYPE.e2e.yaml" -echo "๐Ÿงช Using test file: $test_file" +echo "๐ŸŽฌ Using flow file for recording: $test_file" if [ ! -f "$test_file" ]; then - echo "โŒ Error! Test file not found: $test_file" + echo "โŒ Error! Flow file not found: $test_file" echo "" exit 1 fi -testCmd="maestro test \"$test_file\" -e APP_ID=$APP_ID --flatten-debug-output" -echo "๐ŸŽฏ Running test: $testCmd" +# Create output directory for videos +mkdir -p e2e-artifacts + +recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local" +echo "๐ŸŽฏ Recording test video: $recordCmd" echo "๐Ÿ“ฑ APP_ID: $APP_ID" -if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then - echo "Test ${test_file} failed. Retrying in 30 seconds..." +if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE.mp4"; then + echo "Recording ${test_file} failed. Retrying in 30 seconds..." sleep 30 - if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then - echo "Test ${test_file} failed again. Retrying for the last time in 120 seconds..." + if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-1.mp4"; then + echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..." sleep 120 - if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then - echo "Test ${test_file} failed again. Exiting..." + if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-2.mp4"; then + echo "Recording ${test_file} failed again. Exiting..." exit 1 fi fi From eb1a84b8aeef1d0eae5c6f1b296ce668eb3aa0f8 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sun, 28 Sep 2025 10:54:03 +0200 Subject: [PATCH 02/13] chore(scripts): add debug output option to e2e-maestro.sh recording command --- .github/workflows/ci-packages.yml | 2 ++ scripts/e2e-maestro.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index cb340938..94c96c84 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -7,6 +7,7 @@ on: - 'src/**' - '.github/workflows/**' - '.github/actions/**' + - 'scripts/**' - 'package.json' - 'bun.lock' - 'assets/template/**' @@ -16,6 +17,7 @@ on: - 'src/**' - '.github/workflows/**' - '.github/actions/**' + - 'scripts/**' - 'package.json' - 'bun.lock' - 'assets/template/**' diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index 0e43f7cf..dde07073 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -132,7 +132,7 @@ fi # Create output directory for videos mkdir -p e2e-artifacts -recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local" +recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local --debug-output" echo "๐ŸŽฏ Recording test video: $recordCmd" echo "๐Ÿ“ฑ APP_ID: $APP_ID" From 463f9598be881de85c69d0093d7e176f69412568 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sun, 28 Sep 2025 11:37:55 +0200 Subject: [PATCH 03/13] chore(deps): update react-native to version 0.81.4 --- assets/template/package.json | 2 +- scripts/e2e-maestro.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/template/package.json b/assets/template/package.json index df943731..0c5d94de 100644 --- a/assets/template/package.json +++ b/assets/template/package.json @@ -56,7 +56,7 @@ "@types/react": "19.1.0", "nitrogen": "^0.29.4", "react": "19.1.0", - "react-native": "0.81.1", + "react-native": "0.81.4", "react-native-builder-bob": "^0.37.0", "react-native-nitro-modules": "^0.2942", "conventional-changelog-conventionalcommits": "^9.1.0", diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index dde07073..ac571499 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -132,18 +132,18 @@ fi # Create output directory for videos mkdir -p e2e-artifacts -recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local --debug-output" +recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local" echo "๐ŸŽฏ Recording test video: $recordCmd" echo "๐Ÿ“ฑ APP_ID: $APP_ID" -if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE.mp4"; then +if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then echo "Recording ${test_file} failed. Retrying in 30 seconds..." sleep 30 - if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-1.mp4"; then + if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..." sleep 120 - if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-2.mp4"; then + if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then echo "Recording ${test_file} failed again. Exiting..." exit 1 fi From 1a9c8190b06d13fd53d2d02516a5f3a1661efbb6 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sun, 28 Sep 2025 12:50:00 +0200 Subject: [PATCH 04/13] chore(actions): update Maestro CLI installation to version 1.40.0 --- .github/actions/setup-maestro/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-maestro/action.yml b/.github/actions/setup-maestro/action.yml index efbc604f..fedd25a4 100644 --- a/.github/actions/setup-maestro/action.yml +++ b/.github/actions/setup-maestro/action.yml @@ -5,10 +5,11 @@ runs: steps: - run: | echo "Installing Maestro CLI..." - curl -Ls "https://get.maestro.mobile.dev" | bash + export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash # Add Maestro to PATH for subsequent steps - echo "${HOME}/.maestro/bin" >> $GITHUB_PATH + export PATH="$PATH":"$HOME/.maestro/bin" + echo "$HOME/.maestro/bin" >> $GITHUB_PATH # Verify installation maestro --version || echo "Maestro installation verification failed" From 16599208e41cae95fc3b0a1e64d9c6becbe8fb95 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Tue, 30 Sep 2025 19:56:57 +0200 Subject: [PATCH 05/13] chore(deps): update react and react-native to versions 19.1.1 and 0.82.0-rc.5 --- assets/template/package.json | 4 ++-- commitlint.config.cjs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/template/package.json b/assets/template/package.json index 0c5d94de..285d60c7 100644 --- a/assets/template/package.json +++ b/assets/template/package.json @@ -55,8 +55,8 @@ "@types/jest": "^29.5.12", "@types/react": "19.1.0", "nitrogen": "^0.29.4", - "react": "19.1.0", - "react-native": "0.81.4", + "react": "19.1.1", + "react-native": "0.82.0-rc.5", "react-native-builder-bob": "^0.37.0", "react-native-nitro-modules": "^0.2942", "conventional-changelog-conventionalcommits": "^9.1.0", diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 186619e5..1ee388d9 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -2,5 +2,6 @@ module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'footer-max-line-length': [0, 'always'], + 'body-max-line-length': [0, 'always'], }, } From ff06e4e5d7d8e35e1142e74d00bd024337f52318 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Wed, 1 Oct 2025 08:05:48 +0200 Subject: [PATCH 06/13] chore(scripts): enhance e2e-maestro.sh with project root path --- scripts/e2e-maestro.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index ac571499..16baf1e0 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -2,11 +2,15 @@ trap 'exit' INT +# Save the script directory (project root) +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" + PLATFORM=${1:-} EXAMPLE_DIR=${2:-} PACKAGE_TYPE=${3:-} echo "๐Ÿš€ Running e2e video recording for $PLATFORM" +echo "๐Ÿ“‚ Project root: $SCRIPT_DIR" # Validate passed platform case $PLATFORM in @@ -48,15 +52,16 @@ if [ "$PLATFORM" == "ios" ]; then export USE_CCACHE=1 buildCmd="xcodebuild \ - CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ - -derivedDataPath build \ - -UseModernBuildSystem=YES \ -workspace $SCHEME.xcworkspace \ - -configuration Release \ -scheme $SCHEME \ + -configuration Release \ -destination id=$iphone16Id \ - -parallelizeTargets \ + -derivedDataPath build \ -jobs $(sysctl -n hw.ncpu) \ + ONLY_ACTIVE_ARCH=YES \ + ARCHS=arm64 \ + VALID_ARCHS=arm64 \ + EXCLUDED_ARCHS=x86_64 \ CODE_SIGNING_ALLOWED=NO" echo "๐Ÿ”จ Building iOS app..." @@ -92,7 +97,8 @@ if [ "$PLATFORM" == "ios" ]; then echo "๐Ÿ“ฒ Installing app from: $APP_PATH" xcrun simctl install $iphone16Id "$APP_PATH" - cd ../../.. + # Return to project root + cd "$SCRIPT_DIR" else cd $EXAMPLE_DIR/android chmod +x ./gradlew @@ -113,7 +119,9 @@ else # Stop Gradle daemon to free up memory echo "๐Ÿงน Stopping Gradle daemon..." ./gradlew --stop - cd ../../.. + + # Return to project root + cd "$SCRIPT_DIR" fi echo "๐Ÿ“‚ Script directory: $(pwd)" @@ -132,7 +140,7 @@ fi # Create output directory for videos mkdir -p e2e-artifacts -recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local" +recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID" echo "๐ŸŽฏ Recording test video: $recordCmd" echo "๐Ÿ“ฑ APP_ID: $APP_ID" From 98d771aaa343143094f7f7a41c5f8fcea4185d98 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Wed, 1 Oct 2025 08:53:44 +0200 Subject: [PATCH 07/13] chore(ci): integrate ccache for improved build performance in CI workflow --- .github/workflows/ci-packages.yml | 28 ++++++++++++++++++++++++++++ scripts/e2e-maestro.sh | 11 +++++++++++ 2 files changed, 39 insertions(+) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 94c96c84..15bf350c 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -517,12 +517,40 @@ jobs: working-directory: ${{ env.WORKING_DIR }}/example/ios run: pod install + - name: Setup ccache + run: | + brew install ccache + ccache --version + ccache --zero-stats + + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ~/Library/Caches/ccache + key: ${{ runner.os }}-ccache-${{ matrix.package-type }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-ccache-${{ matrix.package-type }}- + ${{ runner.os }}-ccache- + + - name: Configure ccache + run: | + ccache --set-config=max_size=2G + ccache --set-config=compression=true + ccache --set-config=compression_level=6 + - name: Install Maestro CLI uses: ./.github/actions/setup-maestro - name: Run tests + env: + USE_CCACHE: 1 + CCACHE_DIR: ~/Library/Caches/ccache run: ${{ matrix.pm }} ios:e2e ${{ env.WORKING_DIR }}/example ${{ matrix.package-type }} + - name: Print ccache statistics + if: always() + run: ccache --show-stats + - name: Upload test artifacts if: always() uses: actions/upload-artifact@v4 diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index 16baf1e0..24eedd0f 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -50,6 +50,17 @@ if [ "$PLATFORM" == "ios" ]; then # Build the app with optimizations and pretty output export USE_CCACHE=1 + # Configure ccache if available (optional optimization) + if command -v ccache >/dev/null 2>&1; then + export CCACHE_DIR="${CCACHE_DIR:-$HOME/Library/Caches/ccache}" + mkdir -p "$CCACHE_DIR" + export PATH="/opt/homebrew/bin:$PATH" + echo "โœ… ccache is available" + echo "๐Ÿ“ฆ ccache directory: $CCACHE_DIR" + ccache --max-size=2G 2>/dev/null || true + else + echo "โš ๏ธ ccache not found (optional). Install with: brew install ccache" + fi buildCmd="xcodebuild \ -workspace $SCHEME.xcworkspace \ From 3d2e5fd6afd8c054e492822bfd6f66425a88523c Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 03:44:55 +0200 Subject: [PATCH 08/13] chore(deps): bump up react-native to 0.82 --- assets/template/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/template/package.json b/assets/template/package.json index 285d60c7..ea3bf366 100644 --- a/assets/template/package.json +++ b/assets/template/package.json @@ -53,12 +53,12 @@ "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", "@types/jest": "^29.5.12", - "@types/react": "19.1.0", - "nitrogen": "^0.29.4", + "@types/react": "19.1.1", + "nitrogen": "^0.29.8", "react": "19.1.1", - "react-native": "0.82.0-rc.5", + "react-native": "0.82", "react-native-builder-bob": "^0.37.0", - "react-native-nitro-modules": "^0.2942", + "react-native-nitro-modules": "^0.29.8", "conventional-changelog-conventionalcommits": "^9.1.0", "semantic-release": "^24.2.9", "typescript": "^5.8.3" From 13a69656d0756ad2304793973c6eed06f59bb63c Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 04:33:10 +0200 Subject: [PATCH 09/13] chore(deps): update bun install commands to use --linker=hoisted across workflows and scripts --- .github/workflows/ci-packages.yml | 4 ++-- .github/workflows/deploy.yml | 2 +- .github/workflows/release.yml | 2 +- assets/template/.github/workflows/android-build.yml | 2 +- assets/template/.github/workflows/ios-build.yml | 2 +- assets/template/.github/workflows/release.yml | 2 +- test-local.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 15bf350c..09f2a0b2 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -58,7 +58,7 @@ jobs: ${{ runner.os }}-bun- - name: Install dependencies - run: bun install + run: bun install --linker=hoisted - name: Lint Code run: bun lint @@ -116,7 +116,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install + run: bun install --linker=hoisted - name: Build CLI and Link Locally run: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1dc1dd65..3634c145 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: bun-version: latest - name: Install dependencies - run: bun install --frozen-lockfile + run: bun install --linker=hoisted --frozen-lockfile - name: Build website id: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f1b8cd9..f68e8c32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install + run: bun install --linker=hoisted - name: Build lib run: bun run build diff --git a/assets/template/.github/workflows/android-build.yml b/assets/template/.github/workflows/android-build.yml index 9d8ef32d..e58369ff 100644 --- a/assets/template/.github/workflows/android-build.yml +++ b/assets/template/.github/workflows/android-build.yml @@ -47,7 +47,7 @@ jobs: - uses: oven-sh/setup-bun@v2 - name: Install dependencies (bun) - run: bun install + run: bun install --linker=hoisted - name: Disable new architecture in gradle.properties if: matrix.arch == 'old' diff --git a/assets/template/.github/workflows/ios-build.yml b/assets/template/.github/workflows/ios-build.yml index d4ac2990..fe011720 100644 --- a/assets/template/.github/workflows/ios-build.yml +++ b/assets/template/.github/workflows/ios-build.yml @@ -62,7 +62,7 @@ jobs: xcode-version: 16.4 - name: Install dependencies (bun) - run: bun install + run: bun install --linker=hoisted - name: Disable new architecture in Podfile if: matrix.arch == 'old' diff --git a/assets/template/.github/workflows/release.yml b/assets/template/.github/workflows/release.yml index d0818340..9fa5d468 100644 --- a/assets/template/.github/workflows/release.yml +++ b/assets/template/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install + run: bun install --linker=hoisted - name: Build lib run: bun run build diff --git a/test-local.sh b/test-local.sh index 90ed67f4..d04fdb28 100755 --- a/test-local.sh +++ b/test-local.sh @@ -79,7 +79,7 @@ EOF chmod +x test-module.exp # Install, build and link bun -bun install +bun install --linker=hoisted bun run build bun link From 4d6eb2617aef7c39cf4ea8f5fb067ea9970c3e12 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 04:39:42 +0200 Subject: [PATCH 10/13] chore(actions): modify bun install command to conditionally use --linker=hoisted --- .github/actions/install-deps/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-deps/action.yml b/.github/actions/install-deps/action.yml index 043e875f..ddf1f2b4 100644 --- a/.github/actions/install-deps/action.yml +++ b/.github/actions/install-deps/action.yml @@ -18,4 +18,8 @@ runs: bun|yarn|pnpm|npm) ;; *) echo "Unsupported pm: ${{ inputs.pm }}" >&2; exit 1;; esac - ${{ inputs.pm }} install + if [ "${{ inputs.pm }}" = "bun" ]; then + ${{ inputs.pm }} install --linker=hoisted + else + ${{ inputs.pm }} install + fi From d654c745d8b5f244ccdc6d93ad7c7208505e846d Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 08:47:20 +0200 Subject: [PATCH 11/13] chore(scripts): update e2e-maestro.sh to include --local flag in recording command --- scripts/e2e-maestro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/e2e-maestro.sh b/scripts/e2e-maestro.sh index 24eedd0f..73578980 100755 --- a/scripts/e2e-maestro.sh +++ b/scripts/e2e-maestro.sh @@ -151,7 +151,7 @@ fi # Create output directory for videos mkdir -p e2e-artifacts -recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID" +recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local" echo "๐ŸŽฏ Recording test video: $recordCmd" echo "๐Ÿ“ฑ APP_ID: $APP_ID" From f55f4092a3da285138d876e34ff3e1c521b93099 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 10:11:13 +0200 Subject: [PATCH 12/13] chore(config): add bunfig.toml with --linker=hoisted flag --- .github/actions/install-deps/action.yml | 6 +----- .github/workflows/ci-packages.yml | 4 ++-- .github/workflows/deploy.yml | 2 +- .github/workflows/release.yml | 2 +- assets/template/.github/workflows/android-build.yml | 2 +- assets/template/.github/workflows/ios-build.yml | 2 +- assets/template/.github/workflows/release.yml | 2 +- assets/template/bunfig.toml | 2 ++ bunfig.toml | 2 ++ src/generate-nitro-package.ts | 1 + test-local.sh | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 assets/template/bunfig.toml create mode 100644 bunfig.toml diff --git a/.github/actions/install-deps/action.yml b/.github/actions/install-deps/action.yml index ddf1f2b4..043e875f 100644 --- a/.github/actions/install-deps/action.yml +++ b/.github/actions/install-deps/action.yml @@ -18,8 +18,4 @@ runs: bun|yarn|pnpm|npm) ;; *) echo "Unsupported pm: ${{ inputs.pm }}" >&2; exit 1;; esac - if [ "${{ inputs.pm }}" = "bun" ]; then - ${{ inputs.pm }} install --linker=hoisted - else - ${{ inputs.pm }} install - fi + ${{ inputs.pm }} install diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 09f2a0b2..15bf350c 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -58,7 +58,7 @@ jobs: ${{ runner.os }}-bun- - name: Install dependencies - run: bun install --linker=hoisted + run: bun install - name: Lint Code run: bun lint @@ -116,7 +116,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install --linker=hoisted + run: bun install - name: Build CLI and Link Locally run: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3634c145..1dc1dd65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: bun-version: latest - name: Install dependencies - run: bun install --linker=hoisted --frozen-lockfile + run: bun install --frozen-lockfile - name: Build website id: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f68e8c32..8f1b8cd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install --linker=hoisted + run: bun install - name: Build lib run: bun run build diff --git a/assets/template/.github/workflows/android-build.yml b/assets/template/.github/workflows/android-build.yml index e58369ff..9d8ef32d 100644 --- a/assets/template/.github/workflows/android-build.yml +++ b/assets/template/.github/workflows/android-build.yml @@ -47,7 +47,7 @@ jobs: - uses: oven-sh/setup-bun@v2 - name: Install dependencies (bun) - run: bun install --linker=hoisted + run: bun install - name: Disable new architecture in gradle.properties if: matrix.arch == 'old' diff --git a/assets/template/.github/workflows/ios-build.yml b/assets/template/.github/workflows/ios-build.yml index fe011720..d4ac2990 100644 --- a/assets/template/.github/workflows/ios-build.yml +++ b/assets/template/.github/workflows/ios-build.yml @@ -62,7 +62,7 @@ jobs: xcode-version: 16.4 - name: Install dependencies (bun) - run: bun install --linker=hoisted + run: bun install - name: Disable new architecture in Podfile if: matrix.arch == 'old' diff --git a/assets/template/.github/workflows/release.yml b/assets/template/.github/workflows/release.yml index 9fa5d468..d0818340 100644 --- a/assets/template/.github/workflows/release.yml +++ b/assets/template/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: ${{ runner.os }}-bun- - name: Install npm dependencies (bun) - run: bun install --linker=hoisted + run: bun install - name: Build lib run: bun run build diff --git a/assets/template/bunfig.toml b/assets/template/bunfig.toml new file mode 100644 index 00000000..57f75baf --- /dev/null +++ b/assets/template/bunfig.toml @@ -0,0 +1,2 @@ +[install] +linker = "hoisted" diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 00000000..57f75baf --- /dev/null +++ b/bunfig.toml @@ -0,0 +1,2 @@ +[install] +linker = "hoisted" diff --git a/src/generate-nitro-package.ts b/src/generate-nitro-package.ts index b0a821fd..9f15f4fb 100644 --- a/src/generate-nitro-package.ts +++ b/src/generate-nitro-package.ts @@ -295,6 +295,7 @@ export class NitroModuleFactory { '.github', 'release.config.cjs', 'LICENSE', + 'bunfig.toml', ] await copyTemplateFiles( diff --git a/test-local.sh b/test-local.sh index d04fdb28..90ed67f4 100755 --- a/test-local.sh +++ b/test-local.sh @@ -79,7 +79,7 @@ EOF chmod +x test-module.exp # Install, build and link bun -bun install --linker=hoisted +bun install bun run build bun link From f2852efab8735ab34805ae9662998f876319f3f4 Mon Sep 17 00:00:00 2001 From: Patrick Kabwe Date: Sat, 11 Oct 2025 19:28:10 +0200 Subject: [PATCH 13/13] feat(nitro): conditionally include bunfig.toml in files to copy based on package manager --- src/generate-nitro-package.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/generate-nitro-package.ts b/src/generate-nitro-package.ts index 9f15f4fb..29c44be6 100644 --- a/src/generate-nitro-package.ts +++ b/src/generate-nitro-package.ts @@ -295,9 +295,12 @@ export class NitroModuleFactory { '.github', 'release.config.cjs', 'LICENSE', - 'bunfig.toml', ] + if (this.config.pm === 'bun') { + filesToCopy.push('bunfig.toml') + } + await copyTemplateFiles( this.config, [__dirname, '..', 'assets', 'template'],