Skip to content

fix(pi): pin npmCommand to stable mise node spec to prevent package root drift#432

Merged
Alan-TheGentleman merged 1 commit into
mainfrom
fix/pi-npm-command-pin
May 27, 2026
Merged

fix(pi): pin npmCommand to stable mise node spec to prevent package root drift#432
Alan-TheGentleman merged 1 commit into
mainfrom
fix/pi-npm-command-pin

Conversation

@Alan-TheGentleman

Copy link
Copy Markdown
Collaborator

Summary

  • engram setup pi now detects mise and writes a stable npmCommand (["mise", "exec", "node@X.Y.Z", "--", "npm"]) to Pi's settings.json when none is configured, preventing package-root drift / duplicate installs when the Node version changes.
  • Existing npmCommand values are never overwritten (user customizations survive re-runs).
  • No change when mise is absent (plain npm / other version managers unaffected).

Test plan

  • TestEnsurePiNpmCommandWritesMiseCommand, TestEnsurePiNpmCommandPreservesExisting, TestEnsurePiNpmCommandNoMise, TestEnsurePiNpmCommandMiseVersionFallback, TestInstallPiWritesNpmCommandWhenMiseDetected, TestInstallPiNoNpmCommandWhenNoMise
  • go test ./... && go vet ./... && go build ./... clean

Closes #385

…oot drift

When mise is detected and no npmCommand is configured in settings.json,
engram setup pi now writes ["mise", "exec", "node@X.Y.Z", "--", "npm"]
using the currently active Node version. Existing npmCommand values are
never overwritten, and no change is made when mise is absent.

Closes #385
Copilot AI review requested due to automatic review settings May 27, 2026 15:28
@Alan-TheGentleman Alan-TheGentleman added the type:bug Bug fix label May 27, 2026
@Alan-TheGentleman Alan-TheGentleman merged commit 43cc242 into main May 27, 2026
8 of 9 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the fix/pi-npm-command-pin branch May 27, 2026 15:30
@Alan-TheGentleman Alan-TheGentleman removed the request for review from Copilot May 27, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pi): configure npmCommand to avoid Node/mise package root drift

1 participant