Skip to content

fix(version): support from-git - #13203

Merged
zkochan merged 6 commits into
pnpm:mainfrom
massimomazzariol:fix/version-from-git
Jul 23, 2026
Merged

zkochan merged 6 commits into
pnpm:mainfrom
massimomazzariol:fix/version-from-git

Conversation

@massimomazzariol

@massimomazzariol massimomazzariol commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • support the from-git argument in pnpm version
  • resolve the version from the latest matching Git tag
  • respect tag-version-prefix
  • document the argument in command help

Tests

  • pnpm --filter @pnpm/releasing.commands run test -- version/index.test.ts
  • 29 tests passed

Fixes #13118


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

Summary by CodeRabbit

  • New Features
    • Added from-git support to pnpm version to set the manifest version from the latest matching Git tag.
    • Ensures --tag-version-prefix is honored when selecting and interpreting tags.
  • Documentation
    • Updated pnpm version help text and related diagnostics to mention from-git.
  • Bug Fixes
    • Improved validation and error handling for from-git, including clearer INVALID_VERSION_FROM_GIT reasons.
  • Tests
    • Added coverage for successful version resolution, missing/malformed tags, prefix handling, and unexpected Git failures.

@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 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

pnpm version now accepts from-git, derives a semver version from the latest matching Git tag, honors tagVersionPrefix, and updates the package manifest. Help text, integration tests, and patch changeset metadata were added.

Changes

Version from Git tags

Layer / File(s) Summary
Add from-git version resolution
pnpm/crates/cli/src/cli_args/version.rs, pnpm11/releasing/commands/src/version/index.ts
The version commands accept from-git, resolve matching Git tags into semver versions, and update help and validation text.
Validate from-git behavior
pnpm/crates/cli/tests/version.rs, pnpm11/releasing/commands/test/version/index.test.ts
Tests verify Git-tag-derived versions, manifest updates, invalid-tag errors, help output, custom tagVersionPrefix handling, and Git command failures.
Record release metadata
.changeset/support-version-from-git.md
A Changeset records patch updates for the releasing commands package and pnpm package.

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

Sequence Diagram(s)

sequenceDiagram
  participant version_command
  participant version_from_git
  participant git
  version_command->>version_from_git: Resolve from-git
  version_from_git->>git: Describe matching tag
  git-->>version_from_git: Return tag
  version_from_git->>git: Verify described tag
  git-->>version_from_git: Return matching tag
  version_from_git-->>version_command: Return semver version
Loading

Assessment against linked issues

