Skip to content

feat(update): select global groups interactively - #13428

Merged
zkochan merged 7 commits into
mainfrom
fix-13360
Aug 6, 2026
Merged

zkochan merged 7 commits into
mainfrom
fix-13360

Conversation

@zkochan

@zkochan zkochan commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds support for pnpm update --global --interactive in both the TypeScript CLI and the Rust pnpm port.

Global install groups are presented as the selection unit. Each option summarizes the outdated packages in that group, and only selected groups are updated. Empty global stores and empty selections exit without changing anything.

Prompt labels are sanitized before rendering so local or registry metadata cannot inject terminal control characters.

Also makes the concurrent selector-resolution test tolerate the valid case where an auxiliary packument request is skipped.

Closes #13360.

Squash Commit Body

Scan global install groups and calculate their outdated dependencies before a
global interactive update. Present each group as one selectable item so packages
that share a global installation remain an atomic update unit, then restrict the
global update to the selected group hashes.

Implement the same selection and filtering behavior in the TypeScript CLI and
the Rust pnpm port, including clean no-op behavior for empty stores and empty
selections. Sanitize metadata-derived prompt labels before rendering them. Add
focused tests and release metadata for both implementations.

Closes pnpm/pnpm#13360.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Codex, GPT-5).

Summary by CodeRabbit

  • New Features

    • Added interactive selection for pnpm update --global.
    • Displays outdated global package groups with installed and available versions.
    • Updates only the package groups selected by the user.
    • Handles empty installations, unmatched packages, and up-to-date packages gracefully.
  • Bug Fixes

    • Removed the unsupported-operation error for interactive global updates.
    • Improved handling of cancelled interactive prompts.
    • Ensured global lockfiles are read correctly during update checks.
    • Prevented inherited properties from being treated as package dependencies.

Copilot AI lite review requested due to automatic review settings July 27, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

feat(update): interactive selection for global update groups

✨ Enhancement 🧪 Tests ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Add interactive selection for pnpm update --global --interactive by global install group.
• Compute outdated packages per group and only update selected group hashes.
• Treat empty global stores and empty selections as clean no-ops; adjust tests accordingly.
Diagram

graph TD
  U(["User"]) --> CLI["Update command"] --> SCAN["Scan global groups"] --> OUT["Compute outdated"] --> SEL{"Interactive select"} --> UPD["Global updater"]
  SCAN --> STORE[("Global store")]
  UPD --> STORE

  subgraph Legend
    direction LR
    _u(["Actor"]) ~~~ _p["Process"] ~~~ _db[("Data store")] ~~~ _d{"Decision"}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Select individual packages (not groups) in interactive mode
  • ➕ More granular control for users who only want one package updated
  • ➕ Simpler UI labels (one package per option)
  • ➖ Breaks atomicity for packages sharing the same global installation group
  • ➖ Can produce partial upgrades within a shared global group
2. Prompt first, then compute outdated only for selected groups
  • ➕ Potentially fewer registry/packument requests up front
  • ➕ Faster initial prompt in very large global stores
  • ➖ Hard to present meaningful choices without outdated summaries
  • ➖ Two-phase UX (choose blindly, then discover changes)
3. Auto-update all outdated groups but allow interactive exclusion
  • ➕ Default path remains a full update while still allowing opt-out
  • ➕ Less chance users miss an important update by under-selecting
  • ➖ Changes semantics vs current interactive expectation (explicit selection)
  • ➖ More surprising behavior when users expect 'only what I pick'

Recommendation: Keep the PR’s approach: selecting by global install group preserves the correct atomic update unit and aligns TS and Rust behavior. Computing outdated per group before prompting enables informative choices, and filtering by group hash keeps the execution path minimal and deterministic.

Files changed (13) +258 / -9

Enhancement (5) +169 / -7
global.rsFilter Rust global update by selected group hashes +5/-1

Filter Rust global update by selected group hashes

• Extends 'handle_global_update' to accept an optional set of selected group hashes. When provided, only matching global package groups are updated.

pnpm/crates/cli/src/cli_args/global.rs

update.rsEnable Rust '--global --interactive' via group selection +16/-6

Enable Rust '--global --interactive' via group selection

• Replaces the prior 'not supported yet' error with a real interactive flow. Collects selected group hashes (or exits cleanly on no-op) and passes them into the global update handler.

pnpm/crates/cli/src/cli_args/update.rs

update_interactive.rsAdd Rust global group selection with outdated summaries +84/-0

Add Rust global group selection with outdated summaries

• Implements 'select_global_package_groups' to scan global groups, compute outdated direct deps, and prompt via 'MultiSelect'. Returns selected group hashes, or 'None' for empty stores, no outdated, or empty selections.

pnpm/crates/cli/src/cli_args/update_interactive.rs

globalUpdate.tsFilter TS global updates by selected group hashes +5/-0

Filter TS global updates by selected group hashes

• Adds an optional 'selectedPackageHashes' set to global update options. Filters 'packagesToUpdate' so only interactively chosen groups are processed.

pnpm11/global/commands/src/globalUpdate.ts

index.tsImplement TS global interactive group selection before update +59/-0

Implement TS global interactive group selection before update

• Adds 'selectGlobalPackageGroups' to build per-group outdated summaries and prompt via checkbox. Threads the resulting selected group hashes into 'handleGlobalUpdate', with clean no-op behavior for empty stores and empty selections.

pnpm11/installing/commands/src/update/index.ts

Tests (4) +74 / -2
global.rsAdd Rust test for empty-store global interactive update +25/-0

Add Rust test for empty-store global interactive update

• Adds a Unix-only integration test asserting that 'pnpm update -g -i' succeeds on an empty global directory. Verifies it no longer emits the 'not supported yet' error.

pnpm/crates/cli/tests/global.rs

tests.rsRelax concurrent selector-resolution mock expectations +1/-1

Relax concurrent selector-resolution mock expectations

• Adjusts an HTTP mock from 'expect at least 1' to 'expect at most 1'. Makes the test tolerate the valid case where an auxiliary packument request is skipped.

pnpm/crates/package-manager/src/add/tests.rs

globalUpdate.test.tsTest TS global update respects selected group hashes +34/-1

Test TS global update respects selected group hashes

• Adds a new test that passes 'selectedPackageHashes' and asserts only the chosen group is installed/updated. Also resets mocks between tests to avoid cross-test interference.

pnpm11/global/commands/test/globalUpdate.test.ts

interactive.tsTest TS global interactive update on empty global directory +14/-0

Test TS global interactive update on empty global directory

• Adds a unit test asserting global interactive update returns 'No global packages found' without prompting. Validates the new early-exit behavior for empty global stores.

pnpm11/installing/commands/test/update/interactive.ts

Documentation (1) +8 / -0
friendly-global-groups.mdAdd release note for global interactive group selection +8/-0

Add release note for global interactive group selection

• Introduces a changeset bumping relevant packages and pnpm. Documents the new interactive group selection behavior for 'pnpm update --global --interactive'.

.changeset/friendly-global-groups.md

Other (3) +7 / -0
pnpm-lock.yamlWire in new workspace dependency for global packages scanning +3/-0

Wire in new workspace dependency for global packages scanning

