Make files-widget deps required and ship a release
Session from pi-extensions-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Click a segment to jump to that moment
28msession
1interventions
GOAL
Investigate whether npm/pi install handles files-widget's external dependencies (bat, delta, glow), then update the package so those deps are properly declared and enforced, and publish the release.
- +0Prompt · +0Will npm install handle files-widget's dependencies?
- +0mAgent did · +0mInspected package.json files across the repo and files-widget; concluded npm install won't fetch anything since there are no declared dependencies or workspaces.
- +0mPrompt · +0mI want users installing this package to get the dependencies installed automatically, since it's my package.
- +1mAgent did · +1mExplored pi docs and other extension packages, added @mariozechner/pi-* as peerDependencies, added a postinstall script hinting at bat/delta/glow, and updated the README with explicit install commands under the pi install block, treating system deps as optional/recommended.
- +14mIntervention · +14mDeveloper pushed back: the deps aren't optional — the extension loads without them but isn't actually useful.Why: I said these are optional but that's wrong — without bat/delta/glow the widget loads but doesn't do anything useful, so it needs to treat them as required and block or warn accordingly.
- +16mAgent did · +16mReworked index.ts so /files refuses to open without bat/delta/glow, updated postinstall message and README to state deps are required rather than recommended.
- +22mPrompt · +22mCommit, push, and publish — not just commit.
- +23mAgent did · +23mBumped versions in files-widget/package.json (0.1.11) and root package.json (0.1.14), updated CHANGELOG, committed, pushed to origin/main, published both npm packages, and tagged/pushed files-widget/v0.1.11.
- Break · 6h 08m away, not counted
- +26mFail · +26mgh release create stripped backticks from the release notes, mangling the changelog text in the published release.
- +26mAgent did · +26mFixed the release notes via gh release edit with corrected formatting.
- +28mOutcome · +28mSession ended with @tmustier/[email protected] and [email protected] published to npm, pushed to GitHub, tagged, and a GitHub release created with corrected notes.
VERDICT
Next time I'd open by stating upfront that bat/delta/glow are required, not optional, since that shaped most of the back-and-forth. The correction that actually did the work was pointing out the extension loads but isn't useful without those deps — that's what got the agent to change /files to block instead of just warning. The gh release notes getting mangled by backticks was a small but avoidable snag I had to catch and fix separately.