mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:50:45 +00:00
fix(memory): keep llama runtime optional (#71425)
* fix(memory): keep llama runtime optional * fix(memory): harden optional llama runtime guard
This commit is contained in:
@@ -519,13 +519,11 @@ describe("collectReleasePackageMetadataErrors", () => {
|
||||
license: "MIT",
|
||||
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
|
||||
bin: { openclaw: "openclaw.mjs" },
|
||||
peerDependencies: { "node-llama-cpp": "3.18.1" },
|
||||
peerDependenciesMeta: { "node-llama-cpp": { optional: true } },
|
||||
}),
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
it("requires node-llama-cpp to stay an optional peer", () => {
|
||||
it("rejects node-llama-cpp as a peer dependency", () => {
|
||||
expect(
|
||||
collectReleasePackageMetadataErrors({
|
||||
name: "openclaw",
|
||||
@@ -534,7 +532,39 @@ describe("collectReleasePackageMetadataErrors", () => {
|
||||
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
|
||||
bin: { openclaw: "openclaw.mjs" },
|
||||
peerDependencies: { "node-llama-cpp": "3.18.1" },
|
||||
peerDependenciesMeta: { "node-llama-cpp": { optional: true } },
|
||||
}),
|
||||
).toContain('package.json peerDependenciesMeta["node-llama-cpp"].optional must be true.');
|
||||
).toEqual([
|
||||
'package.json peerDependencies["node-llama-cpp"] must be omitted; keep it optional.',
|
||||
'package.json peerDependenciesMeta["node-llama-cpp"] must be omitted; keep it optional.',
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects node-llama-cpp as a direct runtime dependency", () => {
|
||||
expect(
|
||||
collectReleasePackageMetadataErrors({
|
||||
name: "openclaw",
|
||||
description: "Multi-channel AI gateway with extensible messaging integrations",
|
||||
license: "MIT",
|
||||
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
|
||||
bin: { openclaw: "openclaw.mjs" },
|
||||
dependencies: { "node-llama-cpp": "3.18.1" },
|
||||
}),
|
||||
).toContain('package.json dependencies["node-llama-cpp"] must be omitted; keep it optional.');
|
||||
});
|
||||
|
||||
it("rejects node-llama-cpp as an optional dependency", () => {
|
||||
expect(
|
||||
collectReleasePackageMetadataErrors({
|
||||
name: "openclaw",
|
||||
description: "Multi-channel AI gateway with extensible messaging integrations",
|
||||
license: "MIT",
|
||||
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
|
||||
bin: { openclaw: "openclaw.mjs" },
|
||||
optionalDependencies: { "node-llama-cpp": "3.18.1" },
|
||||
}),
|
||||
).toContain(
|
||||
'package.json optionalDependencies["node-llama-cpp"] must be omitted; keep it operator-installed.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user