• Adds '@pnpm/global.packages' as a workspace-linked dependency to the lockfile. Ensures the installing commands package can import the global package scanner.

pnpm-lock.yaml

package.jsonAdd dependency on @pnpm/global.packages +1/-0

Add dependency on @pnpm/global.packages

• Adds '@pnpm/global.packages' as a workspace dependency for installing commands. Enables importing 'scanGlobalPackages' for global interactive selection.

pnpm11/installing/commands/package.json

tsconfig.jsonAdd TS project reference for global/packages +3/-0

Add TS project reference for global/packages

• Adds a TypeScript project reference to '../../global/packages'. Keeps the workspace build graph consistent with the new import usage.

pnpm11/installing/commands/tsconfig.json

@greptile-apps

greptile-apps Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the current code and regression coverage resolve both previously reported global lockfile lookup concerns.

Reviews (8): Last reviewed commit: "test(global): assert the interactive pro..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.38     16.1±2.31ms    23.3 MB/sec    1.00     11.7±0.43ms    32.1 MB/sec
packument/parse                                  1.00     40.3±1.14µs  1644.7 MB/sec    1.00     40.1±0.35µs  1652.8 MB/sec
tarball/download_dependency                      1.17      2.8±0.31ms  1566.7 KB/sec    1.00      2.4±0.14ms  1832.9 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.25   249.8±18.40ms 64.0 KElem/sec    1.00    199.2±4.32ms 80.3 KElem/sec
workspace_resolution/hoist_heavy                 1.55   416.4±89.00ms        ? ?/sec    1.00   268.9±12.39ms        ? ?/sec

@qodo-code-review

qodo-code-review Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (4) 📜 Skill insights (0)

Grey Divider


Action required

1. Unsanitized prompt labels (Rust) ✓ Resolved 🐞 Bug ⛨ Security
Description
select_global_package_groups()/selectGlobalPackageGroups() constructs dialoguer MultiSelect/checkbox
item labels by concatenating manifest/lockfile/registry-derived fields (e.g.,
alias/current/wanted/latestManifest.version) without stripping VT/control characters, so tampered
global metadata can corrupt/redraw the interactive prompt and spoof terminal output. This is
inconsistent with the existing interactive update table/chooser in the same command path, which
already sanitizes terminal-bound strings (e.g., via sanitize_inline / a manifest-value sanitizer).
Code

pnpm/crates/cli/src/cli_args/update_interactive.rs[R92-119]

+        labels.push(
+            outdated
+                .iter()
+                .map(|package| {
+                    format!("{} {} → {}", package.alias, package.current, package.target)
+                })
+                .collect::<Vec<_>>()
+                .join(", "),
+        );
+        hashes.push(pkg.hash);
+    }
+    if labels.is_empty() {
+        let message = if latest {
+            "All of your dependencies are already up to date"
+        } else {
+            "All of your dependencies are already up to date inside the specified ranges. Use the --latest option to update the ranges in package.json"
+        };
+        println!("{message}");
+        return Ok(None);
+    }
+    let selected_indices = MultiSelect::new()
+        .with_prompt(
+            "Choose which global package groups to update (space to select, enter to confirm)",
+        )
+        .items(&labels)
+        .interact()
+        .into_diagnostic()
+        .map_err(|err| miette!("interactive update selection failed: {err}"))?;
Relevance

●●● Strong

Sanitizing terminal-bound strings is established and accepted (PR #13287) and applied to interactive
UI too (PR #13298).

PR-#13287
PR-#13298

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The cited code path for the new global interactive selector formats package fields like alias and
version strings (current/target such as wanted/latestManifest.version) into label/name strings and
passes them directly to the terminal UI selection component (dialoguer::MultiSelect / checkbox)
without any sanitization step, meaning any embedded ANSI escape sequences, newlines, or other
control characters would be interpreted by the terminal during rendering and redraw. In contrast,
elsewhere in the same command’s interactive update UI, terminal-bound cells/rows are explicitly
cleaned using an established sanitizer (sanitize_inline / a manifest-value sanitizer), demonstrating
both that this is a known risk in the repo and that the new global interactive path bypasses the
existing mitigation.

pnpm/crates/cli/src/cli_args/update_interactive.rs[46-128]
pnpm/crates/cli/src/cli_args/update_interactive/choices.rs[154-176]
pnpm/crates/cli/src/cli_args/sanitize.rs[17-23]
pnpm/crates/cli/src/cli_args/outdated.rs[63-76]
pnpm11/installing/commands/src/update/index.ts[222-272]
pnpm11/installing/commands/src/update/getUpdateChoices.ts[148-157]
pnpm11/config/reader/src/index.ts[991-1000]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The global interactive update selector builds choice labels from `OutdatedPackage`/outdated metadata fields (e.g., `alias`, `current`, and target versions like `wanted`/`latestManifest.version`) and passes them directly into the interactive prompt component (`dialoguer::MultiSelect` / checkbox). If any of these strings include VT/control characters (ANSI escapes, `\n`, `\r`, etc.)—for example via locally-tampered global store metadata or registry-served strings—they can interfere with terminal rendering/redraw and spoof or mangle prompt output.

The repo already sanitizes terminal-bound strings in the non-global interactive update chooser/table (and has an established manifest-value sanitizer), but this new global interactive path does not apply that sanitization.

## Issue Context
This affects the global interactive update flow (e.g., `pnpm update -g -i`) and specifically the selector that renders package group choices built from outdated metadata.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/update_interactive.rs[46-128]
- pnpm11/installing/commands/src/update/index.ts[222-272]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Test ignores exit status ✓ Resolved 🐞 Bug ☼ Reliability
Description
The new global_commands_read_group_lockfiles_when_the_lockfile_setting_is_off test runs `update -g
-i --latest but never asserts output.status.success()`, so a prompt/TTY failure can still pass as
long as stdout lacks the checked substring. This can mask regressions in the interactive global
update path and make CI results unreliable.
Code

pnpm/crates/cli/tests/global.rs[R591-594]

+    let output = global_command(&workspace, &pnpm_home)
+        .with_args(["update", "-g", "-i", "--latest"])
+        .output()
+        .expect("run interactive global update");
Relevance

●●● Strong

Team often hardens CLI integration tests with explicit output.status.success() to avoid
false-greens.

PR-#13460
PR-#13366

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test captures the output of update -g -i --latest and immediately asserts only that stdout
does not contain "already up to date"; it never checks the process exit status, so failures can slip
through as false positives.

pnpm/crates/cli/tests/global.rs[591-600]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The test `global_commands_read_group_lockfiles_when_the_lockfile_setting_is_off` invokes an interactive command (`pnpm update -g -i --latest`) and only asserts on stdout text. If the command exits non-zero (e.g., prompt cannot run in the test environment), stdout may still not contain the asserted substring and the test can incorrectly pass.

### Issue Context
This is a regression test intended to ensure global group lockfiles are still read when `lockfile=false`. It should fail when the interactive path errors.

### Fix
Add an explicit `output.status.success()` assertion (including stderr in the failure message) before the stdout-content assertion.

### Fix Focus Areas
- pnpm/crates/cli/tests/global.rs[591-600]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. No mirrored Rust match test 📘 Rule violation ▣ Testability
Description
A new TypeScript test asserts that pnpm update -g -i <pkg> still offers the group when the
requested package is current but another package in the group is outdated, but there is no
corresponding Rust test to prevent pacquet regressions for the same scenario. This weakens
cross-stack parity guarantees for the new interactive global update behavior.
Code

pnpm11/installing/commands/test/update/interactive.ts[R126-129]

+    ...options,
+    interactive: true,
+    latest: true,
+  } as any, ['@pnpm.e2e/multi-version-b']) // eslint-disable-line @typescript-eslint/no-explicit-any
Relevance

