Skip to content

fix: refuse a broken pnpm release when switching versions, not only on self-update - #13082

Merged
zkochan merged 1 commit into
mainfrom
fix-12959
Jul 16, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix-12959

Conversation

@zkochan

@zkochan zkochan commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #12959.

#13076 stopped pnpm self-update from installing a broken release. It did not cover the version switch, which is the path most of the reports in #12959 actually describe — "every single pnpm add/install command failed". Measured on merged main (f15d67c, which includes #13076), a project pinned through devEngines.packageManager:

committed pin before after
11.11.0 ok ok
11.12.0 Cannot use 'in' operator to search for 'integrity' in undefined refused, with a reason
11.13.0 ok refused, with a reason
11.13.1 ok ok

assertReleaseIsInstallable — the list #13076 introduced — now guards the switch too, so both ways of acquiring a pnpm agree on which releases are refusable.

What a user sees instead of the TypeError:

[ERROR] pnpm v11.12.0 is a broken release and cannot be installed
Its "@pnpm/exe" build shipped without a binary and does not run. Even where it does run,
pinning it would break everyone on the project who uses "@pnpm/exe", because the pin is
shared. Choose another version, or run "pnpm self-update latest".

Two decisions worth review

The check is placed after the "already this version" early return. Switching to a broken release is refused; running one that is already installed is not. Someone whose pnpm is 11.12.0 still needs it to work well enough to move off it — and self-update skips the switch entirely (skipPackageManagerCheck), so that escape stays open. A test covers this.

11.13.0 is refused even though it runs. For the JS pnpm wrapper 11.13.0 is fine — it is @pnpm/[email protected] whose platform packages shipped without a binary. But the pin is shared and the wrapper is not, so a developer on the JS wrapper would pin a version that works for them and breaks every teammate on @pnpm/exe. This is a deliberate behaviour change: a repo pinned to 11.13.0 that currently works for JS-wrapper users will start failing, with the message above telling them what to do. Both versions are deprecated on npm.

Verification

  • Rust: 11 switch_cli_version + 30 self_update tests pass; clippy and fmt clean.
  • TypeScript: 9 switchCliVersion tests pass, including three new ones — the refusal, that a non-broken release still switches, and that a broken release already running is not refused.
  • Regression-proving: with the guard removed, refuses to switch to a broken release fails with Received promise resolved instead of rejected. It spies process.exit for that reason: without the spy a regression runs the switch to completion and reaches exit(), ending the worker instead of failing the test.
  • End to end: the table above, against the real registry with the built bundle and an isolated PNPM_HOME/store per case.

The test file now spreads the real @pnpm/engine.pm.commands into its mock rather than stubbing assertReleaseIsInstallable, so the list of broken releases stays in one place and these tests exercise it instead of a copy.

Not in this PR

#12960 fixes the underlying buildLockfileFromEnvLockfile peer-suffix bug that made the bad manifest fatal. It is worth merging on its own merit — it is what stops a future release with peer-carrying dependencies from crashing the same way — but it is orthogonal to this, which is about refusing releases already known to be broken. It currently conflicts with #13076.

Squash Commit Body

A project pinned to 11.12.0 through `packageManager` or
`devEngines.packageManager` still failed on every command with `Cannot use
'in' operator to search for 'integrity' in undefined`. That is the report in
pnpm/pnpm#12959, and it is the shape most people hit: the pin is committed,
so one bad pin breaks everyone who clones the repo.

pnpm/pnpm#13076 refuses these releases, but only in `self-update`. The
version switch is the other way in, and it reached the installer instead,
where a release whose manifest declares dependencies crashes resolving them.

Refuse the same releases there. The check sits after the "already this
version" early return, deliberately: switching *to* a broken release is
refused, but running one that is already installed is not — a developer
whose pnpm is a broken release still needs it to work well enough to move
off it.

11.13.0 is refused too, though it runs for the JS wrapper. The pin is shared
and the wrapper is not, so pinning it works for whoever wrote the pin and
breaks every teammate on `@pnpm/exe`, whose native is missing.

