chore(release): prepare 2026.4.14 beta

This commit is contained in:
Peter Steinberger
2026-04-14 03:06:46 +01:00
parent 366ee11a80
commit 224cbd9ff6
14 changed files with 99 additions and 16 deletions

View File

@@ -261,6 +261,71 @@ describe("stageBundledPluginRuntimeDeps", () => {
);
});
it("applies default prune rules for known heavy non-runtime package cargo", () => {
const { pluginDir, repoRoot } = createBundledPluginFixture({
packageJson: {
name: "@openclaw/fixture-plugin",
version: "1.0.0",
dependencies: {
"@cloudflare/workers-types": "1.0.0",
"@jimp/plugin-blit": "1.0.0",
gifwrap: "1.0.0",
"playwright-core": "1.0.0",
},
openclaw: { bundle: { stageRuntimeDependencies: true } },
},
});
const rootNodeModules = path.join(repoRoot, "node_modules");
const writePackage = (name: string) => {
const depDir = path.join(rootNodeModules, ...name.split("/"));
fs.mkdirSync(depDir, { recursive: true });
fs.writeFileSync(
path.join(depDir, "package.json"),
`${JSON.stringify({ name, version: "1.0.0" }, null, 2)}\n`,
"utf8",
);
return depDir;
};
const cloudflareDir = writePackage("@cloudflare/workers-types");
fs.writeFileSync(path.join(cloudflareDir, "index.d.ts"), "export {};\n", "utf8");
const gifwrapDir = writePackage("gifwrap");
fs.mkdirSync(path.join(gifwrapDir, "test", "fixtures"), { recursive: true });
fs.writeFileSync(path.join(gifwrapDir, "test", "fixtures", "large.gif"), "fixture\n", "utf8");
const playwrightDir = writePackage("playwright-core");
fs.mkdirSync(path.join(playwrightDir, "types"), { recursive: true });
fs.writeFileSync(path.join(playwrightDir, "types", "types.d.ts"), "export {};\n", "utf8");
fs.writeFileSync(path.join(playwrightDir, "index.js"), "export {};\n", "utf8");
const jimpDir = writePackage("@jimp/plugin-blit");
fs.mkdirSync(path.join(jimpDir, "src", "__image_snapshots__"), { recursive: true });
fs.writeFileSync(
path.join(jimpDir, "src", "__image_snapshots__", "snapshot.png"),
"fixture\n",
"utf8",
);
fs.writeFileSync(path.join(jimpDir, "index.js"), "export {};\n", "utf8");
stageBundledPluginRuntimeDeps({ cwd: repoRoot });
expect(
fs.existsSync(path.join(pluginDir, "node_modules", "@cloudflare", "workers-types")),
).toBe(false);
expect(fs.existsSync(path.join(pluginDir, "node_modules", "gifwrap", "test"))).toBe(false);
expect(fs.existsSync(path.join(pluginDir, "node_modules", "playwright-core", "types"))).toBe(
false,
);
expect(fs.existsSync(path.join(pluginDir, "node_modules", "playwright-core", "index.js"))).toBe(
true,
);
expect(
fs.existsSync(
path.join(pluginDir, "node_modules", "@jimp", "plugin-blit", "src", "__image_snapshots__"),
),
).toBe(false);
expect(
fs.existsSync(path.join(pluginDir, "node_modules", "@jimp", "plugin-blit", "index.js")),
).toBe(true);
});
it("falls back to staging installs when the root dependency version is incompatible", () => {
const { pluginDir, repoRoot } = createBundledPluginFixture({
packageJson: {