mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:00:43 +00:00
refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths. Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
This commit is contained in:
committed by
GitHub
parent
2e8e9cd6ca
commit
ed8f50f240
@@ -46,8 +46,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("install-e2e-anthropic");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("mcp-channels");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("commitments-safety");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-channel-feishu");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-channel-update-acpx");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-0");
|
||||
expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-23");
|
||||
expect(plan.lanes.filter((lane) => lane.name === "install-e2e-openai")).toHaveLength(1);
|
||||
@@ -141,31 +139,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "plugins-runtime-install-h",
|
||||
});
|
||||
const bundledChannelsCore = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-core",
|
||||
});
|
||||
const bundledChannelsUpdateA = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-update-a",
|
||||
});
|
||||
const bundledChannelsUpdateDiscord = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-update-discord",
|
||||
});
|
||||
const bundledChannelsUpdateB = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-update-b",
|
||||
});
|
||||
const bundledChannelsContracts = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-contracts",
|
||||
});
|
||||
|
||||
expect(packageInstallOpenAi.lanes.map((lane) => lane.name)).toEqual(["install-e2e-openai"]);
|
||||
expect(packageInstallAnthropic.lanes.map((lane) => lane.name)).toEqual([
|
||||
@@ -260,42 +233,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
"bundled-plugin-install-uninstall-22",
|
||||
"bundled-plugin-install-uninstall-23",
|
||||
]);
|
||||
expect(bundledChannelsCore.lanes.map((lane) => lane.name)).toEqual([
|
||||
"plugin-update",
|
||||
"bundled-channel-telegram",
|
||||
"bundled-channel-discord",
|
||||
"bundled-channel-slack",
|
||||
"bundled-channel-feishu",
|
||||
"bundled-channel-memory-lancedb",
|
||||
]);
|
||||
expect(bundledChannelsCore.lanes[0]).toMatchObject({
|
||||
name: "plugin-update",
|
||||
stateScenario: "empty",
|
||||
});
|
||||
expect(bundledChannelsUpdateA.lanes.map((lane) => lane.name)).toEqual([
|
||||
"bundled-channel-update-telegram",
|
||||
"bundled-channel-update-memory-lancedb",
|
||||
]);
|
||||
expect(bundledChannelsUpdateDiscord.lanes.map((lane) => lane.name)).toEqual([
|
||||
"bundled-channel-update-discord",
|
||||
]);
|
||||
expect(bundledChannelsUpdateDiscord.lanes[0]).toMatchObject({
|
||||
noOutputTimeoutMs: 4 * 60 * 1000,
|
||||
timeoutMs: 6 * 60 * 1000,
|
||||
});
|
||||
expect(bundledChannelsUpdateB.lanes.map((lane) => lane.name)).toEqual([
|
||||
"bundled-channel-update-slack",
|
||||
"bundled-channel-update-feishu",
|
||||
"bundled-channel-update-acpx",
|
||||
]);
|
||||
expect(bundledChannelsContracts.lanes.map((lane) => lane.name)).toEqual([
|
||||
"bundled-channel-root-owned",
|
||||
"bundled-channel-setup-entry",
|
||||
"bundled-channel-load-failure",
|
||||
"bundled-channel-disabled-config",
|
||||
]);
|
||||
expect(bundledChannelsCore.lanes.map((lane) => lane.name)).not.toContain("plugins");
|
||||
expect(bundledChannelsUpdateA.lanes.map((lane) => lane.name)).not.toContain("openwebui");
|
||||
});
|
||||
|
||||
it("keeps legacy release chunk names as aggregate aliases", () => {
|
||||
@@ -309,11 +246,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "plugins-runtime",
|
||||
});
|
||||
const bundledChannelsUpdateALegacy = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
releaseChunk: "bundled-channels-update-a-legacy",
|
||||
});
|
||||
const legacy = planFor({
|
||||
includeOpenWebUI: true,
|
||||
profile: RELEASE_PATH_PROFILE,
|
||||
@@ -335,19 +267,8 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
"openwebui",
|
||||
]),
|
||||
);
|
||||
expect(bundledChannelsUpdateALegacy.lanes.map((lane) => lane.name)).toEqual([
|
||||
"bundled-channel-update-telegram",
|
||||
"bundled-channel-update-discord",
|
||||
"bundled-channel-update-memory-lancedb",
|
||||
]);
|
||||
expect(legacy.lanes.map((lane) => lane.name)).toEqual(
|
||||
expect.arrayContaining([
|
||||
"plugins",
|
||||
"bundled-plugin-install-uninstall-0",
|
||||
"plugin-update",
|
||||
"bundled-channel-update-acpx",
|
||||
"openwebui",
|
||||
]),
|
||||
expect.arrayContaining(["plugins", "bundled-plugin-install-uninstall-0", "openwebui"]),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -487,8 +408,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
"plugin-update",
|
||||
"plugins",
|
||||
"kitchen-sink-plugin",
|
||||
"bundled-channel-deps-compat",
|
||||
"bundled-channel-setup-entry",
|
||||
"bundled-plugin-install-uninstall-0",
|
||||
"commitments-safety",
|
||||
"update-channel-switch",
|
||||
@@ -557,14 +476,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
name: "kitchen-sink-plugin",
|
||||
stateScenario: "empty",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: "bundled-channel-deps-compat",
|
||||
stateScenario: "empty",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: "bundled-channel-setup-entry",
|
||||
stateScenario: "empty",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
name: "bundled-plugin-install-uninstall-0",
|
||||
stateScenario: "empty",
|
||||
@@ -584,19 +495,6 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("maps the legacy bundled channel deps lane to the split compat lane", () => {
|
||||
const selectedLaneNames = parseLaneSelection("bundled-channel-deps");
|
||||
const plan = planFor({ selectedLaneNames });
|
||||
|
||||
expect(selectedLaneNames).toEqual(["bundled-channel-deps-compat"]);
|
||||
expect(plan.lanes).toEqual([
|
||||
expect.objectContaining({
|
||||
imageKind: "bare",
|
||||
name: "bundled-channel-deps-compat",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it("maps installer E2E to provider-specific package install lanes", () => {
|
||||
const selectedLaneNames = parseLaneSelection("install-e2e");
|
||||
const plan = planFor({ selectedLaneNames });
|
||||
|
||||
Reference in New Issue
Block a user