Closes pnpm/pnpm#12959.

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.
  • Updated the documentation if needed.

Written by an agent (Claude Code, claude-opus-4-8).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • Release version switching now detects broken pnpm releases before installation.
    • Displays an actionable error identifying the unavailable release.
    • Continues to support switching when the target release is valid or already running.
  • Tests

    • Added coverage for broken, valid, and currently active pnpm releases.

…n self-update

A project pinned to 11.12.0 through `packageManager` or
`devEngines.packageManager` still failed on every command with `Cannot use
'in' operator to search for 'integrity' in undefined`. That is the report in
#12959, and it is the shape most people hit: the pin is committed,
so one bad pin breaks everyone who clones the repo.

#13076 refuses these releases, but only in `self-update`. The
version switch is the other way in, and it reached the installer instead,
where a release whose manifest declares dependencies crashes resolving them.

Refuse the same releases there. The check sits after the "already this
version" early return, deliberately: switching *to* a broken release is
refused, but running one that is already installed is not — a developer
whose pnpm is a broken release still needs it to work well enough to move
off it.

11.13.0 is refused too, though it runs for the JS wrapper. The pin is shared
and the wrapper is not, so pinning it works for whoever wrote the pin and
breaks every teammate on `@pnpm/exe`, whose native is missing.
Copilot AI review requested due to automatic review settings July 16, 2026 16:31

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.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Version switching now rejects broken pnpm releases before installation in Rust and TypeScript flows, while allowing an already-running broken version. Tests cover these cases, and a patch changeset documents the behavior.

Changes

Broken release switching

