mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
test(release): include mirrored root runtime deps
This commit is contained in:
@@ -2095,6 +2095,34 @@ describe("createBundledRuntimeDepsPackagePlan config policy", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("reports declared package mirror deps even when no plugin deps are selected", () => {
|
||||
const packageRoot = makeTempDir();
|
||||
const stageDir = makeTempDir();
|
||||
fs.writeFileSync(
|
||||
path.join(packageRoot, "package.json"),
|
||||
JSON.stringify({
|
||||
name: "openclaw",
|
||||
version: "2026.4.25",
|
||||
dependencies: { jiti: "^2.6.1" },
|
||||
openclaw: {
|
||||
bundle: {
|
||||
mirroredRootRuntimeDependencies: ["jiti"],
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
fs.mkdirSync(path.join(packageRoot, "dist", "extensions"), { recursive: true });
|
||||
|
||||
const result = createBundledRuntimeDepsPackagePlan({
|
||||
packageRoot,
|
||||
config: {},
|
||||
env: { OPENCLAW_PLUGIN_STAGE_DIR: stageDir },
|
||||
});
|
||||
|
||||
expect(result.deps.map((dep) => `${dep.name}@${dep.version}`)).toEqual(["jiti@^2.6.1"]);
|
||||
expect(result.missing.map((dep) => `${dep.name}@${dep.version}`)).toEqual(["jiti@^2.6.1"]);
|
||||
});
|
||||
|
||||
it("includes selected plugin deps that can be used by mirrored root chunks", () => {
|
||||
const packageRoot = makeTempDir();
|
||||
const stageDir = makeTempDir();
|
||||
|
||||
@@ -374,8 +374,7 @@ export function createBundledRuntimeDepsPackagePlan(
|
||||
manifestCache,
|
||||
...(normalizePluginId ? { normalizePluginId } : {}),
|
||||
});
|
||||
const packageRuntimeDeps =
|
||||
pluginIds.length > 0 ? collectMirroredPackageRuntimeDeps(params.packageRoot) : [];
|
||||
const packageRuntimeDeps = collectMirroredPackageRuntimeDeps(params.packageRoot);
|
||||
const plan = createBundledRuntimeDepsPlan({
|
||||
deps: [...deps, ...packageRuntimeDeps],
|
||||
conflicts,
|
||||
|
||||
Reference in New Issue
Block a user