Skip to content

Commit

Permalink
Restore yarn
Browse files Browse the repository at this point in the history
pnpm & react-native is too painful of a combination
  • Loading branch information
Sergey Tatarintsev committed Apr 26, 2024
1 parent fec6cb4 commit 51c19a4
Show file tree
Hide file tree
Showing 9 changed files with 1,502 additions and 14,122 deletions.
8 changes: 2 additions & 6 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ description: Setup Node.js and install dependencies
runs:
using: composite
steps:
- uses: pnpm/[email protected]
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'pnpm'
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
shell: bash
run: pnpm install
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: ./.github/actions/setup

- name: Lint files
run: pnpm lint
run: yarn lint

- name: Typecheck files
run: pnpm typecheck
run: yarn typecheck

test:
runs-on: ubuntu-latest
Expand All @@ -33,7 +33,7 @@ jobs:
uses: ./.github/actions/setup

- name: Run unit tests
run: pnpm test --maxWorkers=2 --coverage
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest
Expand All @@ -45,7 +45,7 @@ jobs:
uses: ./.github/actions/setup

- name: Build package
run: pnpm prepare
run: yarn prepare

build-android:
runs-on: ubuntu-latest
Expand All @@ -62,13 +62,13 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('pnpm-lock.yaml') }}
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 "($(pnpm turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Build example for Android
run: |
pnpm turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
build-ios:
runs-on: macos-latest
Expand All @@ -116,13 +116,13 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('pnpm-lock.yaml') }}
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 "($(pnpm turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
Expand All @@ -142,10 +142,10 @@ jobs:
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
pnpm pod-install example/ios
yarn pod-install example/ios
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
pnpm turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ PODS:
- React
- react-native-network-info (5.2.1):
- React
- react-native-prisma (0.1.18):
- react-native-prisma (0.2.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React
Expand Down Expand Up @@ -1284,7 +1284,7 @@ SPEC CHECKSUMS:
React-Mapbuffer: 9ee041e1d7be96da6d76a251f92e72b711c651d6
react-native-http-bridge-refurbished: 88fe66aa55e63807bd8cbaa372c062bc76ed4962
react-native-network-info: d1290ffc0bd0709e11436f5b8d7f605dcc5c4530
react-native-prisma: 82a55a6977bd976a0b0813e6b2eeeb5920077752
react-native-prisma: 1e5ad75a974a7813469b83d8ec6712430505692c
react-native-quick-base64: 777057ea4286f806b00259ede65dc79c7c706320
React-nativeconfig: d753fbbc8cecc8ae413d615599ac378bbf6999bb
React-NativeModulesApple: 964f4eeab1b4325e8b6a799cf4444c3fd4eb0a9c
Expand Down
2 changes: 2 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"prepare": "pod-install",
"android": "react-native run-android",
"ios": "react-native run-ios --simulator='iPhone 15' --scheme='Debug'",
"start": "react-native start",
Expand Down Expand Up @@ -37,6 +38,7 @@
"babel-plugin-module-resolver": "^5.0.0",
"detox": "^20.20.0",
"jest": "^29",
"pod-install": "0.2.0",
"prisma": "5.14.0-dev.22",
"tailwindcss": "^3.4.0"
},
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@
"expo.js"
],
"scripts": {
"example": "pnpm --filter example",
"example": "yarn workspace react-native-prisma-example",
"test": "jest",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
"prepare": "bob build",
"release": "release-it",
"ios:full": "yarn qe:sim && cd example && yarn ios",
"clang": "clang-format -i ./cpp/*.cpp ./cpp/*.h && git add .",
"ios": "cd example && pnpm ios"
"ios": "cd example && yarn ios"
},
"keywords": [
"react-native",
Expand Down Expand Up @@ -85,7 +86,7 @@
"react-native-url-polyfill": "2.0.0",
"release-it": "^15.0.0",
"turbo": "^1.10.7",
"typescript": "^5.4.5"
"typescript": "^5.4.3"
},
"resolutions": {
"@types/react": "17.0.21"
Expand All @@ -97,6 +98,10 @@
"react-native": "*",
"react-native-quick-base64": "*"
},
"workspaces": [
"example"
],
"packageManager": "[email protected]",
"engines": {
"node": ">= 18.0.0"
},
Expand Down
Loading

0 comments on commit 51c19a4

Please sign in to comment.