Skip to content

feat(pacquet): implement the npm-style pnpm version bump - #13200

Merged
zkochan merged 4 commits into
pnpm:mainfrom
Safort:feat/pacquet-version-npm-style
Jul 21, 2026
Merged

zkochan merged 4 commits into
pnpm:mainfrom
Safort:feat/pacquet-version-npm-style

Conversation

@Safort

@Safort Safort commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Replace the ERR_PNPM_NOT_IMPLEMENTED stub with the npm-style form: pnpm version <major|minor|patch|premajor|preminor|prepatch|prerelease> and pnpm version <exact-version> (a leading v is accepted and stripped, like semver.valid), also recursively with -r/--filter. The bare pnpm version -r change-intents release flow is untouched.

The bump follows node-semver's inc() with its default identifier base of 0 — bumping major/minor/patch from a matching prerelease finalizes it, the pre* types start a .0 prerelease honoring --preid, and prerelease increments the right-most numeric identifier. Options mirror the TypeScript CLI: --allow-same-version, --message with %s substitution, --no-git-tag-version, --no-commit-hooks, --sign-git-tag, --tag-version-prefix (default "v"), and --json.

The single-package form records the bump as a commit plus an annotated (or GPG-signed) tag through the same RunCommand capability the publish git checks use; recursive runs skip the commit and tag since there is no single version to tag with. The preversion/version/postversion scripts run through pacquet-executor's run_lifecycle_hook — the same port of @pnpm/exec.lifecycle the upstream handler calls — re-reading the manifest between stages so each hook sees the right version. Error codes match pnpm: ERR_PNPM_INVALID_VERSION_BUMP, ERR_PNPM_INVALID_VERSION, ERR_PNPM_VERSION_NOT_CHANGED, ERR_PNPM_NO_PACKAGES_TO_VERSION, ERR_PNPM_UNCLEAN_WORKING_TREE.

The TypeScript CLI already ships this form, so only the pacquet side changes; no TypeScript change is needed. Covers the remaining version gap under the Stage 3 command surface in #11633.

Tests: a unit table driving inc() through the node-semver cases, plus integration tests against the built binary porting the upstream scenarios from releasing/commands/test/version/index.test.ts and pnpm/test/version.ts — bumps, preid, JSON output, explicit versions, same-version handling, lifecycle-hook ordering, the git commit/tag matrix, and recursive selection with and without --filter.

Summary

Implements the npm-style form of pnpm version in pacquet, replacing the ERR_PNPM_NOT_IMPLEMENTED stub: pnpm version <major|minor|patch|premajor|preminor|prepatch|prerelease> and pnpm version <exact-version>, also recursively with -r/--filter. The bare pnpm version -r change-intents release flow from #12953 is untouched, and the two forms interact exactly as the TypeScript handler dictates (a version argument selects the npm-style bump; intents are neither consumed nor garbage-collected by it — there is a test proving that).

The TypeScript CLI already ships this form (pnpm11/releasing/commands/src/version/index.ts), so only the pacquet side changes. Covers the remaining version gap under the Stage 3 command surface in #11633.

Behavior parity highlights:

  • A hand-rolled inc() reproducing node-semver's semantics with its default identifier base of 0 (finalizing prereleases on major|minor|patch, --preid handling, right-most-numeric prerelease increments), verified by a 20-case unit table.
  • Options mirror the TypeScript CLI: --preid, --allow-same-version, --message (%s substitution), --no-git-tag-version, --no-commit-hooks, --sign-git-tag, --tag-version-prefix (default v), --json.
  • preversion/version/postversion run through pacquet-executor's run_lifecycle_hook — the port of the same upstream exec.lifecycle package the TypeScript handler calls — re-reading the manifest between stages so each hook sees the right version.
  • The single-package form records the bump as a commit plus an annotated (or GPG-signed) tag; recursive runs skip the commit and tag, like upstream.
  • Error codes match pnpm: ERR_PNPM_INVALID_VERSION_BUMP, ERR_PNPM_INVALID_VERSION, ERR_PNPM_VERSION_NOT_CHANGED, ERR_PNPM_NO_PACKAGES_TO_VERSION, ERR_PNPM_UNCLEAN_WORKING_TREE.

