Repository navigation
Update pnpm to 12.5.1 - #764
Conversation
pnpm 12 is a native binary. The npm `pnpm` tarball is now only a wrapper
whose `pnpm` placeholder hands over to bin/pnpm.mjs, which downloads the
native binary from the registry on first run. Ship the binary from
@pnpm/exe.linux-{x64,arm64} instead, laid out the way upstream's
install.js does (binary over the placeholder, dist/ with the bundled
node-gyp beside it, where the binary looks for it), and drop the
Corepack/download path (bin/*.mjs, install.js, native-binary.mjs,
dist/node_modules/get-pnpm).
agent-browser: pnpm 12 places its default store inside
node_modules/.pnpm-store when /build is a separate mount, which the
build copies into its output. Pin the store dir outside the build tree
and fail the build if it ever lands in node_modules again.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reached
This review includes 1 billable file and costs up to $0.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 38 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Your 57 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. Review configuration: ⚙️ Run configurationConfiguration used: Repository: gominimal/pkgs/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: gominimal/pkgs/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe pnpm package now uses native Linux executables for Amd64 and Arm64. The agent-browser build sets the pnpm store outside the project tree and stops if a local pnpm store exists. Changesagent-browser Store Handling
Native pnpm Package
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Merge Risk: ⚪ Minimal · up to The change is mergeable; normal build validation should still cover the unverified environment-specific store path. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…l fetched
Restore `needs = { dns, internet }`. It was never for pnpm's own build: it is
the abstract network dep a package that builds WITH pnpm inherits (71d7239,
as on curl/go/rust/uv/wget). agent-browser declares no `needs` of its own and
today reaches the registry through rust; a pnpm consumer without rust would
lose it.
build.sh no longer re-derives the arch with `uname -m`; it uses the single
exe.linux-*-<version>.tgz that build.ncl selected by `target`, and fails if
there is not exactly one.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…its stale result) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
next's build.sh ran an unpinned `npm install sharp node-addon-api node-gyp`. sharp 0.35.5 (published 2026-09-27) raised its floor to libvips >=8.18.7, so the rebuild triggered by the pnpm 12.5.1 bump (#764) FTBFS on both arches against our libvips 8.18.6: common.h:23: #error "libvips version 8.18.7+ is required" Pin sharp to 0.35.4 (satisfies next 16.3.6's ^0.35.4 and libvips >=8.18.6), and node-addon-api/node-gyp to the versions that resolved. Exact pins also make the build reproducible. Follow-up: libvips 8.18.7, then SHARP_VERSION=0.35.5. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The merge-queue run failed on Added a98197b: the same exact-version pin as #773 ( |
Summary
Upgrades
packages/pnpmfrom 11.21.0 to 12.5.1. This is a repackage, not a plain version bump.Why: pnpm 12 is a native (Rust) binary. The npm
pnpmtarball is now only a wrapper around it. Itspackage/pnpmis anshplaceholder that hands over tobin/pnpm.mjs, and that script runs the binary from@pnpm/exe.<os>-<arch>. If that package isn't installed, it downloads the binary from the registry on first run. That must never happen in a sandbox. The old build.sh also chmods and symlinksbin/*.cjs, and those files no longer exist in 12.x, so a naive bump fails.Changes
packages/pnpm@pnpm/exe.linux-x64/@pnpm/exe.linux-arm64, using thematch { { arch = 'Amd64, .. } => ... } targetpattern fromdeno. Thepnpmwrapper tarball is still fetched, but only for itsdist/payload.install.jsproduces: the native binary is placed over thepnpmplaceholder inusr/libexec/pnpm/, withdist/beside it. The binary finds its bundled node-gyp at<dir of current_exe>/dist/node-gyp-bin(crates/executor/src/bundled_node_gyp.rs) and puts it on lifecycle scripts' PATH. Withoutdist/, native-addon builds would fall back to whatever node-gyp the environment has.bin/*.mjs,install.jsandnative-binary.mjs(the Corepack / install-time path) are not shipped, and neither isdist/node_modules/get-pnpm, the downloader they call. Nothing else indist/uses it.package.json#bin:pnpm,pn,pnpxandpnx. The last three are upstream's#!/bin/shalias scripts, which exec thepnpmbeside them (pnpx/pnxadddlx). The binary infersdlxonly fromcurrent_exe(), and on Linux that resolves symlinks, so a symlink alias cannot work.pn/pnxare new relative to 11.x.glibcandsubsetOf gcc ["libgcc"](ELFDT_NEEDED: libgcc_s, libc, libm, libdl, libpthread, librt; needs GLIBC_2.18 or later).bash, for the/bin/shalias scripts and lifecycle scripts.coreutils, which the alias scripts need forreadlink.subsetOf node-lts ["node"]on purpose. pnpm no longer needs node to run itself, but lifecycle scripts, the bundlednode-gypwrapper andpnpm run/execall spawnnode. It stays the interpreter-only subset, so the agent-browser and cf still blend a second npm into sessions with node-lts (follow-up to #665/#670) #751 rule holds: no second npm enters consumer closures.needs(dns/internet). The build no longer touches the network; all sources are declared.cli:pnpm --versionandpn --versionprint exactly12.5.1,/usr/bin/pnpmresolves to an ELF, and nothing mentions a download.install: a dependency-freepnpm install --offlineworks with no download message, and a rootpostinstallsees/usr/libexec/pnpm/dist/node-gyp-bin/node-gypandnodeon PATH.dist/node-gyp-bin/node-gypsits beside the binary and that the binary reports$MINIMAL_ARG_VERSION.packages/agent-browser/build.sh(needed by this bump)/buildis a separate mount), it puts the store at<project>/node_modules/.pnpm-store(crates/config/src/store_path.rs). agent-browser doescp -R node_modulesinto its output, so it would have shipped the whole pnpm store.Content-addressable store is at: /build/node_modules/.pnpm-store/v11./state/data/pnpm/store/v11.PNPM_CONFIG_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pnpm/store". The store is now back at/state/data/pnpm/store/v11. The build also fails ifnode_modules/.pnpm-storeever reappears.Sources and checksums
Each tarball's sha512 was checked against the registry's
dist.integrityfor 12.5.1 (all match). The sha256 values in build.ncl were computed from the same verified files.pnpm-12.5.1.tgz4/MFvHhKK8ifWtO2E4iJRw+ujSr182thIW7JHCw9ZAiXdfneOKrDMQROpA8kXLDVZmOS399lgk4ZB+9qLGLeXw==3c1439171c1396d7f30892d2444135c9f11de739175058a1503cdf53788f2099exe.linux-x64-12.5.1.tgz3PkUBYo5z4dgtlnTNIFj7QGpcDUAuqXz9WGVigPDCeccEnhGiRkWmA5102TmYJHtwJP3LfmE+ZF9PGeWhn8p9Q==c980bc463e4b1dcd34ab136c738d987dd21a5590f4b4b82dc2c8ad3e605e2f7fexe.linux-arm64-12.5.1.tgz6hbMWW2/eQo1b5wvQPe/ndLHVTH88Rav6N+ffD4/h6IuFMjWCgasFYYsFv0GrvpqREAx3SwmZSvli+0NFXqbxA==d6b8b296256372cdbd02be78b7e19b8387de252abcf920017987660b76c429e8What's in the tarballs:
package/pnpm, 52 MB, glibc-dynamic PIE, interpreter/lib64/ld-linux-x86-64.so.2./lib/ld-linux-aarch64.so.1.@pnpm/exe.*manifests have nobin,libc: ["glibc"], and MIT license.Verification
All builds ran in a Linux
minsession (arm64), each on a freshmin session activatesnapshot, withmin session exec pnpm12 -- min package build --rebuild --verbose <pkg>followed bymin check --packages <pkg>.exit 97at the top of build.sh in a fresh activation: the build failed withprocess(./build.sh) exited with code 97. Restored, re-activated, then built.clitest to expect0.0.0-negctl:standalone tests...Fail(test "$out" = '0.0.0-negctl' had exit code 1). Restored, and it passes, so the tests really run against the built tree.build finished;min check: all Pass (enumerate bins, output types, missing runtime_deps, standalone tests, import line, fmt, disallowed-patterns).build finished;Done in 3.3s using pnpm v12.5.1; store at/state/data/pnpm/store/v11;min check: all Pass, including the end-to-endopen_checkstandalone test.build finished;sharp 0.35.4 vips 8.18.6 addon sharp-linux-arm64-0.35.4.node;min check: all Pass, including standalone tests./state/data/pnpm/store/v11,using pnpm v11.21.0; nextusing pnpm v10.33.0.Review fixes (6d3ba43)
needs = { dns, internet }. The first commit dropped it because pnpm's own build is offline, but the block was never for pnpm's build. It is the abstract network dep that packages building with pnpm inherit (71d7239, the same as curl/go/rust/uv/wget).reused 0, downloaded 410packages. agent-browser reaches the registry today through rust (its toolchain dep carries the same block), not through pnpm.uname -m. It unpacks the singleexe.linux-*-<version>.tgzthat build.ncl selected bytarget, and fails unless there is exactly one. That gives one source of truth for the architecture.pnpm:build finished, andmin checkpasses all 15 checks, including the standalone tests.agent-browser:build finished(Done in 1.9s using pnpm v12.5.1).min checkpasses, including the build-dependent checks (enumerate bins, missing runtime_deps, standalone tests).Local x64 + arm64 smoke test (outside min)
The min sandbox here is arm64-only, so I ran this PR's
build.shverbatim (at 6d3ba43) against the real tarballs indebian:bookwormcontainers:--arch amd64through Rosetta, and native arm64. Node 18.20.4 came from Debian. This supplements the min builds; it doesn't replace them./usr/bin/pnpmis a native ELF for that archpnpm --version/pn --versionprint 12.5.1pnx cowsay@1.6.0(dlx alias, from the registry)pnpm add microtime@3.1.1 --allow-build, forced to build from source:build/Release/microtime.nodecompiles and loadsThe image has no node-gyp of its own (
command -v node-gypfinds nothing with Debian's nodejs installed). So the addon compiled through the bundledusr/libexec/pnpm/dist/node-gyp, which is the layout this PR preserves beside the binary. next's sharp never exercises that path, because it uses prebuilt binaries.Reviewer TODOs / unresolved
nextkeeps its own pinned pnpm, deliberately. It is not changed here.package.jsonpins"packageManager": "pnpm@10.33.0", so pnpm hands off to (and fetches) 10.33.0 at build time. That happens under 11.21.0 on main and under 12.5.1 here, so this bump doesn't change next's install.PNPM_CONFIG_PM_ON_FAIL=ignoreandPNPM_CONFIG_MANAGE_PACKAGE_MANAGER_VERSIONS=falseboth keep 12.5.1 running instead of switching. But pnpm 12 then rejects next's lockfile (lockfileVersion: '9.0', written by pnpm 10):pnpm install --frozen-lockfilefails withERR_PNPM_LOCKFILE_CONFIG_MISMATCH("configuration doesn't match the value found in the lockfile").minimal build✅, run261b17df).pnpm installreports pnpm 12.5.1, then the Rust CLI compiles) and next on both (sharp … addon sharp-linux-x64-0.35.4.nodeon amd64), then ran 90 package checks.minimal-checkbuilds nothing here: its build-dependent checks all Skip for these packages. buildbot is the real build.node-runtime-guard / guard✗ is stale and non-blocking. That workflow is disabled repo-wide until ci(node-runtime-guard): evaluate with the runner's pinned mip, not the stale shim #761 lands (it fails every PR on CI's stale May evaluator), and it is not a required check.Update available! 12.5.1 → 12.6.0. This PR pins 12.5.1 as requested. The update notifier makes a harmless registry request during builds.Verifying lockfile against supply-chain policies (473 entries)... ✓, which is new relative to 11.x. It passed here.packages/pnpm/build.nclandbuild.sh, and will need a rebase onto this. Redirect pnpm, bun, deno, and gem global installs to ~/.local per the inbox#584 decision #659 is not modified here.🤖 Generated with Claude Code
Summary by CodeRabbit
pn,pnpx, andpnxcommand aliases.