惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
量子位
N
Netflix TechBlog - Medium
博客园 - 聂微东
博客园 - Franky
aimingoo的专栏
aimingoo的专栏
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(update): retry npm updates without optional deps · op...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1283,6 +1283,76 @@ describe("update-cli", () => {

12831283

).not.toContain("already-current");

12841284

});

128512851286+

it("retries package updates without optional deps when npm global update fails", async () => {

1287+

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-update-optional-"));

1288+

const nodeModules = path.join(tempDir, "node_modules");

1289+

const pkgRoot = path.join(nodeModules, "openclaw");

1290+

mockPackageInstallStatus(pkgRoot);

1291+

await fs.mkdir(pkgRoot, { recursive: true });

1292+

await fs.writeFile(

1293+

path.join(pkgRoot, "package.json"),

1294+

JSON.stringify({ name: "openclaw", version: "1.0.0" }),

1295+

"utf-8",

1296+

);

1297+1298+

vi.mocked(runCommandWithTimeout).mockImplementation(async (argv) => {

1299+

if (Array.isArray(argv) && argv[0] === "npm" && argv[1] === "root" && argv[2] === "-g") {

1300+

return {

1301+

stdout: `${nodeModules}\n`,

1302+

stderr: "",

1303+

code: 0,

1304+

signal: null,

1305+

killed: false,

1306+

termination: "exit",

1307+

};

1308+

}

1309+

if (

1310+

Array.isArray(argv) &&

1311+

argv[0] === "npm" &&

1312+

argv.includes("-g") &&

1313+

!argv.includes("--omit=optional")

1314+

) {

1315+

return {

1316+

stdout: "",

1317+

stderr: "node-gyp failed",

1318+

code: 1,

1319+

signal: null,

1320+

killed: false,

1321+

termination: "exit",

1322+

};

1323+

}

1324+

return {

1325+

stdout: "",

1326+

stderr: "",

1327+

code: 0,

1328+

signal: null,

1329+

killed: false,

1330+

termination: "exit",

1331+

};

1332+

});

1333+1334+

await updateCommand({ yes: true, restart: false });

1335+1336+

expect(runCommandWithTimeout).toHaveBeenCalledWith(

1337+

["npm", "i", "-g", "openclaw@latest", "--no-fund", "--no-audit", "--loglevel=error"],

1338+

expect.any(Object),

1339+

);

1340+

expect(runCommandWithTimeout).toHaveBeenCalledWith(

1341+

[

1342+

"npm",

1343+

"i",

1344+

"-g",

1345+

"openclaw@latest",

1346+

"--omit=optional",

1347+

"--no-fund",

1348+

"--no-audit",

1349+

"--loglevel=error",

1350+

],

1351+

expect.any(Object),

1352+

);

1353+

expect(defaultRuntime.exit).not.toHaveBeenCalledWith(1);

1354+

});

1355+12861356

it("uses the owning npm binary for package updates when PATH npm points elsewhere", async () => {

12871357

const platformSpy = vi.spyOn(process, "platform", "get").mockReturnValue("darwin");

12881358

const brewPrefix = createCaseDir("brew-prefix");