fix(artifacts): preserve unavailable members and stored checksum evidence

This commit is contained in:
morluto
2026-10-08 17:08:17 +08:00
parent c541052ca9
commit 9b38f3a0af
7 changed files with 241 additions and 14 deletions
@@ -146,7 +146,10 @@ describe("xar installer package reader", () => {
);
const [entry] = await collect(bzip);
if (entry === undefined) throw new Error("missing entry");
await expect(bzip.open(entry)).rejects.toMatchObject({ reason: "format" });
expect(entry.contentUnavailable).toBe(true);
await expect(bzip.open(entry)).rejects.toMatchObject({
reason: "unavailable",
});
await bzip.close();
const notXar = new XarArtifactReader(
await writePackage(Buffer.from("not an archive at all")),