fix: make node-llama-cpp optional for npm installs

This commit is contained in:
Peter Steinberger
2026-03-12 16:45:44 +00:00
parent 9f08af1f06
commit 115f24819e
4 changed files with 33 additions and 0 deletions

View File

@@ -86,7 +86,22 @@ describe("collectReleasePackageMetadataErrors", () => {
license: "MIT",
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
bin: { openclaw: "openclaw.mjs" },
peerDependencies: { "node-llama-cpp": "3.16.2" },
peerDependenciesMeta: { "node-llama-cpp": { optional: true } },
}),
).toEqual([]);
});
it("requires node-llama-cpp to stay an optional peer", () => {
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" },
peerDependencies: { "node-llama-cpp": "3.16.2" },
}),
).toContain('package.json peerDependenciesMeta["node-llama-cpp"].optional must be true.');
});
});