Skip to content

chore: migrated to package manager to pnpm #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
184fc43
migrated to pnpm
dougg0k Jul 25, 2025
6b67400
temp type fix and fixed scripts
dougg0k Jul 25, 2025
ebeb2c5
disabled lint in line
dougg0k Jul 25, 2025
4656a57
example possible error fix
dougg0k Jul 25, 2025
8e85d15
Merge branch 'main' of github.com:dougg0k/react-native-node-api into …
dougg0k Jul 25, 2025
40e9221
added skiplibcheck
dougg0k Jul 25, 2025
1a04847
added skiplibcheck in another proj
dougg0k Jul 25, 2025
5c61df5
removed skip lib from a project and added @types
dougg0k Jul 25, 2025
698c6f2
changed ferric dep to actual version back
dougg0k Jul 25, 2025
ee06e8a
add changes
dougg0k Jul 25, 2025
7768127
added released changes
dougg0k Jul 25, 2025
04df8c5
added check
dougg0k Jul 25, 2025
c094863
fixed check
dougg0k Jul 25, 2025
a2f03dc
added check to apple fn
dougg0k Jul 25, 2025
af071fb
try without skiplib
dougg0k Jul 25, 2025
ab6a417
Merge branch 'main' of github.com:dougg0k/react-native-node-api into …
dougg0k Jul 26, 2025
b9c8fb2
added no-sort to recursive pnpm
dougg0k Jul 26, 2025
0e4abe5
updated pnpm lock
dougg0k Jul 26, 2025
3388f85
fix prettier checks
dougg0k Jul 26, 2025
51df6e3
added file to prettier ignore
dougg0k Jul 26, 2025
5cb73f5
Merge remote-tracking branch 'upstream/main' into replace-package-man…
dougg0k Aug 2, 2025
a4e7b67
fixed lock and workspace dependency
dougg0k Aug 2, 2025
44be588
fixed formatting
dougg0k Aug 2, 2025
0f32d7b
Merge remote-tracking branch 'upstream/main' into replace-package-man…
dougg0k Aug 9, 2025
7def782
updated pnpm lock
dougg0k Aug 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/cute-cities-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@react-native-node-api/ferric-example": patch
"cmake-rn": patch
"ferric-cli": patch
"@react-native-node-api/test-app": patch
"react-native-node-api": patch
---

