Skip to content

Commit bd503b9

Browse files
authored
chore: use pnpm and pnpm/setup (#30)
- replace npm with pnpm in CI and docs - use pnpm/setup with .nvmrc, devEngines.packageManager, and the pnpm lockfile - let pnpm/setup install dependencies with the frozen lockfile - keep Python system-managed for the PyGObject live test
1 parent 118c202 commit bd503b9

6 files changed

Lines changed: 35 additions & 13 deletions

File tree

‎.github/workflows/actions.lock‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ version: 'v0.0.3'
55
workflows:
66
'.github/workflows/ci.yml':
77
- 'actions/checkout@v7.0.1'
8-
- 'actions/setup-node@v7.1.0'
98
- 'actions/upload-artifact@v7.0.2'
9+
- 'pnpm/setup@v3.1.2'
1010
'.github/workflows/renovate.yml': []
1111
dependencies:
1212
'actions/checkout@v7.0.1':
1313
ref: 'v7.0.1'
1414
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
1515
owner_id: 44036562
1616
repo_id: 197814629
17-
'actions/setup-node@v7.1.0':
18-
ref: 'v7.1.0'
19-
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
20-
owner_id: 44036562
21-
repo_id: 189476904
2217
'actions/upload-artifact@v7.0.2':
2318
ref: 'v7.0.2'
2419
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
2520
owner_id: 44036562
2621
repo_id: 192625955
22+
'pnpm/setup@v3.1.2':
23+
ref: 'v3.1.2'
24+
commit: 'sha1-fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e'
25+
owner_id: 21320719
26+
repo_id: 1235693694

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ jobs:
1717
- uses: actions/checkout@v7.0.1
1818
with:
1919
persist-credentials: false
20-
- uses: actions/setup-node@v7.1.0
20+
- uses: pnpm/setup@v3.1.2
2121
with:
2222
node-version-file: .nvmrc
23+
cache: true
24+
require-lockfile: true
2325
- name: Check syntax and placement behavior
2426
run: |
2527
node --check gitify/contents/code/main.js
2628
bash -n scripts/install.sh scripts/bundle.sh
2729
python3 -m py_compile scripts/test-live.py
28-
npm test
30+
pnpm test
2931
- name: Bundle KWin script
30-
run: npm run bundle
32+
run: pnpm bundle
3133
- uses: actions/upload-artifact@v7.0.2
3234
with:
3335
name: gitify-kwin-script

‎CONTRIBUTING.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ it does and how to install it, and [Gitify][gitify-repo] for the app itself.
77

88
## 🛠️ Development
99

10+
Install dependencies (Node version from `.nvmrc`):
11+
12+
```sh
13+
pnpm install
14+
```
15+
1016
```sh
11-
npm test
12-
npm run bundle
17+
pnpm test
18+
pnpm bundle
1319
```
1420

1521
Tests run the same script in a JavaScript VM with compositor events and cover panel placement, display boundaries, resizing, repeated opens, and window filtering.
1622

17-
With Gitify installed, run `npm run test:live` inside a Plasma Wayland session. This needs Node 24, Python 3, and PyGObject, provided by `python-gobject` on Arch. It launches Gitify with a temporary profile, measures the window through KWin, and checks placement, resizing, and tray hide/reopen. It tests the installed script if enabled; otherwise, it temporarily loads this checkout's script. It unloads its temporary script and closes the test app when finished.
23+
With Gitify installed, run `pnpm test:live` inside a Plasma Wayland session. This needs Node (see `.nvmrc`), plus system Python 3 and PyGObject, provided by `python-gobject` on Arch. Python is intentionally system-managed because the live test imports the distro's PyGObject. It launches Gitify with a temporary profile, measures the window through KWin, and checks placement, resizing, and tray hide/reopen. It tests the installed script if enabled; otherwise, it temporarily loads this checkout's script. It unloads its temporary script and closes the test app when finished.
1824

1925
Building the `.kwinscript` bundle requires Python 3. The bundle contains only the metadata and JavaScript; users do not need Node or Python to run the installed script.
2026

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The installer uses `kpackagetool6`, `kwriteconfig6`, and `qdbus6`. It installs f
4444

4545
To update, run `git pull --ff-only` in this checkout and rerun `bash scripts/install.sh`.
4646

47-
Alternatively, build the bundle with `npm run bundle`, which needs Node 24 or newer and Python 3. Import `dist/gitify.kwinscript` through **System Settings → Window Management → KWin Scripts → Install from File**, then enable Gitify and apply.
47+
Alternatively, build the bundle with `pnpm bundle`. The Node version is pinned in `.nvmrc`; Python 3 is provided by your system. Import `dist/gitify.kwinscript` through **System Settings → Window Management → KWin Scripts → Install from File**, then enable Gitify and apply.
4848

4949
### ✅ Check that it works
5050

‎package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
"name": "node",
1616
"version": "26.13.0",
1717
"onFail": "warn"
18+
},
19+
"packageManager": {
20+
"name": "pnpm",
21+
"version": "12.16.1",
22+
"onFail": "download"
1823
}
1924
},
2025
"engines": { "node": ">=24" }

‎pnpm-lock.yaml‎

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)