Skip to content

Commit 3a4e137

Browse files
authored
Merge pull request #18 from objectstack-ai/copilot/update-npm-to-pnpm
2 parents 17f7b5c + 81ca6de commit 3a4e137

14 files changed

Lines changed: 12240 additions & 20558 deletions

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
version: 10
1821
- uses: actions/setup-node@v4
1922
with:
2023
node-version: 20
21-
cache: npm
22-
- run: npm ci --legacy-peer-deps
24+
cache: pnpm
25+
- run: pnpm install
2326
- name: Type Check
2427
run: npx tsc --noEmit
2528
- name: Lint

‎.github/workflows/eas-build.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v4
36+
- uses: pnpm/action-setup@v4
37+
with:
38+
version: 10
3639
- uses: actions/setup-node@v4
3740
with:
3841
node-version: 20
39-
cache: npm
42+
cache: pnpm
4043
- uses: expo/expo-github-action@v8
4144
with:
4245
eas-version: latest
4346
token: ${{ secrets.EXPO_TOKEN }}
44-
- run: npm ci --legacy-peer-deps
47+
- run: pnpm install
4548
- name: Build iOS
4649
if: inputs.platform == 'ios' || inputs.platform == 'all' || inputs.platform == ''
4750
run: eas build --platform ios --profile ${{ inputs.profile || 'preview' }} --non-interactive

‎.github/workflows/eas-submit.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v4
23+
- uses: pnpm/action-setup@v4
24+
with:
25+
version: 10
2326
- uses: actions/setup-node@v4
2427
with:
2528
node-version: 20
26-
cache: npm
29+
cache: pnpm
2730
- uses: expo/expo-github-action@v8
2831
with:
2932
eas-version: latest
3033
token: ${{ secrets.EXPO_TOKEN }}
31-
- run: npm ci --legacy-peer-deps
34+
- run: pnpm install
3235
- name: Submit
3336
run: eas submit --platform ${{ inputs.platform }} --profile production --non-interactive

‎.github/workflows/eas-update.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
2225
- uses: actions/setup-node@v4
2326
with:
2427
node-version: 20
25-
cache: npm
28+
cache: pnpm
2629
- uses: expo/expo-github-action@v8
2730
with:
2831
eas-version: latest
2932
token: ${{ secrets.EXPO_TOKEN }}
30-
- run: npm ci --legacy-peer-deps
33+
- run: pnpm install
3134
- name: Publish update
3235
run: eas update --auto --non-interactive --message "${{ inputs.message || 'OTA update' }}"

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# dependencies
44
node_modules/
55

6+
# pnpm
7+
.pnpm-store/
8+
69
# Expo
710
.expo/
811
dist/

‎.npmrc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
strict-peer-dependencies=false
2+
auto-install-peers=true
3+
shamefully-hoist=true

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Enterprise low-code platform mobile runtime built with Expo, React Native, and T
2424

2525
```bash
2626
# Install dependencies
27-
npm install --legacy-peer-deps
27+
pnpm install
2828

2929
# Copy environment variables
3030
cp .env.example .env.local
3131

3232
# Start development server
33-
npx expo start
33+
pnpm start
3434
```
3535

3636
## Project Structure
@@ -60,10 +60,10 @@ npx expo start
6060

6161
| Command | Description |
6262
|---------|-------------|
63-
| `npm start` | Start Expo development server |
64-
| `npm run lint` | TypeScript check + ESLint |
65-
| `npm test` | Run Jest tests |
66-
| `npm run format` | Format with Prettier |
63+
| `pnpm start` | Start Expo development server |
64+
| `pnpm run lint` | TypeScript check + ESLint |
65+
| `pnpm test` | Run Jest tests |
66+
| `pnpm run format` | Format with Prettier |
6767

6868
## Documentation
6969

‎docs/CONTRIBUTING.md‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
| Tool | Version | Purpose |
3030
|------|---------|---------|
3131
| **Node.js** | ≥ 20.x | Runtime |
32-
| **npm** | ≥ 10.x | Package manager |
32+
| **pnpm** | ≥ 10.x | Package manager |
3333
| **Expo CLI** | Latest | Development tools |
3434
| **Xcode** | ≥ 15 (macOS) | iOS simulator |
3535
| **Android Studio** | Latest | Android emulator |
@@ -42,7 +42,7 @@ git clone https://github.com/objectstack-ai/mobile.git
4242
cd mobile
4343

