From bd00d2fbca20acfac5c0121a983c97d2bbb1fd0c Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 1 Feb 2026 17:41:36 +0100 Subject: [PATCH] fix(coding-agent): pi update not updating packages without args fixes #1151 --- packages/coding-agent/CHANGELOG.md | 4 ++++ packages/coding-agent/src/core/package-manager.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index b720f4b4..50bf33f3 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -8,6 +8,10 @@ - Added `rpc-demo.ts` example extension exercising all RPC-supported extension UI methods ([#1144](https://github.com/badlogic/pi-mono/pull/1144) by [@aliou](https://github.com/aliou)) - Added `rpc-extension-ui.ts` TUI example client demonstrating the extension UI protocol with interactive dialogs ([#1144](https://github.com/badlogic/pi-mono/pull/1144) by [@aliou](https://github.com/aliou)) +### Fixed + +- Fixed `pi update` not updating npm/git packages when called without arguments ([#1151](https://github.com/badlogic/pi-mono/issues/1151)) + ## [0.50.9] - 2026-02-01 ### Added diff --git a/packages/coding-agent/src/core/package-manager.ts b/packages/coding-agent/src/core/package-manager.ts index b968fe24..513677a8 100644 --- a/packages/coding-agent/src/core/package-manager.ts +++ b/packages/coding-agent/src/core/package-manager.ts @@ -750,11 +750,13 @@ export class DefaultPackageManager implements PackageManager { const globalSettings = this.settingsManager.getGlobalSettings(); const projectSettings = this.settingsManager.getProjectSettings(); - for (const extension of globalSettings.extensions ?? []) { - await this.updateSourceForScope(extension, "user"); + for (const pkg of globalSettings.packages ?? []) { + const sourceStr = typeof pkg === "string" ? pkg : pkg.source; + await this.updateSourceForScope(sourceStr, "user"); } - for (const extension of projectSettings.extensions ?? []) { - await this.updateSourceForScope(extension, "project"); + for (const pkg of projectSettings.packages ?? []) { + const sourceStr = typeof pkg === "string" ? pkg : pkg.source; + await this.updateSourceForScope(sourceStr, "project"); } }