Skip to content

fix(deps-resolver): gate peer hoisting on dedupePeerDependents too - #13381

Merged
zkochan merged 3 commits into
mainfrom
gate-peer-hoist-on-dedupe-peer-dependents
Jul 25, 2026
Merged

zkochan merged 3 commits into
mainfrom
gate-peer-hoist-on-dedupe-peer-dependents

Conversation

@zkochan

@zkochan zkochan commented Jul 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Second divergence found while fixing #13325, in the same area but independent of it: pacquet ran the peer hoist rounds on every install, so a missing peer that some version elsewhere in the workspace could satisfy was installed even with autoInstallPeers: false and dedupePeerDependents: false. The dependent then carried a peer context the TypeScript CLI never writes.

Upstream derives one flag from the two settings — hoistPeers = autoInstallPeers || dedupePeerDependents in pnpm11/installing/deps-resolver/src/resolveDependencyTree.ts — and resolveRootDependencies returns before the hoist loop when it is false: hoisting a peer nobody asked to install only pays off when peer-suffixed variants are being collapsed. ImporterHoistState now carries the same derived flag, and both hoist rounds no-op when it is unset. The final peer pass is untouched, so unmet peers are still reported as warnings.

Verified against the TypeScript CLI (node pnpm11/pnpm/dist/pnpm.mjs, v11.17.0) on a two-project workspace where pkg-b resolves @pnpm.e2e/[email protected] and pkg-a depends on @pnpm.e2e/abc-optional-peers, which declares it as an optional peer:

autoInstallPeers dedupePeerDependents before after
false true (default) identical identical
true false identical identical
true true identical identical
false false [email protected](@pnpm.e2e/[email protected]) vs [email protected] identical

Both stacks get a regression test for the newly-fixed combination, next to the #13325 pair they complement.

Squash Commit Body

The hoist rounds ran on every install, so a missing peer that some
version elsewhere in the workspace could satisfy was installed even with
`autoInstallPeers: false` and `dedupePeerDependents: false` — the
dependent then carried a peer context the TypeScript CLI never writes.

Upstream derives one flag from the two settings —
`hoistPeers = autoInstallPeers || dedupePeerDependents` in
`installing/deps-resolver/src/resolveDependencyTree.ts` — and
`resolveRootDependencies` returns before the hoist loop when it is
false: hoisting a peer nobody asked to install only pays off if
peer-suffixed variants are being collapsed. `ImporterHoistState` now
carries the same derived flag and both rounds no-op when it is unset,
which leaves the peer missing and the dependent's snapshot free of a
peer suffix. The final peer pass is untouched, so unmet peers are still
reported.

Verified against the TypeScript CLI on a two-project workspace: all four
`autoInstallPeers` x `dedupePeerDependents` combinations now produce
byte-identical lockfiles, where the both-off combination previously
diverged.

Follow-up to pnpm/pnpm#13372.

Checklist

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

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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • When both peer auto-installation and peer deduplication are disabled, missing peer dependencies are no longer hoisted or installed unexpectedly.
    • Workspace installations now consistently preserve this configuration across packages.
    • Frozen-lockfile installations continue to succeed with the corrected behavior.
  • Tests

    • Added coverage for optional peer handling and workspace installation scenarios.

zkochan and others added 2 commits July 26, 2026 00:48
The hoist rounds ran on every install, so a missing peer that some
version elsewhere in the workspace could satisfy was installed even with
`autoInstallPeers: false` and `dedupePeerDependents: false` — the
dependent then carried a peer context the TypeScript CLI never writes.

Upstream derives one flag from the two settings —
`hoistPeers = autoInstallPeers || dedupePeerDependents` in
`installing/deps-resolver/src/resolveDependencyTree.ts` — and
`resolveRootDependencies` returns before the hoist loop when it is
false: hoisting a peer nobody asked to install only pays off if
peer-suffixed variants are being collapsed. `ImporterHoistState` now
carries the same derived flag and both rounds no-op when it is unset,
which leaves the peer missing and the dependent's snapshot unsuffixed.
The final peer pass is untouched, so unmet peers are still reported.

Verified against the TypeScript CLI on a two-project workspace: all four
`autoInstallPeers` x `dedupePeerDependents` combinations now produce
byte-identical lockfiles, where the both-off combination previously
diverged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 25, 2026 22:54

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 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ed3f2135-ad5c-4e58-aa96-7b20ee6e0627

📥 Commits

Reviewing files that changed from the base of the PR and between 4a081e6 and 562a9ba.

📒 Files selected for processing (1)
  • pnpm/crates/cli/tests/workspace_install.rs
📝 Walkthrough

Walkthrough

Peer hoisting now requires either autoInstallPeers or dedupePeerDependents. The setting is propagated through workspace resolution, hoist rounds are gated accordingly, regression tests cover both behaviors, and the pnpm 11 node-gyp constraint is updated.

