fix: restore update command helpers (#1857)

Exported package-manager helpers used by openchamber update
Added regression coverage for the update-available path
This commit is contained in:
Bohdan Triapitsyn
2026-06-28 09:58:45 +03:00
parent 5034ad27a8
commit b72230bc24
3 changed files with 65 additions and 3 deletions
+2 -2
View File
@@ -483,7 +483,7 @@ export function detectPackageManagerDetails() {
};
}
function detectPackageManager() {
export function detectPackageManager() {
return detectPackageManagerDetails().packageManager;
}
@@ -769,7 +769,7 @@ export async function checkForUpdates(options = {}) {
/**
* Execute the update (used by CLI)
*/
function executeUpdate(pm = detectPackageManager(), options = {}) {
export function executeUpdate(pm = detectPackageManager(), options = {}) {
const command = getUpdateCommand(pm);
if (!options?.silent) {
console.log(`Updating ${PACKAGE_NAME} using ${pm}...`);