Skip to content

Commit 452a016

Browse files
petrkonecny2Petr Konecny
andauthored
chore: switched to yarn (#18)
* chore: switched to yarn * chore: updated action * chore: update readmes * chore: linter config * git: updated repo link * chore: remove private * chore: fixed link --------- Co-authored-by: Petr Konecny <[email protected]>
1 parent 889d179 commit 452a016

File tree

11 files changed

+14101
-22980
lines changed

11 files changed

+14101
-22980
lines changed

.github/actions/setup/action.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Setup Environment
2-
description: 'Set up Node.js, pnpm, Expo CLI'
2+
description: 'Set up Node.js, yarn, Expo CLI'
33
inputs:
44
EXPO_TOKEN:
55
required: true
@@ -11,34 +11,25 @@ runs:
1111
- uses: actions/setup-node@v4
1212
with:
1313
node-version: 20
14-
15-
- name: Install pnpm
16-
uses: pnpm/action-setup@v4
17-
with:
18-
version: 9
19-
- name: Get pnpm store directory
20-
id: pnpm-cache
21-
shell: bash
22-
run: |
23-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
14+
cache: 'yarn'
2415

2516
- uses: actions/cache@v4
26-
name: Setup pnpm cache
17+
name: Setup yarn cache
2718
with:
28-
path: ${{ env.STORE_PATH }}
29-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
19+
path: ~/.yarn/cache
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3021
restore-keys: |
31-
${{ runner.os }}-pnpm-store-
22+
${{ runner.os }}-yarn-
3223
3324
- uses: expo/expo-github-action@v8
3425
with:
3526
eas-version: latest
3627
token: ${{ inputs.EXPO_TOKEN }}
37-
packager: pnpm
28+
packager: yarn
3829

3930
- name: Install Dependencies
40-
run: pnpm install --frozen-lockfile
31+
run: yarn install --frozen-lockfile
4132
shell: bash
4233
- name: Install example dependencies
43-
run: cd example && pnpm install --frozen-lockfile
34+
run: cd example && yarn install --frozen-lockfile
4435
shell: bash

.github/workflows/ci-code-quality.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
- uses: ./.github/actions/setup
1313

1414
- name: Run ESLint
15-
run: pnpm lint
15+
run: yarn lint
1616

1717
- name: Run Prettier
18-
run: pnpm format:check
18+
run: yarn format:check
1919

2020
- name: Run TypeScript
21-
run: pnpm type:check
21+
run: yarn type:check
2222

2323
- name: Run Tests
24-
run: pnpm test
24+
run: yarn test

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
- uses: actions/setup-node@v4
1111
with:
1212
node-version: 20
13-
cache: 'npm'
14-
- run: npm ci
13+
cache: 'yarn'
14+
- run: yarn install
1515
- run: yarn lint
1616

1717
publish:
@@ -25,7 +25,7 @@ jobs:
2525
deployments: write
2626
environment:
2727
name: npm
28-
url: https://www.npmjs.com/package/expo-alternate-app-icons
28+
url: https://www.npmjs.com/package/@strv/react-native-hero-carousel
2929
steps:
3030
- uses: actions/checkout@v4
3131
with:
@@ -34,9 +34,9 @@ jobs:
3434
- uses: actions/setup-node@v4
3535
with:
3636
node-version: 20
37-
cache: 'npm'
38-
- run: npm ci
37+
cache: 'yarn'
38+
- run: yarn install
3939
- env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4141
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4242
run: npx auto shipit

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
pnpm type:check
4+
yarn type:check

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ npm install @strv/react-native-hero-carousel
2727
# or
2828
yarn add @strv/react-native-hero-carousel
2929
# or
30-
pnpm add @strv/react-native-hero-carousel
30+
yarn add @strv/react-native-hero-carousel
3131
```
3232

3333
### Peer Dependencies
@@ -208,8 +208,8 @@ We provide a comprehensive example app showcasing all the carousel features. You
208208

209209
```bash
210210
cd example
211-
pnpm install
212-
pnpm start
211+
yarn install
212+
yarn start
213213
```
214214

215215
Then scan the QR code with Expo Go or run on simulator. See the [example app README](./example/README.md) for detailed setup instructions.

example/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This example app demonstrates all the features and capabilities of the `@strv/re
77
### Prerequisites
88

99
- [Node.js](https://nodejs.org/) (v18 or higher)
10-
- [pnpm](https://pnpm.io/) (recommended) or npm/yarn
10+
- [yarn](https://yarnpkg.com/) (recommended) or npm/pnpm
1111
- [Expo CLI](https://docs.expo.dev/get-started/installation/)
1212
- iOS Simulator (macOS) or Android Emulator
1313

@@ -16,17 +16,16 @@ This example app demonstrates all the features and capabilities of the `@strv/re
1616
1. **Install dependencies**
1717

1818
```bash
19-
pnpm install
19+
yarn install
2020
```
2121

2222
2. **Start the development server**
2323

2424
```bash
25-
pnpm start
25+
yarn start
2626
```
2727

2828
3. **Run on your preferred platform**
29-
3029
- **iOS Simulator**: Press `i` in the terminal or scan QR with Expo Go
3130
- **Android Emulator**: Press `a` in the terminal or scan QR with Expo Go
3231
- **Physical Device**: Install [Expo Go](https://expo.dev/go) and scan the QR code
@@ -163,7 +162,7 @@ The example app includes custom hooks that you can reference:
163162
**Metro bundler issues:**
164163

165164
```bash
166-
pnpm start --clear-cache
165+
yarn start --clear-cache
167166
```
168167

169168
**iOS build issues:**
@@ -175,7 +174,7 @@ cd ios && pod install && cd ..
175174
**Android build issues:**
176175

177176
```bash
178-
pnpm android --clear
177+
yarn android --clear
179178
```
180179

181180
**Video not playing:**

0 commit comments

Comments
 (0)