Changes

Peer hoist gating

Layer / File(s) Summary
Resolver option propagation
pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs, pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs, pnpm/crates/resolving-deps-resolver/src/resolve_workspace.rs
Adds and propagates dedupe_peer_dependents through importer and workspace resolution options.
Conditional peer hoist rounds
pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs
Derives hoist_peers from both peer settings and skips required or optional hoisting when both are disabled.
Resolver and workspace regression coverage
pnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rs, pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs, pnpm/crates/cli/tests/workspace_install.rs, pnpm11/installing/deps-installer/test/install/peerDependencies.ts, .changeset/gate-peer-hoist-on-dedupe-peer-dependents.md
Tests missing and peer-suffixed optional-peer outcomes across resolver and install flows, and records the patch release change.

Tooling dependency update

Layer / File(s) Summary
node-gyp version update
pnpm11/pnpm/package.json
Updates the node-gyp dependency constraint from ^12.3.0 to ^12.4.0.

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

Sequence Diagram(s)

sequenceDiagram
  participant InstallConfig
  participant WorkspaceResolver
  participant ImporterHoistState
  participant PeerHoistRounds
  InstallConfig->>WorkspaceResolver: pass autoInstallPeers and dedupePeerDependents
  WorkspaceResolver->>ImporterHoistState: create importer options
  ImporterHoistState->>PeerHoistRounds: run hoist rounds when either setting is enabled
  ImporterHoistState-->>PeerHoistRounds: skip rounds when both settings are disabled
Loading

Possibly related PRs

  • pnpm/pnpm#12179: Related resolver option wiring and deterministic peer-dependent deduplication.
  • pnpm/pnpm#13343: Related changes to workspace peer-hoisting behavior.
  • pnpm/pnpm#13378: Related optional-peer regression coverage in workspace installation tests.

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

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gate-peer-hoist-on-dedupe-peer-dependents

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

Fix peer hoisting when both autoInstallPeers and dedupePeerDependents are off

🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Gate peer-hoist rounds behind autoInstallPeers || dedupePeerDependents to match upstream
 behavior.
• Thread dedupePeerDependents through workspace/importer resolver options to keep lockfile
 snapshots unsuffixed.
• Add regression coverage for the both-off combination in Rust CLI and pnpm11 deps-installer tests.
Diagram

graph TD
  A[/"Install config\n(autoInstallPeers, dedupePeerDependents)"/] --> B["resolve_workspace" ] --> C["ResolveImporterOptions" ] --> D["ImporterHoistState\nhoist_peers" ] --> E["Required peer hoist\n(run_required_round)" ] --> F["Optional peer hoist\n(hoist_optional_round)" ] --> G[("Lockfile snapshot\n(peer suffix or not)")]
  H["Rust CLI test\nworkspace_install.rs" ] --> D
  I["pnpm11 test\npeerDependencies.ts" ] --> D
  subgraph Legend
    direction LR
    _cfg[/"Config"/] ~~~ _svc["Module/Logic"] ~~~ _data[("Data/Output")]
  end
Loading
High-Level Assessment

The approach matches pnpm upstream’s derived hoistPeers = autoInstallPeers || dedupePeerDependents behavior and keeps the final peer-reporting pass intact, minimizing behavioral change while fixing the lockfile divergence. Alternatives (e.g., computing the gate ad-hoc inside each round without storing it, or returning early at higher call sites) don’t materially improve clarity or correctness compared to the explicit hoist_peers state.

Files changed (9) +196 / -8

Bug fix (3) +32 / -7
install_with_fresh_lockfile.rsPropagate dedupe_peer_dependents into resolver options +1/-0

Propagate dedupe_peer_dependents into resolver options

• Threads 'config.dedupe_peer_dependents' into the options passed to dependency resolution so importer hoist logic can correctly decide whether to run hoist rounds.

pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs

resolve_importer.rsGate importer peer-hoist rounds on derived hoist_peers flag +26/-3

Gate importer peer-hoist rounds on derived hoist_peers flag

• Extends 'ResolveImporterOptions' with 'dedupe_peer_dependents' and records a derived 'hoist_peers = auto_install_peers || dedupe_peer_dependents' in 'ImporterHoistState'. Makes required and optional hoist rounds no-op when hoist_peers is false, preserving peer warning reporting while preventing unintended peer installation and peer-suffixed snapshots.

pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs

resolve_workspace.rsOverride dedupe_peer_dependents at workspace wiring stage +5/-4

Override dedupe_peer_dependents at workspace wiring stage

• Updates workspace option wiring so both 'auto_install_peers' and 'dedupe_peer_dependents' are treated as workspace-wide settings and override any per-importer callback values, keeping hoist logic consistent with tree-walk pruning assumptions.

pnpm/crates/resolving-deps-resolver/src/resolve_workspace.rs

Tests (4) +158 / -0
workspace_install.rsAdd workspace regression test for both hoist settings off +41/-0

