summaryrefslogtreecommitdiffhomepage
path: root/src/core/plugin-abi/load-diff.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-09-05 17:33:06 +0900
committerAdam Malczewski <[email protected]>2026-09-05 17:33:06 +0900
commit254f90a4081a3f15dfe54277da922579dbaee254 (patch)
treef5f4e409196109baf938cd9d557e244242df18ce /src/core/plugin-abi/load-diff.test.ts
parent535215bfd1fee6087613108f42d28cd2807184d3 (diff)
downloaddispatch-web-254f90a4081a3f15dfe54277da922579dbaee254.tar.gz
dispatch-web-254f90a4081a3f15dfe54277da922579dbaee254.zip
feat(layout): plan 04 — ABI layout.applyOps + reset affordance
Diffstat (limited to 'src/core/plugin-abi/load-diff.test.ts')
-rw-r--r--src/core/plugin-abi/load-diff.test.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/plugin-abi/load-diff.test.ts b/src/core/plugin-abi/load-diff.test.ts
index 157b93f..f8ebf6c 100644
--- a/src/core/plugin-abi/load-diff.test.ts
+++ b/src/core/plugin-abi/load-diff.test.ts
@@ -160,8 +160,24 @@ describe("decideFrontendLoads — the load diff (boot / extensions-changed / wor
it("the handshake checks against FRONTEND_ABI_VERSION", () => {
// A range that includes the host version passes — proving the version
// constant feeds the check.
- expect(FRONTEND_ABI_VERSION).toBe("1");
+ expect(FRONTEND_ABI_VERSION).toBe("1.1");
const d = decideFrontendLoads([c("ok")], new Map());
expect(d.incompatible).toEqual([]);
});
+
+ it("the additive bump keeps v1 plugins loading (plan 04: ^1 spans 1.1)", () => {
+ // c() declares apiVersion "^1" — a bare-major range is a
+ // major-compatibility claim, so the 1.1 host (layout member added) still
+ // loads every v1 plugin.
+ const d = decideFrontendLoads([c("v1-plugin")], new Map());
+ expect(d.toLoad.map((x) => x.id)).toEqual(["v1-plugin"]);
+ expect(d.incompatible).toEqual([]);
+ });
+
+ it("plugins requiring the 1.1 ABI (^1.1) load on the 1.1 host", () => {
+ const layout = { ...c("layout-plugin"), apiVersion: "^1.1" };
+ const d = decideFrontendLoads([layout], new Map());
+ expect(d.toLoad.map((x) => x.id)).toEqual(["layout-plugin"]);
+ expect(d.incompatible).toEqual([]);
+ });
});