Skip to content

fix(pack): preserve workspace dependency order - #13751

Merged
zkochan merged 4 commits into
pnpm:mainfrom
hzy:codex/stabilize-packed-workspace-dependency-order
Aug 19, 2026
Merged

zkochan merged 4 commits into
pnpm:mainfrom
hzy:codex/stabilize-packed-workspace-dependency-order

Conversation

@hzy

@hzy hzy commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

p-map-values records converted dependencies when each asynchronous mapper resolves. Resolving multiple workspace: dependencies can therefore change their key order between runs, which makes unchanged packed manifests produce different tarball bytes.

This keeps the concurrent conversion and rebuilds the result in the source manifest's dependency order. The Rust pnpm/ port already inserts converted dependencies synchronously in source order, so it needs no matching production change.

Fixes #10167.

Squash Commit Body

Workspace dependency manifests are read concurrently during packing. The converted dependency object was assembled in read-completion order, so identical inputs could serialize with different key orders.

Rebuild converted dependencies in their source manifest order after all conversions complete. This retains concurrency while making the generated package manifest deterministic.

Fixes pnpm/pnpm#10167.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

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


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

    • Fixed packed workspace manifests so dependencies retain their declared order, even when resolution completes in a different order.
    • Repeated pnpm pack operations now produce deterministic manifest output, with workspace dependency versions preserved correctly.
    • Improved consistency when workspace dependencies are resolved asynchronously.
  • Tests

    • Added coverage for dependency ordering and resolved workspace versions in exported manifests.
    • Added regression checks for consistent output when dependency resolution completes out of order.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 32e75f32-0635-4a6f-948f-a4972f637856

📥 Commits

Reviewing files that changed from the base of the PR and between 6b76162 and c7335a2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (3)
  • pnpm-workspace.yaml
  • pnpm11/lockfile/settings-checker/package.json
  • pnpm11/lockfile/settings-checker/src/calcPatchHashes.ts
💤 Files with no reviewable changes (2)
  • pnpm11/lockfile/settings-checker/package.json
  • pnpm-workspace.yaml

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The exportable manifest now preserves workspace dependency declaration order when converting published specifiers. TypeScript and Rust tests verify deterministic output. The change also removes p-map-values usage and adds patch release metadata.

Changes

Workspace dependency ordering

Layer / File(s) Summary
Preserve and validate dependency order
pnpm11/releasing/exportable-manifest/src/index.ts, pnpm11/releasing/exportable-manifest/test/dependencyOrder.test.ts, pnpm/crates/exportable-manifest/src/tests.rs
makePublishDependencies processes entries concurrently and rebuilds them in declaration order. TypeScript and Rust tests verify stable dependency keys and resolved versions.
Remove p-map-values usage
pnpm11/releasing/exportable-manifest/package.json, pnpm11/fetching/tarball-fetcher/package.json, pnpm11/lockfile/settings-checker/src/calcPatchHashes.ts, pnpm11/lockfile/settings-checker/package.json, pnpm-workspace.yaml
Package manifests and workspace configuration remove p-map-values. Patch hash calculation uses Promise.all and Object.fromEntries.
Record release metadata
.changeset/stable-packed-workspace-deps.md
The changeset requests patch releases for the affected packages.

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

Merge Risk: ⚪ Minimal · up to c7335

This change makes packed manifests preserve dependency order so identical inputs produce stable tarballs; no actionable merge-blocking risk remains, and the PR is merge-ready after normal checks and review.

Assessment against linked issues