Layer / File(s) Summary
Rust switch installability guard
pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs, pnpm/crates/cli/src/cli_args/switch_cli_version.rs
The installability assertion is exposed at crate scope and called before installation for locked and resolved target versions.
TypeScript switch installability guard
pnpm11/pnpm/src/switchCliVersion.ts
Resolved target versions are validated before switching; a created store controller is closed when validation fails.
Switch validation and release note
pnpm11/pnpm/src/switchCliVersion.test.ts, .changeset/refuse-broken-release-on-version-switch.md
Tests cover broken, already-running, and valid releases, and the changeset records the updated switching behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Prevent self-update from crashing when peer-dependency entries omit package metadata [#12959] ❌ The PR adds broken-release checks during version switching but does not update buildLockfileFromEnvLockfile or add the required package fallback.

Out-of-scope changes

Code Change Explanation
Reject broken pnpm releases during CLI version switching (pnpm/crates/cli/src/cli_args/switch_cli_version.rs:64,76; pnpm11/pnpm/src/switchCliVersion.ts:75-84) The linked issue concerns peer-dependency lockfile handling in self-update; it does not specify refusing broken release versions during switching.

Possibly related PRs

  • pnpm/pnpm#13076: Propagates the same broken-release installability guard into the self-update flow.

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

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-12959

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Refuse known-broken pnpm releases during version switch (not just self-update)

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Block switching to known-broken pnpm versions pinned via packageManager/devEngines.packageManager.
• Reuse the existing installability guard so self-update and version switch refuse the same
 releases.
• Add regression tests covering refusal, allowed upgrades, and “already running broken version”
 escape hatch.
Diagram

graph TD
  A["Pinned version detected"] --> B["switchCliVersion"] --> C{"Already running?"}
  C -->|"Yes"| D["No-op (allow escape)"]
  C -->|"No"| E("assertReleaseIsInstallable") --> F{{"Refuse broken release"}}
  E -->|"OK"| G["Install pnpm to store"] --> H["Activate new pnpm"]

  subgraph Legend
    direction LR
    _mod["Module/step"] ~~~ _fn("Guard function") ~~~ _ext{{"Error/refusal"}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Duplicate the broken-version list in switch logic
  • ➕ Avoids exposing/re-exporting the guard function across modules/crates
  • ➕ Lets switch behavior diverge if needed
  • ➖ Risk of list drift between self-update and version switch
  • ➖ Harder to keep tests exercising the real source of truth
2. Fetch a denylist from the registry or a hosted endpoint
  • ➕ Can react to newly discovered broken releases without shipping pnpm changes
  • ➕ Centralized policy updates
  • ➖ Adds network dependency and failure modes during version switching
  • ➖ Harder to make behavior deterministic/offline-friendly
3. Soft-warn then proceed with install
  • ➕ Less disruptive for edge cases where a broken release might still work on one platform
  • ➕ Avoids changing behavior for repos currently pinned to problematic versions
  • ➖ Does not prevent repo-wide breakages when pins are shared across mixed environments
  • ➖ Continues to allow crashes later inside installer/runtime

Recommendation: Keep the PR’s approach: reusing the existing assertReleaseIsInstallable guard makes self-update and version switch consistent and prevents a committed pin from breaking entire teams. The deliberate placement after the “already running this version” early return is sensible (escape hatch remains), and the added tests reduce regression risk.

Files changed (5) +92 / -4

Bug fix (3) +15 / -3
install_pnpm.rsExpose broken-release guard for reuse in other CLI flows +1/-1

Expose broken-release guard for reuse in other CLI flows

• Widens visibility of assert_release_is_installable from self-update-only to crate-wide so the version switch command can reuse the same broken-version denylist and error message.

pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs

switch_cli_version.rsRefuse broken pnpm versions during Rust switch_cli_version +3/-1

Refuse broken pnpm versions during Rust switch_cli_version

• Imports and invokes assert_release_is_installable after the “already this version” early return in both env-installer and store-installer switch paths, preventing attempts to install known-broken releases.

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

switchCliVersion.tsCall assertReleaseIsInstallable before installing during version switch +11/-1

Call assertReleaseIsInstallable before installing during version switch

• Imports the shared guard and checks the target version after the early return, closing the store controller before rethrowing on refusal to avoid leaking resources.

pnpm11/pnpm/src/switchCliVersion.ts

Tests (1) +71 / -1
switchCliVersion.test.tsAdd regression tests for broken-release refusal during version switch +71/-1

Add regression tests for broken-release refusal during version switch

• Adjusts mocks to use the real assertReleaseIsInstallable (keeping the broken list single-sourced), makes the mocked running pnpm version mutable, and adds tests for refusing broken targets, allowing non-broken switches, and not refusing when already running a broken version.

pnpm11/pnpm/src/switchCliVersion.test.ts

Documentation (1) +6 / -0
refuse-broken-release-on-version-switch.mdAdd patch changeset describing refusal of broken pinned releases +6/-0

Add patch changeset describing refusal of broken pinned releases

• Adds a changeset for pnpm and pacquet documenting the improved error behavior when a repo pin targets a known-broken pnpm release during version switching.

.changeset/refuse-broken-release-on-version-switch.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Auto-approved notes - no code review findings
- 'auto_approve_for_no_suggestions' flag enabled

Qodo Logo

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge. The fix is narrow and targeted — one check added in the right place in both stacks — and the resource-cleanup (store close) on the new error path follows the identical pattern already present one block below.

Both the TypeScript and Rust implementations are updated in lock-step, the "already running broken version" escape hatch is explicitly tested, and the broken-release check reuses the existing deny-list in a single place rather than duplicating it. No new failure paths are introduced for well-formed inputs.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: refuse a broken pnpm release when s..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.04     12.4±0.66ms    30.1 MB/sec    1.00     11.9±0.30ms    31.3 MB/sec
packument/parse                1.01     43.5±0.93µs  1525.3 MB/sec    1.00     43.1±0.70µs  1538.6 MB/sec
tarball/download_dependency    1.00      2.9±0.13ms  1497.1 KB/sec    1.09      3.2±0.31ms  1371.9 KB/sec

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pnpm/crates/cli/src/cli_args/switch_cli_version.rs (1)

52-94: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add switch-level Rust regression coverage for broken-release refusal. assert_release_is_installable is already covered, but pnpm/crates/cli/src/cli_args/switch_cli_version/tests.rs still needs execute_switch cases for refusing 11.12.0/11.13.0, allowing a valid target, and skipping the refusal when the broken version is already running.

🤖 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 `@pnpm/crates/cli/src/cli_args/switch_cli_version.rs` around lines 52 - 94, The
switch flow lacks regression coverage for broken-release handling in
execute_switch. Add tests in the switch CLI version tests covering refusal of
versions 11.12.0 and 11.13.0, successful switching to a valid target, and
returning the skip result when the broken version is already the running
PNPM_VERSION; reuse existing test helpers and avoid duplicating
assert_release_is_installable tests.

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.

Outside diff comments:
In `@pnpm/crates/cli/src/cli_args/switch_cli_version.rs`:
- Around line 52-94: The switch flow lacks regression coverage for
broken-release handling in execute_switch. Add tests in the switch CLI version
tests covering refusal of versions 11.12.0 and 11.13.0, successful switching to
a valid target, and returning the skip result when the broken version is already
the running PNPM_VERSION; reuse existing test helpers and avoid duplicating
assert_release_is_installable tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 13714691-1918-4c3f-adf2-693677fa1b8c

📥 Commits

Reviewing files that changed from the base of the PR and between f15d67c and 22cf7b6.

📒 Files selected for processing (5)
  • .changeset/refuse-broken-release-on-version-switch.md
  • pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm11/pnpm/src/switchCliVersion.test.ts
  • pnpm11/pnpm/src/switchCliVersion.ts

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 16, 2026
@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.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.54%. Comparing base (f15d67c) to head (22cf7b6).

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/switch_cli_version.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13082   +/-   ##
=======================================
  Coverage   85.54%   85.54%           
=======================================
  Files         499      499           
  Lines       79884    79886    +2     
=======================================
+ Hits        68339    68341    +2     
  Misses      11545    11545           

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

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 22cf7b6208cb

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 2.784 ± 0.211 2.559 3.195 1.85 ± 0.20
pacquet@main 2.688 ± 0.168 2.456 2.932 1.79 ± 0.18
pnpr@HEAD 1.521 ± 0.147 1.355 1.789 1.01 ± 0.13
pnpr@main 1.503 ± 0.118 1.359 1.731 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.78380104824,
      "stddev": 0.21115977740228506,
      "median": 2.73709482294,
      "user": 2.3599142,
      "system": 1.9545948,
      "min": 2.5590624759400002,
      "max": 3.19476480494,
      "times": [
        2.9262841189400004,
        3.19476480494,
        2.67381592494,
        2.56982115494,
        3.0084802979400003,
        2.6561564629400003,
        2.60284749194,
        2.8464040289400003,
        2.5590624759400002,
        2.80037372094
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6884923542399997,
      "stddev": 0.16820077175697265,
      "median": 2.67199937994,
      "user": 2.2562680999999998,
      "system": 1.7433643999999997,
      "min": 2.45557948194,
      "max": 2.9315760669400004,
      "times": [
        2.85301519694,
        2.47356550794,
        2.67698796794,
        2.6373081009400003,
        2.66701079194,
        2.9156977319400004,
        2.9315760669400004,
        2.57422626494,
        2.69995643094,
        2.45557948194
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.52080543884,
      "stddev": 0.14710074795475656,
      "median": 1.4845855389399998,
      "user": 1.1517060000000001,
      "system": 1.1639267,
      "min": 1.35494512194,
      "max": 1.78938077294,
      "times": [
        1.42985800594,
        1.40241701794,
        1.40228326594,
        1.7252140119400001,
        1.78938077294,
        1.4801036299399999,
        1.48906744794,
        1.6380432299399998,
        1.49674188394,
        1.35494512194
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.50250238124,
      "stddev": 0.11849174094996905,
      "median": 1.48294384394,
      "user": 1.1201706000000002,
      "system": 1.237468,
      "min": 1.35933704694,
      "max": 1.73105120894,
      "times": [
        1.3681565119399999,
        1.45756446494,
        1.48752171294,
        1.73105120894,
        1.53856821494,
        1.57319145394,
        1.62990082294,
        1.40136639994,
        1.35933704694,
        1.47836597494
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 221.8 ± 15.3 200.4 246.6 1.00
pacquet@main 222.7 ± 25.6 198.9 274.6 1.00 ± 0.13
pnpr@HEAD 237.4 ± 12.5 222.2 266.0 1.07 ± 0.09
pnpr@main 246.4 ± 6.2 236.2 255.3 1.11 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.22179876828,
      "stddev": 0.015301581847279217,
      "median": 0.22320530988000004,
      "user": 0.21068540000000002,
      "system": 0.58982818,
      "min": 0.20037775338000002,
      "max": 0.24664160338000002,
      "times": [
        0.20037775338000002,
        0.20430151538000002,
        0.20617915338,
        0.21739644638000002,
        0.22284112438000003,
        0.23044931838000002,
        0.22516215738000003,
        0.22356949538,
        0.24106911538000003,
        0.24664160338000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.22273787038000004,
      "stddev": 0.025641516855881584,
      "median": 0.21016729138,
      "user": 0.21511110000000003,
      "system": 0.5724934799999999,
      "min": 0.19889788538000003,
      "max": 0.27458515837999997,
      "times": [
        0.20998635538000002,
        0.20775884938000003,
        0.20563735338000003,
        0.21450774438000003,
        0.21034822738000003,
        0.19889788538000003,
        0.20752322538,
        0.24063084938,
        0.27458515837999997,
        0.25750305538
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.23739756618000002,
      "stddev": 0.01245608268310927,
      "median": 0.23482779738000004,
      "user": 0.219935,
      "system": 0.58456588,
      "min": 0.22222037438000003,
      "max": 0.26603980938,
      "times": [
        0.23851944138000003,
        0.23325200838000001,
        0.22563528838000002,
        0.22222037438000003,
        0.23270081938,
        0.23287041938000003,
        0.23689196538,
        0.23640358638000003,
        0.24944194938000003,
        0.26603980938
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.24635026308,
      "stddev": 0.006214629113501139,
      "median": 0.24621870638000004,
      "user": 0.2221108,
      "system": 0.61018808,
      "min": 0.23624905438000002,
      "max": 0.25526970838,
      "times": [
        0.25203163838,
        0.24658126938000002,
        0.23624905438000002,
        0.24408842338000003,
        0.24585614338000003,
        0.23991492038,
        0.25279089838,
        0.25526970838,
        0.25002165138,
        0.24069892338
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.724 ± 0.036 2.674 2.793 1.71 ± 0.15
pacquet@main 2.801 ± 0.095 2.729 3.058 1.75 ± 0.16
pnpr@HEAD 1.597 ± 0.138 1.443 1.837 1.00
pnpr@main 1.694 ± 0.111 1.532 1.837 1.06 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7241411352200005,
      "stddev": 0.03633978371627034,
      "median": 2.7209774269199998,
      "user": 1.6890754600000002,
      "system": 1.33218768,
      "min": 2.6742013079199998,
      "max": 2.7927658799199997,
      "times": [
        2.7148488609199997,
        2.7548191359199996,
        2.7363548079199997,
        2.68837869992,
        2.72710599292,
        2.7927658799199997,
        2.69021464792,
        2.75329517492,
        2.7094268439199998,
        2.6742013079199998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.80107918872,
      "stddev": 0.09450711898857689,
      "median": 2.7790805809199997,
      "user": 1.8774661599999998,
      "system": 1.4793834799999999,
      "min": 2.72943629292,
      "max": 3.05768021392,
      "times": [
        2.72943629292,
        2.77916212992,
        2.75573505192,
        2.7789990319199998,
        2.7481121099199997,
        2.75264951692,
        2.7824264079199996,
        2.83041627192,
        3.05768021392,
        2.79617485992
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.59677770922,
      "stddev": 0.1382853569812909,
      "median": 1.55016985742,
      "user": 1.3177038600000002,
      "system": 1.46461848,
      "min": 1.4426205169200002,
      "max": 1.83650658892,
      "times": [
        1.58149743492,
        1.77589746992,
        1.4971342839200001,
        1.47572718092,
        1.51884227992,
        1.4426205169200002,
        1.83650658892,
        1.7233179479200003,
        1.49142316192,
        1.62481022692
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.69400401722,
      "stddev": 0.11088017175534078,
      "median": 1.72647110692,
      "user": 1.2167032599999998,
      "system": 1.3056213799999998,
      "min": 1.53225536092,
      "max": 1.83674640092,
      "times": [
        1.81677169692,
        1.83674640092,
        1.64989018892,
        1.77781754692,
        1.53225536092,
        1.54964865092,
        1.7480431819200002,
        1.7150812399200002,
        1.73786097392,
        1.57592493092
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 649.3 ± 32.7 617.6 709.3 2.47 ± 0.14
pacquet@main 613.8 ± 41.2 551.7 684.9 2.34 ± 0.17
pnpr@HEAD 262.5 ± 7.9 247.8 276.7 1.00 ± 0.04
pnpr@main 262.4 ± 7.6 250.2 278.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6492720969600001,
      "stddev": 0.03274517209889976,
      "median": 0.63609682676,
      "user": 0.8032477799999999,
      "system": 0.7223137199999999,
      "min": 0.6175925842600001,
      "max": 0.7092858252600001,
      "times": [
        0.67469989426,
        0.6175925842600001,
        0.62416219326,
        0.62397489126,
        0.63401710326,
        0.63858700426,
        0.63378015726,
        0.6381765502600001,
        0.7092858252600001,
        0.6984447662600001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6137571320600002,
      "stddev": 0.041166555185259926,
      "median": 0.6190887792599999,
      "user": 0.7446076799999999,
      "system": 0.70923292,
      "min": 0.55167767826,
      "max": 0.6849371442600001,
      "times": [
        0.6849371442600001,
        0.62097519926,
        0.66203151226,
        0.61720235926,
        0.6309264292600001,
        0.59367386326,
        0.57027053326,
        0.62653944326,
        0.55167767826,
        0.57933715826
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26249553346,
      "stddev": 0.007850569002021345,
      "median": 0.26105678626,
      "user": 0.19440158,
      "system": 0.54581452,
      "min": 0.24775003826,
      "max": 0.27671245126,
      "times": [
        0.25892467426,
        0.24775003826,
        0.26007047126,
        0.26170149626,
        0.26925081226,
        0.26216152326000003,
        0.26041207626,
        0.25844777526,
        0.27671245126,
        0.26952401626
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26242424806,
      "stddev": 0.007570087801823597,
      "median": 0.26206116426000003,
      "user": 0.22304458,
      "system": 0.5236886199999999,
      "min": 0.25022956926,
      "max": 0.27800996626,
      "times": [
        0.26272299126000004,
        0.25850292926,
        0.26120712426000003,
        0.26166980726,
        0.26245252126,
        0.26785241626,
        0.27800996626,
        0.25480354826,
        0.25022956926,
        0.26679160726
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.010 ± 0.035 1.953 2.070 7.31 ± 0.35
pacquet@main 1.989 ± 0.039 1.948 2.053 7.23 ± 0.35
pnpr@HEAD 0.275 ± 0.012 0.255 0.299 1.00
pnpr@main 0.275 ± 0.017 0.256 0.304 1.00 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.0103309024200002,
      "stddev": 0.03545803644823515,
      "median": 2.01467581172,
      "user": 1.1380963000000002,
      "system": 0.82893,
      "min": 1.9526312187200001,
      "max": 2.06953683572,
      "times": [
        1.9526312187200001,
        2.01856255472,
        2.01519751772,
        1.99055368972,
        1.98133583172,
        2.04932209672,
        2.06953683572,
        2.01415410572,
        2.03416115272,
        1.97785402072
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9886239648199997,
      "stddev": 0.039302589929780106,
      "median": 1.98115068322,
      "user": 1.1109692,
      "system": 0.8472666999999999,
      "min": 1.94797299172,
      "max": 2.05304856972,
      "times": [
        2.02873811372,
        1.98142998972,
        1.9912067007199998,
        1.9510946437199999,
        2.05304856972,
        2.0405024897199997,
        1.98087137672,
        1.96283132672,
        1.94854344572,
        1.94797299172
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27519673412,
      "stddev": 0.012257741233434214,
      "median": 0.27695657672000007,
      "user": 0.2212701,
      "system": 0.5542636,
      "min": 0.25548533772000004,
      "max": 0.29874238972000006,
      "times": [
        0.26479963672,
        0.27845693872000005,
        0.28015416672000004,
        0.27821103572000005,
        0.25548533772000004,
        0.26598673272,
        0.27570211772000003,
        0.28626214372000003,
        0.29874238972000006,
        0.26816684172000005
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27536484612000006,
      "stddev": 0.016884823490208124,
      "median": 0.26723122322000004,
      "user": 0.2161851,
      "system": 0.5680555,
      "min": 0.25637156772,
      "max": 0.30387303672000004,
      "times": [
        0.26550615772,
        0.28108690472000003,
        0.26510368872,
        0.30387303672000004,
        0.26895628872000005,
        0.25637156772,
        0.28294696872,
        0.26501989172,
        0.30304203072,
        0.26174192572000005
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 395.5 ± 20.6 355.8 426.9 4.48 ± 0.29
pacquet@main 410.0 ± 18.8 376.7 436.9 4.64 ± 0.28
pnpr@HEAD 88.4 ± 4.0 81.2 102.3 1.00 ± 0.06
pnpr@main 88.4 ± 3.4 82.3 98.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.39548124912000004,
      "stddev": 0.0205941005853737,
      "median": 0.39284676742,
      "user": 0.3769409199999999,
      "system": 0.07823714000000001,
      "min": 0.35577101742000006,
      "max": 0.42689244942000004,
      "times": [
        0.37542017642000003,
        0.39012125342000004,
        0.4167071814200001,
        0.39249261042000005,
        0.35577101742000006,
        0.39171468542000004,
        0.42689244942000004,
        0.39320092442000004,
        0.3987732224200001,
        0.41371897042000005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.40999535272000004,
      "stddev": 0.018847217656525948,
      "median": 0.41109088492,
      "user": 0.4064742199999999,
      "system": 0.06533444,
      "min": 0.37670377442,
      "max": 0.43692918842000006,
      "times": [
        0.43692918842000006,
        0.42406005342,
        0.40574624042000007,
        0.42259996242000003,
        0.41567667942000003,
        0.40650509042000005,
        0.37670377442,
        0.40325754142000003,
        0.42463710142000005,
        0.38383789542
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08842421674258062,
      "stddev": 0.004025259872609025,
      "median": 0.08711292542,
      "user": 0.01796464903225806,
      "system": 0.012779914193548387,
      "min": 0.08122423042,
      "max": 0.10231623942,
      "times": [
        0.09072660342,
        0.09159815542,
        0.08785559442,
        0.08942954942,
        0.08122423042,
        0.08637781041999999,
        0.08461240342,
        0.08554203542,
        0.08891792642,
        0.10231623942,
        0.09340955842,
        0.08646395242,
        0.08660964742,
        0.08672367142,
        0.08649640542,
        0.08904390242,
        0.08825695042,
        0.08403136942,
        0.09356139342,
        0.08480624942,
        0.08969462942,
        0.09349705242,
        0.08711292542,
        0.08607591142,
        0.08502007242,
        0.09095529442,
        0.09302619642,
        0.09045832842,
        0.08561488442,
        0.08629842042,
        0.08539335542
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08836200685333333,
      "stddev": 0.0033754741974682174,
      "median": 0.08800453042,
      "user": 0.017864119999999997,
      "system": 0.013365301999999997,
      "min": 0.08229884642,
      "max": 0.09824688142,
      "times": [
        0.09252255742,
        0.08851884441999999,
        0.09042700942,
        0.08733988242,
        0.08706985442,
        0.09071735641999999,
        0.08969582142,
        0.08767853042,
        0.08657016242,
        0.09824688142,
        0.08712217242,
        0.08244284741999999,
        0.08229884642,
        0.08427969742,
        0.08613659542,
        0.08779084242,
        0.09107693342,
        0.09424116542,
        0.08833947642,
        0.08976366942,
        0.09075949542,
        0.08399952942,
        0.08721362442,
        0.09149409942,
        0.08763549942,
        0.08403405442,
        0.08844827042,
        0.08716118542,
        0.08961708242,
        0.08821821842
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.716 ± 0.196 4.508 4.988 1.33 ± 0.07
pacquet@main 4.611 ± 0.128 4.450 4.917 1.30 ± 0.06
pnpr@HEAD 3.534 ± 0.121 3.451 3.824 1.00
pnpr@main 3.548 ± 0.077 3.442 3.675 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.715739429540001,
      "stddev": 0.19581422445519917,
      "median": 4.6249651289400004,
      "user": 2.27407452,
      "system": 1.66461918,
      "min": 4.507963381440001,
      "max": 4.98825602344,
      "times": [
        4.98825602344,
        4.53448239844,
        4.6534054214400005,
        4.89930322244,
        4.551364968440001,
        4.915748108440001,
        4.507963381440001,
        4.946056238440001,
        4.59652483644,
        4.56428969644
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.61113615664,
      "stddev": 0.12805470049932138,
      "median": 4.57371139094,
      "user": 2.08974802,
      "system": 1.61528478,
      "min": 4.44979215644,
      "max": 4.916967141440001,
      "times": [
        4.55693052344,
        4.67007359944,
        4.57904684944,
        4.62835957144,
        4.51531990044,
        4.68129655244,
        4.54519933944,
        4.916967141440001,
        4.44979215644,
        4.56837593244
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5340824689400003,
      "stddev": 0.12085649202115627,
      "median": 3.4852336574400002,
      "user": 1.2549674199999998,
      "system": 1.29688178,
      "min": 3.45136419644,
      "max": 3.8239566944400005,
      "times": [
        3.48679514744,
        3.52737428644,
        3.4969720104400004,
        3.46448144044,
        3.4719646774400004,
        3.6755231914400004,
        3.4587208774400002,
        3.8239566944400005,
        3.45136419644,
        3.4836721674400004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5478341144400005,
      "stddev": 0.07686233271892201,
      "median": 3.53905368394,
      "user": 1.2945531199999998,
      "system": 1.2778107799999998,
      "min": 3.4420191044400004,
      "max": 3.6752606554400002,
      "times": [
        3.6752606554400002,
        3.6319474854400005,
        3.52432135044,
        3.6077252624400002,
        3.4420191044400004,
        3.51401086144,
        3.5850793694400003,
        3.45657377844,
        3.4876172594400003,
        3.5537860174400002
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13082
Testbedpacquet
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,724.14 ms
(-25.50%)Baseline: 3,656.72 ms
4,388.07 ms
(62.08%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,010.33 ms
(-22.41%)Baseline: 2,591.02 ms
3,109.22 ms
(64.66%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
649.27 ms
(-40.45%)Baseline: 1,090.22 ms
1,308.27 ms
(49.63%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
395.48 ms
(-26.16%)Baseline: 535.60 ms
642.72 ms
(61.53%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,783.80 ms
(-16.26%)Baseline: 3,324.16 ms
3,988.99 ms
(69.79%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,715.74 ms
(-21.57%)Baseline: 6,012.36 ms
7,214.83 ms
(65.36%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
221.80 ms
(-54.28%)Baseline: 485.09 ms
582.11 ms
(38.10%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13082
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,596.78 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
275.20 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
262.50 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
88.42 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,520.81 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,534.08 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
237.40 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit e4d7a4a into main Jul 16, 2026
40 checks passed
@zkochan
zkochan deleted the fix-12959 branch July 16, 2026 19:29
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.

self-update crashes with Cannot use 'in' operator to search for 'integrity' in undefined due to peer dependencies

3 participants