Skip to content

feat(cli): support --store-dir in pacquet - #12889

Merged
zkochan merged 5 commits into
pnpm:mainfrom
Stanzilla:stanzilla/investigate-pacquet-store-dir
Jul 10, 2026
Merged

zkochan merged 5 commits into
pnpm:mainfrom
Stanzilla:stanzilla/investigate-pacquet-store-dir

Conversation

@Stanzilla

@Stanzilla Stanzilla commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add pnpm-compatible --store-dir support to the Rust pacquet CLI. Related to #11633.

  • Accept --store-dir globally, before or after subcommands, together with the dotted --config.store-dir form.
  • Resolve relative paths from the workspace root, expand quoted ~/ paths, and preserve pnpm's single-v11 store layout.
  • Expose the raw CLI value to updateConfig hooks and recompute global virtual store paths when hooks replace it.
  • Treat hook-returned null virtual-store values as explicit clears and re-derive their defaults.
  • Treat an explicit empty value as a request to restore the platform's volume-aware default store while still exposing "" to hooks.
  • Cover regular and frozen installs, nested workspaces, global virtual stores, hooks, dotted options, and empty overrides.

The TypeScript CLI already implements this behavior; this change brings pacquet into parity.

No changeset is included. This is a pacquet-only parity change, pacquet's Rust crates and native wrapper are not released through the root Changesets workspace, and the published TypeScript pnpm package already exposes this flag.

Validation:

  • typos pacquet pnpr
  • cargo fmt
  • just check
  • just test (5,605 passed, 3 skipped)
  • just lint
  • Full pre-push hook: TypeScript compile/lint/spell/meta checks and Rust fmt, clippy, docs, dylint, and Taplo

The unscoped just ready command was also run. Its typos step currently scans pnpm11/ and cspell.json, unlike CI's pacquet pnpr scope, and fails on existing commit hashes and spelling fixtures. The CI-scoped spelling check and every remaining just ready step pass.

Squash Commit Body

Accept global and dotted store directory overrides with pnpm-compatible path and config precedence.

Expose overrides to updateConfig hooks and keep global virtual store derivation in sync. Preserve the raw empty CLI value for hooks while restoring the platform's volume-aware default store for the effective configuration.

Cover workspace-relative paths, quoted home paths, frozen installs, global virtual stores, hook replacement, and empty overrides.

Related to pnpm/pnpm#11633

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust pacquet/ port, or the description notes what still needs porting.
  • Added or updated tests.

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

Summary by CodeRabbit

  • New Features
    • Added global --store-dir / store-dir support to override the configured store location (including --config.store-dir), with relative paths, ~/..., and empty values (--store-dir=).
    • Install behavior, store path, derived virtual store locations, and updateConfig hook inputs now reflect the CLI-selected store directory.
  • Bug Fixes
    • Clearing an explicit store directory now reliably restores the platform default store location, including the install “up to date” fast path.
    • Hook-driven virtualStoreDir / globalVirtualStoreDir set to null now resets derived paths and clears related explicit settings.

Accept global and dotted forms with pnpm-compatible path and config precedence.

Expose overrides to updateConfig hooks and keep global virtual store derivation in sync.

Cover workspace, frozen install, and empty override behavior.

Related to pnpm#11633
@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: c94f34f6-108e-49f6-b886-062bd11a6614

📥 Commits

Reviewing files that changed from the base of the PR and between c2e9a2f and 367463f.

📒 Files selected for processing (3)
  • pacquet/crates/cli/src/config_deps.rs
  • pacquet/crates/cli/src/config_deps/tests.rs
  • pacquet/crates/cli/tests/store.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • pacquet/crates/cli/tests/store.rs
  • pacquet/crates/cli/src/config_deps.rs

📝 Walkthrough

Walkthrough

Adds a global --store-dir option, resolves relative, home-relative, absolute, and empty forms, applies it through command and updateConfig flows, recalculates derived virtual store paths, and adds parsing and integration coverage.

Changes

Store directory override

