From a4d367e38c50a0264943e7866da16f8d2db0b684 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 25 Jul 2026 22:46:10 +0800 Subject: [PATCH] fix(crabbox): keep untrusted bootstrap pnpm pin current (#113728) --- scripts/crabbox-untrusted-bootstrap.sh | 2 +- test/scripts/crabbox-untrusted-bootstrap.test.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/crabbox-untrusted-bootstrap.sh b/scripts/crabbox-untrusted-bootstrap.sh index 6736ce2eb19d..bc235d63eb78 100755 --- a/scripts/crabbox-untrusted-bootstrap.sh +++ b/scripts/crabbox-untrusted-bootstrap.sh @@ -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 [args...]" >&2 diff --git a/test/scripts/crabbox-untrusted-bootstrap.test.ts b/test/scripts/crabbox-untrusted-bootstrap.test.ts index 49e582a4f6e9..8e3635c0aaf9 100644 --- a/test/scripts/crabbox-untrusted-bootstrap.test.ts +++ b/test/scripts/crabbox-untrusted-bootstrap.test.ts @@ -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(