mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-02 04:41:11 +00:00
Build: enforce mirrored Matrix dep version parity
This commit is contained in:
@@ -126,7 +126,7 @@ describe("collectBundledExtensionRootDependencyMirrorErrors", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
new Set(),
|
||||
new Map(),
|
||||
),
|
||||
).toEqual([
|
||||
"bundled extension 'matrix' manifest invalid | openclaw.releaseChecks.rootDependencyMirrorAllowlist must be an array",
|
||||
@@ -151,7 +151,7 @@ describe("collectBundledExtensionRootDependencyMirrorErrors", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
new Set(["@matrix-org/matrix-sdk-crypto-wasm"]),
|
||||
new Map([["@matrix-org/matrix-sdk-crypto-wasm", "18.0.0"]]),
|
||||
),
|
||||
).toEqual([
|
||||
"bundled extension 'matrix' manifest invalid | openclaw.releaseChecks.rootDependencyMirrorAllowlist entry '@matrix-org/matrix-sdk-crypto-wasm' must be declared in extension runtime dependencies",
|
||||
@@ -176,13 +176,38 @@ describe("collectBundledExtensionRootDependencyMirrorErrors", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
new Set(),
|
||||
new Map(),
|
||||
),
|
||||
).toEqual([
|
||||
"bundled extension 'matrix' manifest invalid | openclaw.releaseChecks.rootDependencyMirrorAllowlist entry '@matrix-org/matrix-sdk-crypto-wasm' must be mirrored in root runtime dependencies",
|
||||
]);
|
||||
});
|
||||
|
||||
it("flags mirror entries whose root version drifts from the extension", () => {
|
||||
expect(
|
||||
collectBundledExtensionRootDependencyMirrorErrors(
|
||||
[
|
||||
{
|
||||
id: "matrix",
|
||||
packageJson: {
|
||||
dependencies: {
|
||||
"@matrix-org/matrix-sdk-crypto-wasm": "18.0.0",
|
||||
},
|
||||
openclaw: {
|
||||
releaseChecks: {
|
||||
rootDependencyMirrorAllowlist: ["@matrix-org/matrix-sdk-crypto-wasm"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
new Map([["@matrix-org/matrix-sdk-crypto-wasm", "18.1.0"]]),
|
||||
),
|
||||
).toEqual([
|
||||
"bundled extension 'matrix' manifest invalid | openclaw.releaseChecks.rootDependencyMirrorAllowlist entry '@matrix-org/matrix-sdk-crypto-wasm' must match root runtime dependency version (extension '18.0.0', root '18.1.0')",
|
||||
]);
|
||||
});
|
||||
|
||||
it("accepts mirror entries declared by both the extension and root package", () => {
|
||||
expect(
|
||||
collectBundledExtensionRootDependencyMirrorErrors(
|
||||
@@ -201,7 +226,7 @@ describe("collectBundledExtensionRootDependencyMirrorErrors", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
new Set(["@matrix-org/matrix-sdk-crypto-wasm"]),
|
||||
new Map([["@matrix-org/matrix-sdk-crypto-wasm", "18.0.0"]]),
|
||||
),
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user