build: switch from npm to pnpm #61

Merged
padreug merged 1 commit from feat/pnpm-migration into dev 2026-05-23 08:37:30 +00:00
Owner

Summary

  • Replace package-lock.json with pnpm-lock.yaml
  • Add packageManager: pnpm@10.33.0
  • Allowlist postinstall scripts for esbuild, sharp, vue-demi, electron, electron-winstaller via pnpm.onlyBuiltDependencies
  • Pin nostr-tools to 2.15.0 (was ^2.10.4 resolving to 2.15.0 via npm). A fresh pnpm resolve drifted to 2.23.5, which the regtest nostrrelay extension can't parse — upgrade deferred to a follow-up issue covering the matching server-side fix.

Why

  • Bring webapp in line with the workspace's preferred package manager (lamassu-next already uses pnpm)
  • Strict-store dedup means roughly one node_modules on disk shared across worktrees (~491M vs npm's ~888M per worktree)
  • Enables setup of a bare repo + main/dev worktrees layout at ~/dev/webapp/{main,dev} matching the lnbits / shocknet pattern

Test plan

  • pnpm install clean from lockfile (2.2s, no resolution; postinstall scripts run cleanly for the allowlisted deps)
  • pnpm run dev:all boots all 9 vite servers
  • Activities module loads events from regtest LNbits via local nostrrelay (validated against the live regtest stack)
  • Demo deployment (demo.aiolabs.dev) verified after merge to dev

Follow-up

  • Will file a separate issue for nostr-tools 2.15 → 2.23 upgrade — needs concurrent updates to the nostrrelay LNbits extension to handle the wire format 2.23 produces (the relay's NostrFilter.parse_obj raises expected dict not list / kinds value is not a valid list on 2.23's REQ messages).
  • webapp-module (NixOS builder) needs corresponding switch from buildNpmPackagepnpm.fetchDeps + pnpm.configHook — separate PR coming.
## Summary - Replace `package-lock.json` with `pnpm-lock.yaml` - Add `packageManager: pnpm@10.33.0` - Allowlist postinstall scripts for `esbuild`, `sharp`, `vue-demi`, `electron`, `electron-winstaller` via `pnpm.onlyBuiltDependencies` - Pin `nostr-tools` to `2.15.0` (was `^2.10.4` resolving to `2.15.0` via npm). A fresh pnpm resolve drifted to `2.23.5`, which the regtest `nostrrelay` extension can't parse — upgrade deferred to a follow-up issue covering the matching server-side fix. ## Why - Bring webapp in line with the workspace's preferred package manager (`lamassu-next` already uses pnpm) - Strict-store dedup means roughly one `node_modules` on disk shared across worktrees (~491M vs npm's ~888M per worktree) - Enables setup of a `bare repo + main/dev worktrees` layout at `~/dev/webapp/{main,dev}` matching the lnbits / shocknet pattern ## Test plan - [x] `pnpm install` clean from lockfile (2.2s, no resolution; postinstall scripts run cleanly for the allowlisted deps) - [x] `pnpm run dev:all` boots all 9 vite servers - [x] Activities module loads events from regtest LNbits via local `nostrrelay` (validated against the live regtest stack) - [ ] Demo deployment (`demo.aiolabs.dev`) verified after merge to `dev` ## Follow-up - Will file a separate issue for `nostr-tools` 2.15 → 2.23 upgrade — needs concurrent updates to the `nostrrelay` LNbits extension to handle the wire format 2.23 produces (the relay's `NostrFilter.parse_obj` raises `expected dict not list` / `kinds value is not a valid list` on 2.23's REQ messages). - `webapp-module` (NixOS builder) needs corresponding switch from `buildNpmPackage` → `pnpm.fetchDeps` + `pnpm.configHook` — separate PR coming.
- Replace package-lock.json with pnpm-lock.yaml
- Add packageManager: pnpm@10.33.0
- Allowlist postinstall scripts for esbuild, sharp, vue-demi, electron,
  electron-winstaller via pnpm.onlyBuiltDependencies
- Pin nostr-tools to 2.15.0 (was ^2.10.4 resolving to 2.15.0 via npm).
  A fresh pnpm resolve drifted to 2.23.5, which the regtest nostrrelay
  extension can't parse; upgrade deferred to a follow-up issue covering
  the matching server-side fix.
padreug deleted branch feat/pnpm-migration 2026-05-23 08:37:30 +00:00
Sign in to join this conversation.
No description provided.