mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-30 13:03:39 +00:00
refactor: prune legacy plugin dependency debris on postinstall
This commit is contained in:
@@ -739,25 +739,6 @@ describe("bundled channel entry shape guards", () => {
|
||||
expect(offenders).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps setup-only plugin barrels off legacy staged runtime-dependency metadata", () => {
|
||||
const offenders: string[] = [];
|
||||
|
||||
for (const extensionDir of bundledPluginRoots) {
|
||||
const packageJsonPath = path.join(extensionDir, "package.json");
|
||||
if (!fs.existsSync(packageJsonPath)) {
|
||||
continue;
|
||||
}
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")) as {
|
||||
openclaw?: { bundle?: Record<string, unknown> };
|
||||
};
|
||||
if (packageJson.openclaw?.bundle?.stageRuntimeDependencies === true) {
|
||||
offenders.push(path.relative(process.cwd(), packageJsonPath));
|
||||
}
|
||||
}
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps bundled channel entrypoints free of static src imports", () => {
|
||||
const offenders = collectBundledChannelEntrypointOffenders(bundledPluginRoots, (source) =>
|
||||
/^(?:import|export)\s.+["']\.\/src\//mu.test(source),
|
||||
|
||||
Reference in New Issue
Block a user