Skip to content

fix(config): read node-version from pnpm config env - #13874

Merged
zkochan merged 2 commits into
pnpm:mainfrom
vsumner:codex/fix-config-env-node-version
Aug 20, 2026
Merged

zkochan merged 2 commits into
pnpm:mainfrom
vsumner:codex/fix-config-env-node-version

Conversation

@vsumner

@vsumner vsumner commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Related to #11254.

Restore PNPM_CONFIG_NODE_VERSION support in the TypeScript CLI's environment config reader. The key was excluded when its schema used a private semver parser, but it is now declared as [null, String], which the current parser supports.

This changes only the Node.js version used for compatibility checks; it does not change the runtime that executes pnpm. The Rust CLI already reads PNPM_CONFIG_NODE_VERSION, so this restores parity without a pacquet production change.

The regression tests cover environment loading and the existing precedence contract: CLI > environment > devEngines.runtime.

Squash Commit Body

The pnpm_config environment reader excluded node-version when its npm config schema used a private semver parser. The schema is now parser-supported, but the exclusion remained and caused PNPM_CONFIG_NODE_VERSION to be ignored.

Remove only the stale node-version exclusion. Keep init-version excluded until pnpm and pacquet have matching init config behavior, and keep umask excluded because Number parsing does not preserve npm's octal semantics.

Add regression coverage for environment loading and CLI/environment/manifest precedence.

Related to pnpm/pnpm#11254.

Checklist

  • I checked the referenced issue and verified that none of the PRs linked to it solves this.
  • The change is implemented in both the TypeScript CLI and the Rust pnpm/ port. The Rust port already supports this environment variable.
  • Added a changeset (pnpm changeset) for @pnpm/config.reader and pnpm.
  • 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 compatibility checks so PNPM_CONFIG_NODE_VERSION is correctly recognized.
    • Restored expected precedence when determining the Node.js version: command-line and configuration settings take priority over environment variables, which take priority over runtime recommendations.
    • Improved handling of initialization version and umask environment settings for better compatibility.
    • Ensured uppercase PNPM configuration environment variables are consistently recognized.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 6 seconds

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 016d2293-b18a-499a-85be-e6f8aff90a44

📥 Commits

Reviewing files that changed from the base of the PR and between b66ff8a and a87a1ce.

📒 Files selected for processing (3)
  • pnpm/crates/cli/tests/suite/install_runtimes.rs
  • pnpm/crates/config/src/tests.rs
  • pnpm11/config/reader/test/index.ts

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: 8ed22c78-23a3-4ce3-b4a9-8d2dd70013b9

📥 Commits

Reviewing files that changed from the base of the PR and between 8680ece and b66ff8a.

📒 Files selected for processing (3)
  • .changeset/config-node-version-env.md
  • pnpm11/config/reader/src/index.ts
  • pnpm11/config/reader/test/index.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpm11/config/reader/src/index.ts
  • .changeset/config-node-version-env.md
  • pnpm11/config/reader/test/index.ts

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


📝 Walkthrough

Walkthrough

The configuration reader now accepts PNPM_CONFIG_NODE_VERSION during compatibility checks. Tests verify environment resolution and precedence against devEngines.runtime and CLI configuration. A patch changeset documents releases for the affected packages.

Changes

Node version environment handling

Layer / File(s) Summary
Environment schema handling
pnpm11/config/reader/src/index.ts, pnpm11/config/reader/test/index.ts
The environment schema no longer excludes node-version. Comments clarify init-version and umask. Test cleanup removes uppercase PNPM_CONFIG_* variables.
Precedence validation and release metadata
pnpm11/config/reader/test/index.ts, .changeset/config-node-version-env.md
Tests cover nodeVersion resolution and precedence. The changeset records patch releases for @pnpm/config.reader and pnpm.

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

Merge Risk: ⚪ Minimal · up to b66ff

This restores PNPM_CONFIG_NODE_VERSION handling for compatibility checks without changing the pnpm runtime; the change is localized and covered by regression tests, so no actionable merge-blocking risk remains beyond normal checks and review.

Suggested labels: product: pnpm@11