Add workspace regression test for both hoist settings off

• Adds a two-project workspace test that sets 'autoInstallPeers: false' and 'dedupePeerDependents: false' in 'pnpm-workspace.yaml', verifies the dependent’s lockfile entry is unsuffixed, and ensures the optional peer is not linked into the importer. Also checks idempotence via '--frozen-lockfile'.

pnpm/crates/cli/tests/workspace_install.rs

tests.rsAdd resolver-level test for both-off hoist behavior +71/-0

Add resolver-level test for both-off hoist behavior

• Adds a tokio test that seeds preferred versions for an optional peer and asserts it stays missing (and the dep path unsuffixed) when both settings are off, while confirming 'dedupePeerDependents' alone still triggers hoisting.

pnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rs

tests.rsUpdate workspace test helper defaults for new option field +1/-0

Update workspace test helper defaults for new option field

• Extends the test options struct initialization to include the new 'dedupe_peer_dependents' field with the default 'true' value.

pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs

peerDependencies.tsAdd pnpm11 test for no peer hoist when both settings are off +45/-0

Add pnpm11 test for no peer hoist when both settings are off

• Adds a deps-installer regression test that creates two projects, disables 'autoInstallPeers' and 'dedupePeerDependents', runs install, and asserts the lockfile version is unsuffixed and the optional peer is not present in the dependent’s node_modules.

pnpm11/installing/deps-installer/test/install/peerDependencies.ts

Documentation (1) +5 / -0
gate-peer-hoist-on-dedupe-peer-dependents.mdAdd changeset describing peer-hoist gating fix +5/-0

Add changeset describing peer-hoist gating fix

• Introduces a patch changeset for pacquet documenting that when both 'autoInstallPeers' and 'dedupePeerDependents' are false, missing peers are no longer hoisted/installed opportunistically.

.changeset/gate-peer-hoist-on-dedupe-peer-dependents.md

Other (1) +1 / -1
package.jsonBump node-gyp dependency +1/-1

Bump node-gyp dependency

• Updates pnpm11’s 'node-gyp' dependency from '^12.3.0' to '^12.4.0'.

pnpm11/pnpm/package.json

@greptile-apps

greptile-apps Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fix(cli): drop an unrelated manifest edi..." | Re-trigger Greptile