Tests: all 27 scenarios of releasing/commands/test/version/index.test.ts and both e2e cases of pnpm/test/version.ts are mapped onto 21 integration tests driving the built binary, plus the unit inc() table; three extra tests cover the unclean-tree gate, --filter end to end, and the change-intent survival guard.

Squash Commit Body

Replace the ERR_PNPM_NOT_IMPLEMENTED stub with the npm-style form:
`pnpm version <major|minor|patch|premajor|preminor|prepatch|prerelease>`
and `pnpm version <exact-version>` (a leading `v` is accepted and
stripped, like semver.valid), also recursively with `-r`/`--filter`.
The bare `pnpm version -r` change-intents release flow is untouched.

The bump follows node-semver's inc() with its default identifier base
of 0 — bumping major/minor/patch from a matching prerelease finalizes
it, the pre* types start a `.0` prerelease honoring `--preid`, and
`prerelease` increments the right-most numeric identifier. Options
mirror the TypeScript CLI: `--allow-same-version`, `--message` with
`%s` substitution, `--no-git-tag-version`, `--no-commit-hooks`,
`--sign-git-tag`, `--tag-version-prefix` (default "v"), and `--json`.

The single-package form records the bump as a commit plus an annotated
(or GPG-signed) tag through the same RunCommand capability the publish
git checks use; recursive runs skip the commit and tag since there is
no single version to tag with. The preversion/version/postversion
scripts run through pacquet-executor's run_lifecycle_hook — the same
port of the upstream exec.lifecycle package the TypeScript handler
calls — re-reading the manifest between stages so each hook sees the
right version. Error codes match pnpm: ERR_PNPM_INVALID_VERSION_BUMP,
ERR_PNPM_INVALID_VERSION, ERR_PNPM_VERSION_NOT_CHANGED,
ERR_PNPM_NO_PACKAGES_TO_VERSION, ERR_PNPM_UNCLEAN_WORKING_TREE.

The TypeScript CLI already ships this form, so only the pacquet side
changes; no TypeScript change is needed. Covers the remaining `version`
gap under the Stage 3 command surface in pnpm/pnpm#11633.

Tests: a unit table driving inc() through the node-semver cases, plus
integration tests against the built binary porting the upstream
scenarios from releasing/commands/test/version/index.test.ts and
pnpm/test/version.ts — bumps, preid, JSON output, explicit versions,
same-version handling, lifecycle-hook ordering, the git commit/tag
matrix, and recursive selection with and without --filter.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
    (The TypeScript CLI already ships this form; this PR adds the pacquet side.)
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed. (No docs change: the command form
    is already documented for the TypeScript CLI.)

Made with the help of Claude Code (claude-fable-5).


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 npm-compatible pnpm version bumps for major/minor/patch, prereleases (with --preid), and exact versions (v-prefix supported).
    • Extended pnpm version for workspaces with recursive execution and advanced workspace selection.
    • Added support for lifecycle scripts, configurable commit/tag behavior (--message, --no-git-tag-version, --no-commit-hooks, --sign-git-tag, --tag-version-prefix), and --json.
    • Added --allow-same-version.
  • Bug Fixes

    • Improved pnpm version behavior across reporters and execution contexts (directory/recursive handling).
  • Tests

    • Expanded unit and integration coverage for bump parsing, lifecycle ordering, git/tag behavior, JSON output, and workspace scenarios.

Replace the ERR_PNPM_NOT_IMPLEMENTED stub with the npm-style form:
`pnpm version <major|minor|patch|premajor|preminor|prepatch|prerelease>`
and `pnpm version <exact-version>` (a leading `v` is accepted and
stripped, like semver.valid), also recursively with `-r`/`--filter`.
The bare `pnpm version -r` change-intents release flow is untouched.