Suggested reviewers: zkochan

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vsumner
vsumner marked this pull request as ready for review August 12, 2026 16:53
@vsumner
vsumner requested a review from zkochan as a code owner August 12, 2026 16:53
Copilot AI lite review requested due to automatic review settings August 12, 2026 16:53
@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 12, 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: "test(config): cover PNPM_CONFIG_NODE_VER..." | Re-trigger Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 12, 2026

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

🧹 Nitpick comments (1)
pnpm11/config/reader/src/index.ts (1)

546-551: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a Rust regression test for PNPM_CONFIG_NODE_VERSION.

Pacquet already applies the environment value after workspace configuration and before the devEngines.runtime fallback. Add matching coverage for the required precedence: CLI/config > environment > devEngines.runtime.

🤖 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/config/reader/src/index.ts` around lines 546 - 551, Add a Rust
regression test for PNPM_CONFIG_NODE_VERSION covering the reader’s precedence
behavior: explicit CLI/configuration must override the environment value, while
the environment value must override the devEngines.runtime fallback. Reuse the
existing configuration-reader test helpers and assert the resolved node version
for each precedence case.

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.

Nitpick comments:
In `@pnpm11/config/reader/src/index.ts`:
- Around line 546-551: Add a Rust regression test for PNPM_CONFIG_NODE_VERSION
covering the reader’s precedence behavior: explicit CLI/configuration must
override the environment value, while the environment value must override the
devEngines.runtime fallback. Reuse the existing configuration-reader test
helpers and assert the resolved node version for each precedence case.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 94ab15c7-367c-4a7b-bfca-fcb25d9c96e4

📥 Commits

Reviewing files that changed from the base of the PR and between e6f2249 and 2cf3c8d.

📒 Files selected for processing (3)
  • .changeset/config-node-version-env.md
  • pnpm11/config/reader/src/index.ts
  • pnpm11/config/reader/test/index.ts

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

Restores support for PNPM_CONFIG_NODE_VERSION in the TypeScript CLI config reader so users can set the Node.js version used by compatibility checks via pnpm config environment variables, aligning behavior with the Rust CLI.

Changes:

  • Stop excluding node-version from env-var parsing by removing it from the envPnpmTypes omit list.
  • Add regression tests covering env loading and precedence (CLI > env > devEngines.runtime) for nodeVersion.
  • Add a changeset to release the fix for @pnpm/config.reader and pnpm.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pnpm11/config/reader/src/index.ts Removes the stale env schema exclusion so PNPM_CONFIG_NODE_VERSION is parsed into config.nodeVersion.
pnpm11/config/reader/test/index.ts Adds regression coverage for reading nodeVersion from env vars and precedence vs CLI and devEngines.runtime.
.changeset/config-node-version-env.md Publishes the fix as a patch for @pnpm/config.reader and pnpm.

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

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 12, 2026
Copilot AI review requested due to automatic review settings August 14, 2026 16:21
@vsumner
vsumner force-pushed the codex/fix-config-env-node-version branch from 2cf3c8d to 3564c70 Compare August 14, 2026 16:21

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (3)

pnpm11/config/reader/test/index.ts:127

  • The test title says "pnpm_config_*" but the test uses PNPM_CONFIG_NODE_VERSION (uppercase). Adjust the wording so it matches what’s being exercised.
test('nodeVersion from pnpm_config_* environment variables takes priority over devEngines.runtime', async () => {

pnpm11/config/reader/test/index.ts:152

  • The test name refers to "pnpm_config_*" env vars, but the test sets PNPM_CONFIG_NODE_VERSION (uppercase). Renaming improves clarity about which env-var form is covered here.
test('nodeVersion from config takes priority over pnpm_config_* environment variables', async () => {

pnpm11/config/reader/test/index.ts:112

  • The test title says "pnpm_config_*" but the test actually sets an uppercase PNPM_CONFIG_NODE_VERSION env var. Renaming the test to match the env var prefix avoids confusion when scanning failures.

This issue also appears in the following locations of the same file:

  • line 127
  • line 152
test('nodeVersion is read from pnpm_config_* environment variables', async () => {

@vsumner

vsumner commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@zkochan if you have a moment i'd love to land this

@BPScott

BPScott commented Aug 19, 2026

Copy link
Copy Markdown

@zkochan, would you be able to take a look at this if you get a moment?

Copilot AI review requested due to automatic review settings August 20, 2026 15:58
@zkochan
zkochan force-pushed the codex/fix-config-env-node-version branch from 3564c70 to b66ff8a Compare August 20, 2026 15:58

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 20, 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

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Informational

1. Non-hermetic env config tests 🐞 Bug ☼ Reliability
Description
The new Jest tests pass a minimal env object into getConfig(), which makes loadNpmrcConfig()
fall back to reading real user config files from os.homedir() (e.g. ~/.npmrc, auth.ini). This
can make the tests machine/CI-dependent and can also mask regressions if a developer/CI has
node-version set globally to the asserted value.
Code

pnpm11/config/reader/test/index.ts[R114-118]

+test('nodeVersion is read from the PNPM_CONFIG_NODE_VERSION environment variable', async () => {
+  const { config } = await getConfig({
+    cliOptions: {},
+    env: {
+      PNPM_CONFIG_NODE_VERSION: '20.0.0',
Relevance

● Weak

Similar env-isolation requests for this exact test file were rejected as unneeded (PR #12862,
#13862).

PR-#12862
PR-#13862

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The tests pass only PNPM_CONFIG_NODE_VERSION in env, while the config loader will still load
user-level npmrc/auth files by default from os.homedir() when no explicit userconfig path is
supplied via the injected env. This makes outcomes dependent on the machine’s home config and can
hide regressions if a global node-version is already set.

pnpm11/config/reader/test/index.ts[114-169]
pnpm11/config/reader/src/index.ts[251-268]
pnpm11/config/reader/src/loadNpmrcFiles.ts[80-112]

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 newly added tests for `PNPM_CONFIG_NODE_VERSION` inject a partial `env` into `getConfig()`. Because the config loader reads user/workspace npmrc and pnpm auth config, supplying a minimal env causes it to resolve user config paths via `os.homedir()` and read real `~/.npmrc` / `~/.config/pnpm/auth.ini`, making tests non-hermetic and potentially masking failures.

## Issue Context
- `getConfig()` uses `opts.env` (when provided) as the environment for config loading.
- `loadNpmrcConfig()` reads `~/.npmrc` by default using `os.homedir()`.

## Fix Focus Areas
- pnpm11/config/reader/test/index.ts[114-169]

## Suggested fix
Update the new tests to fully isolate config inputs:
- Call `prepareEmpty()` (or otherwise ensure a fresh temp project dir) at the start of each test.
- Pass a complete env object that prevents reading real user config:
 - include the existing test `env` baseline (`{ ...env, ... }`),
 - set `npm_config_userconfig` (and/or `NPM_CONFIG_USERCONFIG`) to a temp `.npmrc` path you create in the temp project and keep it empty,
 - set `XDG_CONFIG_HOME` to a temp directory inside the test project so `auth.ini` cannot come from the real machine.
- Keep the assertions as-is (they’re good), but ensure no host config can influence the result.

ⓘ 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

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit a87a1ce ⚖️ Balanced

Results up to commit b66ff8a ⚖️ Balanced


No changes from previous review

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.

Address review feedback on the PR: name the exercised env-var form in
the TypeScript test titles, and add the requested Rust regression
coverage - a config-layer test that the env var overrides
pnpm-workspace.yaml and an e2e proving it beats devEngines.runtime for
engine compatibility checks.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 20, 2026 16:16

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.

@greptile-apps
greptile-apps Bot dismissed their stale review August 20, 2026 16:16

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

@qodo-code-review

Copy link
Copy Markdown

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

@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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.17%. Comparing base (bb57938) to head (a87a1ce).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13874      +/-   ##
==========================================
- Coverage   88.19%   88.17%   -0.03%     
==========================================
  Files         646      646              
  Lines      107162   107281     +119     
==========================================
+ Hits        94509    94591      +82     
- Misses      12653    12690      +37     

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

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

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: a87a1ceed8c3

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.427 ± 0.119 2.291 2.648 1.33 ± 0.11
pacquet@main 2.632 ± 0.216 2.316 2.985 1.44 ± 0.16
pnpr@HEAD 1.856 ± 0.114 1.684 2.045 1.02 ± 0.09
pnpr@main 1.826 ± 0.129 1.663 2.053 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.42676181356,
      "stddev": 0.11916211868172018,
      "median": 2.38239730056,
      "user": 1.5877093399999997,
      "system": 1.6012957200000002,
      "min": 2.29092522606,
      "max": 2.64840027206
    },
    {
      "command": "pacquet@main",
      "mean": 2.63166174586,
      "stddev": 0.21592060309906438,
      "median": 2.67375731356,
      "user": 2.0749571399999995,
      "system": 2.1205620199999995,
      "min": 2.31572003306,
      "max": 2.98539127706
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.85585046976,
      "stddev": 0.11406994721039519,
      "median": 1.8357464990599999,
      "user": 2.6431293399999998,
      "system": 3.5680039199999998,
      "min": 1.68382264706,
      "max": 2.0451942230599998
    },
    {
      "command": "pnpr@main",
      "mean": 1.82576343306,
      "stddev": 0.1285046881336053,
      "median": 1.80571954306,
      "user": 2.56552434,
      "system": 3.2507854200000006,
      "min": 1.6627583700600002,
      "max": 2.05328969406
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 444.3 ± 44.7 391.4 514.5 1.32 ± 0.17
pacquet@main 458.9 ± 65.7 375.0 588.8 1.36 ± 0.22
pnpr@HEAD 439.1 ± 28.7 394.6 493.2 1.30 ± 0.13
pnpr@main 337.2 ± 27.0 307.7 382.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.44433627374,
      "stddev": 0.04472397131216444,
      "median": 0.43791360974000004,
      "user": 0.3793418599999999,
      "system": 0.7011784400000001,
      "min": 0.39144005274000004,
      "max": 0.51448710974
    },
    {
      "command": "pacquet@main",
      "mean": 0.45885562844,
      "stddev": 0.06573571304637181,
      "median": 0.44135385024000007,
      "user": 0.38826396,
      "system": 0.7445068400000001,
      "min": 0.37501641174000006,
      "max": 0.5888440607400001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.43913343563999996,
      "stddev": 0.028728815014574666,
      "median": 0.44059228174000004,
      "user": 0.37388565999999995,
      "system": 0.68928224,
      "min": 0.39458916074000006,
      "max": 0.49319575674000005
    },
    {
      "command": "pnpr@main",
      "mean": 0.3372212505400001,
      "stddev": 0.026961441964489366,
      "median": 0.32847070874000006,
      "user": 0.27531706,
      "system": 0.55547844,
      "min": 0.30767983474000005,
      "max": 0.38226362274000003
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 10.4 ± 1.6 7.1 14.9 1.01 ± 0.24
pacquet@main 10.2 ± 1.9 7.2 18.6 1.00
pnpr@HEAD 11.7 ± 1.9 7.5 20.2 1.15 ± 0.28
pnpr@main 12.1 ± 1.9 8.9 20.2 1.19 ± 0.29
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010381489582158277,
      "stddev": 0.0015644517892579172,
      "median": 0.010220324780000001,
      "user": 0.005863645899280579,
      "system": 0.004560204316546762,
      "min": 0.00709661728,
      "max": 0.014917163280000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.01023409555722773,
      "stddev": 0.0018723812504761856,
      "median": 0.010052444280000001,
      "user": 0.006542744422442245,
      "system": 0.003734474587458748,
      "min": 0.00723510728,
      "max": 0.01863139328
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011748206210041141,
      "stddev": 0.0018642948879979142,
      "median": 0.01142118228,
      "user": 0.0072568141563786,
      "system": 0.0045262469135802464,
      "min": 0.00754008928,
      "max": 0.02020760128
    },
    {
      "command": "pnpr@main",
      "mean": 0.012149335544069259,
      "stddev": 0.0019004948383190474,
      "median": 0.011740862280000002,
      "user": 0.007624485367965364,
      "system": 0.004554124675324673,
      "min": 0.008938473280000001,
      "max": 0.02021819128
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 10.3 ± 1.6 7.3 14.1 1.10 ± 0.22
pacquet@main 10.9 ± 1.8 7.4 17.2 1.17 ± 0.24
pnpr@HEAD 9.3 ± 1.1 7.6 14.7 1.00
pnpr@main 10.0 ± 2.1 7.3 18.1 1.07 ± 0.26
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010287599377131473,
      "stddev": 0.0016213485118707544,
      "median": 0.01019203466,
      "user": 0.006437526932270916,
      "system": 0.0038767205577689245,
      "min": 0.00728044066,
      "max": 0.01406351966
    },
    {
      "command": "pacquet@main",
      "mean": 0.010869330665347596,
      "stddev": 0.0018128713435801335,
      "median": 0.01085504866,
      "user": 0.006636891016042782,
      "system": 0.004250753689839572,
      "min": 0.007433077660000001,
      "max": 0.017212127660000003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.00931993990615385,
      "stddev": 0.0011374668632695446,
      "median": 0.00903370566,
      "user": 0.005739335923076924,
      "system": 0.003614264692307694,
      "min": 0.007600881659999999,
      "max": 0.01469062566
    },
    {
      "command": "pnpr@main",
      "mean": 0.009999700881343878,
      "stddev": 0.002094747803036713,
      "median": 0.00947794466,
      "user": 0.005877461581027672,
      "system": 0.004142766877470357,
      "min": 0.007340483659999999,
      "max": 0.018056953660000003
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.029 ± 0.080 2.916 3.201 1.73 ± 0.18
pacquet@main 3.082 ± 0.156 2.884 3.277 1.76 ± 0.20
pnpr@HEAD 1.783 ± 0.110 1.608 1.947 1.02 ± 0.12
pnpr@main 1.747 ± 0.173 1.542 1.975 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.0285883493600005,
      "stddev": 0.08015227799978343,
      "median": 3.0331079341600002,
      "user": 2.39851964,
      "system": 1.78026478,
      "min": 2.91605285566,
      "max": 3.2013598876600002
    },
    {
      "command": "pacquet@main",
      "mean": 3.08245299086,
      "stddev": 0.15567425827868792,
      "median": 3.14303050066,
      "user": 2.41276204,
      "system": 1.9108969799999997,
      "min": 2.88439962666,
      "max": 3.27667747366
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7829116377600003,
      "stddev": 0.11035696865010539,
      "median": 1.78735365916,
      "user": 1.7662940399999996,
      "system": 2.08582908,
      "min": 1.60823604566,
      "max": 1.94695663766
    },
    {
      "command": "pnpr@main",
      "mean": 1.7474405546600003,
      "stddev": 0.17314081014748625,
      "median": 1.72686489266,
      "user": 1.8522891400000003,
      "system": 2.02650328,
      "min": 1.54221733866,
      "max": 1.97514946166
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 680.0 ± 64.4 582.2 762.4 1.51 ± 0.18
pacquet@main 714.4 ± 30.5 658.4 757.2 1.59 ± 0.13
pnpr@HEAD 479.6 ± 81.0 363.9 672.0 1.06 ± 0.20
pnpr@main 450.6 ± 32.5 402.9 503.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.67995421664,
      "stddev": 0.06437205726689192,
      "median": 0.7032756624400001,
      "user": 0.8598376199999999,
      "system": 0.9096874400000001,
      "min": 0.58219181194,
      "max": 0.76241482194
    },
    {
      "command": "pacquet@main",
      "mean": 0.7144426876400001,
      "stddev": 0.030524249542294695,
      "median": 0.7137326479399999,
      "user": 0.8815645199999999,
      "system": 0.99006384,
      "min": 0.65839312994,
      "max": 0.75717644994
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.47959159094000003,
      "stddev": 0.08102284186898115,
      "median": 0.47732849194000004,
      "user": 0.32935271999999993,
      "system": 0.6936585399999998,
      "min": 0.36385328594000005,
      "max": 0.67196659594
    },
    {
      "command": "pnpr@main",
      "mean": 0.4505809834400001,
      "stddev": 0.03252699140984622,
      "median": 0.44898549544000005,
      "user": 0.3191018199999999,
      "system": 0.66754774,
      "min": 0.40286334894000003,
      "max": 0.50300968094
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.301 ± 0.082 2.235 2.524 5.09 ± 0.37
pacquet@main 2.321 ± 0.099 2.201 2.545 5.13 ± 0.39
pnpr@HEAD 0.452 ± 0.029 0.401 0.498 1.00
pnpr@main 0.453 ± 0.024 0.410 0.487 1.00 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.3006205156800004,
      "stddev": 0.08190067972015568,
      "median": 2.27446465658,
      "user": 1.1863098600000002,
      "system": 1.016486,
      "min": 2.2353750115800004,
      "max": 2.52373248158
    },
    {
      "command": "pacquet@main",
      "mean": 2.3206681054800002,
      "stddev": 0.09947004064451373,
      "median": 2.27849236658,
      "user": 1.2049113599999999,
      "system": 1.041497,
      "min": 2.2013087705800003,
      "max": 2.54473311858
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.4524223050800001,
      "stddev": 0.02867198595977444,
      "median": 0.45258095308000007,
      "user": 0.31519226,
      "system": 0.6721011,
      "min": 0.4014346635800001,
      "max": 0.49800888958000006
    },
    {
      "command": "pnpr@main",
      "mean": 0.45260144038000005,
      "stddev": 0.024370018740193997,
      "median": 0.45741896358000006,
      "user": 0.33780925999999994,
      "system": 0.6825876,
      "min": 0.41049025958000007,
      "max": 0.48655720558000004
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 443.0 ± 52.3 382.1 560.5 2.91 ± 0.38
pacquet@main 385.5 ± 46.3 301.0 446.8 2.53 ± 0.33
pnpr@HEAD 159.0 ± 14.7 132.1 188.9 1.04 ± 0.11
pnpr@main 152.3 ± 7.9 127.6 162.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.44301059748,
      "stddev": 0.05228816022200534,
      "median": 0.43056198068000007,
      "user": 0.42491518,
      "system": 0.09870375999999999,
      "min": 0.38209832568,
      "max": 0.5604962946800001
    },
    {
      "command": "pacquet@main",
      "mean": 0.38551926488000005,
      "stddev": 0.04631634822671733,
      "median": 0.38588057968000006,
      "user": 0.37433648,
      "system": 0.08431805999999999,
      "min": 0.30098136168000006,
      "max": 0.44681430568
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.15899460387047623,
      "stddev": 0.014700145327318817,
      "median": 0.16043051168,
      "user": 0.06807749904761903,
      "system": 0.02165909333333333,
      "min": 0.13208208168,
      "max": 0.18885860068000002
    },
    {
      "command": "pnpr@main",
      "mean": 0.1522855891536842,
      "stddev": 0.007906052147581947,
      "median": 0.15459618068,
      "user": 0.06479614315789473,
      "system": 0.02031676,
      "min": 0.12764081568,
      "max": 0.16256917468
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 905.0 ± 145.8 684.8 1131.1 1.11 ± 0.26
pacquet@main 815.7 ± 141.4 686.5 1056.5 1.00
pnpm@HEAD 4389.2 ± 578.2 3717.1 5657.6 5.38 ± 1.17
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.9049701238066667,
      "stddev": 0.14581002334709708,
      "median": 0.8774658551400001,
      "user": 0.913307771111111,
      "system": 0.18225198888888886,
      "min": 0.6847714741400001,
      "max": 1.13110446914
    },
    {
      "command": "pacquet@main",
      "mean": 0.8156877164733333,
      "stddev": 0.14138162116890748,
      "median": 0.7426883011400001,
      "user": 0.8277023266666665,
      "system": 0.1581628777777778,
      "min": 0.68649861514,
      "max": 1.0564975331400002
    },
    {
      "command": "pnpm@HEAD",
      "mean": 4.389194464028888,
      "stddev": 0.5781576272402353,
      "median": 4.326243762140001,
      "user": 6.718709104444444,
      "system": 0.41358465555555557,
      "min": 3.71714800514,
      "max": 5.65761270814
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.478 ± 0.129 4.313 4.728 1.24 ± 0.06
pacquet@main 4.537 ± 0.177 4.359 4.900 1.26 ± 0.07
pnpr@HEAD 3.724 ± 0.135 3.452 3.981 1.03 ± 0.06
pnpr@main 3.608 ± 0.143 3.429 3.864 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.4775075845200005,
      "stddev": 0.12883353818847162,
      "median": 4.450042162220001,
      "user": 1.6524891000000004,
      "system": 1.6502799,
      "min": 4.3129068552200005,
      "max": 4.728177860220001
    },
    {
      "command": "pacquet@main",
      "mean": 4.537194124820001,
      "stddev": 0.17655341231217236,
      "median": 4.47308775322,
      "user": 1.8238604000000003,
      "system": 1.7925459000000004,
      "min": 4.35880318522,
      "max": 4.90022229022
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.7238704731199994,
      "stddev": 0.13528970579768057,
      "median": 3.7092150352199997,
      "user": 2.0440518,
      "system": 2.034427,
      "min": 3.45191075922,
      "max": 3.98108173422
    },
    {
      "command": "pnpr@main",
      "mean": 3.6084997783199997,
      "stddev": 0.14299485248566887,
      "median": 3.53861491522,
      "user": 1.7334377999999997,
      "system": 1.7181395999999995,
      "min": 3.42860092722,
      "max": 3.86410454222
    }
  ]
}

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 212.0 ± 18.1 184.8 251.2 1.13 ± 0.13
pacquet@main 188.2 ± 15.1 165.0 215.3 1.00
pnpr@HEAD 200.4 ± 18.3 182.3 248.3 1.06 ± 0.13
pnpr@main 214.4 ± 15.3 197.5 236.3 1.14 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.21195634803,
      "stddev": 0.018107085074179494,
      "median": 0.20966940928,
      "user": 0.23542040333333333,
      "system": 0.24696543999999998,
      "min": 0.18476894828,
      "max": 0.25122830928000006
    },
    {
      "command": "pacquet@main",
      "mean": 0.18824518949428576,
      "stddev": 0.015063820051878717,
      "median": 0.18380417228,
      "user": 0.22034489142857142,
      "system": 0.2104286542857143,
      "min": 0.16495646028,
      "max": 0.21533832528
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.20039804049428572,
      "stddev": 0.018312910491034756,
      "median": 0.19562900078,
      "user": 0.2274638914285714,
      "system": 0.21456572571428573,
      "min": 0.18232378928,
      "max": 0.24833046028
    },
    {
      "command": "pnpr@main",
      "mean": 0.21439237582545456,
      "stddev": 0.015271499463774669,
      "median": 0.21700941128,
      "user": 0.2546364109090909,
      "system": 0.20995734909090907,
      "min": 0.19746572928,
      "max": 0.23625694828000002
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13874
Testbedpacquet

🚨 4 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
582.19 ms
(+27.07%)Baseline: 458.18 ms
549.82 ms
(105.89%)

isolated-linker.fresh-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
382.10 ms
(+76.83%)Baseline: 216.08 ms
259.30 ms
(147.36%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
391.44 ms
(+40.59%)Baseline: 278.42 ms
334.11 ms
(117.16%)

isolated-linker.peer-heavy-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
684.77 ms
(+38.64%)Baseline: 493.91 ms
592.69 ms
(115.54%)

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
184.77 ms
(+2.97%)Baseline: 179.44 ms
215.33 ms
(85.81%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,916.05 ms
(+4.49%)Baseline: 2,790.65 ms
3,348.78 ms
(87.08%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,235.38 ms
(+16.05%)Baseline: 1,926.28 ms
2,311.54 ms
(96.71%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
582.19 ms
(+27.07%)Baseline: 458.18 ms
549.82 ms
(105.89%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
382.10 ms
(+76.83%)Baseline: 216.08 ms
259.30 ms
(147.36%)

isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,290.93 ms
(-0.66%)Baseline: 2,306.07 ms
2,767.29 ms
(82.79%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,312.91 ms
(-0.85%)Baseline: 4,349.90 ms
5,219.88 ms
(82.62%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
391.44 ms
(+40.59%)Baseline: 278.42 ms
334.11 ms
(117.16%)

isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
684.77 ms
(+38.64%)Baseline: 493.91 ms
592.69 ms
(115.54%)

isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
7.28 ms
(+10.11%)Baseline: 6.61 ms
7.93 ms
(91.76%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
7.10 ms
(+11.39%)Baseline: 6.37 ms
7.65 ms
(92.82%)
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 5f43039 into pnpm:main Aug 20, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants