Skip to content

fix(pkg-manifest): devDependencies/dependencies should win over peerDependencies when computing current specifiers - #13124

Merged
zkochan merged 5 commits into
pnpm:mainfrom
Ayush442842q:fix/peer-deps-prefix-precedence-
Jul 21, 2026
Merged

zkochan merged 5 commits into
pnpm:mainfrom
Ayush442842q:fix/peer-deps-prefix-precedence-

Conversation

@Ayush442842q

@Ayush442842q Ayush442842q commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Dependencies

when computing current specifiers

Summary

peerDependencies was spread last in getAllDependenciesFromManifest, so a peer entry like "react": "^19.0.0" silently overwrote a real devDependencies/dependencies/optionalDependencies entry for the same package when computing "current specifiers" during pnpm add/pnpm update. That ^-prefixed value then leaked into the resolver's pinned-version detection, overriding --save-exact/--save-prefix and writing ^19.2.7 instead of the requested 19.2.7.

The sibling function getWantedDependencies already spreads peerDependencies first for exactly this reason — this function just had the order backwards.

Review follow-ups: the two same-named definitions of getAllDependenciesFromManifest (the dormant standalone copy kept the old peers-last order) are consolidated into a single module re-exported from the package index (0ef3520), and pacquet gained a regression test pinning the equivalent precedence in its add prev-specifier scan (bbeea26).

Closes #13108

Squash Commit Body

Fix pnpm add --save-exact/--save-prefix and pnpm update writing a
package's version with the peerDependencies range's prefix instead of
the requested exact version, whenever the same package also appeared
in peerDependencies.

getAllDependenciesFromManifest spread peerDependencies last when
merging a project's current specifiers, so a peerDependencies entry
(e.g. "react": "^19.0.0") silently overwrote a same-named
devDependencies/dependencies/optionalDependencies entry. The
resulting merged specifier was then read as prevSpecifier in
parseWantedDependencies, and whichVersionIsPinned saw the "^" prefix
and returned "major" instead of "patch", overriding the pinned-version
behavior requested by --save-exact.

getWantedDependencies already spreads peerDependencies first for this
same reason (so real dependency fields take precedence over a peer's
compatibility range). This change brings getAllDependenciesFromManifest
in line with that existing convention rather than introducing a new
pattern.

Two of the four new tests reproduce the bug's two reported scenarios
directly (pnpm add --save-exact, pnpm update --latest) and fail
against the unmodified function; the other two guard existing
behavior (a peer-only dependency is still included when
autoInstallPeers is true; peerDependencies is still excluded entirely
when autoInstallPeers is false), to confirm the reorder doesn't change
anything except precedence.

Review follow-ups: consolidate the duplicated
getAllDependenciesFromManifest definitions into a single module (the
dormant standalone copy kept the old peers-last order), and add a
pacquet regression test pinning the equivalent prev-specifier
precedence in add — pacquet already scanned peers last, so no Rust
behavior change was needed.

Closes pnpm/pnpm#13108

Checklist

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

    No Rust-side behavior change needed — pacquet already gives real dependency groups precedence over peerDependencies everywhere the TypeScript bug could occur: the add prev-specifier scan reads peers last (first match wins), update never reads peers and matches previous specifiers by name and group, and the resolver's wanted-deps merge spreads peers first. The pacquet regression test add_existing_dependency_ignores_pin_from_peer_range (bbeea26) now pins the add scan's precedence; it was verified to fail when the scan order is flipped to peers-first.

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


Description edited by an agent (Claude Code, claude-fable-5): corrected the Rust parity note and recorded the review follow-up commits.


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

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Fixed dependency spec precedence so matching dependencies / devDependencies / optionalDependencies correctly override peerDependencies when computing specifiers and when writing versions/prefixes (including --save-exact, --save-prefix, and update).
  • Tests

    • Added regression coverage for add behavior with pinned non-peer entries vs peer ranges, and added Jest coverage for peer auto-install precedence and inclusion/exclusion behavior.

