pi: update pinned npm packages 0 ▲ ¬ just serendipity 🍀 4 hours ago · Tech · hide · 0 comments ♠ Problem statement: pin pi npm packages without giving up convenient updates. My settings.json used to leave some package versions unpinned, until now: "npm:@heyhuynhgiabuu/pi-diff@0.7.6", - "npm:@tifan/pi-recap", - "npm:@tmustier/pi-tab-status", - "npm:@tintinweb/pi-subagents" + "npm:@tifan/pi-recap@0.4.4", + "npm:@tmustier/pi-tab-status@0.1.4", + "npm:@tintinweb/pi-subagents@0.14.3" Exact versions make package installation reproducible (& safer), but Pi then does not automatically pull newer packages. To tackle that, I added a just update-pi recipe that asks npm for each package’s current latest version and writes back an exact pin: [doc('Update pinned Pi npm packages')] [group('update')] update-pi: #!/usr/bin/env bash set -euo pipefail settings="pi/.pi/agent/settings.json" updates="{}" while IFS= read -r spec; do if [[ "$spec" =~ ^npm:((@[^/]+/[^@]+)|([^@]+))(@[^@]+)?$ ]]; then package="${BASH_REMATCH[1]}" else echo "Invalid npm package spec: $spec" >&2 exit 1 fi latest="$(npm… No comments yet. Log in to reply on the Fediverse. Comments will appear here.