From 40defb41baa59f409e5a4ef22406cedb41cd2eab Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Sun, 22 Dec 2024 12:12:26 +0100 Subject: [PATCH 1/3] Get rid of turbo --- package.json | 3 +-- turbo.json | 40 ---------------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 turbo.json diff --git a/package.json b/package.json index 69dd268..8d6ef54 100644 --- a/package.json +++ b/package.json @@ -51,12 +51,11 @@ "react": "18.3.1", "react-native": "0.76.5", "react-native-builder-bob": "^0.23.2", - "turbo": "^1.12.4", "typescript": "5.0.4" }, "peerDependencies": { "react": "*", - "react-native": ">0.73.0" + "react-native": "*" }, "workspaces": [ "example" diff --git a/turbo.json b/turbo.json deleted file mode 100644 index b1c666a..0000000 --- a/turbo.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "pipeline": { - "run:android:release": { - "inputs": [ - "package.json", - "android", - "!android/build", - "src/*.ts", - "example/src/tests/**.ts", - "example/package.json", - "example/android", - "cpp/**.cpp", - "cpp/**/*.c", - "cpp/*.h", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" - ], - "outputs": [] - }, - "run:ios": { - "inputs": [ - "package.json", - "*.podspec", - "ios", - "cpp/**/*.cpp", - "cpp/**/*.c", - "cpp/*.h", - "src/*.ts", - "example/src/tests/**.ts", - "example/package.json", - "example/ios", - "!example/ios/build", - "!example/ios/Pods" - ], - "outputs": [] - } - } -} From 9be93131aa21616bbe767103a31e73eecdd94f7c Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Sun, 22 Dec 2024 12:13:45 +0100 Subject: [PATCH 2/3] lock file --- lefthook.yml | 35 +++++++++++++++++++++++++ yarn.lock | 74 +--------------------------------------------------- 2 files changed, 36 insertions(+), 73 deletions(-) create mode 100644 lefthook.yml diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..f6e5dfe --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,35 @@ +# EXAMPLE USAGE: +# +# Refer for explanation to following link: +# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md +# +# pre-push: +# commands: +# packages-audit: +# tags: frontend security +# run: yarn audit +# gems-audit: +# tags: backend security +# run: bundle audit +# +# pre-commit: +# parallel: true +# commands: +# eslint: +# glob: "*.{js,ts,jsx,tsx}" +# run: yarn eslint {staged_files} +# rubocop: +# tags: backend style +# glob: "*.rb" +# exclude: '(^|/)(application|routes)\.rb$' +# run: bundle exec rubocop --force-exclusion {all_files} +# govet: +# tags: backend style +# files: git ls-files -m +# glob: "*.go" +# run: go vet {files} +# scripts: +# "hello.js": +# runner: node +# "any.go": +# runner: go run diff --git a/yarn.lock b/yarn.lock index 993acf2..1859638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4115,11 +4115,10 @@ __metadata: react: "npm:18.3.1" react-native: "npm:0.76.5" react-native-builder-bob: "npm:^0.23.2" - turbo: "npm:^1.12.4" typescript: "npm:5.0.4" peerDependencies: react: "*" - react-native: ">0.73.0" + react-native: "*" languageName: unknown linkType: soft @@ -12937,77 +12936,6 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-darwin-64@npm:1.13.2" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"turbo-darwin-arm64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-darwin-arm64@npm:1.13.2" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"turbo-linux-64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-linux-64@npm:1.13.2" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"turbo-linux-arm64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-linux-arm64@npm:1.13.2" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"turbo-windows-64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-windows-64@npm:1.13.2" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"turbo-windows-arm64@npm:1.13.2": - version: 1.13.2 - resolution: "turbo-windows-arm64@npm:1.13.2" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"turbo@npm:^1.12.4": - version: 1.13.2 - resolution: "turbo@npm:1.13.2" - dependencies: - turbo-darwin-64: "npm:1.13.2" - turbo-darwin-arm64: "npm:1.13.2" - turbo-linux-64: "npm:1.13.2" - turbo-linux-arm64: "npm:1.13.2" - turbo-windows-64: "npm:1.13.2" - turbo-windows-arm64: "npm:1.13.2" - dependenciesMeta: - turbo-darwin-64: - optional: true - turbo-darwin-arm64: - optional: true - turbo-linux-64: - optional: true - turbo-linux-arm64: - optional: true - turbo-windows-64: - optional: true - turbo-windows-arm64: - optional: true - bin: - turbo: bin/turbo - checksum: 10c0/f02c06dfdb0339b91bea7d1c9f9f35f0a271df636e49f5f50ad444f6ae22d2205214a71ca31b197a665dc0bf995dc100e47d204c6e674550266efa910505eb7e - languageName: node - linkType: hard - "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" From fb7f7ec1d99f4e7a4b0f3d2731faa47625ba9908 Mon Sep 17 00:00:00 2001 From: Oscar Franco Date: Sun, 22 Dec 2024 12:17:25 +0100 Subject: [PATCH 3/3] Get rid of turbo cache steps --- .github/workflows/ci.yml | 186 --------------------------------------- 1 file changed, 186 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f57c63..220d12c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,66 +14,6 @@ jobs: - name: Typecheck files run: yarn typecheck - # build-android: - # runs-on: ubuntu-latest - # env: - # TURBO_CACHE_DIR: .turbo/android - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - - # - name: Turn off addons - # run: | - # node ./scripts/turnOffEverything.js - - # - name: Setup - # uses: ./.github/actions/setup - - # - name: Cache turborepo for Android - # uses: actions/cache@v4 - # with: - # path: ${{ env.TURBO_CACHE_DIR }} - # key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - # restore-keys: | - # ${{ runner.os }}-turborepo-android- - - # - name: Check turborepo cache for Android - # run: | - # TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - # if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - # echo "turbo_cache_hit=1" >> $GITHUB_ENV - # fi - - # - name: Install JDK - # if: env.turbo_cache_hit != 1 - # uses: actions/setup-java@v3 - # with: - # distribution: 'zulu' - # java-version: '17' - - # - name: Finalize Android SDK - # if: env.turbo_cache_hit != 1 - # run: | - # /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" - - # - name: Cache Gradle - # if: env.turbo_cache_hit != 1 - # uses: actions/cache@v4 - # with: - # path: | - # ~/.gradle/wrapper - # ~/.gradle/caches - # key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} - # restore-keys: | - # ${{ runner.os }}-gradle- - - # - name: Build example for Android - # env: - # JAVA_OPTS: '-XX:MaxHeapSize=6g' - # run: | - # yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" - test-android: runs-on: ubuntu-latest env: @@ -89,22 +29,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3 @@ -146,13 +70,6 @@ jobs: adb wait-for-device adb shell input keyevent 82 ./scripts/test-android.sh - - # - name: Build example for Android - # env: - # JAVA_OPTS: '-XX:MaxHeapSize=6g' - # run: | - # yarn turbo run android --cache-dir="${{ env.TURBO_CACHE_DIR }}" - test-ios: runs-on: macos-latest env: @@ -173,22 +90,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -201,17 +102,12 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install env: NO_FLIPPER: 1 - # - name: Build example for iOS - # run: | - # yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" - - name: run tests run: | ./scripts/test-ios.sh @@ -236,22 +132,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -264,7 +144,6 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install @@ -295,22 +174,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -353,22 +216,6 @@ jobs: cd example bundle install - - name: Cache turborepo for iOS - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-ios- - - - name: Check turborepo cache for iOS - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:ios').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Cache cocoapods if: env.turbo_cache_hit != 1 id: cocoapods-cache @@ -381,7 +228,6 @@ jobs: ${{ runner.os }}-cocoapods- - name: Install cocoapods - # if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | cd example/ios bundle exec pod install @@ -407,22 +253,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3 @@ -477,22 +307,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Cache turborepo for Android - uses: actions/cache@v4 - with: - path: ${{ env.TURBO_CACHE_DIR }} - key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} - restore-keys: | - ${{ runner.os }}-turborepo-android- - - - name: Check turborepo cache for Android - run: | - TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run run:android:release --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'run:android:release').cache.status") - - if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then - echo "turbo_cache_hit=1" >> $GITHUB_ENV - fi - - name: Install JDK if: env.turbo_cache_hit != 1 uses: actions/setup-java@v3