●●● Strong

Repo frequently adds/updates Rust integration tests to mirror TypeScript behavior changes for parity
regressions.

PR-#13132
PR-#13203

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires mirrored tests when behavior changes in both stacks. The new TypeScript test
covers the 'requested package current but group still selectable' scenario, while the Rust global
interactive tests added in this PR focus on empty/no-match paths and do not cover this matching
semantics scenario.

Rule 2255044: Cross-stack behavior changes must have mirrored tests in Rust and TypeScript
pnpm11/installing/commands/test/update/interactive.ts[114-137]
pnpm/crates/cli/tests/global.rs[545-580]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
TypeScript adds coverage for a key global-interactive selection scenario (requested package is current, but its group contains other outdated packages and should still be offered). Rust does not have an equivalent automated test, risking silent divergence.

## Issue Context
The PR implements the same feature in both stacks. Cross-stack behavior changes should have mirrored tests to keep pnpm TypeScript and pacquet Rust aligned.

## Fix Focus Areas
- pnpm11/installing/commands/test/update/interactive.ts[114-137]
- pnpm/crates/cli/tests/global.rs[545-580]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Rust prompt cancel exits error 📘 Rule violation ⌂ Architecture
Description
TypeScript now treats interactive prompt cancellation as a successful no-op, but the Rust port
appears to propagate the prompt error, which will exit non-zero. This creates a user-visible
behavior divergence between pnpm TypeScript and pacquet Rust for the same command.
Code

pnpm11/installing/commands/src/update/index.ts[R396-399]

+  try {
+    return await prompt()
+  } catch (err: unknown) {
+    if (util.types.isNativeError(err) && err.name === 'ExitPromptError') {
Relevance

●●● Strong

Team has accepted Rust/TS parity fixes to align user-visible behavior and errors; cancel should not
exit non-zero.

PR-#13132
PR-#13203

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires pnpm TypeScript and pacquet Rust user-visible behavior changes to stay in
sync. TypeScript explicitly treats ExitPromptError as a user-declined action and exits
successfully, while the Rust interactive global selection uses dialoguer's interact() and maps
errors into a returned error; the CLI dispatcher exits with code 1 on such errors, leading to
different observable outcomes.

Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pnpm11/installing/commands/src/update/index.ts[391-402]
pnpm/crates/cli/src/cli_args/update_interactive.rs[132-139]
pnpm/crates/cli/src/cli_args/dispatch.rs[337-345]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
TypeScript `pnpm update --interactive` (including `--global`) treats Ctrl-c prompt cancellation as a success (exit code 0), but the Rust port does not appear to special-case prompt cancellation and will surface it as an error.

## Issue Context
This PR adds user-visible interactive update behavior that should remain in sync across TypeScript (pnpm) and Rust (pacquet) per the cross-stack parity requirement.

## Fix Focus Areas
- pnpm11/installing/commands/src/update/index.ts[391-402]
- pnpm/crates/cli/src/cli_args/update_interactive.rs[132-139]
- pnpm/crates/cli/src/cli_args/dispatch.rs[337-345]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (4)
5. Interactive global skips lockfile-less ✓ Resolved 🐞 Bug ☼ Reliability
Description
select_global_package_groups() relies on lockfile-pinned versions to compute “outdated”; if the
wanted lockfile is disabled or absent for a global group, every dependency is dropped and `pnpm
update -g -i` can incorrectly report “up to date” and exit without offering any selection. This
makes the new interactive global update path silently no-op under lockfile=false configs or
lockfile-less global installs.
Code

pnpm/crates/cli/src/cli_args/update_interactive.rs[R75-80]

+        let state = crate::State::init(pkg.install_dir.join("package.json"), config, false)
+            .map_err(|err| miette::Report::new(err).wrap_err("initialize global state"))?;
+        let lockfile = state
+            .lockfile
+            .get()
+            .map_err(|err| miette::Report::new(err).wrap_err("load the lockfile"))?;
Relevance

●●● Strong

Team has accepted explicit handling for missing/None lockfile rather than silently proceeding.

PR-#13202

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new interactive global selection uses State::init(..., require_lockfile=false) and passes
state.lockfile.get() into collect_outdated_for_importer. LazyLockfile::get() returns
Ok(None) when loading is disabled or the file is absent; collect_outdated_for_importer then
drops dependencies because it requires lockfile-pinned current versions, producing an empty outdated
set and causing the selection path to return Ok(None) (no prompt, no update).

pnpm/crates/cli/src/cli_args/update_interactive.rs[47-117]
pnpm/crates/lockfile/src/lazy_lockfile.rs[28-58]
pnpm/crates/cli/src/cli_args/outdated.rs[201-214]
pnpm/crates/cli/src/cli_args/update_interactive.rs[109-117]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`select_global_package_groups()` computes outdated packages using `collect_outdated_for_importer(...)`, which drops dependencies unless it can find a lockfile-pinned current version. When `LazyLockfile::get()` returns `None` (lockfile disabled or not present), the outdated list becomes empty and the interactive global update path exits as a no-op with an “up to date” message.

## Issue Context
This is triggered by the newly added interactive global selection path.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/update_interactive.rs[47-135]

## Implementation notes
Choose one (or combine):
1) **Fallback to installed versions**: when `lockfile` is `None`, compute `current` from the installed global group (e.g., read each direct dependency’s installed `package.json` version under `install_dir/node_modules/<alias>`), then compare to the registry `target` to decide whether it’s outdated.
2) **Force/require lockfile (and message)**: if interactive global selection fundamentally requires lockfile data, explicitly detect `lockfile.is_none()` and return a clear message (or error) explaining that interactive global update needs `pnpm-lock.yaml` for each group—do not treat it as “already up to date.”
3) Add a regression test covering a global group without `pnpm-lock.yaml` (or with `lockfile=false`) to ensure the command does not silently no-op.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Non-hermetic empty-dir test 🐞 Bug ☼ Reliability
Description
global interactive update handles an empty global directory uses path.resolve('empty-global')
without creating/isolating the directory, so a pre-existing empty-global containing global-group
symlinks will take the interactive scan/outdated path and break the test’s expectations (and can add
avoidable work). This can make local runs flaky and slower depending on filesystem state.
Code

pnpm11/installing/commands/test/update/interactive.ts[R66-76]

+  const globalDir = path.resolve('empty-global')
+
+  await expect(update.handler({
+    ...DEFAULT_OPTIONS,
+    bin: path.resolve('bin'),
+    dir: process.cwd(),
+    global: true,
+    globalPkgDir: globalDir,
+    interactive: true,
+  } as any)).resolves.toBe('No global packages found') // eslint-disable-line @typescript-eslint/no-explicit-any
+  expect(mockCheckbox).not.toHaveBeenCalled()
Relevance