Layer / File(s) Summary
CLI store-dir parsing and extraction
pacquet/crates/cli/src/cli_args/cli_command.rs, pacquet/crates/cli/src/config_overrides.rs, pacquet/crates/cli/src/cli_args/tests.rs, pacquet/crates/cli/src/config_overrides/tests.rs
Adds the global --store-dir option, preserves dotted config syntax for clap parsing, recognizes value consumption, and tests placement and empty-value parsing.
Store directory resolution and reset
pacquet/crates/cli/src/config_overrides.rs, pacquet/crates/config/src/lib.rs, pacquet/crates/cli/src/config_overrides/tests.rs
Resolves store directories relative to the workspace or home, records explicit settings, resets empty overrides to defaults, and recalculates derived virtual store paths.
Command and updateConfig application
pacquet/crates/cli/src/cli_args/dispatch.rs, pacquet/crates/cli/src/config_deps.rs, pacquet/crates/cli/src/config_deps/tests.rs
Applies store directory overrides during normal and fast-path configuration loading, exposes the value to updateConfig, and reapplies hook-generated store directory changes.
Install and store command validation
pacquet/crates/cli/tests/install.rs, pacquet/crates/cli/tests/store.rs, pacquet/crates/cli/tests/config_dependencies.rs
Tests store selection for installs, frozen lockfiles, global virtual stores, store path, home expansion, empty values, and updateConfig replacements.

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

Sequence Diagram(s)

sequenceDiagram
  participant CliArgs
  participant ConfigOverrides
  participant Host
  participant updateConfig
  CliArgs->>ConfigOverrides: Apply store_dir override
  ConfigOverrides->>Host: Update store_dir and derived paths
  Host->>updateConfig: Provide explicit storeDir
  updateConfig->>Host: Return storeDir changes
  Host->>ConfigOverrides: Reapply hook storeDir override
Loading

Possibly related PRs

  • pnpm/pnpm#11730: Refactors related Config store-directory default and resolution plumbing.
  • pnpm/pnpm#11804: Updates related explicit-versus-default storeDir handling.
  • pnpm/pnpm#11806: Changes the related CLI config_overrides argument-processing pipeline.

Suggested labels: product: pacquet

Suggested reviewers: zkochan, qodo-code-review

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Stanzilla
Stanzilla marked this pull request as ready for review July 9, 2026 22:38
@Stanzilla
Stanzilla requested a review from zkochan as a code owner July 9, 2026 22:38
Copilot AI review requested due to automatic review settings July 9, 2026 22:38
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@codecov-commenter

