fix(update): carry candidate plugin API version through doctor · openclaw/openclaw@6b82eaa
steipete
·
2026-05-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2365,12 +2365,21 @@ describe("update-cli", () => {
|
2365 | 2365 | termination: "exit", |
2366 | 2366 | }; |
2367 | 2367 | }); |
| 2368 | +readPackageVersion.mockImplementation(async (packageRoot: string) => { |
| 2369 | +const manifest = JSON.parse( |
| 2370 | +await fs.readFile(path.join(packageRoot, "package.json"), "utf-8"), |
| 2371 | +) as { version?: string }; |
| 2372 | +return manifest.version ?? "0.0.0"; |
| 2373 | +}); |
2368 | 2374 | |
2369 | 2375 | await updateCommand({ yes: true }); |
2370 | 2376 | |
2371 | 2377 | const doctorCall = doctorCommandCall(); |
2372 | 2378 | expect(doctorCall?.[0].slice(1)).toEqual([entryPath, "doctor", "--non-interactive", "--fix"]); |
2373 | 2379 | expect(doctorCall?.[1].cwd).toBe(pkgRoot); |
| 2380 | +expect( |
| 2381 | +(doctorCall?.[1].env as NodeJS.ProcessEnv | undefined)?.OPENCLAW_COMPATIBILITY_HOST_VERSION, |
| 2382 | +).toBe("2026.5.14"); |
2374 | 2383 | expect(defaultRuntime.exit).not.toHaveBeenCalledWith(1); |
2375 | 2384 | }); |
2376 | 2385 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。