test(package): reuse XZ plugin lock entries (#16086)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-12-02 19:35:35 +00:00
1 parent 54a73a3840
commit 2e49b469e9
1 file changed
+14 -21
+14 -21
View File
@@ -97,6 +97,14 @@ it("refuses a stale lock before producing a release artifact", () => {
);
});
const xzBinary = (os: string, integrity: string): Record<string, unknown> => ({
version: "2.0.0",
integrity,
os: [os],
cpu: ["x64"],
optional: true,
});
const platformLock = () => ({
name: "rea-agents",
version: "6.8.0",
@@ -123,28 +131,13 @@ const platformLock = () => ({
"xz-wasm32": "2.0.0",
},
} as Record<string, unknown>,
"node_modules/xz-win32-x64": {
version: "2.0.0",
integrity: "win digest",
os: ["win32"],
cpu: ["x64"],
optional: true,
} as Record<string, unknown>,
"node_modules/xz-win32-x64": xzBinary("win32", "win digest"),
// A development copy of another version is hoisted; the runtime one nests.
"node_modules/xz/node_modules/xz-linux-x64": {
version: "2.0.0",
integrity: "linux digest",
os: ["linux"],
cpu: ["x64"],
optional: true,
} as Record<string, unknown>,
"node_modules/xz-freebsd-x64": {
version: "2.0.0",
integrity: "bsd digest",
os: ["freebsd"],
cpu: ["x64"],
optional: true,
} as Record<string, unknown>,
"node_modules/xz/node_modules/xz-linux-x64": xzBinary(
"linux",
"linux digest",
),
"node_modules/xz-freebsd-x64": xzBinary("freebsd", "bsd digest"),
"node_modules/xz-wasm32": {
version: "2.0.0",
integrity: "wasm digest",