The bump follows node-semver's inc() with its default identifier base
of 0 — bumping major/minor/patch from a matching prerelease finalizes
it, the pre* types start a `.0` prerelease honoring `--preid`, and
`prerelease` increments the right-most numeric identifier. Options
mirror the TypeScript CLI: `--allow-same-version`, `--message` with
`%s` substitution, `--no-git-tag-version`, `--no-commit-hooks`,
`--sign-git-tag`, `--tag-version-prefix` (default "v"), and `--json`.

The single-package form records the bump as a commit plus an annotated
(or GPG-signed) tag through the same RunCommand capability the publish
git checks use; recursive runs skip the commit and tag since there is
no single version to tag with. The preversion/version/postversion
scripts run through pacquet-executor's run_lifecycle_hook — the same
port of `@pnpm/exec.lifecycle` the upstream handler calls — re-reading
the manifest between stages so each hook sees the right version.
Error codes match pnpm: ERR_PNPM_INVALID_VERSION_BUMP,
ERR_PNPM_INVALID_VERSION, ERR_PNPM_VERSION_NOT_CHANGED,
ERR_PNPM_NO_PACKAGES_TO_VERSION, ERR_PNPM_UNCLEAN_WORKING_TREE.

The TypeScript CLI already ships this form, so only the pacquet side
changes; no TypeScript change is needed. Covers the remaining `version`
gap under the Stage 3 command surface in pnpm#11633.

Tests: a unit table driving inc() through the node-semver cases, plus
integration tests against the built binary porting the upstream
scenarios from releasing/commands/test/version/index.test.ts and
pnpm/test/version.ts — bumps, preid, JSON output, explicit versions,
same-version handling, lifecycle-hook ordering, the git commit/tag
matrix, and recursive selection with and without --filter.

Co-Authored-By: Claude Fable 5 <[email protected]>
@Safort
Safort requested a review from zkochan as a code owner July 21, 2026 18:36
@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

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: 20997ae0-edb2-484d-89bd-8efbeb9087d1

📥 Commits

Reviewing files that changed from the base of the PR and between 3643d14 and 2cd3778.

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

📝 Walkthrough

Walkthrough

Changes

npm-style versioning

Layer / File(s) Summary
CLI contract and dispatch
pnpm/crates/cli/src/cli_args/version.rs, pnpm/crates/cli/src/cli_args/dispatch_query.rs, pnpm/crates/cli/src/cli_args/run.rs
Adds npm-compatible version flags and errors, passes directory and reporter context, and exposes shared script execution support.
Version bump and lifecycle execution
pnpm/crates/cli/src/cli_args/version.rs, pnpm/crates/cli/src/cli_args/version/tests.rs
Parses exact versions and bump keywords, handles prereleases, updates manifests, and runs version lifecycle hooks.
Git, reporting, and workspace behavior
pnpm/crates/cli/src/cli_args/version.rs, pnpm/crates/cli/tests/version.rs, .changeset/pacquet-npm-style-version.md
Adds commit/tag handling, JSON and text output, recursive workspace behavior, validation coverage, and release documentation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant VersionArgs
  participant WorkspacePackages
  participant PackageManifest
  participant LifecycleHooks
  participant Git
  CLI->>VersionArgs: dispatch version with directory and reporter
  VersionArgs->>WorkspacePackages: select packages for recursive mode
  VersionArgs->>PackageManifest: compute and write versions
  VersionArgs->>LifecycleHooks: run version lifecycle scripts
  VersionArgs->>Git: commit and tag single-package changes
Loading

Possibly related issues

Suggested labels: 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

The latest fixes appear safe to merge.

  • Empty --preid values are normalized before prerelease construction.
  • No distinct blocking issue qualifies for an additional follow-up comment.

