mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-16 20:40:45 +00:00
* fix: ship feishu bundled runtime dependency * test: align feishu bundled dependency specs
26 lines
940 B
TypeScript
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);
|
|
});
|
|
});
|