Migrated package manager to pnpm
57 changes: 38 additions & 19 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "latest"
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/jod
Expand All @@ -36,16 +41,15 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android
- run: npm ci
- run: npm run build
- run: pnpm install --frozen-lockfile
- run: pnpm build
# Bootstrap host package to get weak-node-api and ferric-example to get types
# TODO: Solve this by adding an option to ferric to build only types or by committing the types into the repo as a fixture for an "init" command
- run: npm run bootstrap --workspace react-native-node-api
- run: npm run bootstrap --workspace @react-native-node-api/ferric-example
- run: npm run lint
- run: pnpm --filter react-native-node-api bootstrap --filter @react-native-node-api/ferric-example bootstrap
- run: pnpm lint
env:
DEBUG: eslint:eslint
- run: npm run prettier:check
- run: pnpm prettier:check
unit-tests:
strategy:
fail-fast: false
Expand All @@ -58,6 +62,11 @@ jobs:
name: Unit tests (${{ matrix.runner }})
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "latest"
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/jod
Expand All @@ -71,15 +80,20 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: npm ci
- run: npm run bootstrap
- run: npm test
- run: pnpm install --frozen-lockfile
- run: pnpm bootstrap
- run: pnpm test
test-ios:
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Apple 🍎')
name: Test app (iOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "latest"
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/jod
Expand All @@ -93,24 +107,29 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: npm ci
- run: npm run bootstrap
- run: pnpm install --frozen-lockfile
- run: pnpm bootstrap
env:
CMAKE_RN_TARGETS: arm64-apple-ios-sim
FERRIC_TARGETS: aarch64-apple-ios-sim
- run: npm run pod-install
- run: pnpm pod-install
working-directory: apps/test-app
- name: Run tests (iOS)
run: npm run test:ios:allTests
run: pnpm test:ios:allTests
# TODO: Enable release mode when it works
# run: npm run test:ios -- --mode Release
# run: pnpm test:ios -- --mode Release
working-directory: apps/test-app
test-android:
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖')
name: Test app (Android)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "latest"
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/jod
Expand All @@ -124,8 +143,8 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: npm ci
- run: npm run bootstrap
- run: pnpm install --frozen-lockfile
- run: pnpm bootstrap
env:
CMAKE_RN_TARGETS: i686-linux-android
FERRIC_TARGETS: i686-linux-android
Expand All @@ -150,10 +169,10 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Build weak-node-api for all architectures
run: npm run build-weak-node-api -- --android
run: pnpm build-weak-node-api -- --android
working-directory: packages/host
- name: Build ferric-example for all architectures
run: npm run build -- --android
run: pnpm build -- --android
working-directory: packages/ferric-example
- name: Run tests (Android)
timeout-minutes: 75
Expand All @@ -176,7 +195,7 @@ jobs:
adb logcat > emulator-logcat.txt 2>&1 &
LOGCAT_PID=$!
# Build, install and run the app
npm run test:android:allTests -- --mode Release
pnpm test:android:allTests -- --mode Release
# Wait a bit for the sub-process to terminate, before terminating the emulator
sleep 5
# Stop logcat
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: "latest"
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/jod
Expand All @@ -30,13 +35,13 @@ jobs:
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: npm ci
- run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ packages/node-addon-examples/examples
packages/node-tests/node
packages/node-tests/tests
packages/node-tests/*.generated.js

pnpm-lock.yaml
24 changes: 12 additions & 12 deletions apps/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"ios": "react-native run-ios --no-packager",
"pod-install": "cd ios && pod install",
"test:android": "mocha-remote --exit-on-error -- concurrently --kill-others-on-fail --passthrough-arguments npm:metro 'npm:android -- {@}' --",
"test:android:allTests": "MOCHA_REMOTE_CONTEXT=allTests npm run test:android -- ",
"test:android:nodeAddonExamples": "MOCHA_REMOTE_CONTEXT=nodeAddonExamples npm run test:android -- ",
"test:android:nodeTests": "MOCHA_REMOTE_CONTEXT=nodeTests npm run test:android -- ",
"test:android:ferricExample": "MOCHA_REMOTE_CONTEXT=ferricExample npm run test:android -- ",
"test:android:allTests": "MOCHA_REMOTE_CONTEXT=allTests pnpm test:android -- ",
"test:android:nodeAddonExamples": "MOCHA_REMOTE_CONTEXT=nodeAddonExamples pnpm test:android -- ",
"test:android:nodeTests": "MOCHA_REMOTE_CONTEXT=nodeTests pnpm test:android -- ",
"test:android:ferricExample": "MOCHA_REMOTE_CONTEXT=ferricExample pnpm test:android -- ",
"test:ios": "mocha-remote --exit-on-error -- concurrently --passthrough-arguments --kill-others-on-fail npm:metro 'npm:ios -- {@}' --",
"test:ios:allTests": "MOCHA_REMOTE_CONTEXT=allTests npm run test:ios -- ",
"test:ios:nodeAddonExamples": "MOCHA_REMOTE_CONTEXT=nodeAddonExamples npm run test:ios -- ",
"test:ios:nodeTests": "MOCHA_REMOTE_CONTEXT=nodeTests npm run test:ios -- ",
"test:ios:ferricExample": "MOCHA_REMOTE_CONTEXT=ferricExample npm run test:ios -- "
"test:ios:allTests": "MOCHA_REMOTE_CONTEXT=allTests pnpm test:ios -- ",
"test:ios:nodeAddonExamples": "MOCHA_REMOTE_CONTEXT=nodeAddonExamples pnpm test:ios -- ",
"test:ios:nodeTests": "MOCHA_REMOTE_CONTEXT=nodeTests pnpm test:ios -- ",
"test:ios:ferricExample": "MOCHA_REMOTE_CONTEXT=ferricExample pnpm test:ios -- "
},
"dependencies": {
"@babel/core": "^7.26.10",
Expand All @@ -25,22 +25,22 @@
"@react-native-community/cli": "^18.0.0",
"@react-native-community/cli-platform-android": "^18.0.0",
"@react-native-community/cli-platform-ios": "^18.0.0",
"@react-native-node-api/node-addon-examples": "*",
"@react-native-node-api/node-tests": "*",
"@react-native-node-api/node-tests": "workspace:*",
"@react-native/babel-preset": "0.79.0",
"@react-native/metro-config": "0.79.0",
"@react-native/typescript-config": "0.79.0",
"@rnx-kit/metro-config": "^2.0.1",
"@types/mocha": "^10.0.10",
"@types/react": "^19.0.0",
"concurrently": "^9.1.2",
"ferric-example": "^0.1.0",
"@react-native-node-api/ferric-example": "workspace:*",
"mocha": "^11.6.0",
"mocha-remote-cli": "^1.13.2",
"mocha-remote-react-native": "^1.13.2",
"react": "19.0.0",
"react-native": "0.79.5",
"react-native-node-api": "*",
"@react-native-node-api/node-addon-examples": "workspace:*",
"react-native-node-api": "workspace:*",
"react-native-test-app": "^4.3.3"
}
}
Loading
Loading