codecov-commenter commented Jul 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.60000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.35%. Comparing base (fecfe83) to head (367463f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pacquet/crates/cli/src/config_overrides.rs 92.45% 4 Missing ⚠️
pacquet/crates/cli/src/config_deps.rs 90.90% 3 Missing ⚠️
pacquet/crates/cli/src/cli_args/dispatch.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12889      +/-   ##
==========================================
+ Coverage   85.34%   85.35%   +0.01%     
==========================================
  Files         453      453              
  Lines       71074    71178     +104     
==========================================
+ Hits        60657    60756      +99     
- Misses      10417    10422       +5     

☔ 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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (2)
pacquet/crates/cli/tests/config_dependencies.rs (1)

219-219: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add logging before the assert! per CODE_STYLE_GUIDE.

The guide requires useful context before non-assert_eq! assertions. If index.db is missing, the panic message won't show which path was checked.

♻️ Suggested logging
+ eprintln!("Checking for index.db in hook store: {}", hook_store.join("index.db").display());
 assert!(hook_store.join("index.db").is_file());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pacquet/crates/cli/tests/config_dependencies.rs` at line 219, Add a logging
statement immediately before the `assert!` checking
`hook_store.join("index.db").is_file()` in the relevant test, including the
fully resolved path being validated; retain the assertion afterward so failures
provide useful context about the missing file.

Source: Path instructions

pacquet/crates/cli/tests/store.rs (1)

108-135: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add logging before the assert! at line 117 per CODE_STYLE_GUIDE.

The guide requires useful context before non-assert_eq! assertions. If the default store path command fails, the panic won't show stderr/stdout for debugging.

♻️ Suggested logging
+ eprintln!("default stderr={}", String::from_utf8_lossy(&default_output.stderr));
 assert!(default_output.status.success());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pacquet/crates/cli/tests/store.rs` around lines 108 - 135, Add diagnostic
logging before the non-equality assertion on default_store output in
empty_store_dir_override_restores_the_platform_default. Include the command’s
status and captured stdout/stderr so failures provide actionable context,
following CODE_STYLE_GUIDE.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pacquet/crates/cli/src/config_overrides.rs`:
- Around line 18-19: Replace the hard-coded Host provider in the empty store-dir
branch with the injected Sys provider, adding any required capability bounds to
the surrounding generic function or impl. Update related default-reset logic to
preserve the same provider throughout, and add a test using a fake Sys
implementation that verifies an empty override resets to the expected default
without relying on process-global state.

---

Nitpick comments:
In `@pacquet/crates/cli/tests/config_dependencies.rs`:
- Line 219: Add a logging statement immediately before the `assert!` checking
`hook_store.join("index.db").is_file()` in the relevant test, including the
fully resolved path being validated; retain the assertion afterward so failures
provide useful context about the missing file.

In `@pacquet/crates/cli/tests/store.rs`:
- Around line 108-135: Add diagnostic logging before the non-equality assertion
on default_store output in
empty_store_dir_override_restores_the_platform_default. Include the command’s
status and captured stdout/stderr so failures provide actionable context,
following CODE_STYLE_GUIDE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c3946d55-d8ca-41b7-8903-bc2b2fe301a1

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1e4c0 and be458a4.

📒 Files selected for processing (10)
  • pacquet/crates/cli/src/cli_args/cli_command.rs
  • pacquet/crates/cli/src/cli_args/dispatch.rs
  • pacquet/crates/cli/src/cli_args/tests.rs
  • pacquet/crates/cli/src/config_deps.rs
  • pacquet/crates/cli/src/config_overrides.rs
  • pacquet/crates/cli/src/config_overrides/tests.rs
  • pacquet/crates/cli/tests/config_dependencies.rs
  • pacquet/crates/cli/tests/install.rs
  • pacquet/crates/cli/tests/store.rs
  • pacquet/crates/config/src/lib.rs

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.

Pull request overview

This PR adds pnpm-compatible --store-dir support to the Rust pacquet CLI, bringing it into parity with pnpm’s CLI behavior around store directory overrides (including dotted --config.store-dir), path resolution, and updateConfig hook visibility.

Changes:

  • Adds a global --store-dir CLI option (and rewrites dotted --config.store-dir=... into it) so it can be provided before/after subcommands.
  • Implements pnpm-compatible store-dir override semantics: workspace-root-relative resolution, ~/ expansion, and explicit-empty override restoring the platform default while still exposing "" to hooks.
  • Updates config-hook plumbing and adds coverage across store path, installs (including frozen), global virtual store derivation, and hook replacement.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pacquet/crates/config/src/lib.rs Adds store-dir reset helper and factors default-store resolution into a shared routine.
pacquet/crates/cli/src/cli_args/cli_command.rs Introduces global --store-dir argument parsing.
pacquet/crates/cli/src/cli_args/dispatch.rs Applies --store-dir override during config loading and fast-path evaluation.
pacquet/crates/cli/src/config_overrides.rs Rewrites --config.store-dir=... into --store-dir=... and ensures argv parsing treats it as consuming a value.
pacquet/crates/cli/src/config_overrides/tests.rs Adds unit tests for dotted rewrite and store-dir resolution behavior.
pacquet/crates/cli/src/config_deps.rs Ensures updateConfig hooks can observe/replace storeDir and keeps derived paths in sync.
pacquet/crates/cli/tests/store.rs Adds integration coverage for store path output with global/dotted overrides and ~/ expansion.
pacquet/crates/cli/tests/install.rs Adds install/frozen/GVS integration coverage for --store-dir.
pacquet/crates/cli/tests/config_dependencies.rs Adds end-to-end tests for updateConfig observing/replacing storeDir and observing explicit empty storeDir.
pacquet/crates/cli/src/cli_args/tests.rs Verifies global parsing of --store-dir and explicit empty value parsing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pacquet/crates/cli/src/config_deps.rs Resolved
Use the injected system provider when restoring the default store and cover it with a hermetic fake.

Avoid duplicate global virtual store derivation and improve test failure diagnostics.
Copilot AI review requested due to automatic review settings July 9, 2026 22:59
@Stanzilla

Copy link
Copy Markdown
Contributor Author

Addressed all current review feedback in 9f1c3d0c94:

  • thread the injected system provider through empty store-dir default resolution and add hermetic fake-provider coverage;
  • avoid duplicate global virtual store derivation after updateConfig changes storeDir;
  • add the requested diagnostics before non-equality test assertions.

Validated with the focused config override, hook, and store integration tests; pacquet CLI clippy; formatting; full perfectionist dylint; and the complete pre-push hook.


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

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Comment thread pacquet/crates/cli/tests/install.rs Resolved
Comment thread pacquet/crates/cli/tests/install.rs Resolved
Comment thread pacquet/crates/cli/tests/install.rs Resolved
Comment thread pacquet/crates/cli/tests/install.rs Resolved
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 9, 2026
Copilot AI review requested due to automatic review settings July 9, 2026 23:14

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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread pacquet/crates/cli/src/config_deps.rs Resolved
Comment thread pacquet/crates/cli/tests/store.rs Resolved
Copilot AI review requested due to automatic review settings July 9, 2026 23: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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 367463fde292

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.244 ± 0.409 3.822 5.192 1.50 ± 0.32
pacquet@main 4.272 ± 0.419 3.751 5.058 1.51 ± 0.32
pnpr@HEAD 3.339 ± 1.032 2.182 5.213 1.18 ± 0.43
pnpr@main 2.827 ± 0.529 2.135 4.060 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.24385120626,
      "stddev": 0.40865812113587774,
      "median": 4.15766182706,
      "user": 3.3643069599999995,
      "system": 1.91447902,
      "min": 3.82242924006,
      "max": 5.19169459406,
      "times": [
        4.01733364306,
        4.06108229206,
        3.82242924006,
        4.29050355806,
        4.29588955806,
        4.07939817006,
        5.19169459406,
        4.23592548406,
        3.82883459506,
        4.61542092806
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.272210687359999,
      "stddev": 0.41885431455306155,
      "median": 4.256392030060001,
      "user": 3.3579356600000003,
      "system": 1.88330392,
      "min": 3.7511335590600003,
      "max": 5.05784916406,
      "times": [
        3.85288978306,
        3.7511335590600003,
        3.76679008206,
        4.54436488506,
        4.15150090206,
        4.6419907270600005,
        5.05784916406,
        4.44280371106,
        4.2119918290600005,
        4.30079223106
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.33903860136,
      "stddev": 1.0317276589054947,
      "median": 3.24260251006,
      "user": 2.28682026,
      "system": 1.5475595199999999,
      "min": 2.1823316200600003,
      "max": 5.21336700406,
      "times": [
        3.21086399206,
        2.58267057606,
        2.1823316200600003,
        2.22422112706,
        3.2743410280600003,
        3.7228110560600003,
        5.21336700406,
        2.46968042706,
        4.65023142306,
        3.85986776006
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.82671085426,
      "stddev": 0.5286167536725479,
      "median": 2.87262797856,
      "user": 2.2516216599999996,
      "system": 1.5713318199999997,
      "min": 2.13531048506,
      "max": 4.05981115506,
      "times": [
        2.8785551060600003,
        2.86670085106,
        3.00994030106,
        2.39051872906,
        2.39356400006,
        2.9820724960600002,
        2.58665047106,
        4.05981115506,
        2.13531048506,
        2.9639849480600002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 823.2 ± 265.9 559.3 1444.0 1.35 ± 0.46
pacquet@main 608.3 ± 70.7 532.1 728.8 1.00
pnpr@HEAD 904.9 ± 214.1 600.9 1391.7 1.49 ± 0.39
pnpr@main 749.0 ± 136.6 562.5 954.3 1.23 ± 0.27
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8232027782800001,
      "stddev": 0.26586873299217656,
      "median": 0.71621999158,
      "user": 0.32300713999999997,
      "system": 0.6744748199999999,
      "min": 0.55925755608,
      "max": 1.44399494308,
      "times": [
        0.6417293930800001,
        0.6673191890800001,
        0.8208369560800001,
        0.64807932708,
        1.44399494308,
        0.55925755608,
        0.7241996720800001,
        1.03179753608,
        0.9865728990800001,
        0.7082403110800001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.60829696638,
      "stddev": 0.07069555016450278,
      "median": 0.5995032975800001,
      "user": 0.31550033999999993,
      "system": 0.6658636199999999,
      "min": 0.5321311240800001,
      "max": 0.7287839010800001,
      "times": [
        0.6440859710800001,
        0.6485523930800001,
        0.69437014908,
        0.6331988800800001,
        0.7287839010800001,
        0.56580771508,
        0.54674084308,
        0.5321311240800001,
        0.54041688208,
        0.5488818050800001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.9048560786800002,
      "stddev": 0.2140954744281381,
      "median": 0.8979935400800001,
      "user": 0.33386864,
      "system": 0.6950455199999999,
      "min": 0.60093890508,
      "max": 1.39174187108,
      "times": [
        0.9957048220800001,
        0.9032391600800002,
        0.60093890508,
        0.7409231670800001,
        0.9963486230800002,
        0.7529270560800001,
        1.39174187108,
        0.9757085940800001,
        0.8927479200800001,
        0.7982806680800001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7490140288800001,
      "stddev": 0.1365592229324742,
      "median": 0.7090658070800001,
      "user": 0.32821764,
      "system": 0.68447932,
      "min": 0.56250255008,
      "max": 0.9542793290800001,
      "times": [
        0.9542793290800001,
        0.57981901008,
        0.7103113180800001,
        0.7679090530800001,
        0.7078202960800001,
        0.6932118580800001,
        0.56250255008,
        0.7033114830800001,
        0.9532684220800001,
        0.8577069690800001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.123 ± 0.122 3.975 4.366 1.62 ± 0.12
pacquet@main 4.338 ± 0.244 4.026 4.799 1.70 ± 0.15
pnpr@HEAD 2.661 ± 0.265 2.278 3.102 1.04 ± 0.13
pnpr@main 2.547 ± 0.180 2.236 2.856 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.12310468894,
      "stddev": 0.12210414800113505,
      "median": 4.117551113439999,
      "user": 3.2730880399999998,
      "system": 1.8307272399999999,
      "min": 3.97466609044,
      "max": 4.365719598439999,
      "times": [
        4.22986512444,
        4.17765812344,
        4.14783325144,
        4.02336758444,
        4.03152825944,
        3.97466609044,
        4.365719598439999,
        4.08726897544,
        4.18951430244,
        4.0036255794399995
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.33790157414,
      "stddev": 0.24396208753696083,
      "median": 4.413845887439999,
      "user": 3.31341354,
      "system": 1.8031518399999995,
      "min": 4.02610281244,
      "max": 4.79852423944,
      "times": [
        4.0709104604399995,
        4.43423908344,
        4.42469305544,
        4.06893116644,
        4.402998719439999,
        4.19789392544,
        4.51663620244,
        4.438086076439999,
        4.79852423944,
        4.02610281244
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.6609747524400005,
      "stddev": 0.2645142324602633,
      "median": 2.63931338794,
      "user": 2.1233118400000004,
      "system": 1.52837264,
      "min": 2.27820584544,
      "max": 3.10243220444,
      "times": [
        2.84717221344,
        2.64999014744,
        2.4753557014400003,
        2.4061374464400003,
        2.63719099644,
        3.10243220444,
        2.64143577944,
        2.5389725224400004,
        2.27820584544,
        3.03285466744
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.54670153094,
      "stddev": 0.17973600496782402,
      "median": 2.5422017174400002,
      "user": 2.10768634,
      "system": 1.52875954,
      "min": 2.23599931644,
      "max": 2.8562139864400002,
      "times": [
        2.23599931644,
        2.52173824844,
        2.55354388844,
        2.51442165144,
        2.60700922944,
        2.53562564344,
        2.33127905244,
        2.8562139864400002,
        2.54877779144,
        2.76240650144
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.244 ± 0.177 1.143 1.708 2.08 ± 0.32
pacquet@main 1.204 ± 0.071 1.154 1.364 2.02 ± 0.16
pnpr@HEAD 0.600 ± 0.031 0.566 0.651 1.00 ± 0.07
pnpr@main 0.597 ± 0.032 0.566 0.648 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.24398073948,
      "stddev": 0.17659150961998676,
      "median": 1.17283105308,
      "user": 1.1503129999999997,
      "system": 0.89523736,
      "min": 1.1429539705799998,
      "max": 1.7083266015799998,
      "times": [
        1.7083266015799998,
        1.2095330225799998,
        1.1646586855799999,
        1.1429539705799998,
        1.17539163158,
        1.1702704745799999,
        1.18081670158,
        1.1545489705799998,
        1.3766659425799999,
        1.15664139358
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.2043174623800001,
      "stddev": 0.07132013363845865,
      "median": 1.1753254440799998,
      "user": 1.141293,
      "system": 0.88205436,
      "min": 1.15406556458,
      "max": 1.3638227165799999,
      "times": [
        1.19205188758,
        1.15406556458,
        1.15714944858,
        1.1647454955799998,
        1.3040773855799999,
        1.3638227165799999,
        1.1659735085799998,
        1.1594721185799999,
        1.19713911858,
        1.1846773795799999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.5997654131800001,
      "stddev": 0.031396750685642384,
      "median": 0.58775332808,
      "user": 0.29215749999999996,
      "system": 0.6410548599999999,
      "min": 0.5657632315800001,
      "max": 0.65066264458,
      "times": [
        0.5765766975800001,
        0.62972035658,
        0.65066264458,
        0.5657632315800001,
        0.59145041558,
        0.64352306958,
        0.58405624058,
        0.57421156658,
        0.60883542258,
        0.57285448658
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.5968332142799999,
      "stddev": 0.03163148338109195,
      "median": 0.58499827258,
      "user": 0.2890573999999999,
      "system": 0.6395525599999999,
      "min": 0.56620331958,
      "max": 0.6477166105800001,
      "times": [
        0.5972353355800001,
        0.57396905558,
        0.64691925358,
        0.6477166105800001,
        0.5784154905800001,
        0.56655237658,
        0.6237856605800001,
        0.5915810545800001,
        0.57595398558,
        0.56620331958
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.796 ± 0.080 2.707 2.987 4.11 ± 0.76
pacquet@main 2.992 ± 0.400 2.698 4.050 4.40 ± 1.00
pnpr@HEAD 0.680 ± 0.124 0.566 0.936 1.00
pnpr@main 0.706 ± 0.115 0.568 0.905 1.04 ± 0.25
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7964140094200003,
      "stddev": 0.08021742075177582,
      "median": 2.7900435981200005,
      "user": 1.59088948,
      "system": 1.0930140599999998,
      "min": 2.70727241062,
      "max": 2.98650525262,
      "times": [
        2.77691481662,
        2.8174863296200003,
        2.75215390162,
        2.73602580362,
        2.70727241062,
        2.8031723796200003,
        2.72552425662,
        2.8378077476200003,
        2.82127719562,
        2.98650525262
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.99154857002,
      "stddev": 0.3996570353957376,
      "median": 2.9053387181200003,
      "user": 1.58664978,
      "system": 1.0634699600000002,
      "min": 2.69815749762,
      "max": 4.0502786656200005,
      "times": [
        2.98503811662,
        2.79046708962,
        2.69815749762,
        2.74301385362,
        2.92258345262,
        2.7258214666200002,
        2.88809398362,
        2.9257922346200003,
        4.0502786656200005,
        3.18623933962
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.67983232102,
      "stddev": 0.12416765413922018,
      "median": 0.6313531316200001,
      "user": 0.28018548,
      "system": 0.6439619599999998,
      "min": 0.56604203662,
      "max": 0.93601208162,
      "times": [
        0.58292046062,
        0.66027532562,
        0.76622206562,
        0.58311023262,
        0.72214130862,
        0.80276166062,
        0.57640710062,
        0.56604203662,
        0.93601208162,
        0.60243093762
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.70600848352,
      "stddev": 0.11465733614107478,
      "median": 0.6809410891200001,
      "user": 0.28778108,
      "system": 0.6448551599999999,
      "min": 0.56832771062,
      "max": 0.90454997662,
      "times": [
        0.59093416462,
        0.60183502562,
        0.81498906862,
        0.64816015862,
        0.56832771062,
        0.80532688962,
        0.71372201962,
        0.6329729736199999,
        0.77926684762,
        0.90454997662
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 556.0 ± 11.9 546.5 583.2 5.86 ± 0.15
pacquet@main 553.6 ± 7.9 539.1 562.5 5.83 ± 0.12
pnpr@HEAD 95.0 ± 1.4 91.2 97.3 1.00
pnpr@main 95.2 ± 1.3 91.6 96.9 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.55603406154,
      "stddev": 0.01185810394780856,
      "median": 0.5526194413400001,
      "user": 0.5366727200000001,
      "system": 0.09645366,
      "min": 0.54646958384,
      "max": 0.58323539784,
      "times": [
        0.58323539784,
        0.54984269584,
        0.54681883284,
        0.5582868038400001,
        0.5483475438400001,
        0.54692229384,
        0.55539618684,
        0.56881165384,
        0.54646958384,
        0.5562096228400001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5535865630399999,
      "stddev": 0.007867886052043185,
      "median": 0.55596727934,
      "user": 0.53905422,
      "system": 0.09457836,
      "min": 0.5390651308400001,
      "max": 0.56253480784,
      "times": [
        0.54258840184,
        0.55032391684,
        0.5390651308400001,
        0.5601278068400001,
        0.56131817584,
        0.55582446884,
        0.55079868084,
        0.56253480784,
        0.55611008984,
        0.55717415084
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09495568387333334,
      "stddev": 0.0013562189493333777,
      "median": 0.09522006934,
      "user": 0.02288615333333333,
      "system": 0.011696326666666665,
      "min": 0.09116337184000001,
      "max": 0.09729049884,
      "times": [
        0.09281303384,
        0.09553872484,
        0.09566981784,
        0.09484107184,
        0.09635581184,
        0.09439312284000001,
        0.09667902384,
        0.09501424084,
        0.09664352284000001,
        0.09572082384000001,
        0.09521344784,
        0.09487765884,
        0.09503157384000001,
        0.09116337184000001,
        0.09520780184000001,
        0.09522669084,
        0.09526341684,
        0.09317312284,
        0.09479807184,
        0.09546064384,
        0.09440767084,
        0.09604194184,
        0.09581627284000001,
        0.09590838684,
        0.09524685684,
        0.09729049884,
        0.09227904384,
        0.09274794184,
        0.09534052584000001,
        0.09450638184
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09519358294344828,
      "stddev": 0.0013111920679961502,
      "median": 0.09553862184,
      "user": 0.02281134758620689,
      "system": 0.011221135862068965,
      "min": 0.09155961984000001,
      "max": 0.09687844384000001,
      "times": [
        0.09571020884,
        0.09213192584,
        0.09155961984000001,
        0.09666524184,
        0.09322657184000001,
        0.09604459784000001,
        0.09597629984,
        0.09605633284000001,
        0.09472913684,
        0.09687844384000001,
        0.09375451784000001,
        0.09587344184,
        0.09540268884,
        0.09623381284,
        0.09431739984000001,
        0.09639609884,
        0.09640214484000001,
        0.09453314284,
        0.09551363084,
        0.09592935484000001,
        0.09549622684,
        0.09553862184,
        0.09394398684000001,
        0.09608402284,
        0.09443096284000001,
        0.09607491084,
        0.09455263684000001,
        0.09631275984,
        0.09484516384000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 9.433 ± 1.595 7.138 12.327 1.50 ± 0.33
pacquet@main 9.217 ± 1.451 7.272 11.905 1.46 ± 0.31
pnpr@HEAD 6.303 ± 0.877 5.090 7.838 1.00
pnpr@main 8.835 ± 3.595 5.215 17.384 1.40 ± 0.60
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 9.433090894679998,
      "stddev": 1.5945138585491714,
      "median": 9.74347255008,
      "user": 3.44473942,
      "system": 2.0176696199999995,
      "min": 7.13844421408,
      "max": 12.32664026308,
      "times": [
        7.9707946630799995,
        8.48651515508,
        9.74051291208,
        10.599543881079999,
        12.32664026308,
        10.67189805708,
        9.91652660308,
        7.73360101008,
        7.13844421408,
        9.74643218808
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 9.21744125268,
      "stddev": 1.4512451363601906,
      "median": 9.03925674308,
      "user": 3.45502262,
      "system": 2.02429422,
      "min": 7.27224164108,
      "max": 11.90536101808,
      "times": [
        9.80966913308,
        8.19168895008,
        8.43460461408,
        8.32261655208,
        10.404059994079999,
        11.90536101808,
        7.77036799208,
        7.27224164108,
        9.643908872079999,
        10.419893760079999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 6.30251841788,
      "stddev": 0.8773857702573926,
      "median": 5.976047922079999,
      "user": 2.3880370200000005,
      "system": 1.7058752199999998,
      "min": 5.090040226079999,
      "max": 7.83837496908,
      "times": [
        6.020460928079999,
        5.090040226079999,
        5.595723770079999,
        5.93163491608,
        6.172145374079999,
        7.36532743408,
        5.85460166008,
        5.91391824808,
        7.242956653079999,
        7.83837496908
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 8.83468673958,
      "stddev": 3.594523164773304,
      "median": 8.03457598058,
      "user": 2.3694648199999997,
      "system": 1.6820648200000001,
      "min": 5.21499201208,
      "max": 17.38427767108,
      "times": [
        6.27893038808,
        9.20594695408,
        8.72956307408,
        17.38427767108,
        10.54574996108,
        10.95068940008,
        7.186648895079999,
        7.33958888708,
        5.51048015308,
        5.21499201208
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12889
Testbedpacquet

🚨 2 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnprLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
9.43 s
(+38.44%)Baseline: 6.81 s
8.18 s
(115.37%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
823.20 ms
(+29.57%)Baseline: 635.32 ms
762.38 ms
(107.98%)

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
4,123.10 ms
(-3.25%)Baseline: 4,261.49 ms
5,113.79 ms
(80.63%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,796.41 ms
(-7.71%)Baseline: 3,030.17 ms
3,636.21 ms
(76.90%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,243.98 ms
(-8.03%)Baseline: 1,352.54 ms
1,623.04 ms
(76.64%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
556.03 ms
(-13.62%)Baseline: 643.69 ms
772.43 ms
(71.99%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
4,243.85 ms
(+4.65%)Baseline: 4,055.38 ms
4,866.45 ms
(87.21%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
🚨 view alert (🔔)
9,433.09 ms
(+38.44%)Baseline: 6,813.91 ms
8,176.70 ms
(115.37%)

isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
823.20 ms
(+29.57%)Baseline: 635.32 ms
762.38 ms
(107.98%)

🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 52b57ad into pnpm:main Jul 10, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants