fix: harden bundled plugin dependency release checks

This commit is contained in:
Peter Steinberger
2026-04-08 15:14:11 +01:00
parent 0de5db8772
commit edf6b490a6
17 changed files with 474 additions and 358 deletions

View File

@@ -12,9 +12,6 @@ type PackageManifest = {
install?: {
minHostVersion?: string;
};
releaseChecks?: {
rootDependencyMirrorAllowlist?: unknown;
};
};
};
@@ -63,12 +60,9 @@ export function describePackageManifestContract(params: PackageManifestContractP
const rootSpec =
rootManifest.dependencies?.[dependencyName] ??
rootManifest.optionalDependencies?.[dependencyName];
const allowlist = pluginManifest.openclaw?.releaseChecks?.rootDependencyMirrorAllowlist;
expect(pluginSpec).toBeTruthy();
expect(rootSpec).toBe(pluginSpec);
expect(Array.isArray(allowlist)).toBe(true);
expect(allowlist).toContain(dependencyName);
});
}
}