Objective Addressed Explanation
Support pnpm version from-git by deriving the version from Git tags [#13118] ✅

Possibly related PRs

  • pnpm/pnpm#13200: Extends the npm-style bump parsing flow that this change adds from-git handling to.

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

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

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

This looks safe to merge.

  • The updated tag parser validates the complete version after removing the prefix.
  • Missing matching tags now produce the contextual command error.
  • Both CLI implementations accept from-git and cover the main success and failure cases.

Reviews (6): Last reviewed commit: "fix(version): harden from-git coverage" | 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: 2

🧹 Nitpick comments (1)
pnpm11/releasing/commands/test/version/index.test.ts (1)

311-347: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Prefer asynchronous filesystem APIs in the new async tests.

The added writeFileSync and readFileSync calls block the Jest worker while the surrounding Git operations are awaited. Use fs.promises.writeFile/readFile and await them in these new cases.

As per coding guidelines, filesystem work should prefer asynchronous APIs and async/await.

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

In `@pnpm11/releasing/commands/test/version/index.test.ts` around lines 311 - 347,
Update the two new async tests around “should set the version from the latest
git tag” and “should use tagVersionPrefix with from-git” to replace
fs.writeFileSync and fs.readFileSync with awaited fs.promises.writeFile and
fs.promises.readFile calls, preserving the existing file paths and assertions.

Source: Coding guidelines

🤖 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/releasing/commands/src/version/index.ts`:
- Around line 303-305: Update versionFromGit to catch git describe failures,
convert the no-matching-tag case into a PnpmError whose message includes cwd and
tagVersionPrefix, and rethrow unexpected Git or executable failures unchanged.
Preserve the existing stdout normalization and semver validation flow for
successful commands.
- Line 21: Update the version parsing logic in the release command to remove the
configured tagVersionPrefix from each tag before validation, then use
semver.valid() on only the remaining suffix. Do not use coerce() on the full
tag, so tags with extra numeric segments or numeric prefixes cannot resolve to
an incorrect version.

---

Nitpick comments:
In `@pnpm11/releasing/commands/test/version/index.test.ts`:
- Around line 311-347: Update the two new async tests around “should set the
version from the latest git tag” and “should use tagVersionPrefix with from-git”
to replace fs.writeFileSync and fs.readFileSync with awaited
fs.promises.writeFile and fs.promises.readFile calls, preserving the existing
file paths and assertions.
🪄 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: 58eb6e8a-2e5f-428d-adc2-9b823689ed76

📥 Commits

Reviewing files that changed from the base of the PR and between 7763777 and 7b007f5.

📒 Files selected for processing (3)
  • .changeset/support-version-from-git.md
  • pnpm11/releasing/commands/src/version/index.ts
  • pnpm11/releasing/commands/test/version/index.test.ts

@zkochan zkochan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The same should land in rust pnpm

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
pnpm/crates/cli/src/cli_args/version.rs (1)

648-649: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the implementation-narrating rustdoc.

version_from_git is private, and this only repeats its body. Reserve rustdoc for public contracts; keep comments only when they explain a non-obvious rationale.

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

In `@pnpm/crates/cli/src/cli_args/version.rs` around lines 648 - 649, Remove the
implementation-narrating rustdoc comment immediately above the private
version_from_git function, leaving the function implementation unchanged.

Source: Coding guidelines

🤖 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/src/cli_args/version.rs`:
- Around line 95-99: Define the canonical InvalidVersionFromGit diagnostic
message in pnpm/crates/cli/src/cli_args/version.rs:95-99, then update its
version-resolution handling in pnpm/crates/cli/src/cli_args/version.rs:653-687
and the corresponding TypeScript logic in
pnpm11/releasing/commands/src/version/index.ts:303-315 to use deterministic
canonical reasons for missing and malformed tags instead of Git stderr. Add
parity assertions including ERR_PNPM_INVALID_VERSION_FROM_GIT in
pnpm/crates/cli/tests/version.rs:358-391 and
pnpm11/releasing/commands/test/version/index.test.ts:330-352.

---

Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/version.rs`:
- Around line 648-649: Remove the implementation-narrating rustdoc comment
immediately above the private version_from_git function, leaving the function
implementation 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: 804ce2c5-3bb8-4d7c-a3fe-94293e795ac4

📥 Commits

Reviewing files that changed from the base of the PR and between 7b007f5 and f80fb59.

📒 Files selected for processing (4)
  • pnpm/crates/cli/src/cli_args/version.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm11/releasing/commands/src/version/index.ts
  • pnpm11/releasing/commands/test/version/index.test.ts

Comment thread pnpm/crates/cli/src/cli_args/version.rs Resolved
@codecov-commenter

codecov-commenter commented Jul 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.03774% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.88%. Comparing base (fd33859) to head (8d29059).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/version.rs 66.03% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13203      +/-   ##
==========================================
+ Coverage   86.76%   86.88%   +0.12%     
==========================================
  Files         524      526       +2     
  Lines       88672    90056    +1384     
==========================================
+ Hits        76935    78249    +1314     
- Misses      11737    11807      +70     

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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

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

⚠️ Outside diff range comments (1)
pnpm11/releasing/commands/test/version/index.test.ts (1)

311-384: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add focused real-CLI coverage for from-git.

These tests call handler() directly, so they cannot catch argument-parser or compiled-CLI wiring regressions—the path that rejected from-git in v11.x. Add focused CLI success and failure coverage, rebuilding the bundled CLI first. As per path instructions, REVIEW_GUIDE.md requires regression coverage through the real CLI for from-git wiring and failure modes.

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

In `@pnpm11/releasing/commands/test/version/index.test.ts` around lines 311 - 384,
Add focused tests that invoke the rebuilt bundled CLI rather than calling
handler() directly for from-git scenarios. Cover a successful from-git version
update and representative failure modes, including invalid or missing tags,
while rebuilding the compiled CLI before execution so argument-parser and CLI
wiring regressions are exercised. Retain the existing handler-level tests as
appropriate, but ensure the real-CLI regression coverage required by
REVIEW_GUIDE.md is present.

Source: Path instructions

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

Inline comments:
In `@pnpm11/releasing/commands/src/version/index.ts`:
- Around line 308-320: Update the git-description error handling around the
catch block to detect the absence of matching tags using a locale-independent
signal rather than matching err.stderr text. Convert only confirmed no-tag cases
to PnpmError with code INVALID_VERSION_FROM_GIT, while rethrowing raw errors for
non-repositories and all unexpected failures.

---

Outside diff comments:
In `@pnpm11/releasing/commands/test/version/index.test.ts`:
- Around line 311-384: Add focused tests that invoke the rebuilt bundled CLI
rather than calling handler() directly for from-git scenarios. Cover a
successful from-git version update and representative failure modes, including
invalid or missing tags, while rebuilding the compiled CLI before execution so
argument-parser and CLI wiring regressions are exercised. Retain the existing
handler-level tests as appropriate, but ensure the real-CLI regression coverage
required by REVIEW_GUIDE.md is present.
🪄 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: 90ac616b-e4a0-4f51-8144-12f825275901

📥 Commits

Reviewing files that changed from the base of the PR and between f80fb59 and 2b9d286.

📒 Files selected for processing (2)
  • pnpm11/releasing/commands/src/version/index.ts
  • pnpm11/releasing/commands/test/version/index.test.ts

@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/src/cli_args/version.rs`:
- Around line 677-692: Update the tag lookup arguments used by the matching_tag
RunCommand invocation to terminate Git options before the resolved tag, ensuring
tags beginning with "-" are treated as tag names rather than options. Preserve
the existing error handling and matching logic, and add an integration case
covering git update-ref refs/tags/-1.2.3 HEAD with --tag-version-prefix -.
🪄 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: ddec4045-9ba2-40c8-b47a-3143bf96503e

📥 Commits

Reviewing files that changed from the base of the PR and between 393eb53 and dec8786.

📒 Files selected for processing (3)
  • pnpm/crates/cli/src/cli_args/version.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm11/releasing/commands/src/version/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • pnpm/crates/cli/tests/version.rs
  • pnpm11/releasing/commands/src/version/index.ts

Comment thread pnpm/crates/cli/src/cli_args/version.rs Resolved
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 8d29059534ef

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.510 ± 0.098 2.403 2.679 1.58 ± 0.14
pacquet@main 2.632 ± 0.155 2.413 2.831 1.66 ± 0.16
pnpr@HEAD 1.687 ± 0.120 1.470 1.804 1.06 ± 0.11
pnpr@main 1.590 ± 0.122 1.452 1.806 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5101641422600003,
      "stddev": 0.0981829618723639,
      "median": 2.4873760433600003,
      "user": 2.1881128199999997,
      "system": 1.7205180599999998,
      "min": 2.4033711593600002,
      "max": 2.67941133736,
      "times": [
        2.5731643173600003,
        2.47223641036,
        2.66479599536,
        2.49156054936,
        2.4033711593600002,
        2.67941133736,
        2.49135756236,
        2.42943738936,
        2.48339452436,
        2.41291217736
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.63221721216,
      "stddev": 0.1545825942428034,
      "median": 2.67617180386,
      "user": 1.9910848200000004,
      "system": 1.5699235599999999,
      "min": 2.41275384936,
      "max": 2.83109444936,
      "times": [
        2.41275384936,
        2.64934728636,
        2.74359724436,
        2.45049915436,
        2.42890752736,
        2.73417748636,
        2.83109444936,
        2.78298669736,
        2.70299632136,
        2.58581210536
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6872340134600001,
      "stddev": 0.11991071330541095,
      "median": 1.7478210088600001,
      "user": 1.52723222,
      "system": 1.4451761599999997,
      "min": 1.46955026836,
      "max": 1.80435563036,
      "times": [
        1.5488040813600001,
        1.60301365136,
        1.78608996136,
        1.77499515436,
        1.80435563036,
        1.78743972236,
        1.7468326193600001,
        1.7488093983600002,
        1.46955026836,
        1.60244964736
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5899708017599998,
      "stddev": 0.12168224365452995,
      "median": 1.57954644336,
      "user": 1.6240132199999997,
      "system": 1.5815105599999997,
      "min": 1.45182268136,
      "max": 1.80579905236,
      "times": [
        1.45182268136,
        1.62612801536,
        1.73020998936,
        1.5082316543599998,
        1.6760641923600001,
        1.80579905236,
        1.53748023436,
        1.48769584736,
        1.62161265236,
        1.45466369836
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 288.7 ± 11.1 272.6 307.7 1.00
pacquet@main 289.9 ± 10.6 277.1 310.7 1.00 ± 0.05
pnpr@HEAD 306.4 ± 10.8 293.3 327.3 1.06 ± 0.06
pnpr@main 322.2 ± 13.0 310.1 349.0 1.12 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2887090103,
      "stddev": 0.01112358720720954,
      "median": 0.2851060077,
      "user": 0.24474784,
      "system": 0.5959682,
      "min": 0.2725664882,
      "max": 0.3076704602,
      "times": [
        0.2795741342,
        0.3016870942,
        0.2830493162,
        0.3076704602,
        0.2871626992,
        0.2811854492,
        0.29674056719999997,
        0.2725664882,
        0.2952874262,
        0.2821664682
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.28992278969999996,
      "stddev": 0.010555711732991893,
      "median": 0.2887152742,
      "user": 0.24663304,
      "system": 0.5822357,
      "min": 0.2771038852,
      "max": 0.3106825642,
      "times": [
        0.3106825642,
        0.2943873112,
        0.2922493162,
        0.30223904619999997,
        0.2834463382,
        0.28673269619999997,
        0.2771038852,
        0.2783022522,
        0.2906978522,
        0.2833866352
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3063532001,
      "stddev": 0.010806564223015956,
      "median": 0.3054585352,
      "user": 0.24454404,
      "system": 0.5722440000000001,
      "min": 0.29327768919999997,
      "max": 0.3273118972,
      "times": [
        0.3102863232,
        0.2959415132,
        0.29327768919999997,
        0.3075578652,
        0.2980878662,
        0.2996393422,
        0.3205124342,
        0.3273118972,
        0.3054482722,
        0.3054687982
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3222049221,
      "stddev": 0.013025065568881942,
      "median": 0.31800075569999997,
      "user": 0.26623063999999996,
      "system": 0.6131312,
      "min": 0.3101051942,
      "max": 0.3489700132,
      "times": [
        0.3244695742,
        0.3149045152,
        0.3171071722,
        0.3225395012,
        0.3489700132,
        0.3188943392,
        0.3411383462,
        0.3123024182,
        0.3101051942,
        0.3116181472
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.067 ± 0.115 2.909 3.312 1.85 ± 0.19
pacquet@main 2.890 ± 0.058 2.825 3.013 1.74 ± 0.17
pnpr@HEAD 1.661 ± 0.158 1.465 1.953 1.00
pnpr@main 1.733 ± 0.136 1.506 1.893 1.04 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.06689530134,
      "stddev": 0.11508696148913539,
      "median": 3.05490203624,
      "user": 2.8209151199999996,
      "system": 2.00225384,
      "min": 2.90917584124,
      "max": 3.31164645024,
      "times": [
        2.9946839132400003,
        3.31164645024,
        3.18663051124,
        2.9968784912400004,
        2.97833207524,
        3.03746214624,
        3.08452844724,
        3.07234192624,
        3.09727321124,
        2.90917584124
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.8896006248399995,
      "stddev": 0.05846640605859904,
      "median": 2.87252380874,
      "user": 2.3894919199999998,
      "system": 1.73349324,
      "min": 2.82457399924,
      "max": 3.0132922032400002,
      "times": [
        2.87837517624,
        2.83649549324,
        2.89742406924,
        2.88806610524,
        2.86667244124,
        2.86445593524,
        2.82457399924,
        2.85881210124,
        3.0132922032400002,
        2.96783872424
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6611505144399998,
      "stddev": 0.157595377095572,
      "median": 1.63979743624,
      "user": 1.4891198199999998,
      "system": 1.4659250400000001,
      "min": 1.46530374024,
      "max": 1.9528770722400002,
      "times": [
        1.72548973824,
        1.46530374024,
        1.87343373724,
        1.69025027024,
        1.47917628424,
        1.9528770722400002,
        1.64416260024,
        1.5604296082400002,
        1.63543227224,
        1.58494982124
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7333946249400003,
      "stddev": 0.1360048564599457,
      "median": 1.7401734907400002,
      "user": 1.46591772,
      "system": 1.4189857399999999,
      "min": 1.5061901032400002,
      "max": 1.8929086972400002,
      "times": [
        1.8608030182400002,
        1.7088789272400002,
        1.8180893782400003,
        1.88514058024,
        1.65491561324,
        1.5061901032400002,
        1.8929086972400002,
        1.55440639524,
        1.6811454822400003,
        1.77146805424
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 717.4 ± 32.9 684.8 791.9 2.12 ± 0.11
pacquet@main 675.7 ± 24.4 627.4 710.8 2.00 ± 0.09
pnpr@HEAD 355.8 ± 14.5 339.2 383.7 1.05 ± 0.05
pnpr@main 337.8 ± 9.4 319.6 350.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7173983159599999,
      "stddev": 0.03290619219707804,
      "median": 0.70555574456,
      "user": 0.89812588,
      "system": 0.87068006,
      "min": 0.68477023006,
      "max": 0.7918867660600001,
      "times": [
        0.69257026406,
        0.69149825706,
        0.7461406860600001,
        0.69748101906,
        0.7043954180600001,
        0.68477023006,
        0.70671607106,
        0.7346231040600001,
        0.7239013440600001,
        0.7918867660600001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.67566240456,
      "stddev": 0.02444750297599043,
      "median": 0.67399734306,
      "user": 0.87540438,
      "system": 0.7898241599999999,
      "min": 0.62741427106,
      "max": 0.71084301506,
      "times": [
        0.6989015940600001,
        0.67205611206,
        0.71084301506,
        0.65833243306,
        0.66873395406,
        0.70099668206,
        0.67593857406,
        0.6607738200600001,
        0.62741427106,
        0.68263359006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.35580807336,
      "stddev": 0.014545790201200854,
      "median": 0.35259455556,
      "user": 0.24737067999999995,
      "system": 0.6223017599999999,
      "min": 0.33916695706,
      "max": 0.38373188206000003,
      "times": [
        0.35029686106,
        0.34247735506,
        0.36854258606,
        0.34273331406,
        0.34811270706,
        0.37147950906,
        0.38373188206000003,
        0.33916695706,
        0.35489225006,
        0.35664731206
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.33780978386,
      "stddev": 0.009352715686745458,
      "median": 0.33960189356000003,
      "user": 0.22521677999999995,
      "system": 0.5890477599999999,
      "min": 0.31958915606,
      "max": 0.34999356206,
      "times": [
        0.34228918406000003,
        0.32965469006000003,
        0.34099137406,
        0.33387009306,
        0.31958915606,
        0.33105541106,
        0.34813534506,
        0.34999356206,
        0.34430661006,
        0.33821241306
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.044 ± 0.021 2.013 2.071 6.12 ± 0.23
pacquet@main 2.069 ± 0.061 1.997 2.182 6.19 ± 0.28
pnpr@HEAD 0.340 ± 0.012 0.319 0.362 1.02 ± 0.05
pnpr@main 0.334 ± 0.012 0.320 0.364 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.04358097696,
      "stddev": 0.021382073421958782,
      "median": 2.04014994916,
      "user": 1.2932493,
      "system": 0.9723183599999998,
      "min": 2.01261703666,
      "max": 2.07090411066,
      "times": [
        2.06434028666,
        2.07090411066,
        2.0404942986599997,
        2.03480014666,
        2.01261703666,
        2.0267396236599997,
        2.06406243566,
        2.0398055996599997,
        2.0169256186599998,
        2.06512061266
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.06915573916,
      "stddev": 0.06057807240539651,
      "median": 2.0661917256599995,
      "user": 1.3007009,
      "system": 1.00512926,
      "min": 1.9974037476600002,
      "max": 2.18167313366,
      "times": [
        2.1505733866599996,
        2.0734663416599997,
        2.09508237466,
        2.18167313366,
        2.01589724266,
        2.03813445566,
        2.05891710966,
        2.07425826866,
        2.00615133066,
        1.9974037476600002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33975372786,
      "stddev": 0.012020065655296246,
      "median": 0.33887974866000004,
      "user": 0.2214278,
      "system": 0.59280836,
      "min": 0.31932747666,
      "max": 0.36172230466000005,
      "times": [
        0.34712583366000005,
        0.34310939566000004,
        0.33106495566,
        0.33296591766,
        0.36172230466000005,
        0.34269414566,
        0.35146160266000004,
        0.33506535166,
        0.31932747666,
        0.33300029466000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.33407571676000003,
      "stddev": 0.011834487040520517,
      "median": 0.33191378916000003,
      "user": 0.22484449999999997,
      "system": 0.57817436,
      "min": 0.31981514766,
      "max": 0.36374362966,
      "times": [
        0.33096824966000005,
        0.32932314466,
        0.33814048566000005,
        0.33733885466,
        0.32943817266000003,
        0.33285932866,
        0.32437590566,
        0.33475424866000003,
        0.36374362966,
        0.31981514766
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 432.3 ± 18.1 413.0 472.3 4.48 ± 0.24
pacquet@main 423.9 ± 14.3 406.5 451.7 4.39 ± 0.21
pnpr@HEAD 96.5 ± 3.2 91.2 103.1 1.00
pnpr@main 97.1 ± 4.7 89.8 111.9 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.43225916180000007,
      "stddev": 0.018141230637583296,
      "median": 0.42800426450000006,
      "user": 0.4188547999999999,
      "system": 0.10260065999999998,
      "min": 0.412958303,
      "max": 0.472312235,
      "times": [
        0.45430694600000004,
        0.43562943600000004,
        0.472312235,
        0.42709523800000004,
        0.420586563,
        0.42084719200000004,
        0.42891329100000003,
        0.418761105,
        0.43118130900000007,
        0.412958303
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.4238738918,
      "stddev": 0.014253950028019706,
      "median": 0.4241429225000001,
      "user": 0.4156881,
      "system": 0.09345866,
      "min": 0.40651564800000006,
      "max": 0.45167586100000007,
      "times": [
        0.43020747900000006,
        0.43352460300000006,
        0.41628649600000006,
        0.42280224800000005,
        0.40711155800000004,
        0.40651564800000006,
        0.42548359700000005,
        0.45167586100000007,
        0.43429943700000007,
        0.41083199100000006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09653699003333334,
      "stddev": 0.0031882146927765366,
      "median": 0.09653619050000001,
      "user": 0.02335413333333333,
      "system": 0.014883493333333333,
      "min": 0.09116059200000001,
      "max": 0.10307601700000002,
      "times": [
        0.09185084300000002,
        0.09136839399999999,
        0.101155046,
        0.096551885,
        0.096438935,
        0.09716855700000002,
        0.09467841100000002,
        0.09752998600000001,
        0.09835767100000001,
        0.095949857,
        0.098359153,
        0.09846139300000001,
        0.097661577,
        0.09302775099999999,
        0.09116059200000001,
        0.103017881,
        0.09226981000000001,
        0.098981194,
        0.09412683499999999,
        0.093305322,
        0.09867499200000002,
        0.09969882500000002,
        0.096906618,
        0.10307601700000002,
        0.09399101700000001,
        0.10027045200000001,
        0.09533105,
        0.09443615799999999,
        0.09578298300000002,
        0.09652049600000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09705715737931032,
      "stddev": 0.00471918822827798,
      "median": 0.097106584,
      "user": 0.024021251724137934,
      "system": 0.014943256551724132,
      "min": 0.08976157200000001,
      "max": 0.111853545,
      "times": [
        0.095049676,
        0.08976157200000001,
        0.096481597,
        0.093926539,
        0.09572803200000002,
        0.092775269,
        0.090666459,
        0.097106584,
        0.09968956200000001,
        0.10047341900000001,
        0.10036788300000002,
        0.09102274400000002,
        0.10494791,
        0.097485825,
        0.099456834,
        0.097033435,
        0.111853545,
        0.09784504299999999,
        0.091501895,
        0.095006374,
        0.09938825300000001,
        0.101804749,
        0.10100494800000001,
        0.09742720700000002,
        0.09844509400000001,
        0.09348578500000002,
        0.09054904999999999,
        0.09887142000000002,
        0.09550086099999999
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.651 ± 0.107 4.571 4.934 1.29 ± 0.04
pacquet@main 4.697 ± 0.174 4.543 4.989 1.30 ± 0.05
pnpr@HEAD 3.627 ± 0.137 3.492 3.917 1.01 ± 0.04
pnpr@main 3.607 ± 0.072 3.516 3.711 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.65063198322,
      "stddev": 0.1072172034240776,
      "median": 4.61340951022,
      "user": 2.58106206,
      "system": 1.8998057799999999,
      "min": 4.57055569172,
      "max": 4.93408025372,
      "times": [
        4.61526962672,
        4.70769217572,
        4.5747355157200005,
        4.60600150372,
        4.61154939372,
        4.93408025372,
        4.59795161272,
        4.63868436272,
        4.6497996957200005,
        4.57055569172
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.69677734972,
      "stddev": 0.1738839300832617,
      "median": 4.593909972720001,
      "user": 2.6276237599999996,
      "system": 1.91867788,
      "min": 4.54266879472,
      "max": 4.98916553972,
      "times": [
        4.57389486172,
        4.54266879472,
        4.98916553972,
        4.734789928720001,
        4.59312789672,
        4.59469204872,
        4.97394079072,
        4.823648506720001,
        4.58789154772,
        4.55395358172
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.6274107819200005,
      "stddev": 0.13659306403427773,
      "median": 3.61036351522,
      "user": 1.7524536599999998,
      "system": 1.5830209800000001,
      "min": 3.49196767572,
      "max": 3.9173272217200004,
      "times": [
        3.66080622472,
        3.79649863872,
        3.54385647372,
        3.9173272217200004,
        3.49987823872,
        3.62502340272,
        3.61337633572,
        3.49196767572,
        3.5180229127200002,
        3.60735069472
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6074564330200003,
      "stddev": 0.07202318517883374,
      "median": 3.58009235572,
      "user": 1.5383144599999998,
      "system": 1.4787006800000002,
      "min": 3.51598749072,
      "max": 3.7110932207200005,
      "times": [
        3.5566103377200005,
        3.55918246572,
        3.57174004872,
        3.5355924027200003,
        3.68854749272,
        3.58844466272,
        3.51598749072,
        3.68971354472,
        3.6576526637200004,
        3.7110932207200005
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13203
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,909.18 ms
(+4.07%)Baseline: 2,795.38 ms
3,354.46 ms
(86.73%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,012.62 ms
(+3.00%)Baseline: 1,953.93 ms
2,344.72 ms
(85.84%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
684.77 ms
(+8.30%)Baseline: 632.26 ms
758.71 ms
(90.25%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
412.96 ms
(+9.15%)Baseline: 378.34 ms
454.01 ms
(90.96%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,403.37 ms
(-0.25%)Baseline: 2,409.34 ms
2,891.21 ms
(83.13%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,570.56 ms
(+2.26%)Baseline: 4,469.48 ms
5,363.38 ms
(85.22%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
272.57 ms
(+1.34%)Baseline: 268.95 ms
322.74 ms
(84.45%)
🐰 View full continuous benchmarking report in Bencher

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

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13203
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,465.30 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
319.33 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
339.17 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
91.16 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,469.55 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,491.97 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
293.28 ms
🐰 View full continuous benchmarking report in Bencher

@massimomazzariol
massimomazzariol requested a review from zkochan July 22, 2026 09:56
@zkochan
zkochan merged commit 2c6d294 into pnpm:main Jul 23, 2026
36 checks passed
@welcome

welcome Bot commented Jul 23, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@qodo-code-review qodo-code-review Bot mentioned this pull request Sep 1, 2026
4 tasks done
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.

version from-git in v11.x documented but not working

3 participants