fix(crabbox): keep untrusted bootstrap pnpm pin current (#113728)

This commit is contained in:
Vincent Koc
2026-07-25 22:46:10 +08:00
committed by GitHub
parent 7edc234f6c
commit a4d367e38c
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
set -euo pipefail
node_version="24.15.0"
pnpm_spec="pnpm@11.2.2+sha512.36e6621fad506178936455e70247b8808ef4ec25797a9f437a93281a020484e2607f6a469a22e982987c3dbb8866e3071514ab10a4a1749e06edcd1ec118436f"
pnpm_spec="pnpm@11.15.1+sha512.81350b07e53c9538a02f1f2303b4290fa2d7be04e56e2a970c4cc4b417dc761de196edabd49d55c7dc9580db81007c44143e4e3d7e462b3000d23c255122d065"
if [[ $# -lt 2 ]]; then
echo "usage: $0 <expected-head-sha> <command> [args...]" >&2
@@ -3,6 +3,16 @@ import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
describe("scripts/crabbox-untrusted-bootstrap.sh", () => {
it("pins the package manager required by the trusted checkout", () => {
const script = readFileSync("scripts/crabbox-untrusted-bootstrap.sh", "utf8");
const packageJson = JSON.parse(readFileSync("package.json", "utf8")) as {
packageManager?: string;
};
const pnpmSpec = script.match(/^pnpm_spec="([^"]+)"$/mu)?.[1];
expect(pnpmSpec).toBe(packageJson.packageManager);
});
it("bounds both IMDSv2 identity requests", () => {
const script = readFileSync("scripts/crabbox-untrusted-bootstrap.sh", "utf8");
const imdsRequests = script.match(