@Ayush442842q
Ayush442842q requested a review from zkochan as a code owner July 18, 2026 11:57
@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 →

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8911d313-d918-4718-90c0-24f0be841e59

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Manifest dependency merging now lets dev, regular, and optional dependencies override overlapping peer dependency entries. Utility and CLI tests cover precedence and peer inclusion behavior, and a changeset documents the patch release.

Changes

Peer dependency precedence

Layer / File(s) Summary
Manifest precedence implementation
pnpm11/pkg-manifest/utils/src/getAllDependenciesFromManifest.ts, pnpm11/pkg-manifest/utils/src/index.ts
getAllDependenciesFromManifest merges peer dependencies before dev, regular, and optional dependencies and remains available through the utility index.
Precedence regression coverage
pnpm11/pkg-manifest/utils/test/*, pnpm/crates/cli/tests/add.rs, .changeset/peer-prefix-precedence-fix.md
Tests cover overlapping and peer-only entries, explicit devDependency saving, and the documented patch release.

Estimated code review effort: 2 (Simple) | ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Ensure pnpm add and pnpm update do not inherit version prefixes from peerDependencies when writing dependency entries [#13108] ✅

Possibly related PRs

  • pnpm/pnpm#13114: Adjusts dependency merge precedence with related tests and changeset updates.

Suggested labels: product: pnpm@11

Suggested reviewers: zkochan

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

@greptile-apps

greptile-apps Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the change is a one-line reorder in a tiny utility, matches the established pattern in the sibling getWantedDependencies function, and is covered by targeted tests that fail against the old code.

The reorder is mechanically correct and the old duplicate copy is cleanly removed. All callers that pass autoInstallPeers: true now get the right precedence; callers that omit the option were already unaffected by peers.

No files require special attention.

Reviews (5): Last reviewed commit: "test(cli): simplify regression test comm..." | Re-trigger Greptile

@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

🤖 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 `@pnpm11/pkg-manifest/utils/test/getAllDependenciesFromManifest.test.ts`:
- Around line 4-28: Extend the getAllDependenciesFromManifest() tests with an
optionalDependencies case where an optional dependency uses an exact ~-prefixed
specifier and overrides a same-named peerDependencies entry when
autoInstallPeers is enabled. Assert the returned dependency map contains the
optional dependency’s exact specifier, covering the value consumed by the
writer.
🪄 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: a4af7794-0ee1-4793-b0fe-214b4d066ba2

📥 Commits

Reviewing files that changed from the base of the PR and between aeaaccb and 853bca6.

📒 Files selected for processing (3)
  • .changeset/peer-prefix-precedence-fix.md
  • pnpm11/pkg-manifest/utils/src/index.ts
  • pnpm11/pkg-manifest/utils/test/getAllDependenciesFromManifest.test.ts

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 18, 2026
@zkochan
zkochan force-pushed the fix/peer-deps-prefix-precedence- branch from 21c55d6 to 4d3f401 Compare July 19, 2026 13:33
@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Duplicate getAllDependenciesFromManifest logic ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
getAllDependenciesFromManifest is implemented twice in @pnpm/pkg-manifest.utils, and this PR
updates only the src/index.ts copy, leaving src/getAllDependenciesFromManifest.ts with the old
peerDependencies merge order. This divergence risks reintroducing the original precedence bug for
internal/future callers (especially with autoInstallPeers: true), makes behavior harder to reason
about, and violates the repo guidance to avoid parallel implementations of the same logic.
Code

pnpm11/pkg-manifest/utils/src/index.ts[R31-36]

  return {
+    ...(opts?.autoInstallPeers ? manifest.peerDependencies : {}),
    ...manifest.devDependencies,
    ...manifest.dependencies,
    ...manifest.optionalDependencies,
-    ...(opts?.autoInstallPeers ? manifest.peerDependencies : {}),
  }
Evidence
PR Compliance ID 6 calls for reusing/extracting shared utilities rather than maintaining parallel
implementations, but the PR only changes the merge precedence in src/index.ts while
src/getAllDependenciesFromManifest.ts still retains the old ordering (peers last). Since
getAllUniqueSpecs imports ./getAllDependenciesFromManifest.js, the stale implementation remains
present and actively referenced internally, and with the package’s public export surface being via
lib/index.js only, the internal helper will continue to exist and be used unless the logic is
unified—creating an ongoing drift/regression risk if any internal usage enables peer inclusion.

AGENTS.md: Avoid Duplication by Reusing or Extracting Shared Repo Utilities
pnpm11/pkg-manifest/utils/src/index.ts[27-36]
pnpm11/pkg-manifest/utils/src/getAllDependenciesFromManifest.ts[3-12]
pnpm11/pkg-manifest/utils/src/getAllUniqueSpecs.ts[1-10]
pnpm11/pkg-manifest/utils/package.json[16-22]

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

## Issue description
`getAllDependenciesFromManifest` has two separate implementations (`src/index.ts` and `src/getAllDependenciesFromManifest.ts`) and after this PR they differ in `peerDependencies` precedence (fixed in `src/index.ts`, still old order in `src/getAllDependenciesFromManifest.ts`). This duplication is a drift/regression risk—especially if an internal/future caller uses the internal helper with `autoInstallPeers: true`—and conflicts with the guidance to avoid parallel implementations.

## Issue Context
`getAllUniqueSpecs` imports `./getAllDependenciesFromManifest.js`, so the internal implementation remains in use inside the package. Even if current internal calls don’t enable peer inclusion, the divergence is a sharp edge: a later refactor or new call site could silently resurrect the original precedence bug; keeping a single source of truth prevents this class of regression.

## Fix Focus Areas
- pnpm11/pkg-manifest/utils/src/index.ts[27-36]
- pnpm11/pkg-manifest/utils/src/getAllDependenciesFromManifest.ts[3-12]
- pnpm11/pkg-manifest/utils/src/getAllUniqueSpecs.ts[1-10]

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


Grey Divider

Qodo Logo

Comment thread pnpm11/pkg-manifest/utils/src/index.ts Resolved
@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.

zkochan added 2 commits July 19, 2026 16:43
…e module

index.ts and getAllDependenciesFromManifest.ts each defined their own
copy of the function, and the dormant standalone copy kept the old
peers-last spread order. Keep the standalone module as the single
implementation (with the fixed peers-first order) and re-export it from
the package index, so the precedence cannot silently diverge again.

Also reword the changeset to drop implementation detail from the
release note and link the issue in the repo's changeset style.
A package declared in both devDependencies (exact) and peerDependencies
(caret) must take its previous specifier from the real group when
re-added, so the peer range's caret cannot leak into the written
version. Mirrors the TypeScript tests for pnpm#13108; pacquet's
findSpec-order scan already behaves correctly, so this test only guards
the parity. Verified the test fails when the scan order is flipped to
peers-first.
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit bbeea26

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

🤖 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 `@pnpm/crates/cli/tests/add.rs`:
- Around line 425-430: Remove the rustdoc prose above the test and replace it
with a concise standard comment referencing issue pnpm/pnpm#13108. Leave the
test implementation and behavior unchanged.
🪄 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: ca70ba30-0943-49d5-b5c8-84ee9af382e3

📥 Commits

Reviewing files that changed from the base of the PR and between 4d3f401 and bbeea26.

📒 Files selected for processing (4)
  • .changeset/peer-prefix-precedence-fix.md
  • pnpm/crates/cli/tests/add.rs
  • pnpm11/pkg-manifest/utils/src/getAllDependenciesFromManifest.ts
  • pnpm11/pkg-manifest/utils/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/peer-prefix-precedence-fix.md

Comment thread pnpm/crates/cli/tests/add.rs Resolved
@codecov-commenter

codecov-commenter commented Jul 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.86%. Comparing base (69004d0) to head (3a9272c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13124      +/-   ##
==========================================
+ Coverage   85.85%   85.86%   +0.01%     
==========================================
  Files         505      505              
  Lines       83967    84047      +80     
==========================================
+ Hits        72086    72167      +81     
+ Misses      11881    11880       -1     

☔ 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

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 3a9272cf414d

Each scenario reports direct installs and pnpr installs. 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.443 ± 0.129 2.343 2.756 1.62 ± 0.19
pacquet@main 2.512 ± 0.184 2.361 2.774 1.66 ± 0.21
pnpr@HEAD 1.517 ± 0.125 1.363 1.762 1.00 ± 0.13
pnpr@main 1.510 ± 0.155 1.349 1.739 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4434757209600004,
      "stddev": 0.1293974786826861,
      "median": 2.39332909786,
      "user": 1.5034899400000001,
      "system": 1.2668362799999997,
      "min": 2.3433387588600003,
      "max": 2.75578850286,
      "times": [
        2.35583680586,
        2.75578850286,
        2.45180625286,
        2.4116042118600003,
        2.35744492386,
        2.37505398386,
        2.43807781786,
        2.3716186828600003,
        2.5741872688600003,
        2.3433387588600003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5115674334599998,
      "stddev": 0.18359867261426618,
      "median": 2.39095093486,
      "user": 1.4616576399999999,
      "system": 1.26055918,
      "min": 2.36140961786,
      "max": 2.77417509186,
      "times": [
        2.36140961786,
        2.39212083486,
        2.3797294848600004,
        2.77275277686,
        2.3616112468600003,
        2.3897810348600004,
        2.36474966786,
        2.72769892186,
        2.77417509186,
        2.5916456568600004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.51721658336,
      "stddev": 0.12547715892342506,
      "median": 1.46931303336,
      "user": 1.0044258400000001,
      "system": 1.15124158,
      "min": 1.36309129186,
      "max": 1.76189473386,
      "times": [
        1.4231908498599999,
        1.6047074798599998,
        1.49716335086,
        1.5919515048600001,
        1.76189473386,
        1.44146271586,
        1.43438683086,
        1.42039099486,
        1.63392608086,
        1.36309129186
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5102001921600001,
      "stddev": 0.1553651388805548,
      "median": 1.4834570188599998,
      "user": 1.03868494,
      "system": 1.1152842799999998,
      "min": 1.34893848086,
      "max": 1.73874737886,
      "times": [
        1.34893848086,
        1.73874737886,
        1.58491699786,
        1.40808100786,
        1.6502376408600001,
        1.38800247286,
        1.36211594786,
        1.70895117286,
        1.35317779186,
        1.55883302986
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 250.0 ± 4.9 243.5 256.9 1.01 ± 0.04
pacquet@main 247.4 ± 7.9 236.6 259.6 1.00
pnpr@HEAD 272.4 ± 5.0 261.8 279.8 1.10 ± 0.04
pnpr@main 263.6 ± 5.1 254.2 271.2 1.07 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24999121366,
      "stddev": 0.004933542407535313,
      "median": 0.25010419695999997,
      "user": 0.20007105999999997,
      "system": 0.5238037,
      "min": 0.24353356746000002,
      "max": 0.25693470546,
      "times": [
        0.24835176646,
        0.24525538446,
        0.24361868746,
        0.25180061146,
        0.24353356746000002,
        0.24840778246,
        0.25693470546,
        0.25307117146,
        0.25647519146000003,
        0.25246326846
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24743554496000003,
      "stddev": 0.00790815443805872,
      "median": 0.24898828946,
      "user": 0.19587455999999998,
      "system": 0.5167565999999999,
      "min": 0.23658409946,
      "max": 0.25957275546,
      "times": [
        0.25022331646,
        0.23956224946000002,
        0.25155151246,
        0.25957275546,
        0.23847852246,
        0.23658409946,
        0.24775326246,
        0.25518947346,
        0.25365596046,
        0.24178429746000002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27240388156000006,
      "stddev": 0.0050331287184695855,
      "median": 0.27232299596,
      "user": 0.21457056,
      "system": 0.5280721999999999,
      "min": 0.26182722446,
      "max": 0.27977794846000004,
      "times": [
        0.26835274546,
        0.27612513946,
        0.27135811646,
        0.27159462946,
        0.27227188446,
        0.27977794846000004,
        0.27250217746,
        0.26182722446,
        0.27237410746,
        0.27785484246000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26356302596000003,
      "stddev": 0.005067025413740405,
      "median": 0.26315414546000004,
      "user": 0.20507356,
      "system": 0.5155269,
      "min": 0.25415385546,
      "max": 0.27117316846,
      "times": [
        0.26124751446,
        0.26032528146,
        0.27117316846,
        0.26028639846,
        0.25415385546,
        0.26499026246,
        0.26954711146,
        0.26181616446,
        0.26759837646,
        0.26449212646000003
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.701 ± 0.016 2.681 2.732 1.85 ± 0.12
pacquet@main 2.691 ± 0.024 2.640 2.733 1.85 ± 0.12
pnpr@HEAD 1.607 ± 0.151 1.394 1.801 1.10 ± 0.13
pnpr@main 1.457 ± 0.096 1.373 1.662 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7013258690199997,
      "stddev": 0.016207693672995103,
      "median": 2.69970415582,
      "user": 1.6102104599999998,
      "system": 1.25495812,
      "min": 2.68136211082,
      "max": 2.7320254248199998,
      "times": [
        2.7320254248199998,
        2.68796312382,
        2.70134715982,
        2.70527686982,
        2.68852984882,
        2.72432874382,
        2.69043135482,
        2.68136211082,
        2.6980611518199997,
        2.70393290182
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.69078814302,
      "stddev": 0.02417159560426923,
      "median": 2.69180316732,
      "user": 1.57360606,
      "system": 1.2561258199999998,
      "min": 2.6403600098199997,
      "max": 2.73262373082,
      "times": [
        2.70464544182,
        2.73262373082,
        2.7021909058199998,
        2.6403600098199997,
        2.68013834482,
        2.67829023982,
        2.68697583082,
        2.68046432682,
        2.70556209582,
        2.69663050382
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6073607809200001,
      "stddev": 0.1512387842882762,
      "median": 1.59104090282,
      "user": 0.9451634599999998,
      "system": 1.1120099200000002,
      "min": 1.39380127782,
      "max": 1.8007982148200001,
      "times": [
        1.39380127782,
        1.58539309382,
        1.59668871182,
        1.4020319328200002,
        1.5383608428200002,
        1.5049029338200002,
        1.70883314982,
        1.75263430382,
        1.79016334782,
        1.8007982148200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4573862336199999,
      "stddev": 0.0957831869338362,
      "median": 1.42203032882,
      "user": 0.9774840600000001,
      "system": 1.08326382,
      "min": 1.3726404888200001,
      "max": 1.66245107882,
      "times": [
        1.43380086482,
        1.39132321682,
        1.66245107882,
        1.41087926682,
        1.43318139082,
        1.5470151228200002,
        1.3726404888200001,
        1.39607128482,
        1.5463321498200002,
        1.38016747182
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 540.0 ± 12.0 517.3 558.3 1.87 ± 0.06
pacquet@main 528.0 ± 8.8 517.0 542.9 1.82 ± 0.05
pnpr@HEAD 289.5 ± 6.6 275.8 298.6 1.00
pnpr@main 292.5 ± 7.0 283.2 302.1 1.01 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5400273395200001,
      "stddev": 0.011986316742459997,
      "median": 0.54188704052,
      "user": 0.6508079600000001,
      "system": 0.64423532,
      "min": 0.5173252875200001,
      "max": 0.5582520495200001,
      "times": [
        0.5582520495200001,
        0.55361192552,
        0.5424720705200001,
        0.53185580052,
        0.54130201052,
        0.5441779065200001,
        0.54639909352,
        0.5298306815200001,
        0.5350465695200001,
        0.5173252875200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5280189818200001,
      "stddev": 0.008774373872752546,
      "median": 0.5301784865200001,
      "user": 0.6405668600000001,
      "system": 0.6407145200000001,
      "min": 0.5170135935200001,
      "max": 0.5429194825200001,
      "times": [
        0.5171203045200001,
        0.53424264852,
        0.52137742752,
        0.5199132945200001,
        0.5306790575200001,
        0.5429194825200001,
        0.5314098505200001,
        0.53583624352,
        0.5170135935200001,
        0.5296779155200001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28952213511999997,
      "stddev": 0.006556843843580921,
      "median": 0.29020305702,
      "user": 0.17951956,
      "system": 0.50290722,
      "min": 0.27582624452,
      "max": 0.29862374052,
      "times": [
        0.29148930552,
        0.29135836952,
        0.29795079452,
        0.28685475152,
        0.27582624452,
        0.28766345252000003,
        0.28904774452,
        0.28474248152,
        0.29862374052,
        0.29166446652
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29254377832,
      "stddev": 0.006967389631107587,
      "median": 0.29197080102,
      "user": 0.18500226000000003,
      "system": 0.50091412,
      "min": 0.28321685252,
      "max": 0.30214508052,
      "times": [
        0.28972651052,
        0.28440552652,
        0.28647777252,
        0.28994510252,
        0.30149168252,
        0.29399649952,
        0.30000157052,
        0.28321685252,
        0.30214508052,
        0.29403118552
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.832 ± 0.011 1.818 1.850 6.35 ± 0.25
pacquet@main 1.829 ± 0.011 1.804 1.840 6.34 ± 0.25
pnpr@HEAD 0.289 ± 0.011 0.274 0.307 1.00
pnpr@main 0.291 ± 0.006 0.285 0.302 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8324687343600004,
      "stddev": 0.010529259318366235,
      "median": 1.83059123056,
      "user": 0.8526300599999999,
      "system": 0.73318666,
      "min": 1.81803673906,
      "max": 1.8504782570600002,
      "times": [
        1.8431181490600002,
        1.8342825760600001,
        1.8504782570600002,
        1.82585774606,
        1.8313607520600002,
        1.8298217090600002,
        1.8439600520600001,
        1.8268126900600001,
        1.81803673906,
        1.8209586730600003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.8291811232600002,
      "stddev": 0.010827430428389842,
      "median": 1.82978914206,
      "user": 0.8841694599999999,
      "system": 0.6788418599999999,
      "min": 1.8035317160600002,
      "max": 1.8399664930600002,
      "times": [
        1.8263722420600002,
        1.8399664930600002,
        1.83276288906,
        1.8379366350600002,
        1.8233506400600001,
        1.8035317160600002,
        1.8268153950600001,
        1.8365757770600002,
        1.8381826980600002,
        1.8263167470600001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28858640335999997,
      "stddev": 0.011138417268206302,
      "median": 0.28896207606,
      "user": 0.18243376000000003,
      "system": 0.49663445999999994,
      "min": 0.27437008406,
      "max": 0.30743645606000003,
      "times": [
        0.29067661506000003,
        0.30743645606000003,
        0.28577799506,
        0.28724753706,
        0.29224154706,
        0.29413649906,
        0.30205412706,
        0.27533432706,
        0.27658884606,
        0.27437008406
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29109835036,
      "stddev": 0.005704349873019998,
      "median": 0.29072757506,
      "user": 0.17639256,
      "system": 0.51392226,
      "min": 0.28450143306000003,
      "max": 0.30220597206,
      "times": [
        0.29671673206,
        0.29534688506,
        0.28515097506,
        0.28533285606000003,
        0.28851345806,
        0.30220597206,
        0.29176004206,
        0.29031832006,
        0.28450143306000003,
        0.29113683006
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 314.5 ± 9.3 303.7 334.3 3.74 ± 0.15
pacquet@main 319.9 ± 11.0 305.7 334.0 3.81 ± 0.17
pnpr@HEAD 84.5 ± 2.4 81.1 89.3 1.01 ± 0.04
pnpr@main 84.0 ± 2.3 81.2 88.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.31451601174000005,
      "stddev": 0.009335898323047669,
      "median": 0.31091174894,
      "user": 0.30597921999999994,
      "system": 0.05149028,
      "min": 0.30366326044,
      "max": 0.33426133144000003,
      "times": [
        0.30366326044,
        0.31035478144,
        0.31067906144,
        0.30892538544000003,
        0.32527528544,
        0.32090568944000003,
        0.31114443644,
        0.31143951044,
        0.33426133144000003,
        0.30851137544
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.31989061614000003,
      "stddev": 0.01097558839830296,
      "median": 0.32086437194,
      "user": 0.30683612,
      "system": 0.05679578,
      "min": 0.30566295944000005,
      "max": 0.33399970044000005,
      "times": [
        0.33079906144000004,
        0.30593530144000003,
        0.33399970044000005,
        0.32662576444,
        0.31197712144,
        0.33239843944,
        0.30566295944000005,
        0.32129061244,
        0.32043813144,
        0.30977906944
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0844864110157576,
      "stddev": 0.002403422079614919,
      "median": 0.08399127644000001,
      "user": 0.019192641212121213,
      "system": 0.008754924848484847,
      "min": 0.08107129544000001,
      "max": 0.08929664144,
      "times": [
        0.08655208144000001,
        0.08218286644,
        0.08159098344000001,
        0.08263302344000001,
        0.08243709444000001,
        0.08356173044000001,
        0.08135026044,
        0.08332652644,
        0.08220795344000001,
        0.08325007244,
        0.08675824944,
        0.08734716644000001,
        0.08700177744000001,
        0.08107129544000001,
        0.08429327444000001,
        0.08641728844,
        0.08191564444,
        0.08455816344000001,
        0.08682268044000001,
        0.08652636344,
        0.08399127644000001,
        0.08823778044000001,
        0.08929664144,
        0.08202737444000001,
        0.08493148444000001,
        0.08801442144,
        0.08490396244000001,
        0.08338088944000001,
        0.08876230844,
        0.08530139944000001,
        0.08262567944,
        0.08194293544,
        0.08283091444000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.083994814565,
      "stddev": 0.002288663481632044,
      "median": 0.08330025194000001,
      "user": 0.020186426250000004,
      "system": 0.007686200000000001,
      "min": 0.08116267844000001,
      "max": 0.08824810044,
      "times": [
        0.08824810044,
        0.08506347244000001,
        0.08374615544000001,
        0.08172537544000001,
        0.08328950644000001,
        0.08695734344000002,
        0.08710203644,
        0.08805773244000001,
        0.08760302744000001,
        0.08721776344000001,
        0.08410910844000001,
        0.08244045044000001,
        0.08324566544,
        0.08173750844000001,
        0.08252229444,
        0.08116267844000001,
        0.08396503744000001,
        0.08153558944000001,
        0.08245672244,
        0.08244183344000001,
        0.08214978444000001,
        0.08233511244000001,
        0.08183124544,
        0.08344519944,
        0.08161652144,
        0.08556471544000001,
        0.08537721244,
        0.08188739044000001,
        0.08175915944,
        0.08331099744,
        0.08776090544000001,
        0.08616842044
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.455 ± 0.066 4.409 4.588 1.27 ± 0.03
pacquet@main 4.527 ± 0.109 4.420 4.754 1.29 ± 0.04
pnpr@HEAD 3.512 ± 0.075 3.442 3.622 1.00
pnpr@main 3.552 ± 0.123 3.433 3.761 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.45512822638,
      "stddev": 0.06616515706391381,
      "median": 4.42844598508,
      "user": 1.67581056,
      "system": 1.3417682,
      "min": 4.4089181250800005,
      "max": 4.58779346108,
      "times": [
        4.42349843908,
        4.41056392908,
        4.44378334908,
        4.4089181250800005,
        4.41977877508,
        4.58779346108,
        4.437953027080001,
        4.56926752808,
        4.43339353108,
        4.416332099080001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.526811487380001,
      "stddev": 0.10858757753917844,
      "median": 4.508344447580001,
      "user": 1.6586601600000002,
      "system": 1.3617542,
      "min": 4.420347337080001,
      "max": 4.75372937908,
      "times": [
        4.429816475080001,
        4.53204750508,
        4.600302039080001,
        4.540649758080001,
        4.424193021080001,
        4.62935470908,
        4.75372937908,
        4.453033260080001,
        4.420347337080001,
        4.48464139008
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.51205267988,
      "stddev": 0.07508046825864728,
      "median": 3.47920136958,
      "user": 1.16043386,
      "system": 1.1941907,
      "min": 3.44225157308,
      "max": 3.62190647908,
      "times": [
        3.45258252108,
        3.62190647908,
        3.44930428908,
        3.45023672908,
        3.53972722408,
        3.44225157308,
        3.6154611120799998,
        3.59516197208,
        3.44807468108,
        3.5058202180799998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.55150832968,
      "stddev": 0.12285195345817221,
      "median": 3.48411331908,
      "user": 1.1343177599999998,
      "system": 1.2366375,
      "min": 3.43323011508,
      "max": 3.76098983208,
      "times": [
        3.45929309808,
        3.4490394860799998,
        3.44883095508,
        3.43323011508,
        3.66455079908,
        3.65931376308,
        3.76098983208,
        3.50002191108,
        3.6716086100800003,
        3.46820472708
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13124
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,681.36 ms
(-0.11%)Baseline: 2,684.43 ms
3,221.32 ms
(83.24%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,818.04 ms
(-1.33%)Baseline: 1,842.61 ms
2,211.13 ms
(82.22%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
517.33 ms
(-5.06%)Baseline: 544.87 ms
653.84 ms
(79.12%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
303.66 ms
(-7.11%)Baseline: 326.92 ms
392.30 ms
(77.41%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,343.34 ms
(-1.61%)Baseline: 2,381.63 ms
2,857.95 ms
(81.99%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,408.92 ms
(-1.00%)Baseline: 4,453.23 ms
5,343.88 ms
(82.50%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
243.53 ms
(-1.73%)Baseline: 247.83 ms
297.39 ms
(81.89%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13124
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,393.80 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
274.37 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
275.83 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
81.07 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,363.09 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,442.25 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
261.83 ms
🐰 View full continuous benchmarking report in Bencher

@Ayush442842q

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@Ayush442842q: Automated reviews have been resumed.

✅ Action performed

Reviews resumed.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zkochan
zkochan merged commit b080184 into pnpm:main Jul 21, 2026
36 checks passed
@welcome

welcome Bot commented Jul 21, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

zkochan added a commit to xianjianlf2/pnpm that referenced this pull request Jul 30, 2026
…verage

Re-add the explicit autoInstallPeers: false test that the test rewrite
dropped, and remove the changeset: the user-visible fix for
pnpm#13108 already shipped and was
released via pnpm#13124, so this PR no
longer changes behavior and must not emit a duplicate release note.

Co-Authored-By: Claude Fable 5 <[email protected]>
zkochan added a commit that referenced this pull request Jul 30, 2026
Multiple contributors keep submitting parallel PRs for the same issue
(e.g. #13114 was superseded by #13124 for issue
#13108). GitHub already cross-links every PR that references
an issue on the issue's timeline, so add a checklist item prompting
authors to check those links before submitting.

Co-Authored-By: Claude Fable 5 <[email protected]>
zkochan added a commit that referenced this pull request Jul 30, 2026
…#13498)

Multiple contributors keep submitting parallel PRs for the same issue
(e.g. #13114 was superseded by #13124 for issue
#13108). GitHub already cross-links every PR that references
an issue on the issue's timeline, so add a checklist item prompting
authors to check those links before submitting.
@Ayush442842q
Ayush442842q deleted the fix/peer-deps-prefix-precedence- branch August 22, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pnpm update and pnpm add are influenced by existing peerDependencies version prefixes

3 participants