mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:00:44 +00:00
fix(release): reject staged runtime deps in packs
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
shouldUseManagedGatewayForInstallerRuntime,
|
||||
shouldUseManagedGatewayService,
|
||||
verifyDevUpdateStatus,
|
||||
writePackageDistInventoryForCandidate,
|
||||
} from "../../scripts/openclaw-cross-os-release-checks.ts";
|
||||
|
||||
describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
@@ -418,6 +419,30 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("rejects bundled runtime-deps staging debris before candidate inventory generation", async () => {
|
||||
const packageRoot = mkdtempSync(join(tmpdir(), "openclaw-cross-os-stage-debris-"));
|
||||
try {
|
||||
mkdirSync(
|
||||
join(packageRoot, "dist", "Extensions", "demo", ".OpenClaw-Install-Stage", "node_modules"),
|
||||
{ recursive: true },
|
||||
);
|
||||
writeFileSync(
|
||||
join(packageRoot, "dist", "Extensions", "demo", ".OpenClaw-Install-Stage", "package.json"),
|
||||
"{}\n",
|
||||
"utf8",
|
||||
);
|
||||
|
||||
await expect(
|
||||
writePackageDistInventoryForCandidate({
|
||||
sourceDir: packageRoot,
|
||||
logPath: join(packageRoot, "npm-pack-dry-run.log"),
|
||||
}),
|
||||
).rejects.toThrow("unexpected bundled-runtime-deps install staging debris");
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("accepts a git main dev-channel update status payload", () => {
|
||||
expect(() =>
|
||||
verifyDevUpdateStatus(
|
||||
|
||||
Reference in New Issue
Block a user