●●● Strong

Team accepted fixing flaky tests by using unique temp dirs/cleanup vs fixed paths (PR #12280,
#11363).

PR-#12280
PR-#11363

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test hard-codes a repo-relative directory name and asserts the prompt is not invoked, but the
implementation only returns the “No global packages found” string when scanning yields zero groups.
Since scanGlobalPackages() reads existing directory contents (returning [] only for ENOENT or no
matching entries), any existing empty-global with global-group symlinks will change the execution
path and invalidate the test’s assumptions.

pnpm11/installing/commands/test/update/interactive.ts[65-77]
pnpm11/installing/commands/src/update/index.ts[198-231]
pnpm11/global/packages/src/scanGlobalPackages.ts[57-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The test assumes `path.resolve('empty-global')` represents an empty global store, but it doesn’t create or clean that path. If the directory already exists and contains entries that `scanGlobalPackages()` recognizes (hash symlinks), the handler will proceed into the interactive/outdated path and may call `checkbox`, failing the test and doing extra work.

### Issue Context
`selectGlobalPackageGroups()` calls `scanGlobalPackages(opts.globalPkgDir!)` and returns `'No global packages found'` only when the scan returns an empty list.

### Fix Focus Areas
- pnpm11/installing/commands/test/update/interactive.ts[66-76]

### Recommended fix
In the test, create a unique temporary directory (or use `prepare()` to run inside a fresh temp cwd and then create an empty `globalPkgDir` under it) and pass that as `globalPkgDir`. Optionally remove it after the test.

Example approach:
- `import fs from 'node:fs'` and `import os from 'node:os'`
- `const globalDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pnpm-empty-global-'))`
- pass `globalPkgDir: globalDir`
- `fs.rmSync(globalDir, { recursive: true, force: true })` in a `finally` block.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. No Rust test for selected hashes 📘 Rule violation ▣ Testability
Description
TypeScript adds a test that verifies only interactively selected global groups are updated, but Rust
adds the same selection/filtering behavior without a mirrored test for that scenario. This risks
cross-stack regressions where pacquet and pnpm diverge silently.
Code

pnpm/crates/cli/src/cli_args/global.rs[R193-196]

+    let mut to_update: Vec<GlobalPackageInfo> = if params.is_empty() {
        all
    } else {
        let filtered: Vec<GlobalPackageInfo> =
Relevance

●●● Strong

Team enforces JS/Rust parity and updates tests accordingly (accepted parity fixes in PRs #13132,
#13074).

PR-#13132
PR-#13074

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2255044 requires mirrored tests for behavior changed in both stacks. The TypeScript side
includes a test asserting filtering by selected hashes, while the Rust side adds filtering logic but
only adds an empty-store interactive test and does not cover the selected-hash filtering scenario.

Rule 2255044: Cross-stack behavior changes must have mirrored tests in Rust and TypeScript
pnpm/crates/cli/src/cli_args/global.rs[193-206]
pnpm11/global/commands/test/globalUpdate.test.ts[89-116]
pnpm/crates/cli/tests/global.rs[520-543]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR adds selection-based filtering for global updates in both TypeScript and Rust, but only TypeScript includes a test asserting that only the selected group(s) are updated.

## Issue Context
Cross-stack behavior changes must have mirrored tests to prevent drift between the TypeScript CLI and the Rust port.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/global.rs[193-206]
- pnpm/crates/cli/tests/global.rs[520-543]
- pnpm11/global/commands/test/globalUpdate.test.ts[89-116]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. Repeated selection work per group 🐞 Bug ➹ Performance
Description
select_global_package_groups() initializes a full State and runs an independent outdated
collection for each global group, which also means separate packument caches per group and potential
repeated registry metadata fetches for the same packages across groups. With many global groups this
increases pre-prompt CPU/network work and delays time-to-prompt for pnpm update -g -i.
Code

pnpm/crates/cli/src/cli_args/update_interactive.rs[R74-88]

+    for pkg in global_packages {
+        let state = crate::State::init(pkg.install_dir.join("package.json"), config, false)
+            .map_err(|err| miette::Report::new(err).wrap_err("initialize global state"))?;
+        let lockfile = state
+            .lockfile
+            .get()
+            .map_err(|err| miette::Report::new(err).wrap_err("load the lockfile"))?;
+        let outdated = collect_outdated_for_importer(
+            &state.manifest,
+            lockfile,
+            pacquet_lockfile::Lockfile::ROOT_IMPORTER_KEY,
+            config,
+            &state.http_client,
+            &query,
+        )
Relevance

●● Moderate

Mixed precedent on reusing clients/caches; fix likely non-trivial refactor across global-group
selection.

PR-#13207
PR-#12971

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new function iterates global groups and calls State::init + collect_outdated_for_importer
for each. State::init constructs a new ThrottledClient each time, and
collect_outdated_for_importer uses a fresh PackumentCache::default() per invocation, preventing
cross-group reuse of fetched packuments.

pnpm/crates/cli/src/cli_args/update_interactive.rs[74-108]
pnpm/crates/cli/src/state.rs[83-103]
pnpm/crates/cli/src/cli_args/outdated.rs[151-168]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The global interactive selection loops over global groups and for each group initializes `State` and calls `collect_outdated_for_importer(...)`. The outdated helper constructs its own `PackumentCache::default()` per call, so registry packuments may be fetched repeatedly across groups. `State::init` also constructs a new `ThrottledClient` per group.

## Issue Context
This affects the pre-prompt phase of `pnpm update --global --interactive`.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/update_interactive.rs[47-135]

## Implementation notes
- Hoist reusable resources outside the `for pkg in global_packages` loop:
 - Create one `ThrottledClient` (or reuse one) for selection-time metadata fetches.
 - Share a single packument cache across all groups so identical package metadata is fetched once.
- If needed, add a small helper in `outdated` to accept an external cache (or expose a `collect_outdated_for_importer_with_cache`-style API) and use it from `select_global_package_groups`.
- Keep overall concurrency bounded (do not replace this with unbounded fan-out).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

9. Brittle prompt-error assertion 🐞 Bug ☼ Reliability ⭐ New
Description
The test proves it reached the interactive selection by matching the human-readable substring
"interactive update selection failed" in stderr, which tightly couples it to the current miette
error text. Refactoring the error wrapping/message can break this test even if the command still
reaches the prompt and reads lockfile-pinned versions correctly.
Code

pnpm/crates/cli/tests/global.rs[R600-603]

+    let stderr = String::from_utf8_lossy(&output.stderr);
+    assert!(
+        stderr.contains("interactive update selection failed"),
+        "the outdated group must reach the prompt; stdout: {}; stderr: {stderr}",
Relevance

●●● Strong

Repo often accepts hardening brittle test assertions (prefer structured/less formatting-dependent
checks over raw message substrings).

PR-#13372
PR-#13563
PR-#13329

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test assertion is a direct substring match on stderr for "interactive update selection failed";
that phrase is produced by the interactive global selection code path when dialoguer fails to
render a prompt in non-TTY mode, so changing the message/wrapping would break the test without
changing the underlying behavior.

pnpm/crates/cli/tests/global.rs[596-605]
pnpm/crates/cli/src/cli_args/update_interactive.rs[136-143]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The test currently asserts on an implementation-specific English error substring to detect “prompt was reached” in a non-TTY environment, which is fragile to refactors of error wording/wrapping.

### Issue Context
The string being matched comes from the current wrapping of the dialoguer error in the interactive global selection path.

### Fix Focus Areas
- pnpm/crates/cli/tests/global.rs[596-605]
- pnpm/crates/cli/src/cli_args/update_interactive.rs[136-143]

### Suggested fix
1. Add a stable diagnostic identifier to the error produced when the prompt cannot render (e.g., `miette!(code = "ERR_PNPM_INTERACTIVE_SELECTION", "interactive update selection failed: {err}")`).
2. Update the test to assert on that stable identifier (or another stable machine-oriented marker) rather than a human-readable phrase.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


10. Unbounded group-scan concurrency 🐞 Bug ➹ Performance
Description
pnpm11’s selectGlobalPackageGroups() runs one outdatedDepsOfProjects() per global group inside a
top-level Promise.all, creating a resolver+fetch stack per group concurrently and multiplying
effective network concurrency beyond the configured per-resolver limit. With many global groups,
this can cause avoidable CPU/memory spikes and registry request bursts before the user even sees the
selection UI.
Code

pnpm11/installing/commands/src/update/index.ts[R226-251]

+  const globalPackages = scanGlobalPackages(opts.globalPkgDir!)
+  if (globalPackages.length === 0) return 'No global packages found'
+  const outdatedPerGroup = await Promise.all(globalPackages.map(async (pkg) => {
+    const project = {
+      rootDir: pkg.installDir as ProjectRootDir,
+      manifest: await readProjectManifestOnly(pkg.installDir, opts),
+    }
+    const [outdated] = await outdatedDepsOfProjects([project], input, {
+      ...opts,
+      compatible: opts.latest !== true,
+      ignoreDependencies: opts.updateConfig?.ignoreDependencies,
+      include: {
+        dependencies: true,
+        devDependencies: false,
+        optionalDependencies: true,
+      },
+      retry: {
+        factor: opts.fetchRetryFactor,
+        maxTimeout: opts.fetchRetryMaxtimeout,
+        minTimeout: opts.fetchRetryMintimeout,
+        retries: opts.fetchRetries,
+      },
+      timeout: opts.fetchTimeout,
+    })
+    return { pkg, outdated }
+  }))
Relevance

● Weak

Repo often rejects “bound Promise.all concurrency” perf suggestions (rejected in PRs #12953,
#12876).

PR-#12953
PR-#12876

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The code runs one outdated resolution per global group concurrently via Promise.all.
outdatedDepsOfProjects constructs a resolver per invocation, and createResolver builds a fresh
fetch/dispatcher per resolver, so concurrency limits are per-invocation rather than shared across
all groups.

pnpm11/installing/commands/src/update/index.ts[222-272]
pnpm11/deps/inspection/outdated/src/outdatedDepsOfProjects.ts[56-63]
pnpm11/installing/client/src/index.ts[88-93]
pnpm11/deps/security/signatures/src/verifySignatures.ts[84-88]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`selectGlobalPackageGroups()` does `Promise.all(globalPackages.map(async ... outdatedDepsOfProjects ...))`, so N groups start resolving outdated data concurrently.

Each `outdatedDepsOfProjects()` call creates its own resolver via `createResolver()`, and `createResolver()` creates a fresh registry dispatcher/fetcher. That means per-resolver `networkConcurrency` limits don’t compose across groups; running many groups concurrently can multiply outbound requests and work.

## Issue Context
This happens before the interactive prompt is displayed, so the user perceives it as a slow/hung selector.

## Fix Focus Areas
- pnpm11/installing/commands/src/update/index.ts[222-272]

### Suggested change
- Add `p-limit` (already used in-repo) around the per-group task:
 - `const limit = pLimit(opts.networkConcurrency ?? 16)` (or whatever default matches pnpm conventions)
 - `await Promise.all(globalPackages.map((pkg) => limit(async () => { ... })))`
- Keep ordering stable (Promise.all preserves input order) so the existing `hashes`/labels alignment logic remains correct.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


11. Missing comma in Jest call 📘 Rule violation ⚙ Maintainability
Description
New multi-line TypeScript constructs were added without trailing commas after the final item,
including a toHaveBeenCalledWith call and the selectGlobalPackageGroups function signature. This
violates the repository’s trailing-comma requirement and increases diff noise for future edits.
Code

pnpm11/global/commands/test/globalUpdate.test.ts[R112-115]

+  expect(installGlobalPackages).toHaveBeenCalledWith(
+    expect.objectContaining({ dir: '/global/v11/install-1' }),
+    ['foo@^1.0.0']
+  )
Relevance

● Weak

Trailing-comma style nits are often rejected in pnpm11 (e.g., PRs #13289, #13288).

PR-#13289
PR-#13288

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713434 mandates trailing commas in multi-line TypeScript constructs. In
pnpm11/global/commands/test/globalUpdate.test.ts, the newly added multi-line
toHaveBeenCalledWith( invocation ends with the last argument ['foo@^1.0.0'] but does not include
a trailing comma, and in pnpm11/installing/commands/src/update/index.ts, the new multi-line
function declaration includes the last parameter opts: UpdateCommandOptions without a trailing
comma, demonstrating the same compliance issue in a parameter list.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/global/commands/test/globalUpdate.test.ts[112-115]
pnpm11/installing/commands/src/update/index.ts[222-225]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Multi-line TypeScript constructs introduced in this change are missing required trailing commas after the last argument/parameter, which violates the repository’s TypeScript trailing-comma requirement and makes future edits produce noisier diffs.

## Issue Context
Compliance rule 713434 requires trailing commas in TypeScript multi-line constructs, including function parameter lists and multi-line argument lists (such as Jest assertions).

## Fix Focus Areas
- pnpm11/global/commands/test/globalUpdate.test.ts[112-115]
- pnpm11/installing/commands/src/update/index.ts[222-225]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 24 rules

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 74d9090f-abb0-424f-9e8f-eda3a7c4a008

📥 Commits

Reviewing files that changed from the base of the PR and between 2a832f0 and f614e4e.

📒 Files selected for processing (1)
  • pnpm/crates/cli/tests/global.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm/crates/cli/tests/global.rs

📝 Walkthrough

Walkthrough

pnpm update --global --interactive now discovers outdated global package groups, prompts for group selection, and updates only selected groups in pnpm and pacquet.

Changes

Interactive global update

Layer / File(s) Summary
Selected-group filtering contracts
pnpm/crates/cli/src/cli_args/global.rs, pnpm11/global/commands/src/globalUpdate.ts, pnpm11/global/commands/src/globalAdd.ts, pnpm11/global/packages/src/scanGlobalPackages.ts
Global update handlers accept selected package hashes and filter groups by own dependency keys.
Global group discovery and prompts
pnpm/crates/cli/src/cli_args/update_interactive.rs, pnpm/crates/cli/src/cli_args/outdated.rs, pnpm11/installing/commands/src/update/*, pnpm11/installing/commands/package.json, pnpm11/installing/commands/tsconfig.json, pnpm/crates/cli/src/cli_args/update.rs
The commands scan global packages, identify outdated dependencies, load group lockfiles, render sanitized choices, and handle prompt cancellation.
Command wiring and validation
pnpm/crates/cli/tests/global.rs, pnpm11/global/commands/test/globalUpdate.test.ts, pnpm11/installing/commands/test/update/interactive.ts, .changeset/friendly-global-groups.md
Interactive selection is connected to global updates. Tests cover empty states, cancellation, selectors, lockfiles, and selective updates. Release metadata documents the feature.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UpdateCommand
  participant GlobalGroupSelector
  participant User
  participant GlobalUpdateHandler
  UpdateCommand->>GlobalGroupSelector: discover outdated global groups
  GlobalGroupSelector->>User: show selectable update groups
  User-->>GlobalGroupSelector: choose package-group hashes
  GlobalGroupSelector-->>UpdateCommand: return selected hashes
  UpdateCommand->>GlobalUpdateHandler: update selected groups
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement interactive global update selection in pnpm and pacquet [#13360] ✅
Update only the selected global package groups [#13360] ✅
Remove the inconsistent ignored or unsupported interactive behavior [#13360] ✅

Possibly related PRs

  • pnpm/pnpm#13024: Both PRs modify handleGlobalUpdate and global package selection.
  • pnpm/pnpm#13427: Both PRs modify interactive update sanitization and choice display handling.

Suggested labels: product: pacquet, product: pnpm@11

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-13360

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.13%. Comparing base (f2fa9c9) to head (f614e4e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/update_interactive.rs 79.31% 18 Missing ⚠️
pnpm/crates/cli/src/cli_args/global.rs 0.00% 5 Missing ⚠️
pnpm/crates/cli/src/cli_args/update.rs 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13428      +/-   ##
==========================================
+ Coverage   88.11%   88.13%   +0.01%     
==========================================
  Files         609      611       +2     
  Lines       99150    99372     +222     
==========================================
+ Hits        87366    87578     +212     
- Misses      11784    11794      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings July 27, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 27, 2026
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 527a577

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Copilot AI review requested due to automatic review settings July 27, 2026 11:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 2a8386e

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: f7115d4f11a0

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.786 ± 0.176 2.559 3.068 1.71 ± 0.23
pacquet@main 2.722 ± 0.191 2.507 3.059 1.67 ± 0.23
pnpr@HEAD 1.629 ± 0.198 1.438 1.932 1.00
pnpr@main 1.662 ± 0.176 1.421 1.938 1.02 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.78592133414,
      "stddev": 0.17556321975979455,
      "median": 2.7574373105400003,
      "user": 2.54278326,
      "system": 1.91174508,
      "min": 2.55915971004,
      "max": 3.06754013704,
      "times": [
        2.69009673204,
        2.55915971004,
        2.61232148204,
        2.67465264404,
        2.96035172504,
        2.8247778890400004,
        2.8962495770400003,
        2.94650185804,
        2.62756158704,
        3.06754013704
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.72228937514,
      "stddev": 0.1911821779108189,
      "median": 2.72119687104,
      "user": 2.34019736,
      "system": 1.8129953800000003,
      "min": 2.50683887404,
      "max": 3.05944697304,
      "times": [
        2.8791202640400004,
        2.73359380104,
        2.70879994104,
        2.59087497704,
        2.52380624204,
        2.50683887404,
        2.53106361104,
        2.94657383304,
        2.7427752350400003,
        3.05944697304
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6289423276400001,
      "stddev": 0.19833617484290317,
      "median": 1.5613008390400003,
      "user": 1.5236752599999996,
      "system": 1.60292328,
      "min": 1.43774384104,
      "max": 1.9322750480400002,
      "times": [
        1.8525711940400003,
        1.4661008480400002,
        1.9322750480400002,
        1.6221911260400002,
        1.89103732404,
        1.43774384104,
        1.4693745960400002,
        1.4397051850400002,
        1.5004105520400002,
        1.6780135620400003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66211391384,
      "stddev": 0.17615276929743215,
      "median": 1.6877128895400002,
      "user": 1.3920780599999998,
      "system": 1.49536648,
      "min": 1.4212942800400001,
      "max": 1.9383181560400002,
      "times": [
        1.4212942800400001,
        1.9383181560400002,
        1.7140621770400002,
        1.78450863104,
        1.46982882304,
        1.7517124100400001,
        1.4646597970400002,
        1.56776584304,
        1.84762541904,
        1.6613636020400002
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 337.8 ± 27.7 309.6 400.4 1.00
pacquet@main 373.1 ± 26.1 343.4 424.1 1.10 ± 0.12
pnpr@HEAD 387.9 ± 15.7 371.4 421.4 1.15 ± 0.10
pnpr@main 384.0 ± 20.8 359.5 420.8 1.14 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.33781692864,
      "stddev": 0.02765238351219017,
      "median": 0.33251358424,
      "user": 0.2892038,
      "system": 0.64962654,
      "min": 0.30959785374,
      "max": 0.40037378774,
      "times": [
        0.31891240774,
        0.31227349374,
        0.32504933574,
        0.34293999374,
        0.30959785374,
        0.32186559974,
        0.34318648674,
        0.36399249474,
        0.33997783274,
        0.40037378774
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.37307703884,
      "stddev": 0.026076186305571368,
      "median": 0.37010601424,
      "user": 0.3332919,
      "system": 0.6998799399999999,
      "min": 0.34339770474,
      "max": 0.42406444774,
      "times": [
        0.36117834474,
        0.34739950174,
        0.34339770474,
        0.38915683074,
        0.42406444774,
        0.38300178774,
        0.39665698674,
        0.34574397374,
        0.37903368374,
        0.36113712674
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.38793885444000004,
      "stddev": 0.01573448933414872,
      "median": 0.38105886324,
      "user": 0.3415444,
      "system": 0.7005894399999999,
      "min": 0.37142271874,
      "max": 0.42142459574,
      "times": [
        0.38008028474,
        0.39347060474,
        0.42142459574,
        0.37507571974,
        0.37142271874,
        0.40056897574,
        0.37984665474,
        0.37515390574,
        0.40030764274,
        0.38203744174
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.38398355754,
      "stddev": 0.020755377248605916,
      "median": 0.37950263674,
      "user": 0.3146788,
      "system": 0.7219817399999999,
      "min": 0.35953607074,
      "max": 0.42081337374,
      "times": [
        0.38222885174,
        0.41380592574,
        0.39928993574,
        0.42081337374,
        0.37247718474,
        0.36692278374,
        0.36575617574,
        0.37908016074,
        0.37992511274,
        0.35953607074
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.908 ± 0.051 2.845 2.983 1.77 ± 0.16
pacquet@main 2.939 ± 0.089 2.827 3.079 1.79 ± 0.17
pnpr@HEAD 1.727 ± 0.126 1.546 1.920 1.05 ± 0.12
pnpr@main 1.642 ± 0.144 1.506 1.949 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.90821726684,
      "stddev": 0.050787413248894964,
      "median": 2.90027336024,
      "user": 2.29486174,
      "system": 1.92766962,
      "min": 2.8447453247400003,
      "max": 2.9833140947400003,
      "times": [
        2.95670936474,
        2.9833140947400003,
        2.94615562774,
        2.88090075274,
        2.86165897074,
        2.85696826674,
        2.8447453247400003,
        2.91964596774,
        2.96054549174,
        2.87152880674
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.93930000864,
      "stddev": 0.0890536492804928,
      "median": 2.95932208574,
      "user": 2.3901423399999997,
      "system": 1.94587772,
      "min": 2.82690758174,
      "max": 3.0785999797400003,
      "times": [
        2.82690758174,
        2.84639658574,
        2.85796489074,
        2.85244889374,
        2.9645403637400003,
        3.00334360074,
        3.04415401874,
        3.0785999797400003,
        2.9566686787400003,
        2.96197549274
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7273396268399999,
      "stddev": 0.12570797225171526,
      "median": 1.71927170324,
      "user": 1.7501199399999998,
      "system": 1.87067522,
      "min": 1.54640115274,
      "max": 1.92041769374,
      "times": [
        1.70353814674,
        1.54640115274,
        1.57455058574,
        1.79029207874,
        1.88878434774,
        1.79770998974,
        1.72783762074,
        1.92041769374,
        1.7107057857399999,
        1.6131588667399999
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6420840131399999,
      "stddev": 0.14361177496167732,
      "median": 1.56972685724,
      "user": 1.42238544,
      "system": 1.51817502,
      "min": 1.50578731574,
      "max": 1.94908331774,
      "times": [
        1.69664536674,
        1.71447739874,
        1.52910200374,
        1.57858856174,
        1.50578731574,
        1.56086515274,
        1.79337735874,
        1.94908331774,
        1.54788286374,
        1.54503079174
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 493.9 ± 27.4 455.9 529.3 1.25 ± 0.12
pacquet@main 613.7 ± 49.5 519.8 669.4 1.55 ± 0.17
pnpr@HEAD 463.4 ± 48.9 388.7 550.8 1.17 ± 0.15
pnpr@main 395.6 ± 30.3 339.8 449.8 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.49388111198000006,
      "stddev": 0.027395372245381577,
      "median": 0.5011484160799999,
      "user": 0.6771038199999999,
      "system": 0.8084746599999999,
      "min": 0.45590622758,
      "max": 0.52927139558,
      "times": [
        0.51683128658,
        0.47653520758,
        0.52927139558,
        0.49343527558,
        0.46897852658,
        0.51641567458,
        0.51599096358,
        0.45658500558,
        0.45590622758,
        0.50886155658
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.61373938558,
      "stddev": 0.04950915660790267,
      "median": 0.61873105958,
      "user": 0.8562808199999999,
      "system": 0.94852856,
      "min": 0.51982091758,
      "max": 0.66940502658,
      "times": [
        0.66940502658,
        0.61307817658,
        0.55142323358,
        0.51982091758,
        0.61343313258,
        0.65567866758,
        0.58261235558,
        0.64424327258,
        0.66367008658,
        0.6240289865800001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.4634470411800001,
      "stddev": 0.04886638677301015,
      "median": 0.46609446758000006,
      "user": 0.33910762,
      "system": 0.7353917600000001,
      "min": 0.38865473858,
      "max": 0.55079665158,
      "times": [
        0.45983222558000003,
        0.42405973158,
        0.48151637958,
        0.47400965258,
        0.47235670958000003,
        0.52314467958,
        0.55079665158,
        0.44403258358000003,
        0.38865473858,
        0.41606705958
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.39557186477999995,
      "stddev": 0.030303481930035132,
      "median": 0.39438081208,
      "user": 0.28220532,
      "system": 0.6604299600000001,
      "min": 0.33979714358,
      "max": 0.44978491458000003,
      "times": [
        0.40476363358,
        0.41928859658,
        0.41662454958,
        0.37963279958,
        0.39713620058,
        0.39019256558,
        0.44978491458000003,
        0.39162542358,
        0.36687282058,
        0.33979714358
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.881 ± 0.051 1.817 1.970 4.15 ± 0.37
pacquet@main 1.829 ± 0.047 1.779 1.955 4.04 ± 0.36
pnpr@HEAD 0.455 ± 0.051 0.396 0.554 1.00 ± 0.14
pnpr@main 0.453 ± 0.039 0.406 0.530 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8811235357599998,
      "stddev": 0.05099699874165878,
      "median": 1.8873570481600002,
      "user": 0.99685848,
      "system": 0.9050892999999999,
      "min": 1.81723127366,
      "max": 1.96958444266,
      "times": [
        1.90180323166,
        1.91414940166,
        1.9018727226599998,
        1.92997509266,
        1.8543875726599999,
        1.82309599666,
        1.96958444266,
        1.8729108646600001,
        1.82622475866,
        1.81723127366
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.8291207875599997,
      "stddev": 0.04733207006329402,
      "median": 1.81797985766,
      "user": 0.8998461799999999,
      "system": 0.8369857999999999,
      "min": 1.77881037266,
      "max": 1.95475051866,
      "times": [
        1.83502127366,
        1.83558050666,
        1.77881037266,
        1.79518405566,
        1.8183331376599998,
        1.95475051866,
        1.81762657766,
        1.81482809766,
        1.82374334666,
        1.81732998866
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.45511425826000007,
      "stddev": 0.05142604407320434,
      "median": 0.44138986465999996,
      "user": 0.34434568,
      "system": 0.7078595,
      "min": 0.39563549766,
      "max": 0.55397211566,
      "times": [
        0.40564620066,
        0.44074902266,
        0.41751597266,
        0.45310876766,
        0.5029543726600001,
        0.5117822166600001,
        0.55397211566,
        0.42774770966000003,
        0.44203070666,
        0.39563549766
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.45305511436,
      "stddev": 0.03892311154567219,
      "median": 0.44391031066,
      "user": 0.33507548000000004,
      "system": 0.752544,
      "min": 0.40624284266,
      "max": 0.5295561266600001,
      "times": [
        0.5295561266600001,
        0.46518507866000003,
        0.42904422166,
        0.42966392766,
        0.45713884666,
        0.43121727366,
        0.42041438966,
        0.40624284266,
        0.5054850886600001,
        0.45660334766
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 310.3 ± 28.2 266.9 343.8 2.87 ± 0.32
pacquet@main 316.6 ± 37.5 251.4 371.4 2.93 ± 0.39
pnpr@HEAD 108.2 ± 6.7 96.9 128.2 1.00
pnpr@main 109.5 ± 9.9 94.8 130.4 1.01 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.31026960768,
      "stddev": 0.02823153586183287,
      "median": 0.30967997838000005,
      "user": 0.28766522,
      "system": 0.11519937999999999,
      "min": 0.26687962038,
      "max": 0.34377900038,
      "times": [
        0.33322925438,
        0.34377900038,
        0.33895597938,
        0.29695599738,
        0.30603918338,
        0.26687962038,
        0.31332077338000003,
        0.26878529838,
        0.29748629638,
        0.33726467338
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.31661701858,
      "stddev": 0.03747729899210552,
      "median": 0.31285964588,
      "user": 0.29181051999999996,
      "system": 0.11138968,
      "min": 0.25135210938,
      "max": 0.37140867038,
      "times": [
        0.30692894738,
        0.36078750938,
        0.29247671238,
        0.29931828638,
        0.34979366838,
        0.31879034438,
        0.37140867038,
        0.33201295438,
        0.25135210938,
        0.28330098338
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10823837986,
      "stddev": 0.0066785977913337985,
      "median": 0.10758844338000001,
      "user": 0.033810440000000004,
      "system": 0.014496580000000004,
      "min": 0.09689699438,
      "max": 0.12817827538,
      "times": [
        0.11297597138,
        0.10913141138,
        0.11294100538,
        0.11511547038,
        0.10951531438,
        0.10701789138000001,
        0.09974503338,
        0.10488646538,
        0.11027203438000001,
        0.11087681338000001,
        0.11382470338,
        0.11812241438,
        0.11218664038000001,
        0.10494100938,
        0.10491692338,
        0.10417933438,
        0.10266404138,
        0.10318017438,
        0.10513664738,
        0.10861304138,
        0.10758844338000001,
        0.10419274038000001,
        0.09886070238,
        0.09689699438,
        0.12817827538
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10945791902285713,
      "stddev": 0.009890469452794157,
      "median": 0.10720964938,
      "user": 0.032218798571428564,
      "system": 0.01736186571428571,
      "min": 0.09477894738,
      "max": 0.13039350738000002,
      "times": [
        0.10116214538,
        0.10074282538,
        0.10277754638,
        0.10863188738,
        0.11052303738000001,
        0.11866913338,
        0.10508986938,
        0.12729544338,
        0.12295673538,
        0.11885018438,
        0.10578741138,
        0.10487888138,
        0.10317479338,
        0.09840999338,
        0.10980300238,
        0.12170560938000001,
        0.12316301438,
        0.10942375938,
        0.13039350738000002,
        0.09803684138,
        0.10202758438000001,
        0.09477894738,
        0.10038359938000001,
        0.12197993738,
        0.11220226938,
        0.10955809138,
        0.10200113438,
        0.10041454738
      ]
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.390 ± 0.556 0.749 2.543 1.29 ± 0.58
pacquet@main 1.075 ± 0.224 0.814 1.449 1.00
pnpm@HEAD 3.556 ± 0.376 3.153 4.382 3.31 ± 0.77
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.3897034450577779,
      "stddev": 0.5563291871319369,
      "median": 1.26295346328,
      "user": 1.2948251533333333,
      "system": 0.27517246444444443,
      "min": 0.74943799328,
      "max": 2.54344871228,
      "times": [
        0.92366777328,
        1.03412654628,
        1.26295346328,
        1.92717822228,
        2.54344871228,
        1.53781566728,
        0.74943799328,
        1.13586608328,
        1.39283654428
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.0748017449466665,
      "stddev": 0.22426855167432558,
      "median": 1.11146327328,
      "user": 1.0090298199999999,
      "system": 0.19676479777777775,
      "min": 0.81448969128,
      "max": 1.44851978628,
      "times": [
        1.16366168328,
        0.89096233028,
        1.17826792128,
        1.11146327328,
        1.44851978628,
        0.81448969128,
        0.91518781828,
        0.83478636228,
        1.31587683828
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.555744420280001,
      "stddev": 0.3758702820771515,
      "median": 3.4579705892800003,
      "user": 5.377977931111111,
      "system": 0.33928335333333337,
      "min": 3.15332859128,
      "max": 4.38233478628,
      "times": [
        3.54611529328,
        3.4579705892800003,
        3.3558614552800003,
        3.24008358828,
        3.89669323228,
        3.5533475782800004,
        4.38233478628,
        3.41596466828,
        3.15332859128
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.554 ± 0.124 4.428 4.770 1.30 ± 0.05
pacquet@main 4.518 ± 0.092 4.426 4.702 1.29 ± 0.04
pnpr@HEAD 3.510 ± 0.088 3.450 3.711 1.00
pnpr@main 3.526 ± 0.087 3.455 3.715 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.55404027112,
      "stddev": 0.12367080243352403,
      "median": 4.49980041132,
      "user": 1.8663423599999998,
      "system": 1.39638778,
      "min": 4.42845199782,
      "max": 4.77034821182,
      "times": [
        4.47941606482,
        4.47223088782,
        4.76105643882,
        4.52018475782,
        4.53998969082,
        4.47649001582,
        4.62513701282,
        4.77034821182,
        4.46709763282,
        4.42845199782
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.51781275342,
      "stddev": 0.0916863445873839,
      "median": 4.48174864632,
      "user": 1.7892168599999998,
      "system": 1.3686858799999997,
      "min": 4.42627839582,
      "max": 4.70178124582,
      "times": [
        4.4485997488199995,
        4.49164827382,
        4.54544046382,
        4.44808877682,
        4.65024712682,
        4.70178124582,
        4.52730478182,
        4.46688970182,
        4.4718490188199995,
        4.42627839582
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.50999797172,
      "stddev": 0.08750802758480125,
      "median": 3.46973092782,
      "user": 1.1541953599999997,
      "system": 1.28091878,
      "min": 3.44964366382,
      "max": 3.71073789682,
      "times": [
        3.71073789682,
        3.45580161682,
        3.47342125782,
        3.44964366382,
        3.51492888982,
        3.49055963482,
        3.62333540982,
        3.4519992138199997,
        3.46351153582,
        3.46604059782
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.52630851682,
      "stddev": 0.08652676827632982,
      "median": 3.49519865082,
      "user": 1.15451346,
      "system": 1.24793788,
      "min": 3.45478843682,
      "max": 3.71544853482,
      "times": [
        3.60507362682,
        3.45636800182,
        3.71544853482,
        3.46534498782,
        3.4690818658199998,
        3.49274597182,
        3.45478843682,
        3.50328122282,
        3.49765132982,
        3.60330118982
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13428
Testbedpacquet

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
266.88 ms
(+20.79%)Baseline: 220.94 ms
265.13 ms
(100.66%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,844.75 ms
(+4.15%)Baseline: 2,731.29 ms
3,277.55 ms
(86.79%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,817.23 ms
(-1.29%)Baseline: 1,840.90 ms
2,209.08 ms
(82.26%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
455.91 ms
(-4.32%)Baseline: 476.50 ms
571.81 ms
(79.73%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
266.88 ms
(+20.79%)Baseline: 220.94 ms
265.13 ms
(100.66%)

isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,559.16 ms
(+3.61%)Baseline: 2,469.89 ms
2,963.87 ms
(86.35%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,428.45 ms
(-2.17%)Baseline: 4,526.61 ms
5,431.93 ms
(81.53%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
309.60 ms
(+2.30%)Baseline: 302.63 ms
363.15 ms
(85.25%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
749.44 ms
(+1.48%)Baseline: 738.53 ms
886.24 ms
(84.56%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13428
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,474.15 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.43 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
315.11 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
88.72 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,372.13 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,483.66 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
277.51 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings August 6, 2026 09:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review qodo-code-review Bot mentioned this pull request Nov 2, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update --global --interactive does not prompt: pnpm ignores the flag, pacquet errors

3 participants