4444
# 2. Install dependencies
45-
npm install --legacy-peer-deps
45+
pnpm install
4646

4747
# 3. Copy environment variables
4848
cp .env.example .env.local
@@ -51,21 +51,21 @@ cp .env.example .env.local
5151
# Edit .env.local: EXPO_PUBLIC_API_URL=http://localhost:3000
5252

5353
# 5. Start development server
54-
npx expo start
54+
pnpm start
5555
```
5656

5757
### Available Commands
5858

5959
| Command | Description |
6060
|---------|-------------|
61-
| `npm start` | Start Expo development server |
62-
| `npm run android` | Start on Android |
63-
| `npm run ios` | Start on iOS |
64-
| `npm run web` | Start on web |
65-
| `npm run lint` | Run TypeScript check + ESLint |
66-
| `npm test` | Run Jest tests |
67-
| `npm run format` | Format code with Prettier |
68-
| `npm run format:check` | Check formatting without changes |
61+
| `pnpm start` | Start Expo development server |
62+
| `pnpm run android` | Start on Android |
63+
| `pnpm run ios` | Start on iOS |
64+
| `pnpm run web` | Start on web |
65+
| `pnpm run lint` | Run TypeScript check + ESLint |
66+
| `pnpm test` | Run Jest tests |
67+
| `pnpm run format` | Format code with Prettier |
68+
| `pnpm run format:check` | Check formatting without changes |
6969

7070
---
7171

@@ -206,7 +206,7 @@ mobile/
206206
2. Make changes with small, focused commits
207207
208208
3. Run checks before pushing
209-
npm run lint && npm test
209+
pnpm run lint && pnpm test
210210
211211
4. Push and create PR against develop
212212
git push origin feature/my-feature
@@ -509,8 +509,8 @@ chore(deps): update expo SDK to 54.0.33
509509

510510
- [ ] TypeScript compiles without errors (`npx tsc --noEmit`)
511511
- [ ] ESLint passes (`npx eslint . --ext .ts,.tsx`)
512-
- [ ] Tests pass (`npm test`)
513-
- [ ] Code is formatted (`npm run format:check`)
512+
- [ ] Tests pass (`pnpm test`)
513+
- [ ] Code is formatted (`pnpm run format:check`)
514514
- [ ] New code has appropriate types (no unnecessary `any`)
515515
- [ ] New components have `accessibilityLabel` props
516516
- [ ] Documentation updated if API changed
@@ -578,8 +578,8 @@ How to verify the changes.
578578

579579
| Issue | Solution |
580580
|-------|----------|
581-
| **Install fails** | Use `npm install --legacy-peer-deps` |
582-
| **Metro cache issues** | `npx expo start --clear` |
581+
| **Install fails** | Use `pnpm install --no-frozen-lockfile` |
582+
| **Metro cache issues** | `pnpm start --clear` |
583583
| **TypeScript errors** | `npx tsc --noEmit` to check |
584584
| **NativeWind not updating** | Restart Metro bundler |
585585
| **Expo Go crash** | Use development build instead |
@@ -589,7 +589,7 @@ How to verify the changes.
589589

590590
```bash
591591
# Clear all caches
592-
npx expo start --clear
592+
pnpm start --clear
593593

594594
# Reset Metro cache
595595
npx react-native start --reset-cache
@@ -601,7 +601,7 @@ npx expo-doctor
601601
npx tsc --noEmit
602602

603603
# Fix formatting
604-
npm run format
604+
pnpm run format
605605
```
606606

607607
---

‎docs/DEPLOYMENT.md‎

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ The app uses Expo's **managed workflow**, which means:
4444

4545
```bash
4646
# Install dependencies
47-
npm install --legacy-peer-deps
47+
pnpm install
4848

4949
# Start development server
50-
npx expo start
50+
pnpm start
5151

5252
# Start on specific platform
53-
npx expo start --ios
54-
npx expo start --android
55-
npx expo start --web
53+
pnpm start --ios
54+
pnpm start --android
55+
pnpm start --web
5656