Objective Addressed Explanation
Preserve workspace dependency declaration order in packed package.json output [#10167] ✅

Possibly related PRs

  • pnpm/pnpm#13185: Validates and improves package manifest handling in related pack and publish code paths.

Suggested labels: product: pacquet, 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.

@hzy
hzy marked this pull request as ready for review August 10, 2026 10:03
@hzy
hzy requested a review from zkochan as a code owner August 10, 2026 10:03
Copilot AI lite review requested due to automatic review settings August 10, 2026 10:03
@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 →

@greptile-apps

greptile-apps Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (4): Last reviewed commit: "refactor(lockfile): drop the p-map-value..." | Re-trigger Greptile

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes pnpm pack output deterministic for workspace dependencies by ensuring dependency key order in the packed manifest matches the original manifest’s declaration order, even when workspace manifest reads resolve concurrently.

Changes:

  • Rebuilds the converted dependency object in source-key order after concurrent conversion completes.
  • Adds a regression test that forces out-of-order workspace manifest read completion and asserts stable dependency ordering.
  • Adds a changeset for a patch release of @pnpm/releasing.exportable-manifest and pnpm.

Reviewed changes

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

File Description
pnpm11/releasing/exportable-manifest/src/index.ts Reorders the returned converted dependencies to match the original manifest key order.
pnpm11/releasing/exportable-manifest/test/dependencyOrder.test.ts Adds a test ensuring workspace dependency order is preserved despite out-of-order async reads.
.changeset/stable-packed-workspace-deps.md Declares patch bumps and documents the deterministic pnpm pack behavior change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

hzy and others added 2 commits August 19, 2026 11:54
Rebuild the converted dependency map with an ordered `Promise.all` over
the source entries instead of re-keying a `pMapValues` result. The order
guarantee then holds by construction rather than through a second pass,
and the now-unused `p-map-values` dependency goes away.

Reset the mocked manifest reader state between tests so the ordering
suite stays isolated.

Add a pacquet regression test pinning the same guarantee, which holds
there through `serde_json`'s `preserve_order` feature.
Copilot AI review requested due to automatic review settings August 19, 2026 13:44
@zkochan
zkochan force-pushed the codex/stabilize-packed-workspace-dependency-order branch from ee477f4 to 37cb846 Compare August 19, 2026 13:44

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 Aug 19, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 19, 2026
@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Informational

1. Promise.all lacks trailing comma 📘 Rule violation ⚙ Maintainability
Description
The new multi-line Promise.all argument ends without a trailing comma. This violates the required
TypeScript formatting for multi-line argument lists.
Code

pnpm11/releasing/exportable-manifest/src/index.ts[148]

+    )
Relevance

● Weak

Recent repository precedents reject trailing-comma-only findings in multiline TypeScript calls and
parameter lists.

PR-#13841
PR-#13951
PR-#13803

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713434 requires trailing commas in multi-line TypeScript argument lists. The newly
added Object.entries(...).map(...) argument ends at line 148 with ) rather than ),.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/releasing/exportable-manifest/src/index.ts[145-149]

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 multi-line argument passed to `Promise.all` lacks the required trailing comma.

## Issue Context
TypeScript multi-line argument lists must end their final argument with a trailing comma.

## Fix Focus Areas
- pnpm11/releasing/exportable-manifest/src/index.ts[145-149]

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


Grey Divider

Context sources
✅ Compliance rules (platform): 27 rules
Review mode: 🚀 Fast: The latest push is a localized dependency-removal and deterministic object-rebuild change in one runtime path, with no security, API, migration, or broad cross-cutting risk.

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit c7335a2 🚀 Fast

Results up to commit 37cb846 ⚖️ Balanced


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


Informational
1. Promise.all lacks trailing comma 📘 Rule violation ⚙ Maintainability
Description
The new multi-line Promise.all argument ends without a trailing comma. This violates the required
TypeScript formatting for multi-line argument lists.
Code

pnpm11/releasing/exportable-manifest/src/index.ts[148]

+    )
Relevance

● Weak

Recent repository precedents reject trailing-comma-only findings in multiline TypeScript calls and
parameter lists.

PR-#13841
PR-#13951
PR-#13803

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713434 requires trailing commas in multi-line TypeScript argument lists. The newly
added Object.entries(...).map(...) argument ends at line 148 with ) rather than ),.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/releasing/exportable-manifest/src/index.ts[145-149]

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 multi-line argument passed to `Promise.all` lacks the required trailing comma.

## Issue Context
TypeScript multi-line argument lists must end their final argument with a trailing comma.

## Fix Focus Areas
- pnpm11/releasing/exportable-manifest/src/index.ts[145-149]

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

@codecov-commenter

