Skip to content

Commit aebeb2d

Browse files
authored
chore: update node in ci (#157)
1 parent e70e92d commit aebeb2d

File tree

3 files changed

+116
-24
lines changed

3 files changed

+116
-24
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
node-version: [18]
9+
node-version: [22]
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v1
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
1313
with:
1414
node-version: ${{ matrix.node-version }}
1515
- name: Get yarn cache
1616
id: yarn-cache
1717
run: echo "::set-output name=dir::$(yarn cache dir)"
18-
- uses: actions/cache@v2
18+
- uses: actions/cache@v4
1919
with:
2020
path: ${{ steps.yarn-cache.outputs.dir }}
2121
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -27,16 +27,16 @@ jobs:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
node-version: [18]
30+
node-version: [22]
3131
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/setup-node@v1
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
3434
with:
3535
node-version: ${{ matrix.node-version }}
3636
- name: Get yarn cache
3737
id: yarn-cache
3838
run: echo "::set-output name=dir::$(yarn cache dir)"
39-
- uses: actions/cache@v2
39+
- uses: actions/cache@v4
4040
with:
4141
path: ${{ steps.yarn-cache.outputs.dir }}
4242
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -48,16 +48,16 @@ jobs:
4848
runs-on: ubuntu-latest
4949
strategy:
5050
matrix:
51-
node-version: [18]
51+
node-version: [22]
5252
steps:
53-
- uses: actions/checkout@v2
54-
- uses: actions/setup-node@v1
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-node@v4
5555
with:
5656
node-version: ${{ matrix.node-version }}
5757
- name: Get yarn cache
5858
id: yarn-cache
5959
run: echo "::set-output name=dir::$(yarn cache dir)"
60-
- uses: actions/cache@v2
60+
- uses: actions/cache@v4
6161
with:
6262
path: ${{ steps.yarn-cache.outputs.dir }}
6363
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -69,11 +69,11 @@ jobs:
6969
runs-on: ubuntu-latest
7070
strategy:
7171
matrix:
72-
node-version: [18]
72+
node-version: [22]
7373
java-version: [11]
7474
steps:
75-
- uses: actions/checkout@v2
76-
- uses: actions/setup-node@v1
75+
- uses: actions/checkout@v4
76+
- uses: actions/setup-node@v4
7777
with:
7878
node-version: ${{ matrix.node-version }}
7979
- uses: actions/setup-java@v3
@@ -83,7 +83,7 @@ jobs:
8383
- name: Get yarn cache
8484
id: yarn-cache
8585
run: echo "::set-output name=dir::$(yarn cache dir)"
86-
- uses: actions/cache@v2
86+
- uses: actions/cache@v4
8787
with:
8888
path: ${{ steps.yarn-cache.outputs.dir }}
8989
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -99,16 +99,16 @@ jobs:
9999
runs-on: macos-latest
100100
strategy:
101101
matrix:
102-
node-version: [18]
102+
node-version: [22]
103103
steps:
104-
- uses: actions/checkout@v2
105-
- uses: actions/setup-node@v1
104+
- uses: actions/checkout@v4
105+
- uses: actions/setup-node@v4
106106
with:
107107
node-version: ${{ matrix.node-version }}
108108
- name: Get yarn cache
109109
id: yarn-cache
110110
run: echo "::set-output name=dir::$(yarn cache dir)"
111-
- uses: actions/cache@v2
111+
- uses: actions/cache@v4
112112
with:
113113
path: ${{ steps.yarn-cache.outputs.dir }}
114114
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

.github/workflows/windows-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ jobs:
77
runs-on: windows-2019
88
strategy:
99
matrix:
10-
node-version: [18]
10+
node-version: [22]
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
name: Checkout Code
1515

1616
- name: Setup Node.js
17-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v4
1818
with:
1919
node-version: ${{ matrix.node-version }}
2020

@@ -27,7 +27,7 @@ jobs:
2727
uses: NuGet/setup-nuget@v1.0.5
2828

2929
- name: Check node modules cache
30-
uses: actions/cache@v1
30+
uses: actions/cache@v4
3131
id: yarn-cache
3232
with:
3333
path: ./node_modules

CLAUDE.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is `@react-native-community/progress-view`, a React Native library providing a cross-platform ProgressView component. The library supports iOS (UIProgressView), Android, macOS, and Windows platforms with both legacy and new React Native architecture (Fabric).
8+
9+
## Development Commands
10+
11+
### Essential Commands
12+
- `yarn lint` - Run ESLint on the codebase
13+
- `yarn test` - Run Jest tests for JavaScript components
14+
- `yarn test:windows` - Run Windows-specific tests
15+
- `yarn type-check` - Run TypeScript type checking
16+
- `yarn flow` - Run Flow type checking
17+
18+
### Platform-Specific Development
19+
- `yarn ios` - Run iOS example app
20+
- `yarn android` - Run Android example app
21+
- `yarn windows` - Run Windows example app
22+
- `yarn start` - Start Metro bundler
23+
- `yarn start:macos` - Start Metro for macOS
24+
- `yarn start:windows` - Start Metro for Windows
25+
26+
### Testing Individual Components
27+
- `yarn test js/__tests__/*` - Run specific test files
28+
- Tests are located in `js/__tests__/` and use Jest with React Native preset
29+
30+
## Architecture Overview
31+
32+
### Multi-Platform Native Module Structure
33+
The library implements platform-specific components that all expose the same JavaScript interface:
34+
35+
**JavaScript Layer** (`js/` directory):
36+
- `index.js` - Main entry point exporting ProgressView
37+
- `index.d.ts` - TypeScript definitions
38+
- Platform-specific implementations:
39+
- `ProgressView.ios.js` - iOS implementation using UIProgressView
40+
- `ProgressView.android.js` - Android implementation
41+
- `ProgressView.macos.js` - macOS implementation
42+
- `ProgressView.windows.js` - Windows implementation
43+
44+
**Native Component Generation**:
45+
- Uses React Native's codegen system for type-safe native components
46+
- `RNCProgressViewNativeComponent.js` - iOS/macOS native component spec
47+
- `RNCProgressViewNativeComponentAndroid.js` - Android native component spec
48+
- `RNCProgressViewNativeComponentWindows.js` - Windows native component spec
49+
50+
### Native Platform Implementations
51+
52+
**iOS/macOS** (`ios/` and `macos/` directories):
53+
- Objective-C implementation wrapping UIProgressView
54+
- Supports both old and new architecture (Fabric)
55+
- Fabric implementation in `ios/Fabric/` uses C++ and the new renderer
56+
57+
**Android** (`android/` directory):
58+
- Java implementation with separate Paper and Fabric managers
59+
- `src/paper/` - Legacy architecture implementation
60+
- `src/fabric/` - New architecture implementation
61+
62+
**Windows** (`windows/` directory):
63+
- C++/WinRT implementation
64+
- Uses Visual Studio project structure
65+
66+
### Build System Integration
67+
- **React Native Config**: `react-native.config.js` defines platform-specific dependencies
68+
- **CocoaPods**: `react-native-progress-view.podspec` handles iOS/macOS dependencies
69+
- **Android Gradle**: `android/build.gradle` handles Android dependencies
70+
- **Codegen**: `package.json` contains `codegenConfig` for automatic native component generation
71+
72+
### Key Files to Understand
73+
- `js/index.js:3` - Main component export
74+
- `js/index.d.ts:4-40` - TypeScript interface definitions
75+
- `package.json:81-88` - Codegen configuration for native components
76+
- `react-native-progress-view.podspec:22-49` - Fabric/Paper conditional compilation
77+
78+
## Development Notes
79+
80+
### Dual Architecture Support
81+
The library supports both the old React Native architecture (Paper) and the new architecture (Fabric). The build system automatically selects the appropriate implementation based on the `RCT_NEW_ARCH_ENABLED` environment variable.
82+
83+
### Cross-Platform Considerations
84+
Each platform has slightly different prop support:
85+
- `isIndeterminate` prop is Windows-only
86+
- Image props (`progressImage`, `trackImage`) work differently across platforms
87+
- Default styling varies by platform (iOS: 2px height, Android: 20px height)
88+
89+
### Testing Strategy
90+
- Unit tests focus on component rendering and prop validation
91+
- Platform-specific test setups in `jest-setups/`
92+
- Example apps in `example/` and `fabric-example/` for manual testing

0 commit comments

Comments
 (0)