Comment thread pnpm11/pnpm/package.json Outdated
"dependencies": {
"@reflink/reflink": "catalog:",
"node-gyp": "^12.3.0",
"node-gyp": "^12.4.0",

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.

P1 Lockfile importer specifier is stale

When the workspace is installed with a frozen lockfile, this manifest requests node-gyp as ^12.4.0 while the corresponding lockfile importer still records ^12.3.0, causing the install to abort with an outdated-lockfile specifier mismatch.

Knowledge Base Used: TypeScript install flow (pnpm11)

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.02     11.7±0.19ms    31.9 MB/sec    1.00     11.5±0.10ms    32.5 MB/sec
packument/parse                1.01     36.8±0.05µs  1804.8 MB/sec    1.00     36.3±0.07µs  1827.2 MB/sec
tarball/download_dependency    1.00      2.4±0.08ms  1829.3 KB/sec    1.00      2.4±0.06ms  1826.6 KB/sec

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Context used
✅ Compliance rules (platform): 24 rules

Grey Divider


Remediation recommended

1. Changeset missing pnpm bump 📘 Rule violation § Compliance
Description
The new changeset only declares a pacquet release, but this PR also changes the published
TypeScript package pnpm (e.g., pnpm11/pnpm/package.json). This violates the requirement to
include affected TypeScript packages (and specifically pnpm) in changesets with an appropriate
bump type.
Code

.changeset/gate-peer-hoist-on-dedupe-peer-dependents.md[R1-3]

+---
+"pacquet": patch
+---
Relevance

⭐⭐⭐ High

Team enforces changeset package list matches published packages changed; pnpm entry expected when
pnpm is modified.

PR-#11481
PR-#11555
PR-#13090

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance requires changesets to include the pnpm package when it is modified, with a valid
bump type. The added changeset declares only pacquet, while pnpm11/pnpm/package.json is modified
in this PR, indicating pnpm is affected but not listed.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
Rule 713441: Require changeset for TypeScript package changes
.changeset/gate-peer-hoist-on-dedupe-peer-dependents.md[1-3]
pnpm11/pnpm/package.json[74-78]

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

## Issue description
The changeset only lists `pacquet`, but this PR also modifies the published TypeScript package `pnpm`, so the changeset must include a `pnpm` entry with a valid bump type.

## Issue Context
The repository uses changesets to track releases per package. This PR updates `pnpm11/pnpm/package.json`, which is a published package (`name: pnpm`).

## Fix Focus Areas
- .changeset/gate-peer-hoist-on-dedupe-peer-dependents.md[1-3]
- pnpm11/pnpm/package.json[74-78]

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


2. Unrelated node-gyp bump ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
This bug-fix PR includes a node-gyp version bump in pnpm11/pnpm/package.json even though the
stated functional change is peer-hoist gating/resolver behavior, making the PR less focused and
harder to audit. Unrelated dependency updates in the same PR increase review risk and can introduce
unsynchronized user-visible changes unless clearly justified and documented.
Code

pnpm11/pnpm/package.json[76]

+    "node-gyp": "^12.4.0",
Relevance

⭐⭐ Medium

Repo sometimes asks to revert unrelated dependency/lockfile churn, but “unrelated bump” is
subjective without clear precedent.

PR-#11450

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance/review guidance expects bug-fix PRs to avoid unrelated changes, and the diff shows
pnpm11/pnpm/package.json updating node-gyp’s allowed version range (from ^12.3.0 to ^12.4.0)
alongside the peer-hoist gating work. Because this dependency bump is separate from the
peer-hoisting behavior change described as the PR’s goal, it expands the review surface and
conflicts with the repo’s scope-discipline guidance unless explicitly tied to the fix.

Rule 2255067: Bug fix changes must not include unrelated refactors or reformatting
pnpm11/pnpm/package.json[73-78]
pnpm11/pnpm/package.json[74-78]
REVIEW_GUIDE.md[166-175]

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

## Issue description
The PR includes a `node-gyp` version-range bump in `pnpm11/pnpm/package.json` that appears unrelated to the stated peer-hoisting/peer-hoist gating bug fix, increasing review and audit surface and conflicting with scope-discipline expectations for bug-fix PRs.

## Issue Context
Compliance/review guidance requires bug-fix PRs to avoid unrelated refactors or dependency updates to reduce risk and keep review/auditing clear. This PR’s stated goal is peer-hoist gating; dependency updates like `node-gyp` should be isolated unless they are required for the behavior change.

Suggested resolution options:
- Revert `node-gyp` back to `^12.3.0` in this PR and open a separate PR/changeset for the dependency update, **or**
- Keep the bump but add a short note in the PR description/commit message explaining why the version change is necessary for the peer-hoist gating work (ideally referencing a concrete failure it resolves, e.g., a CI/test issue).

## Fix Focus Areas
- pnpm11/pnpm/package.json[74-78]
- REVIEW_GUIDE.md[166-175]

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


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

The `node-gyp` bump in pnpm11/pnpm/package.json was uncommitted in the
worktree and got swept into the previous commit; the lockfile importer
still pins the old range, so frozen workspace installs rejected it in
CI. Restored to what main has.

The new test's node_modules check now matches `ErrorKind::NotFound`
rather than any error, so a permission or I/O failure on the path cannot
pass for an absent link.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 25, 2026 23:03

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.

@zkochan

zkochan commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Fixed in 562a9ba — thanks, both findings were right.

Greptile's Lockfile importer specifier is stale (P1): correct, and it was the cause of the red Rust/TS CI runs. The node-gyp ^12.3.0 → ^12.4.0 bump in pnpm11/pnpm/package.json was an unrelated edit sitting uncommitted in my worktree that got swept into the first commit; the lockfile importer still pins the old range, so frozen workspace installs rejected it. That file is back to what main has, and the PR is now Rust changes plus the two regression tests and the changeset.

CodeRabbit's Assert specifically on NotFound (filed on the sibling PR #13378, same assertion shape): the new test's node_modules check now matches ErrorKind::NotFound instead of accepting any error, so a permission or I/O failure on the path can't pass for an absent link. The same tweak went to #13378 in d56d575.


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

@zkochan

zkochan commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Qodo's one remaining finding is Changeset missing pnpm entry, declined for the same reason as on #13372: AGENTS.md states that in changesets pnpm always means the TypeScript CLI package, and that a change whose implementation is Rust-only must omit it. The only TypeScript file here is a test (pnpm11/installing/deps-installer/test/install/peerDependencies.ts) pinning behavior the TypeScript CLI already has — no published TypeScript package changes, so a pnpm bump would attach a release note to the TS CLI for a fix it never needed.


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

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 562a9ba

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 562a9ba9f50a

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.488 ± 0.168 2.334 2.792 1.68 ± 0.18
pacquet@main 2.421 ± 0.097 2.349 2.592 1.63 ± 0.15
pnpr@HEAD 1.481 ± 0.118 1.354 1.732 1.00
pnpr@main 1.568 ± 0.156 1.343 1.755 1.06 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4877655397,
      "stddev": 0.16832426912659287,
      "median": 2.4118706678,
      "user": 1.6719100399999998,
      "system": 1.29568068,
      "min": 2.3336601573,
      "max": 2.7920157463,
      "times": [
        2.6543835093,
        2.3688247233,
        2.3526192973,
        2.3605585623,
        2.7920157463,
        2.4549166123000004,
        2.5358088053,
        2.3336601573,
        2.6823192753000002,
        2.3425487083000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4208116281,
      "stddev": 0.09739425435547984,
      "median": 2.3712989493,
      "user": 1.64790574,
      "system": 1.28082178,
      "min": 2.3492337733,
      "max": 2.5918427863,
      "times": [
        2.3806270903,
        2.3704737153,
        2.5802373133,
        2.3606069153,
        2.3537836293,
        2.3721241833,
        2.5918427863,
        2.3507218003,
        2.3492337733,
        2.4984650743000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4814613061000002,
      "stddev": 0.11750473120898017,
      "median": 1.4842149473000001,
      "user": 1.17751944,
      "system": 1.1487713800000001,
      "min": 1.3538085413,
      "max": 1.7316691453000002,
      "times": [
        1.7316691453000002,
        1.4690483433000001,
        1.5330967863000002,
        1.5085635723000002,
        1.3592391173,
        1.5802009533,
        1.3538085413,
        1.3903715193000001,
        1.3892335313000002,
        1.4993815513000002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5678132343000002,
      "stddev": 0.15551321193540876,
      "median": 1.6151954338,
      "user": 1.19576884,
      "system": 1.12632868,
      "min": 1.3430519503,
      "max": 1.7546188653,
      "times": [
        1.3558233333,
        1.3430519503,
        1.7546188653,
        1.6753512083000002,
        1.6486444893,
        1.7396192143000002,
        1.5471473023,
        1.6351459943000002,
        1.3834851123,
        1.5952448733
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 252.9 ± 3.0 248.6 259.2 1.02 ± 0.03
pacquet@main 248.1 ± 6.0 239.6 259.5 1.00
pnpr@HEAD 270.9 ± 5.9 262.8 282.5 1.09 ± 0.04
pnpr@main 265.8 ± 7.1 256.6 276.7 1.07 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2528682664,
      "stddev": 0.0029669477152616413,
      "median": 0.2526680375,
      "user": 0.21745411999999997,
      "system": 0.49550456,
      "min": 0.248560312,
      "max": 0.259175065,
      "times": [
        0.248560312,
        0.253232198,
        0.250742886,
        0.250337047,
        0.253064864,
        0.252271211,
        0.25577658400000003,
        0.253453248,
        0.252069249,
        0.259175065
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24813590030000002,
      "stddev": 0.006046714356503447,
      "median": 0.2476737575,
      "user": 0.19809952,
      "system": 0.49711326,
      "min": 0.239595892,
      "max": 0.259532791,
      "times": [
        0.25485699300000003,
        0.242792186,
        0.259532791,
        0.242939221,
        0.239595892,
        0.244833529,
        0.247339144,
        0.250235416,
        0.25122546,
        0.248008371
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2709497966,
      "stddev": 0.005890773842710047,
      "median": 0.270135133,
      "user": 0.22137822,
      "system": 0.49152486,
      "min": 0.262757482,
      "max": 0.282463258,
      "times": [
        0.275165158,
        0.271194335,
        0.269075931,
        0.265847319,
        0.262757482,
        0.282463258,
        0.265868674,
        0.2768407,
        0.271453582,
        0.268831527
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.265811,
      "stddev": 0.007124068400342581,
      "median": 0.264817715,
      "user": 0.19887481999999998,
      "system": 0.51967376,
      "min": 0.25659054800000003,
      "max": 0.276724091,
      "times": [
        0.273384342,
        0.264943119,
        0.26063121,
        0.274902849,
        0.267142412,
        0.258203679,
        0.260895439,
        0.264692311,
        0.276724091,
        0.25659054800000003
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.751 ± 0.018 2.714 2.784 1.79 ± 0.15
pacquet@main 2.737 ± 0.020 2.709 2.763 1.78 ± 0.15
pnpr@HEAD 1.578 ± 0.131 1.426 1.839 1.03 ± 0.12
pnpr@main 1.535 ± 0.126 1.429 1.743 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7514051359,
      "stddev": 0.018159872315959228,
      "median": 2.7505210193,
      "user": 1.8641060200000001,
      "system": 1.3334241199999999,
      "min": 2.7139918748,
      "max": 2.7838863458,
      "times": [
        2.7397589968,
        2.7457926728,
        2.7610423697999997,
        2.7838863458,
        2.7139918748,
        2.7454332768,
        2.7602113078,
        2.7628924757999997,
        2.7487175618,
        2.7523244768
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.737212036,
      "stddev": 0.01953018084752483,
      "median": 2.7456426888000003,
      "user": 1.81770992,
      "system": 1.3279420199999998,
      "min": 2.7087802938,
      "max": 2.7634511578,
      "times": [
        2.7503286827999998,
        2.7434197588,
        2.7118745708,
        2.7376306308,
        2.7108676598,
        2.7487056698,
        2.7087802938,
        2.7491963168,
        2.7478656188,
        2.7634511578
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5776503364,
      "stddev": 0.13058492916502099,
      "median": 1.5717966543,
      "user": 1.2215763199999998,
      "system": 1.11951692,
      "min": 1.4263462117999999,
      "max": 1.8385372008,
      "times": [
        1.6176391907999998,
        1.8385372008,
        1.4418112698,
        1.7230083997999999,
        1.4263462117999999,
        1.5703253768,
        1.5469683088,
        1.6014969388,
        1.4371025348,
        1.5732679318
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5349710035,
      "stddev": 0.12636651887907874,
      "median": 1.4828311258,
      "user": 1.19950902,
      "system": 1.15365832,
      "min": 1.4289728038,
      "max": 1.7426934148,
      "times": [
        1.4551528038,
        1.4324990968,
        1.7426934148,
        1.4984864968,
        1.4289728038,
        1.4671757548,
        1.4989064058000001,
        1.7165980408000001,
        1.6800575817999999,
        1.4291676358
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 587.3 ± 8.5 571.2 599.7 1.97 ± 0.07
pacquet@main 572.8 ± 9.1 560.1 588.2 1.92 ± 0.07
pnpr@HEAD 306.3 ± 8.2 297.3 318.3 1.03 ± 0.04
pnpr@main 298.4 ± 10.3 287.1 321.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.58726221034,
      "stddev": 0.008545606588519427,
      "median": 0.5884308284399999,
      "user": 0.7100970999999999,
      "system": 0.6930559999999998,
      "min": 0.57123860944,
      "max": 0.59972143444,
      "times": [
        0.58625449844,
        0.57123860944,
        0.59362879144,
        0.58461374444,
        0.59060715844,
        0.59972143444,
        0.59399129444,
        0.59282229944,
        0.57966593144,
        0.58007834144
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.57281152384,
      "stddev": 0.009067028144804402,
      "median": 0.57165794944,
      "user": 0.6924825000000001,
      "system": 0.6705867999999999,
      "min": 0.56006692144,
      "max": 0.58821419444,
      "times": [
        0.56720554244,
        0.58821419444,
        0.57263002144,
        0.5767161844400001,
        0.58249521344,
        0.58044704644,
        0.57068587744,
        0.56006692144,
        0.56265564244,
        0.56699859444
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30625578663999997,
      "stddev": 0.008227190208822902,
      "median": 0.30488996593999995,
      "user": 0.1874445,
      "system": 0.5220122999999999,
      "min": 0.29726619444,
      "max": 0.31833667744,
      "times": [
        0.30671888344,
        0.29836219944,
        0.31800107244,
        0.29726619444,
        0.30306104844,
        0.29851124444,
        0.31497416244,
        0.30032351644,
        0.31833667744,
        0.30700286744
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29841619184,
      "stddev": 0.010283411698605192,
      "median": 0.29656156844000003,
      "user": 0.1862572,
      "system": 0.5146575,
      "min": 0.28712488144,
      "max": 0.32145707244,
      "times": [
        0.30104318044,
        0.32145707244,
        0.29094329543999997,
        0.30270950943999997,
        0.29081304943999997,
        0.30096456344,
        0.29215857344,
        0.29110107844,
        0.30584671444,
        0.28712488144
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.903 ± 0.013 1.880 1.921 6.39 ± 0.13
pacquet@main 1.890 ± 0.009 1.878 1.905 6.35 ± 0.12
pnpr@HEAD 0.299 ± 0.006 0.292 0.315 1.00 ± 0.03
pnpr@main 0.298 ± 0.006 0.287 0.304 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9026785888400002,
      "stddev": 0.0130532767035388,
      "median": 1.9015543936400001,
      "user": 0.94316064,
      "system": 0.7807073999999999,
      "min": 1.8799420806400002,
      "max": 1.92083841564,
      "times": [
        1.89469726564,
        1.88994160364,
        1.8974501636400003,
        1.8990128646400002,
        1.91574556064,
        1.8799420806400002,
        1.9040959226400003,
        1.92083841564,
        1.9073752766400003,
        1.9176867346400002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.89031804054,
      "stddev": 0.008991284271060182,
      "median": 1.8919986721400002,
      "user": 0.91000314,
      "system": 0.7723581,
      "min": 1.87842679364,
      "max": 1.9051543786400003,
      "times": [
        1.89072444564,
        1.88067367964,
        1.9051543786400003,
        1.8798084056400002,
        1.8955460786400002,
        1.8981296926400002,
        1.87842679364,
        1.8932728986400003,
        1.8964240726400001,
        1.8850199596400001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29914302864000003,
      "stddev": 0.006494615775760942,
      "median": 0.29826618664000004,
      "user": 0.20366933999999998,
      "system": 0.4946453,
      "min": 0.29209481364,
      "max": 0.31500415164,
      "times": [
        0.29532926564,
        0.29209481364,
        0.29978813764,
        0.29564242564,
        0.29338645864,
        0.29674423564,
        0.30152241664,
        0.30092843464,
        0.31500415164,
        0.30098994664
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29776278914,
      "stddev": 0.005591018722276417,
      "median": 0.29676591964,
      "user": 0.17890203999999998,
      "system": 0.5225945,
      "min": 0.28732459064,
      "max": 0.30438400764,
      "times": [
        0.29462754064,
        0.30438400764,
        0.30230501864,
        0.29792413464,
        0.29430406464000003,
        0.28732459064,
        0.30290058564,
        0.29560770464,
        0.29405880164,
        0.30419144264000003
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 369.4 ± 11.7 352.4 393.5 4.21 ± 0.17
pacquet@main 367.0 ± 4.1 360.8 374.0 4.18 ± 0.12
pnpr@HEAD 88.8 ± 3.1 84.7 97.1 1.01 ± 0.04
pnpr@main 87.8 ± 2.2 85.1 94.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.36937047096000003,
      "stddev": 0.011741613491376786,
      "median": 0.37065639506000003,
      "user": 0.36332489999999995,
      "system": 0.06681020000000001,
      "min": 0.35235037206,
      "max": 0.39354368806,
      "times": [
        0.39354368806,
        0.37128664506000003,
        0.36942081806000004,
        0.37597082306,
        0.35496330306,
        0.35235037206,
        0.37157169806,
        0.37428515106000004,
        0.37002614506000003,
        0.36028606606
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.36700160606,
      "stddev": 0.004138590568671523,
      "median": 0.36631768356000005,
      "user": 0.3450911,
      "system": 0.07946120000000001,
      "min": 0.36083554606,
      "max": 0.37396692906,
      "times": [
        0.36589936906000003,
        0.36773339806000005,
        0.37254347506,
        0.37396692906,
        0.36961775206,
        0.36673599806,
        0.36252993406,
        0.36572198906000003,
        0.36083554606,
        0.36443167006000005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08876836957612903,
      "stddev": 0.0030779534367382697,
      "median": 0.08832490506,
      "user": 0.020769116129032254,
      "system": 0.011194032258064517,
      "min": 0.08471224506,
      "max": 0.09710405406,
      "times": [
        0.09037605506,
        0.08530009206,
        0.09172039106,
        0.08632385606,
        0.09172811406,
        0.09357191406,
        0.08859256906,
        0.08577604006,
        0.08717864106,
        0.09015797405999999,
        0.08548296206,
        0.09234867506,
        0.09071636806,
        0.08972732206,
        0.08545420106,
        0.08614271106,
        0.08471224506,
        0.09140684606,
        0.09710405406,
        0.08675698706,
        0.09032706706,
        0.08661308506,
        0.08800821806,
        0.08832490506,
        0.08628629806,
        0.09242652906,
        0.09031077906,
        0.08588202006,
        0.09172554906,
        0.08521031006,
        0.08612667806
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08782899627212121,
      "stddev": 0.0022355561149603495,
      "median": 0.08693192806,
      "user": 0.01947278181818182,
      "system": 0.01181722424242424,
      "min": 0.08510939206,
      "max": 0.09442960906,
      "times": [
        0.08551938406,
        0.09151871506,
        0.08724193306,
        0.08654268406,
        0.08646044206,
        0.08711725306,
        0.09181744106,
        0.08658985206,
        0.08726336906,
        0.08578365606,
        0.08712816306,
        0.08698110406,
        0.08605363206,
        0.09442960906,
        0.08510939206,
        0.08960379206,
        0.08928989506,
        0.08555364806,
        0.08683959106,
        0.08686328906,
        0.08713844306,
        0.08633831606,
        0.08693192806,
        0.08688513906,
        0.08688898606,
        0.08667088506,
        0.08955004406,
        0.08846847706,
        0.08624656706,
        0.08626232506,
        0.09126354006,
        0.09082341906,
        0.09118196206
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.587 ± 0.161 4.425 4.823 1.32 ± 0.05
pacquet@main 4.468 ± 0.091 4.402 4.683 1.28 ± 0.03
pnpr@HEAD 3.542 ± 0.101 3.452 3.757 1.02 ± 0.03
pnpr@main 3.487 ± 0.053 3.445 3.617 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.587428776440001,
      "stddev": 0.16113913964773763,
      "median": 4.53735019824,
      "user": 1.7973512,
      "system": 1.40310388,
      "min": 4.42457884624,
      "max": 4.82302630724,
      "times": [
        4.793721032240001,
        4.65547932024,
        4.42457884624,
        4.559908192240001,
        4.51479220424,
        4.77542042724,
        4.43699001524,
        4.44339441524,
        4.82302630724,
        4.446977004240001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.467684448640001,
      "stddev": 0.09132054818364402,
      "median": 4.43081582124,
      "user": 1.7821036999999997,
      "system": 1.38104218,
      "min": 4.402131323240001,
      "max": 4.68251079224,
      "times": [
        4.44719614224,
        4.4240251312400005,
        4.42985886824,
        4.68251079224,
        4.584773424240001,
        4.402131323240001,
        4.41483796724,
        4.41990678724,
        4.431772774240001,
        4.4398312762400005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5415666029399993,
      "stddev": 0.10063673287091456,
      "median": 3.51653507324,
      "user": 1.2973615,
      "system": 1.22532418,
      "min": 3.45168422924,
      "max": 3.75659944124,
      "times": [
        3.45206747624,
        3.75659944124,
        3.54729847824,
        3.45501641524,
        3.46280472724,
        3.59991535124,
        3.62685989624,
        3.48577166824,
        3.57764834624,
        3.45168422924
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.4873593083400003,
      "stddev": 0.05271726875697333,
      "median": 3.46962508724,
      "user": 1.3160105,
      "system": 1.21031018,
      "min": 3.44493611624,
      "max": 3.61662408324,
      "times": [
        3.45321307024,
        3.49861507124,
        3.45631824024,
        3.45184099024,
        3.44493611624,
        3.47796835324,
        3.61662408324,
        3.47234101024,
        3.46690916424,
        3.53482698424
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13381
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,713.99 ms
(-0.73%)Baseline: 2,734.01 ms
3,280.81 ms
(82.72%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,879.94 ms
(-0.54%)Baseline: 1,890.10 ms
2,268.12 ms
(82.89%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
571.24 ms
(-0.08%)Baseline: 571.67 ms
686.01 ms
(83.27%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
352.35 ms
(+1.96%)Baseline: 345.59 ms
414.71 ms
(84.96%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,333.66 ms
(-1.00%)Baseline: 2,357.16 ms
2,828.59 ms
(82.50%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,424.58 ms
(-0.05%)Baseline: 4,426.83 ms
5,312.20 ms
(83.29%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
248.56 ms
(+0.75%)Baseline: 246.72 ms
296.06 ms
(83.96%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13381
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,426.35 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
292.09 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
297.27 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
84.71 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,353.81 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,451.68 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
262.76 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 3f97c24 into main Jul 25, 2026
36 of 39 checks passed
@zkochan
zkochan deleted the gate-peer-hoist-on-dedupe-peer-dependents branch July 25, 2026 23:30
@zkochan

zkochan commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Note on the red Code Coverage check — it is not this PR.

The job dies ~6 minutes in with no logs uploaded (BlobNotFound from the jobs API) and every step after Run unstarted, which is a killed runner rather than a failing assertion. In the same window the identical failure hit fix-13348, fix-frozen-install-settings-drift, fix-13323 (twice) — and, once the queue saturated, main itself. The successful runs in that window are the ones that started while the pool was quiet.

Locally, the exact CI command passes on this branch:

$ cargo llvm-cov nextest --workspace --exclude pacquet-integrated-benchmark \
    --exclude pacquet-micro-benchmark --exclude pacquet-registry-mock \
    --ignore-filename-regex tasks --no-fail-fast --lcov --output-path lcov.info
     Summary [ 132.949s] 7166 tests run: 7166 passed (7 slow), 4 skipped

An earlier local attempt did fail one test — add::tests::add_resolves_package_selectors_concurrently_and_reports_in_selector_order, with Expected at least 1 request(s) to: GET /@one%2Fa ...but received 0. That is the mockito-starvation flake this repo sees when the machine is oversubscribed (it was at load ~95 on 32 cores); the test passes 3/3 standalone and passed in the full run above. Worth knowing it presents exactly like a real regression on a 4-vCPU coverage runner.

I re-ran the job three times; it needs the runner pool to drain.


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

kairosci added a commit to kairosci/pnpm that referenced this pull request Jul 27, 2026
…npm#13381)

The hoist rounds ran on every install, so a missing peer that some
version elsewhere in the workspace could satisfy was installed even with
`autoInstallPeers: false` and `dedupePeerDependents: false` — the
dependent then carried a peer context the TypeScript CLI never writes.

Upstream derives one flag from the two settings —
`hoistPeers = autoInstallPeers || dedupePeerDependents` in
`installing/deps-resolver/src/resolveDependencyTree.ts` — and
`resolveRootDependencies` returns before the hoist loop when it is
false: hoisting a peer nobody asked to install only pays off if
peer-suffixed variants are being collapsed. `ImporterHoistState` now
carries the same derived flag and both rounds no-op when it is unset,
which leaves the peer missing and the dependent's snapshot free of a
peer suffix. The final peer pass is untouched, so unmet peers are still
reported.

Verified against the TypeScript CLI on a two-project workspace: all four
`autoInstallPeers` x `dedupePeerDependents` combinations now produce
byte-identical lockfiles, where the both-off combination previously
diverged.

Follow-up to pnpm#13372.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants