Files
openclaw/src/plugins/bundled-runtime-deps.test.ts
Tak Hoffman fa83010b17 fix(plugins): ship Feishu bundled runtime dependency (#39990)
* fix: ship feishu bundled runtime dependency

* test: align feishu bundled dependency specs
2026-03-08 10:36:41 -05:00

26 lines
940 B
TypeScript

import fs from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
type PackageManifest = {
dependencies?: Record<string, string>;
};
function readJson<T>(relativePath: string): T {
const absolutePath = path.resolve(process.cwd(), relativePath);
return JSON.parse(fs.readFileSync(absolutePath, "utf8")) as T;
}
describe("bundled plugin runtime dependencies", () => {
it("keeps bundled Feishu runtime deps available from the published root package", () => {
const rootManifest = readJson<PackageManifest>("package.json");
const feishuManifest = readJson<PackageManifest>("extensions/feishu/package.json");
const feishuSpec = feishuManifest.dependencies?.["@larksuiteoapi/node-sdk"];
const rootSpec = rootManifest.dependencies?.["@larksuiteoapi/node-sdk"];
expect(feishuSpec).toBeTruthy();
expect(rootSpec).toBeTruthy();
expect(rootSpec).toBe(feishuSpec);
});
});