5757
# Type check
5858
npx tsc --noEmit
@@ -64,7 +64,7 @@ npx eslint . --ext .ts,.tsx
6464
npx prettier --write "**/*.{ts,tsx,js,json}"
6565

6666
# Test
67-
npm test
67+
pnpm test
6868
```
6969

7070
---
@@ -161,10 +161,10 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
161161

162162
```
163163
1. Clone repository
164-
2. npm install --legacy-peer-deps
164+
2. pnpm install
165165
3. Copy .env.example → .env.local
166166
4. Configure EXPO_PUBLIC_API_URL
167-
5. npx expo start
167+
5. pnpm start
168168
6. Open on device/simulator
169169
```
170170

@@ -230,7 +230,7 @@ eas build --platform all --profile production
230230
Source Code
231231
↓
232232
EAS Build (Cloud)
233-
├── Install dependencies (npm ci)
233+
├── Install dependencies (pnpm install)
234234
├── Run prebuild hooks
235235
├── Generate native projects
236236
├── Compile native code (Xcode / Gradle)
@@ -333,7 +333,7 @@ Push / PR
333333
↓
334334
┌───────────────────────────┐
335335
│ Unit & Integration Tests │
336-
│ npm test -- --coverage │
336+
│ pnpm test -- --coverage │
337337
└─────────────┬─────────────┘
338338
↓
339339
┌───────────────────────────┐
@@ -360,14 +360,17 @@ jobs:
360360
runs-on: ubuntu-latest
361361
steps:
362362
- uses: actions/checkout@v4
363+
- uses: pnpm/action-setup@v4
364+
with:
365+
version: 10
363366
- uses: actions/setup-node@v4
364367
with:
365368
node-version: "20"
366-
cache: "npm"
367-
- run: npm ci --legacy-peer-deps
369+
cache: "pnpm"
370+
- run: pnpm install
368371
- run: npx tsc --noEmit
369372
- run: npx eslint . --ext .ts,.tsx
370-
- run: npm test -- --coverage --ci
373+
- run: pnpm test -- --coverage --ci
371374
```
372375
373376
#### Build on Merge
@@ -383,15 +386,18 @@ jobs:
383386
runs-on: ubuntu-latest
384387
steps:
385388
- uses: actions/checkout@v4
389+
- uses: pnpm/action-setup@v4
390+
with:
391+
version: 10
386392
- uses: actions/setup-node@v4
387393
with:
388394
node-version: "20"
389-
cache: "npm"
395+
cache: "pnpm"
390396
- uses: expo/expo-github-action@v8
391397
with:
392398
eas-version: latest
393399
token: ${{ secrets.EXPO_TOKEN }}
394-
- run: npm ci --legacy-peer-deps
400+
- run: pnpm install
395401
- run: eas build --platform all --profile preview --non-interactive
396402
```
397403
@@ -408,15 +414,18 @@ jobs:
408414
runs-on: ubuntu-latest
409415
steps:
410416
- uses: actions/checkout@v4
417+
- uses: pnpm/action-setup@v4
418+
with:
419+
version: 10
411420
- uses: actions/setup-node@v4
412421
with:
413422
node-version: "20"
414-
cache: "npm"
423+
cache: "pnpm"
415424
- uses: expo/expo-github-action@v8
416425
with:
417426
eas-version: latest
418427
token: ${{ secrets.EXPO_TOKEN }}
419-
- run: npm ci --legacy-peer-deps
428+
- run: pnpm install
420429
- run: eas update --branch production --message "${{ github.ref_name }}"
421430
```
422431
@@ -473,8 +482,8 @@ npm version major
473482

474483
```
475484
1. Create release branch: release/v1.x.x
476-
2. Run full test suite: npm test -- --coverage
477-
3. Bump version: npm version minor
485+
2. Run full test suite: pnpm test -- --coverage
486+
3. Bump version: pnpm version minor
478487
4. Build production: eas build --platform all --profile production
479488
5. Test builds on devices
480489
6. Submit to stores: eas submit --platform all --profile production

0 commit comments

Comments
 (0)