Reviews (2): Last reviewed commit: "test(pacquet): cover the version git-fai..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/src/cli_args/version.rs Resolved
Comment on lines +131 to +136
recursive: bool,
) -> miette::Result<()> {
match self.params.first().map(String::as_str) {
None if recursive => self.release_from_intents(config).await,
None => Err(VersionError::MissingBump.into()),
Some(bump) => Err(VersionError::NpmStyleNotPorted { bump: bump.to_string() }.into()),
Some(_) => self.npm_style_bump::<Reporter>(config, dir, recursive),

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.

P2 Extra Version Arguments Are Ignored

The command accepts params as a vector but dispatches solely from its first entry, so pnpm version patch unexpected silently performs a patch bump and ignores the remaining required input. Reject more than one positional version argument before changing the manifest so malformed invocations cannot report success.

Context Used: pnpm/AGENTS.md (source)

Safort and others added 2 commits July 21, 2026 20:43
An empty --preid produced an empty prerelease identifier and wrote an
invalid version like 1.0.1-.0 into the manifest. The TypeScript CLI
never does: the empty string is falsy to semver's inc(), which then
starts the prerelease at a bare -0. Filter the empty preid out to
match.

Co-Authored-By: Claude Fable 5 <[email protected]>
The perfectionist dylint lint rejects U+2026 in comments; use ASCII dots.

Co-Authored-By: Claude Fable 5 <[email protected]>
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 21, 2026
@codecov-commenter

codecov-commenter commented Jul 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.47436% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.76%. Comparing base (2e2c322) to head (2cd3778).

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/version.rs 97.02% 9 Missing ⚠️
pnpm/crates/cli/src/cli_args/dispatch_query.rs 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13200      +/-   ##
==========================================
+ Coverage   86.74%   86.76%   +0.01%     
==========================================
  Files         524      524              
  Lines       88363    88672     +309     
==========================================
+ Hits        76653    76935     +282     
- Misses      11710    11737      +27     

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

A failing git commit (a rejecting pre-commit hook without
--no-commit-hooks) surfaces git's stderr and leaves no tag behind, and
an empty --tag-version-prefix tags without the default v.

Co-Authored-By: Claude Fable 5 <[email protected]>
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 2cd37787a482

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.597 ± 0.167 2.430 2.810 1.69 ± 0.20
pacquet@main 2.574 ± 0.163 2.399 2.923 1.68 ± 0.20
pnpr@HEAD 1.608 ± 0.126 1.425 1.795 1.05 ± 0.13
pnpr@main 1.535 ± 0.154 1.348 1.796 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.59690078854,
      "stddev": 0.1673117390257194,
      "median": 2.55593442434,
      "user": 1.9916744199999996,
      "system": 1.5504278399999998,
      "min": 2.4300388278400002,
      "max": 2.8104234958400003,
      "times": [
        2.76226892184,
        2.48750835884,
        2.43553140084,
        2.43616037984,
        2.7925251978400003,
        2.8104234958400003,
        2.75047197584,
        2.62436048984,
        2.4300388278400002,
        2.43971883684
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.57366213414,
      "stddev": 0.16346514978557206,
      "median": 2.5193716528400003,
      "user": 2.05367502,
      "system": 1.5128834399999997,
      "min": 2.39894291084,
      "max": 2.92289168984,
      "times": [
        2.56866723784,
        2.55895012084,
        2.92289168984,
        2.4380152118400003,
        2.80449233284,
        2.5022225808400003,
        2.52890468484,
        2.50369595084,
        2.50983862084,
        2.39894291084
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6084230164400002,
      "stddev": 0.12560619705656617,
      "median": 1.64469630884,
      "user": 1.22873292,
      "system": 1.2830075399999998,
      "min": 1.4247606528399999,
      "max": 1.79502730384,
      "times": [
        1.58648829784,
        1.6974532868399999,
        1.4522363058399999,
        1.67426093984,
        1.4247606528399999,
        1.45628244684,
        1.79502730384,
        1.62821206684,
        1.70832831284,
        1.66118055084
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.53458562984,
      "stddev": 0.15381062718436952,
      "median": 1.53284537034,
      "user": 1.09198482,
      "system": 1.18065924,
      "min": 1.34843898884,
      "max": 1.79601018684,
      "times": [
        1.79601018684,
        1.59979271684,
        1.40968039684,
        1.57454548984,
        1.49114525084,
        1.66036623684,
        1.69584298184,
        1.34843898884,
        1.38165234684,
        1.38838170284
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 272.4 ± 46.0 242.0 401.3 1.06 ± 0.19
pacquet@main 257.5 ± 15.0 237.6 286.0 1.00
pnpr@HEAD 273.7 ± 16.1 247.8 306.0 1.06 ± 0.09
pnpr@main 286.1 ± 12.5 270.7 304.6 1.11 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.27236696332,
      "stddev": 0.04598850663856332,
      "median": 0.26073831742000003,
      "user": 0.22159959999999995,
      "system": 0.5457891,
      "min": 0.24203594392000002,
      "max": 0.40127546292000005,
      "times": [
        0.40127546292000005,
        0.25492001892,
        0.26292146992000004,
        0.26609952792,
        0.25855516492,
        0.26319764792,
        0.24866241792000002,
        0.25790058792000004,
        0.26810139092,
        0.24203594392000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25746635912000004,
      "stddev": 0.015000360476441748,
      "median": 0.25268478392000004,
      "user": 0.20669149999999997,
      "system": 0.522873,
      "min": 0.23760942592,
      "max": 0.28600595792,
      "times": [
        0.27331357292,
        0.25012830592,
        0.27008381792,
        0.24478413692,
        0.25395227492,
        0.25141729292000004,
        0.24614370592,
        0.23760942592,
        0.28600595792,
        0.26122509992000004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27369767091999997,
      "stddev": 0.01610239667503817,
      "median": 0.27275203991999997,
      "user": 0.23238940000000002,
      "system": 0.5177558,
      "min": 0.24775571792,
      "max": 0.30599354092000003,
      "times": [
        0.26832954892,
        0.27071675392,
        0.27529055892000004,
        0.27478732592,
        0.30599354092000003,
        0.28965333592000003,
        0.26694776892,
        0.27940629492,
        0.24775571792,
        0.25809586292000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28605403932000006,
      "stddev": 0.012535621849825753,
      "median": 0.28232420542000003,
      "user": 0.25452850000000005,
      "system": 0.5443714999999999,
      "min": 0.27071368892000003,
      "max": 0.30463137592,
      "times": [
        0.30109254292000004,
        0.30463137592,
        0.27278788692,
        0.29717515792,
        0.27071368892000003,
        0.27253266892,
        0.28229214492,
        0.28193758092,
        0.28235626592,
        0.29502107992000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.988 ± 0.126 2.859 3.204 1.89 ± 0.17
pacquet@main 2.827 ± 0.032 2.780 2.869 1.79 ± 0.15
pnpr@HEAD 1.580 ± 0.127 1.438 1.803 1.00
pnpr@main 1.593 ± 0.117 1.436 1.778 1.01 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.98824755762,
      "stddev": 0.12589931833290824,
      "median": 2.95572727472,
      "user": 2.26091688,
      "system": 1.639078,
      "min": 2.85890562122,
      "max": 3.2038063002199997,
      "times": [
        2.91169865522,
        3.2038063002199997,
        3.19399641422,
        2.96344413322,
        3.0008817362199998,
        2.94801041622,
        3.04922423522,
        2.85890562122,
        2.88222882022,
        2.87027924422
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.82660368702,
      "stddev": 0.03239969676525254,
      "median": 2.8305967587199996,
      "user": 1.8686677800000002,
      "system": 1.3732384999999998,
      "min": 2.78026917222,
      "max": 2.86917123722,
      "times": [
        2.84684548822,
        2.8175253362199997,
        2.85210279622,
        2.80146757822,
        2.84366818122,
        2.86261711922,
        2.86917123722,
        2.78026917222,
        2.7844409522199998,
        2.80792900922
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.57988801372,
      "stddev": 0.12749984120926275,
      "median": 1.53389023972,
      "user": 1.0775256799999997,
      "system": 1.2094464000000003,
      "min": 1.43768310522,
      "max": 1.80258732522,
      "times": [
        1.6111975282200002,
        1.4774321832200001,
        1.7661592642200001,
        1.43768310522,
        1.6640942372200003,
        1.5506947072200001,
        1.80258732522,
        1.5058109622200002,
        1.46613505222,
        1.51708577222
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5931720968199998,
      "stddev": 0.11656861033619983,
      "median": 1.5736128282200001,
      "user": 1.06457428,
      "system": 1.2011286999999997,
      "min": 1.4364162902200002,
      "max": 1.7782721952200002,
      "times": [
        1.54295790122,
        1.5814557932200002,
        1.4364162902200002,
        1.7704963762200001,
        1.58908808322,
        1.7782721952200002,
        1.6659725092200002,
        1.44511456922,
        1.5657698632200001,
        1.5561773872200002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 627.1 ± 69.6 565.2 793.0 2.09 ± 0.24
pacquet@main 626.8 ± 56.6 561.0 711.7 2.09 ± 0.19
pnpr@HEAD 299.8 ± 6.6 288.1 308.6 1.00
pnpr@main 307.4 ± 14.4 291.4 344.3 1.03 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.62708542972,
      "stddev": 0.06961970156764104,
      "median": 0.60982059472,
      "user": 0.76056264,
      "system": 0.6984849999999999,
      "min": 0.56518776422,
      "max": 0.7930454642200001,
      "times": [
        0.7930454642200001,
        0.63683050722,
        0.5828106822200001,
        0.5802301522200001,
        0.56518776422,
        0.64744141322,
        0.6395402182200001,
        0.5763507532200001,
        0.5755017532200001,
        0.67391558922
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6268181461200001,
      "stddev": 0.05662710805528345,
      "median": 0.60767187372,
      "user": 0.77051564,
      "system": 0.7012081999999998,
      "min": 0.56101444022,
      "max": 0.71170104322,
      "times": [
        0.56242663822,
        0.5840439082200001,
        0.59386016222,
        0.6718271642200001,
        0.6935496722200001,
        0.71170104322,
        0.67684451022,
        0.59143033722,
        0.62148358522,
        0.56101444022
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29979944072000003,
      "stddev": 0.00655777050392439,
      "median": 0.30084120822000004,
      "user": 0.19654884,
      "system": 0.5288401,
      "min": 0.28807335922000005,
      "max": 0.30863664322000006,
      "times": [
        0.29630363022000006,
        0.30517592522000003,
        0.30468958322000006,
        0.29623387922000005,
        0.30249090122000005,
        0.28807335922000005,
        0.30504908722,
        0.29214988322,
        0.29919151522000004,
        0.30863664322000006
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30741927812000003,
      "stddev": 0.014429299181577813,
      "median": 0.3046362932200001,
      "user": 0.20112934,
      "system": 0.5519487999999999,
      "min": 0.29144915822000006,
      "max": 0.34430768422,
      "times": [
        0.34430768422,
        0.31184501922,
        0.30740991322000005,
        0.29753483922,
        0.30856854622,
        0.31045346022000003,
        0.30001429722000006,
        0.29144915822000006,
        0.30186267322000004,
        0.30074719022
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.943 ± 0.041 1.909 2.046 6.07 ± 0.44
pacquet@main 1.952 ± 0.055 1.900 2.084 6.10 ± 0.46
pnpr@HEAD 0.323 ± 0.024 0.292 0.381 1.01 ± 0.10
pnpr@main 0.320 ± 0.022 0.299 0.377 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9427972096200001,
      "stddev": 0.04112465982961737,
      "median": 1.93098460142,
      "user": 1.0147754,
      "system": 0.7707944,
      "min": 1.9089607124199999,
      "max": 2.04593228342,
      "times": [
        1.92159684442,
        1.94227827142,
        1.93321254342,
        1.9089607124199999,
        1.92875665942,
        1.93742653342,
        1.9234735544200001,
        1.90926943142,
        2.04593228342,
        1.97706526242
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9520336541200003,
      "stddev": 0.054865395960565645,
      "median": 1.9326089419199999,
      "user": 1.0483444,
      "system": 0.7560028000000001,
      "min": 1.90014635342,
      "max": 2.08419163142,
      "times": [
        1.9373220094199999,
        1.9770262244199999,
        1.9556730774200002,
        1.90479130242,
        1.90014635342,
        1.92142545242,
        1.9220365674200002,
        1.9278958744199999,
        1.9898280484200002,
        2.08419163142
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.32330382032000005,
      "stddev": 0.024432261187119792,
      "median": 0.32153187742000006,
      "user": 0.21660870000000002,
      "system": 0.5625988000000001,
      "min": 0.29158604742000005,
      "max": 0.38112487542000006,
      "times": [
        0.38112487542000006,
        0.33151519642000005,
        0.33064368142000006,
        0.32165965642000005,
        0.32140409842000006,
        0.32922861742000004,
        0.31955625242,
        0.29158604742000005,
        0.29898789642000007,
        0.30733188142000006
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32010660932000007,
      "stddev": 0.022261449509792284,
      "median": 0.31392239392000004,
      "user": 0.20928859999999996,
      "system": 0.5613965999999999,
      "min": 0.29939618242000005,
      "max": 0.37688497542000005,
      "times": [
        0.30343467442000005,
        0.31661976642000006,
        0.32496269942000006,
        0.30605874342000006,
        0.33150684942,
        0.31074999042000007,
        0.31122502142,
        0.32022719042000003,
        0.29939618242000005,
        0.37688497542000005
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 392.2 ± 19.6 363.6 439.3 4.13 ± 0.34
pacquet@main 394.8 ± 16.9 368.5 424.4 4.16 ± 0.32
pnpr@HEAD 99.0 ± 11.3 86.4 125.8 1.04 ± 0.14
pnpr@main 95.0 ± 6.1 85.5 107.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.39221902366,
      "stddev": 0.019565140763238707,
      "median": 0.39174088816,
      "user": 0.38328272,
      "system": 0.06288996,
      "min": 0.36359541066,
      "max": 0.43928825566,
      "times": [
        0.38269285866,
        0.39997607366000004,
        0.43928825566,
        0.39278450066000004,
        0.38053351866,
        0.36359541066,
        0.39069727566,
        0.38212750766000003,
        0.39510321766,
        0.39539161766
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.39480483186000004,
      "stddev": 0.016893409439524137,
      "median": 0.39536454416,
      "user": 0.38376512,
      "system": 0.06414055999999999,
      "min": 0.36851999366,
      "max": 0.42444222866000003,
      "times": [
        0.40019705866,
        0.36851999366,
        0.38104029766,
        0.40460149966000003,
        0.40495295766,
        0.37741191066,
        0.39053202966,
        0.42444222866000003,
        0.38726116766,
        0.40908917466
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09896105827290323,
      "stddev": 0.011283327900186067,
      "median": 0.09362072566000001,
      "user": 0.02772810387096773,
      "system": 0.012782187096774195,
      "min": 0.08635397166000001,
      "max": 0.12583537766,
      "times": [
        0.09065028866000001,
        0.08844339866,
        0.08815082166000002,
        0.09126998866000001,
        0.09328118066,
        0.09079518866000001,
        0.08690497566000001,
        0.09152858366000001,
        0.08635397166000001,
        0.08662805566000001,
        0.08996904066000001,
        0.11559021866000001,
        0.10597134366000001,
        0.09676011266000001,
        0.11633701766000001,
        0.09306420366000001,
        0.10946029566000001,
        0.10762845066000001,
        0.09181530266000001,
        0.09834642766000001,
        0.09124080366000001,
        0.11811888866000002,
        0.12186095566,
        0.09907225766000001,
        0.09800834366000001,
        0.12583537766,
        0.10255102066,
        0.09362072566000001,
        0.10771871966000002,
        0.10044494166000001,
        0.09037190466000002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09499468114387098,
      "stddev": 0.006098810168679418,
      "median": 0.09275855966000002,
      "user": 0.02507984580645161,
      "system": 0.011994750322580641,
      "min": 0.08546363266000001,
      "max": 0.10702933666000002,
      "times": [
        0.09171525366000001,
        0.09173262666000001,
        0.09642974366000001,
        0.08876693566,
        0.08851286966000001,
        0.08953503666000001,
        0.08695328466,
        0.09420201666000001,
        0.10702933666000002,
        0.10634183766000001,
        0.09253942866,
        0.10276414066000002,
        0.09736805266000001,
        0.10388460066,
        0.09502971866000001,
        0.09555178766000001,
        0.09814158366000002,
        0.10474769866000001,
        0.09186584666000001,
        0.09708647566,
        0.09275855966000002,
        0.09062673266000001,
        0.08931098666000001,
        0.09083827066000001,
        0.09125935966000001,
        0.09104879466000002,
        0.08546363266000001,
        0.09941326666000001,
        0.09706296066000002,
        0.09033472566000002,
        0.10651955066000002
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.822 ± 0.201 4.563 5.179 1.32 ± 0.07
pacquet@main 5.170 ± 0.283 4.824 5.601 1.41 ± 0.09
pnpr@HEAD 4.028 ± 0.121 3.868 4.181 1.10 ± 0.05
pnpr@main 3.664 ± 0.117 3.512 3.913 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.82191877648,
      "stddev": 0.20098739061934598,
      "median": 4.83520420528,
      "user": 2.64808604,
      "system": 1.92946396,
      "min": 4.56259309378,
      "max": 5.17888422678,
      "times": [
        4.99556991278,
        4.56259309378,
        4.68994990078,
        4.96270457078,
        4.62125215578,
        4.6142793617799995,
        5.17888422678,
        4.77422981178,
        4.92354613178,
        4.89617859878
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 5.16954666158,
      "stddev": 0.28297000725016763,
      "median": 5.163688220779999,
      "user": 3.40970924,
      "system": 2.48351566,
      "min": 4.82361858278,
      "max": 5.60050589678,
      "times": [
        4.90452382578,
        5.07120659778,
        5.33784785578,
        5.56027542578,
        5.2561698437799995,
        5.60050589678,
        5.0347531087799995,
        5.27872288578,
        4.82784259278,
        4.82361858278
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.02760494618,
      "stddev": 0.12082909340984833,
      "median": 3.9887807502799997,
      "user": 2.30854034,
      "system": 2.31665016,
      "min": 3.86767230078,
      "max": 4.18068124678,
      "times": [
        3.95901020078,
        4.18068124678,
        3.91860122678,
        3.9166360717799997,
        4.1749419547799995,
        3.9701674587799998,
        4.00739404178,
        3.86767230078,
        4.10447815778,
        4.17646680178
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6637335227799994,
      "stddev": 0.11675507756673031,
      "median": 3.68368489678,
      "user": 1.5747682399999996,
      "system": 1.5929198599999999,
      "min": 3.5121457857799996,
      "max": 3.91267168478,
      "times": [
        3.91267168478,
        3.7035280727799997,
        3.6110833637799997,
        3.72706121578,
        3.57634774978,
        3.68556608378,
        3.7027186147799998,
        3.5121457857799996,
        3.6818037097799996,
        3.52440894678
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13200
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,858.91 ms
(+5.20%)Baseline: 2,717.61 ms
3,261.13 ms
(87.67%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,908.96 ms
(+1.96%)Baseline: 1,872.21 ms
2,246.65 ms
(84.97%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
565.19 ms
(-0.11%)Baseline: 565.83 ms
678.99 ms
(83.24%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
363.60 ms
(+6.14%)Baseline: 342.56 ms
411.08 ms
(88.45%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,430.04 ms
(+2.47%)Baseline: 2,371.45 ms
2,845.74 ms
(85.39%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,562.59 ms
(+2.69%)Baseline: 4,442.95 ms
5,331.55 ms
(85.58%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
242.04 ms
(-3.20%)Baseline: 250.03 ms
300.04 ms
(80.67%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13200
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,437.68 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
291.59 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
288.07 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
86.35 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,424.76 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,867.67 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
247.76 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit fd33859 into pnpm:main Jul 21, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants