|
| 1 | +--- |
| 2 | +date: 2026-08-05 |
| 3 | +repo: pnpm/pnpm |
| 4 | +size: L |
| 5 | +title: "Sudo guard, GVS fixes, and major refactors" |
| 6 | +excerpt: "pnpm adds sudo protection, fixes several install/tarball edge cases, and lands big Rust module splits plus NAPI/API improvements." |
| 7 | +commits: 15 |
| 8 | +authors: [zkochan, edwardlong-ctrl] |
| 9 | +commit_authors: {"34347bc": zkochan, "21429c6": edwardlong-ctrl, "bdb25ee": zkochan, "769fad5": zkochan, "8753f7d": zkochan, "1a75bb2": zkochan, "a92dc94": zkochan, "29b6da6": zkochan, "420f91b": zkochan, "1ee45b9": zkochan, "a550eca": zkochan} |
| 10 | +--- |
| 11 | + |
| 12 | +### **Sudoed global mutations now warn in v11 and fail in v12** (bdb25ee) |
| 13 | +Running `pnpm setup`, `pnpm self-update`, or global write operations through `sudo` is now explicitly blocked, because pnpm keeps global state in the invoking user's home directory. v11 emits a warning; v12 turns that into `ERR_PNPM_SUDO_NOT_SUPPORTED`, while read-only global commands still work. |
| 14 | + |
| 15 | +### **Global virtual-store imports are now safe under concurrency, and the Node API can use them** (a550eca) |
| 16 | +Concurrent installs sharing a global virtual store no longer race when importing the same slot, avoiding directory-not-empty failures and transient removals of directories another process may be reading. The Node API also now exposes global-virtual-store configuration and related install inputs, making the shared store usable from embedders. |
| 17 | + |
| 18 | +### **`link:` deps inside global virtual-store slots are now materialized correctly** (8753f7d) |
| 19 | +`link:` dependencies are now included in the virtual-store slot hashing and materialization logic, so linked children stay present inside shared slots and changes to the link target invalidate the right ancestors. This fixes isolation bugs where a slot could miss a peer or be reused despite a changed linked target. |
| 20 | + |
| 21 | +### **Tarball extraction now normalizes backslashes in archive entry paths** (420f91b) |
| 22 | +Archive entries using `\` as a separator are now treated the same way pnpm already treats them elsewhere, so Windows-authored paths resolve correctly on Unix instead of being stored verbatim. That also closes a path-traversal gap where backslash-based `..` segments could bypass validation. |
| 23 | + |
| 24 | +### **Store path resolution keeps sandboxed installs inside the project** (21429c6) |
| 25 | +When nothing above the project can accept hard links, pnpm now creates the default store under `node_modules/.pnpm-store` inside the project instead of falling back to the home directory. That avoids copying everything in constrained sandboxes and prevents the store from escaping writable project-only mounts. |
| 26 | + |
| 27 | +### **`resolveDependency({ fullMetadata: true })` now preserves custom registry fields** (34347bc) |
| 28 | +The NAPI resolver stopped stripping full-metadata packuments down to npm's abbreviated field set, which had dropped registry-specific fields like Bit's `componentId`. This restores the API's expected full document shape for callers that need richer metadata. |
| 29 | + |
| 30 | +### **Major Rust modules were split for maintainability** (769fad5) |
| 31 | +The deps-restorer build phase was carved into smaller modules, with the orchestration left in place and the policy, snapshot build, and slot logic moved out. This is a structural refactor only, but it makes one of the crate's largest files much easier to navigate. |
| 32 | + |
| 33 | +### **More large internal refactors landed across install, audit, and tarball code** (1a75bb2, a92dc94, 29b6da6, 1ee45b9) |
| 34 | +Several other oversized Rust modules were split into per-concern pieces, including optimistic repeat-install checks, frozen install internals, the audit command, and the tarball crate root. These are mostly code-motion refactors, but they significantly reduce file size and improve long-term maintainability. |
| 35 | + |
| 36 | +### Other misc changes |
| 37 | +- Dependency / toolchain / GitHub Actions updates (2 commits) |
| 38 | +- Release prep for pacquet 12.0.0-rc.0 |
| 39 | +- Move Rust CLI release lane from beta to rc |
| 40 | +- Minor changelog/test/package metadata updates |
0 commit comments