codecov-commenter commented Aug 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.18%. Comparing base (e500715) to head (c7335a2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13751      +/-   ##
==========================================
- Coverage   88.19%   88.18%   -0.01%     
==========================================
  Files         646      646              
  Lines      106959   106969      +10     
==========================================
+ Hits        94328    94333       +5     
- Misses      12631    12636       +5     

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

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

Copilot AI review requested due to automatic review settings August 19, 2026 14:05
@greptile-apps
greptile-apps Bot dismissed their stale review August 19, 2026 14:05

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

`calcPatchHashes` was the last consumer. Hashing the patch files with an
ordered `Promise.all` over the entries keeps the concurrency and makes
the result carry the input order, so the catalog entry, the release-age
exclusion, and the package itself can all go.
greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 19, 2026
Copilot AI review requested due to automatic review settings August 19, 2026 14:08
@greptile-apps
greptile-apps Bot dismissed their stale review August 19, 2026 14:08

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

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

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

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

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.508 ± 0.141 2.315 2.700 1.71 ± 0.19
pacquet@main 2.614 ± 0.131 2.363 2.819 1.78 ± 0.19
pnpr@HEAD 1.466 ± 0.136 1.338 1.700 1.00
pnpr@main 1.557 ± 0.111 1.382 1.771 1.06 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5079690892999995,
      "stddev": 0.14121010142539997,
      "median": 2.5386036490999997,
      "user": 1.74641606,
      "system": 1.68812502,
      "min": 2.3146285361,
      "max": 2.6995820901
    },
    {
      "command": "pacquet@main",
      "mean": 2.6137205754,
      "stddev": 0.13074985954457158,
      "median": 2.6144973441,
      "user": 2.0068775600000004,
      "system": 1.9271309200000002,
      "min": 2.3629641181,
      "max": 2.8187627370999997
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4655139271000002,
      "stddev": 0.13554230330400913,
      "median": 1.4056654231,
      "user": 1.7571957599999997,
      "system": 1.61464922,
      "min": 1.3384000851000002,
      "max": 1.6998219511000001
    },
    {
      "command": "pnpr@main",
      "mean": 1.5574316871,
      "stddev": 0.11128461935872588,
      "median": 1.5465615256,
      "user": 1.84718396,
      "system": 1.7466633200000001,
      "min": 1.3815698531,
      "max": 1.7709869601000001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 384.9 ± 24.1 343.3 421.4 1.05 ± 0.08
pacquet@main 365.3 ± 18.0 336.8 399.4 1.00
pnpr@HEAD 382.3 ± 14.4 360.2 405.1 1.05 ± 0.06
pnpr@main 404.4 ± 11.4 392.7 427.1 1.11 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.38487569222,
      "stddev": 0.024107572914894095,
      "median": 0.38907506382,
      "user": 0.3106479,
      "system": 0.6721744599999998,
      "min": 0.34325460182,
      "max": 0.42140810082
    },
    {
      "command": "pacquet@main",
      "mean": 0.36534383051999997,
      "stddev": 0.01797201432378993,
      "median": 0.36437295032,
      "user": 0.3028398,
      "system": 0.6512594599999999,
      "min": 0.33677166382,
      "max": 0.39943906782
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.38228246311999997,
      "stddev": 0.014368873295070812,
      "median": 0.38019135232,
      "user": 0.31626699999999996,
      "system": 0.6625897599999999,
      "min": 0.36023016082000003,
      "max": 0.40513961382
    },
    {
      "command": "pnpr@main",
      "mean": 0.40438462332,
      "stddev": 0.011422667712913986,
      "median": 0.40022310632,
      "user": 0.34993430000000003,
      "system": 0.66390016,
      "min": 0.39265058882000003,
      "max": 0.42710274882000004
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 11.9 ± 2.2 8.4 16.6 1.00 ± 0.26
pacquet@main 12.0 ± 2.3 8.1 19.6 1.01 ± 0.27
pnpr@HEAD 11.8 ± 2.1 8.2 16.1 1.00
pnpr@main 12.5 ± 2.1 8.6 16.7 1.06 ± 0.26
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.011896269857391307,
      "stddev": 0.0021556271897817153,
      "median": 0.011586384140000001,
      "user": 0.007086917608695656,
      "system": 0.004905465108695653,
      "min": 0.00840082114,
      "max": 0.01662104014
    },
    {
      "command": "pacquet@main",
      "mean": 0.01200218380666667,
      "stddev": 0.0023208112131197513,
      "median": 0.01195437314,
      "user": 0.006495992804232804,
      "system": 0.005597154285714283,
      "min": 0.008083264140000001,
      "max": 0.019645441140000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011840816439270077,
      "stddev": 0.0021339007467993283,
      "median": 0.01149186064,
      "user": 0.006496657810218971,
      "system": 0.005430126131386861,
      "min": 0.00816737114,
      "max": 0.016077151140000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.012533439224577121,
      "stddev": 0.0020635041427071593,
      "median": 0.012517192140000001,
      "user": 0.006637108258706469,
      "system": 0.0059904503482587045,
      "min": 0.008635014140000001,
      "max": 0.01669611014
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 14.3 ± 1.8 9.5 18.1 1.09 ± 0.23
pacquet@main 13.1 ± 2.1 9.2 18.6 1.00 ± 0.23
pnpr@HEAD 13.0 ± 2.1 8.9 17.1 1.00
pnpr@main 13.3 ± 2.2 8.7 17.7 1.02 ± 0.23
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.014265295899444447,
      "stddev": 0.0017994426428620692,
      "median": 0.014767877080000002,
      "user": 0.007907450000000002,
      "system": 0.006457963333333335,
      "min": 0.00950865258,
      "max": 0.01806203058
    },
    {
      "command": "pacquet@main",
      "mean": 0.013082510044788732,
      "stddev": 0.002066965816647837,
      "median": 0.01296027358,
      "user": 0.007490171830985917,
      "system": 0.005687905492957745,
      "min": 0.00921293658,
      "max": 0.01858884358
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0130293197870707,
      "stddev": 0.0021228716607942697,
      "median": 0.012840743080000001,
      "user": 0.007826356565656565,
      "system": 0.005309073030303031,
      "min": 0.008902393580000001,
      "max": 0.01711198158
    },
    {
      "command": "pnpr@main",
      "mean": 0.013269847940655733,
      "stddev": 0.0021544507927240704,
      "median": 0.013785006580000002,
      "user": 0.007596298360655741,
      "system": 0.005768105464480873,
      "min": 0.008687019580000002,
      "max": 0.01766195058
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.985 ± 0.045 2.928 3.056 1.78 ± 0.17
pacquet@main 2.964 ± 0.046 2.907 3.025 1.77 ± 0.17
pnpr@HEAD 1.677 ± 0.161 1.471 1.922 1.00
pnpr@main 1.817 ± 0.121 1.579 1.973 1.08 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9847920444,
      "stddev": 0.0449689011144315,
      "median": 2.9757656906000003,
      "user": 2.42291252,
      "system": 1.9160084599999998,
      "min": 2.9280218676,
      "max": 3.0556873546000003
    },
    {
      "command": "pacquet@main",
      "mean": 2.9639047296000003,
      "stddev": 0.04588951999990299,
      "median": 2.9615651081000003,
      "user": 2.4462553199999997,
      "system": 1.8468603599999998,
      "min": 2.9066371166000002,
      "max": 3.0247249346
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6769277982000002,
      "stddev": 0.16056298971074462,
      "median": 1.6283473361,
      "user": 1.7353801199999999,
      "system": 1.83632866,
      "min": 1.4707874286,
      "max": 1.9218819556
    },
    {
      "command": "pnpr@main",
      "mean": 1.8167317969999999,
      "stddev": 0.12072274860637806,
      "median": 1.8526655295999999,
      "user": 1.95097062,
      "system": 1.9480705600000001,
      "min": 1.5789055565999999,
      "max": 1.9730409256
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 775.6 ± 35.1 721.4 811.4 1.74 ± 0.13
pacquet@main 724.8 ± 56.4 642.4 827.5 1.63 ± 0.16
pnpr@HEAD 460.1 ± 29.3 409.7 500.6 1.03 ± 0.09
pnpr@main 445.6 ± 25.6 398.1 492.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7755595508200002,
      "stddev": 0.03511442058874617,
      "median": 0.7901055246199999,
      "user": 0.9986522599999998,
      "system": 1.03386236,
      "min": 0.72140784712,
      "max": 0.81136937712
    },
    {
      "command": "pacquet@main",
      "mean": 0.7248466449200001,
      "stddev": 0.056449358387978585,
      "median": 0.73064626662,
      "user": 0.9027683600000002,
      "system": 1.00430256,
      "min": 0.64235599112,
      "max": 0.82752964012
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.46009496422000007,
      "stddev": 0.029280429242609568,
      "median": 0.45960835762,
      "user": 0.33438746,
      "system": 0.6762758599999998,
      "min": 0.40974029412,
      "max": 0.5005949401199999
    },
    {
      "command": "pnpr@main",
      "mean": 0.44557746132,
      "stddev": 0.025595124409003148,
      "median": 0.44736081362,
      "user": 0.30521916,
      "system": 0.6661969600000001,
      "min": 0.39813602512,
      "max": 0.49238446312
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.289 ± 0.074 2.200 2.430 5.34 ± 0.38
pacquet@main 2.223 ± 0.048 2.150 2.281 5.19 ± 0.35
pnpr@HEAD 0.428 ± 0.027 0.388 0.481 1.00
pnpr@main 0.434 ± 0.034 0.404 0.506 1.01 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.2886496936599996,
      "stddev": 0.07411957185888408,
      "median": 2.27891894456,
      "user": 1.3308433,
      "system": 1.1904744799999998,
      "min": 2.20015340156,
      "max": 2.43016938956
    },
    {
      "command": "pacquet@main",
      "mean": 2.2228458065599996,
      "stddev": 0.04831590516418496,
      "median": 2.22715277106,
      "user": 1.2678741,
      "system": 1.1047880799999998,
      "min": 2.15018264856,
      "max": 2.28095073156
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.4284717559600001,
      "stddev": 0.027274903527144137,
      "median": 0.4338939740600001,
      "user": 0.30792729999999996,
      "system": 0.6324939799999999,
      "min": 0.38779504456,
      "max": 0.48079590456000004
    },
    {
      "command": "pnpr@main",
      "mean": 0.4344226373600001,
      "stddev": 0.033564269577918734,
      "median": 0.4207434670600001,
      "user": 0.3009744,
      "system": 0.6404084799999998,
      "min": 0.40351823956000005,
      "max": 0.50577548756
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 328.2 ± 46.5 264.8 400.5 2.42 ± 0.38
pacquet@main 381.8 ± 49.1 298.8 456.1 2.82 ± 0.41
pnpr@HEAD 135.5 ± 9.0 120.9 153.4 1.00
pnpr@main 148.0 ± 37.0 119.2 258.0 1.09 ± 0.28
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32821201224,
      "stddev": 0.04653484156654968,
      "median": 0.31394423654000003,
      "user": 0.2825212199999999,
      "system": 0.12387829999999997,
      "min": 0.26481503654000005,
      "max": 0.40047946054000005
    },
    {
      "command": "pacquet@main",
      "mean": 0.38181360253999996,
      "stddev": 0.049054710877838734,
      "median": 0.37850405854,
      "user": 0.33642681999999996,
      "system": 0.12552029999999997,
      "min": 0.29884546254,
      "max": 0.45612417454000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.13549583814,
      "stddev": 0.009021092971999298,
      "median": 0.13521769354000002,
      "user": 0.05198317,
      "system": 0.0222148,
      "min": 0.12094453154000001,
      "max": 0.15338417354
    },
    {
      "command": "pnpr@main",
      "mean": 0.14801044544909092,
      "stddev": 0.037028007495043286,
      "median": 0.13212488454000001,
      "user": 0.059818329090909096,
      "system": 0.02542067272727273,
      "min": 0.11920403854000002,
      "max": 0.25803456654
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 891.4 ± 166.4 680.4 1177.3 1.01 ± 0.24
pacquet@main 886.0 ± 137.5 658.5 1137.9 1.00
pnpm@HEAD 4956.8 ± 568.4 4155.1 5916.5 5.59 ± 1.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8913593868577778,
      "stddev": 0.16635748486926502,
      "median": 0.85081062108,
      "user": 0.8740934977777777,
      "system": 0.17012215555555554,
      "min": 0.68044555108,
      "max": 1.17730255308
    },
    {
      "command": "pacquet@main",
      "mean": 0.8860033510799998,
      "stddev": 0.13748743056255225,
      "median": 0.89202789108,
      "user": 0.8534836088888887,
      "system": 0.22815415555555557,
      "min": 0.65847731308,
      "max": 1.1379466330799999
    },
    {
      "command": "pnpm@HEAD",
      "mean": 4.956755920191111,
      "stddev": 0.5683667253319804,
      "median": 4.93561459308,
      "user": 7.205009386666666,
      "system": 0.5221430444444444,
      "min": 4.155057455080001,
      "max": 5.916460998080001
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.660 ± 0.163 4.484 5.017 1.29 ± 0.06
pacquet@main 4.685 ± 0.111 4.545 4.891 1.29 ± 0.04
pnpr@HEAD 3.623 ± 0.091 3.556 3.808 1.00
pnpr@main 3.808 ± 0.105 3.580 3.941 1.05 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.66029592478,
      "stddev": 0.1629129361064361,
      "median": 4.624973521579999,
      "user": 2.3845642600000003,
      "system": 2.12875476,
      "min": 4.48432997058,
      "max": 5.016515420579999
    },
    {
      "command": "pacquet@main",
      "mean": 4.685393368480001,
      "stddev": 0.11050669135209136,
      "median": 4.66744637358,
      "user": 2.4642412599999997,
      "system": 2.2149829599999995,
      "min": 4.54496827158,
      "max": 4.89133004358
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.622703074580001,
      "stddev": 0.09051672085232626,
      "median": 3.57654579958,
      "user": 2.21885266,
      "system": 2.1176061600000002,
      "min": 3.55597300858,
      "max": 3.80779598758
    },
    {
      "command": "pnpr@main",
      "mean": 3.80822801888,
      "stddev": 0.10454297912564484,
      "median": 3.83206812508,
      "user": 2.52317606,
      "system": 2.45744466,
      "min": 3.5798284395800004,
      "max": 3.9409110435800003
    }
  ]
}

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

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store — the layout pnpm 12 installs into by default. Comparable to that scenario head-to-head.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 319.3 ± 95.9 247.5 584.4 1.03 ± 0.38
pacquet@main 331.1 ± 90.8 258.0 560.6 1.07 ± 0.38
pnpr@HEAD 310.3 ± 69.1 255.8 492.7 1.00
pnpr@main 318.2 ± 90.1 260.9 533.7 1.03 ± 0.37
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.31928671824000004,
      "stddev": 0.09593634834951771,
      "median": 0.28951175574000004,
      "user": 0.37256156,
      "system": 0.2808924199999999,
      "min": 0.24748457674000002,
      "max": 0.58440493474
    },
    {
      "command": "pacquet@main",
      "mean": 0.33109604434000006,
      "stddev": 0.09084901970674357,
      "median": 0.29373117074000005,
      "user": 0.40011786000000005,
      "system": 0.28846072,
      "min": 0.25796065974000004,
      "max": 0.56060555274
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31033590744,
      "stddev": 0.06905387718280405,
      "median": 0.29189305574,
      "user": 0.34821886,
      "system": 0.30741781999999995,
      "min": 0.25582661674000007,
      "max": 0.4927368717400001
    },
    {
      "command": "pnpr@main",
      "mean": 0.31818134314,
      "stddev": 0.09010963320599279,
      "median": 0.27940590874000004,
      "user": 0.35311276,
      "system": 0.31105232000000005,
      "min": 0.26087972174,
      "max": 0.53370386174
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13751
Testbedpacquet

🚨 7 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
247.48 ms
(+47.13%)Baseline: 168.20 ms
201.85 ms
(122.61%)

isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
721.41 ms
(+58.51%)Baseline: 455.12 ms
546.14 ms
(132.09%)

isolated-linker.fresh-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
264.82 ms
(+25.73%)Baseline: 210.62 ms
252.74 ms
(104.78%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
343.25 ms
(+23.79%)Baseline: 277.29 ms
332.75 ms
(103.16%)

isolated-linker.peer-heavy-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
680.45 ms
(+40.49%)Baseline: 484.34 ms
581.20 ms
(117.08%)

isolated-linker.repeat-install.cold-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
9.51 ms
(+48.89%)Baseline: 6.39 ms
7.66 ms
(124.07%)

isolated-linker.repeat-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
8.40 ms
(+36.73%)Baseline: 6.14 ms
7.37 ms
(113.94%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
247.48 ms
(+47.13%)Baseline: 168.20 ms
201.85 ms
(122.61%)

isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,928.02 ms
(+5.06%)Baseline: 2,787.02 ms
3,344.43 ms
(87.55%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,200.15 ms
(+14.38%)Baseline: 1,923.51 ms
2,308.22 ms
(95.32%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
721.41 ms
(+58.51%)Baseline: 455.12 ms
546.14 ms
(132.09%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
264.82 ms
(+25.73%)Baseline: 210.62 ms
252.74 ms
(104.78%)

isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,314.63 ms
(+0.76%)Baseline: 2,297.28 ms
2,756.74 ms
(83.96%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,484.33 ms
(+3.46%)Baseline: 4,334.46 ms
5,201.35 ms
(86.21%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
343.25 ms
(+23.79%)Baseline: 277.29 ms
332.75 ms
(103.16%)

isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
680.45 ms
(+40.49%)Baseline: 484.34 ms
581.20 ms
(117.08%)

isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
9.51 ms
(+48.89%)Baseline: 6.39 ms
7.66 ms
(124.07%)

isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
8.40 ms
(+36.73%)Baseline: 6.14 ms
7.37 ms
(113.94%)

🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 0fff84c into pnpm:main Aug 19, 2026
36 of 37 checks passed
@welcome

welcome Bot commented Aug 19, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

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.

Unstable ordering of workspace dependencies in packed tarball

4 participants