Skip to content

Commit 59fecfd

Browse files
committed
Wire pnpm into CI workflow, BUILD.bat, and package.json onlyBuiltDependencies
1 parent 5a91e95 commit 59fecfd

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

20+
- name: Set up pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 10.33.0
24+
2025
- name: Set up Node.js
2126
uses: actions/setup-node@v4
2227
with:
2328
node-version: lts/*
29+
cache: pnpm
2430

2531
- name: Install dependencies
26-
run: npm install
32+
run: pnpm install --frozen-lockfile
2733

2834
- name: Bundle server
2935
run: node bundle.mjs

‎BUILD.bat‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ where node >nul 2>&1
1818
if errorlevel 1 ( echo ERROR: Node.js not installed & pause & popd & exit /b 1 )
1919
for /f %%v in ('node --version') do echo Node: %%v
2020

21+
where pnpm >nul 2>&1
22+
if errorlevel 1 (
23+
echo pnpm not found - installing it globally via npm...
24+
call npm install -g pnpm
25+
if errorlevel 1 ( echo ERROR: could not install pnpm & pause & popd & exit /b 1 )
26+
)
27+
for /f %%v in ('pnpm --version') do echo pnpm: %%v
28+
2129
REM Clean everything
2230
echo Cleaning...
2331
if exist "dist" rmdir /s /q dist
@@ -35,8 +43,8 @@ echo main.js found OK
3543

3644
REM Install
3745
echo Installing dependencies...
38-
call npm install
39-
if errorlevel 1 ( echo npm install failed & pause & popd & exit /b 1 )
46+
call pnpm install --frozen-lockfile
47+
if errorlevel 1 ( echo pnpm install failed & pause & popd & exit /b 1 )
4048

4149
REM Bundle
4250
echo.

‎package.json‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
2323
"electron-builder": "^24.13.3",
2424
"esbuild": "^0.20.2"
2525
},
26+
"packageManager": "pnpm@10.33.0",
27+
"pnpm": {
28+
"onlyBuiltDependencies": [
29+
"electron",
30+
"esbuild",
31+
"@meshtastic/core",
32+
"@meshtastic/transport-node"
33+
]
34+
},
2635
"build": {
2736
"appId": "com.meshnatter.app",
2837
"productName": "Meshnatter",
@@ -46,7 +55,7 @@
4655
"!.git/**",
4756
"!**/*.bat",
4857
"!bundle.mjs",
49-
"!package-lock.json",
58+
"!pnpm-lock.yaml",
5059
"!**/*.md"
5160
],
5261
"win": {

0 commit comments

Comments
 (0)