Skip to content

fix(install): use the running Node.js for a devEngines runtime range - #15256

Merged
zkochan merged 6 commits into
pnpm:mainfrom
tunglambk:fix/devengines-runtime-range
Sep 22, 2026
Merged

zkochan merged 6 commits into
pnpm:mainfrom
tunglambk:fix/devengines-runtime-range

Conversation

@tunglambk

@tunglambk tunglambk commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

pnpm install skipped optional dependencies whose engines.node the running Node.js satisfies when devEngines.runtime declared a range. node_version_from_engines_runtime returned range.min_version() for every entry, so the lower bound of the declared range stood in for the Node.js running the install, and each package's engines were compared against that lower bound instead of the real runtime.

The function now uses the lower bound only when the entry sets onFail to download, which is when pnpm provisions that runtime itself. Otherwise a declared range means the Node.js already on the system, and only an exact version names one.

The issue's case is a project on Node.js 24 with devEngines.runtime: { name: "node", version: ">=22.12.0", onFail: "error" }, where an optional dependency requiring engines.node: ">=24.0.0" was dropped. The CLI test in pnpm/crates/cli/tests/suite/install_runtimes.rs builds the same shape from the running Node.js major, so it stays meaningful on whichever Node.js CI uses.

pnpm 11 had the same unconditional semver.minVersion in getNodeVersionFromEnginesRuntime (pnpm11/config/reader/src/index.ts), and that value reaches packageIsInstallable through config.nodeVersion. It now returns the lower bound only when onFail is download, and an exact version otherwise. pnpmConfig.nodeVersion is derived after runtimeOnFail is applied to rootProjectManifest and enginePinManifest. In addition to reader unit tests, an install regression test was added in pnpm11/pnpm/test/install/nodeRuntime.ts.

Closes #15230.

Validation

  • cargo test -p pnpm-package-manifest --lib: 83 passed.
  • cargo check -p pnpm-package-manifest and cargo clippy -p pnpm-package-manifest --all-targets -- --deny warnings: clean.
  • node pnpm/scripts/rustfmt.mjs --all -- --check: clean.
  • typos pnpm pnpr: clean.
  • pnpm --filter @pnpm/config.reader test: 17 suites, 548 passed.
  • pnpm --filter pnpm test test/install/nodeRuntime.ts: 4 passed (including the new regression test).

Squash Commit Body

`node_version_from_engines_runtime` returned the lower bound of every
`devEngines.runtime` and `engines.runtime` range, so a declared range stood in
for the Node.js running the install. Optional dependencies whose `engines.node`
the running Node.js satisfies were skipped, because their engines were compared
against that lower bound.

The lower bound is now used only when the entry sets `onFail` to `download`,
the case where pnpm provisions the runtime. Otherwise a range means the Node.js
already on the system, and only an exact version names one.

The v11 `getNodeVersionFromEnginesRuntime` now applies the same rule. It returns
the range's lower bound only when the entry sets `onFail` to `download`, an
exact version otherwise, and nothing for a range, so `packageIsInstallable`
sees the Node.js running the install. `nodeVersion` is derived after `runtimeOnFail`
is applied so workspace-level download and ignore policies take effect.

Closes pnpm/pnpm#15230.

Checklist

  • I checked the referenced issue and verified that none of the PRs already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes are implemented in every affected version.
  • Added a changeset (pnpm changeset) if this PR changes any published package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Antigravity, Gemini 3.8 Flash).

Summary by CodeRabbit

  • Bug Fixes

    • Fixed installation to reuse a supported system Node.js version when no download is requested.
    • Runtime ranges are provisioned from their lower bound only when configured with onFail: "download".
    • Preserved exact runtime versions as specified.
    • Improved runtime selection when devEngines.runtime and engines.runtime are both present.
    • Ensured runtime failure settings are applied consistently across project configuration.
  • Tests

    • Added coverage for system Node.js compatibility, runtime selection, exact versions, configuration overrides, and download behavior.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 59232b32-0563-4424-831c-91cfbcd3ae50

📥 Commits

Reviewing files that changed from the base of the PR and between 62343fc and c83436c.

📒 Files selected for processing (3)
  • pnpm11/config/reader/src/index.ts
  • pnpm11/config/reader/test/index.ts
  • pnpm11/pnpm/test/install/nodeRuntime.ts

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


📝 Walkthrough

Walkthrough

The runtime resolvers now treat non-download devEngines.runtime ranges as the system Node.js version. They use a range lower bound only when onFail is download. Unit, configuration, and install tests cover the behavior.

Changes

Runtime resolution

Layer / File(s) Summary
Runtime resolver behavior
pnpm/crates/package-manifest/src/lib.rs, pnpm/crates/package-manifest/src/runtime.rs, pnpm11/config/reader/src/index.ts
The resolvers preserve exact runtime versions, return no provisioned version for non-download ranges, and use the range minimum for onFail: "download". Configuration applies runtime overrides before resolving the provisioned version.
Resolution semantics tests
pnpm/crates/package-manifest/src/tests/dependencies.rs, pnpm11/config/reader/test/index.ts
Tests cover runtime precedence, exact pins, download ranges, non-download ranges, and runtime override behavior.
Install regression coverage
pnpm/crates/cli/tests/suite/install_runtimes.rs, pnpm11/pnpm/test/install/nodeRuntime.ts, .changeset/devengines-runtime-range-uses-system-node.md
Install tests verify optional dependency installation against the running Node.js major. The changeset records patch releases for the affected packages.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Assessment against linked issues

Objective Addressed Explanation
Prevent a devEngines.runtime range without onFail: "download" from being treated as the current runtime and skipping compatible optional dependencies [#15230] ✅

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

Merge Risk: ⚪ Minimal · up to c8343

Runtime ranges now use the installed Node.js unless pnpm is downloading a runtime, preserving optional dependency installation while retaining provisioning behavior. The covered paths are merge-ready.

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

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.

@tunglambk
tunglambk marked this pull request as ready for review September 22, 2026 07:31
@tunglambk
tunglambk requested a review from zkochan as a code owner September 22, 2026 07:31
Copilot AI lite review requested due to automatic review settings September 22, 2026 07:31
@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 →

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.

@codecov-commenter

codecov-commenter commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.53%. Comparing base (beb3726) to head (02d7409).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15256   +/-   ##
=======================================
  Coverage   91.52%   91.53%           
=======================================
  Files        1381     1381           
  Lines      185841   185847    +6     
=======================================
+ Hits       170093   170110   +17     
+ Misses      15748    15737   -11     

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

@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the shared runtime-range bug is fixed and covered in both maintained implementations.

Reviews (9) · Last reviewed commit: "docs(changeset): rephrase release note w..."

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Same-run regression check

HEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval.

Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2603.42 ms 2612.15 ms 0.3% 130.17 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1386.53 ms 1444.86 ms 4.2% 69.33 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 243.23 ms 292.53 ms 20.3% 12.16 ms Inconclusive (overlapping samples)
isolated-fresh-restore-hot-cache-hot-store pnpr 245.42 ms 247.61 ms 0.9% 12.27 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 6.53 ms 8.91 ms 36.6% 2.00 ms Inconclusive (overlapping samples)
isolated-repeat-install-hot-cache-hot-store pnpr 6.40 ms 6.17 ms -3.7% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 16.24 ms 8.41 ms -48.2% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 8.47 ms 14.15 ms 67.2% 2.00 ms Inconclusive (not reproduced)
isolated-fresh-install-cold-cache-cold-store pacquet 2518.28 ms 2549.49 ms 1.2% 125.91 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1482.12 ms 1451.74 ms -2.0% 74.11 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 407.41 ms 472.18 ms 15.9% 20.37 ms Inconclusive (overlapping samples)
isolated-fresh-install-hot-cache-hot-store pnpr 285.59 ms 283.84 ms -0.6% 14.28 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1619.05 ms 1632.22 ms 0.8% 80.95 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 277.85 ms 290.37 ms 4.5% 13.89 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 385.61 ms 328.77 ms -14.7% 19.28 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 136.65 ms 132.68 ms -2.9% 6.83 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 606.74 ms 597.03 ms -1.6% 30.34 ms Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet 177.27 ms 178.62 ms 0.8% 8.86 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4461.04 ms 4517.25 ms 1.3% 223.05 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3434.56 ms 3475.18 ms 1.2% 171.73 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 129.64 ms 136.27 ms 5.1% 6.48 ms Inconclusive (overlapping samples)
gvs-fresh-restore-hot-cache-hot-store pnpr 133.34 ms 142.93 ms 7.2% 6.67 ms Inconclusive (overlapping samples)

Integrated-Benchmark Report (Linux)

Commit: 02d7409d4ce8

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

The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.599 ± 0.142 2.384 2.794 1.83 ± 0.17
pacquet@main 2.579 ± 0.115 2.401 2.758 1.81 ± 0.16
pnpr@HEAD 1.423 ± 0.107 1.308 1.663 1.00
pnpr@main 1.453 ± 0.137 1.330 1.675 1.02 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.59937217654,
      "stddev": 0.14230631362767054,
      "median": 2.61215419214,
      "user": 2.1843917799999995,
      "system": 2.23470422,
      "min": 2.38363491314,
      "max": 2.79424965114
    },
    {
      "command": "pacquet@main",
      "mean": 2.57881046084,
      "stddev": 0.1153894590414045,
      "median": 2.60341815514,
      "user": 2.10274458,
      "system": 2.11690392,
      "min": 2.40113311014,
      "max": 2.75756862414
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.42298694544,
      "stddev": 0.10715517495297001,
      "median": 1.44486300864,
      "user": 1.63654008,
      "system": 1.5175456200000002,
      "min": 1.3079272311399999,
      "max": 1.66270441914
    },
    {
      "command": "pnpr@main",
      "mean": 1.45308540164,
      "stddev": 0.13737560590202674,
      "median": 1.3865307311400001,
      "user": 1.58309888,
      "system": 1.53112562,
      "min": 1.32970134014,
      "max": 1.67520025514
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 301.7 ± 56.3 231.9 420.1 1.23 ± 0.23
pacquet@main 247.6 ± 20.2 226.4 295.9 1.01 ± 0.09
pnpr@HEAD 247.6 ± 11.8 228.6 270.9 1.01 ± 0.06
pnpr@main 245.3 ± 9.4 226.8 261.8 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.30172078920000006,
      "stddev": 0.05632765549545661,
      "median": 0.2925347414,
      "user": 0.34072769999999997,
      "system": 0.6583682200000001,
      "min": 0.23186528190000003,
      "max": 0.4200573009
    },
    {
      "command": "pacquet@main",
      "mean": 0.24761242320000001,
      "stddev": 0.020180725060522296,
      "median": 0.24322744740000002,
      "user": 0.27718229999999994,
      "system": 0.56661642,
      "min": 0.22639814290000002,
      "max": 0.2958666909
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2475692378,
      "stddev": 0.011838795309553219,
      "median": 0.24760598240000004,
      "user": 0.262852,
      "system": 0.56404672,
      "min": 0.2285501369,
      "max": 0.2708776119
    },
    {
      "command": "pnpr@main",
      "mean": 0.24528569970000005,
      "stddev": 0.009447999874868915,
      "median": 0.24541523040000002,
      "user": 0.24979419999999997,
      "system": 0.5650534199999999,
      "min": 0.2267631569,
      "max": 0.2617986209
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.5 ± 3.0 5.8 25.8 1.52 ± 0.49
pacquet@main 6.6 ± 0.6 5.6 9.7 1.05 ± 0.12
pnpr@HEAD 6.3 ± 0.4 5.4 8.0 1.00
pnpr@main 6.5 ± 0.6 5.5 9.4 1.04 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.009543988417368417,
      "stddev": 0.0029717372320421354,
      "median": 0.00891196372,
      "user": 0.005746728421052628,
      "system": 0.004362063552631576,
      "min": 0.005846942220000001,
      "max": 0.02579683722
    },
    {
      "command": "pacquet@main",
      "mean": 0.006599611687018472,
      "stddev": 0.0005916619865627292,
      "median": 0.00652547522,
      "user": 0.004006071081794189,
      "system": 0.0030536561477572557,
      "min": 0.00555111722,
      "max": 0.00974017722
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.006265732830978526,
      "stddev": 0.00043995891482374134,
      "median": 0.00616787622,
      "user": 0.00394133971360382,
      "system": 0.0027218693078758954,
      "min": 0.005449707220000001,
      "max": 0.00798260422
    },
    {
      "command": "pnpr@main",
      "mean": 0.00652384809347932,
      "stddev": 0.0005849682916132673,
      "median": 0.006402977220000001,
      "user": 0.00414521279805353,
      "system": 0.0028194871046228693,
      "min": 0.005454385220000001,
      "max": 0.009407679220000001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.8 ± 1.5 6.9 17.4 1.03 ± 0.19
pacquet@main 16.2 ± 1.7 10.5 21.8 1.90 ± 0.24
pnpr@HEAD 14.1 ± 2.6 7.5 19.9 1.65 ± 0.33
pnpr@main 8.5 ± 0.7 7.1 10.5 1.00

Confirmation (reversed target order)

Command Mean [ms] Min [ms] Max [ms] Relative
pnpr@main 8.2 ± 0.9 7.1 11.3 1.02 ± 0.13
pnpr@HEAD 8.2 ± 0.7 6.7 12.0 1.01 ± 0.12
pacquet@main 8.3 ± 0.7 6.9 10.5 1.03 ± 0.11
pacquet@HEAD 8.1 ± 0.6 6.8 10.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.008784300846796123,
      "stddev": 0.0014907570198968286,
      "median": 0.00841136974,
      "user": 0.005444631553398061,
      "system": 0.0038357019417475735,
      "min": 0.006874771240000001,
      "max": 0.01737501424
    },
    {
      "command": "pacquet@main",
      "mean": 0.01624316291320261,
      "stddev": 0.0016560350272711453,
      "median": 0.01623518624,
      "user": 0.009270103660130721,
      "system": 0.00786534326797385,
      "min": 0.010466641240000001,
      "max": 0.02178975924
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.014140422028079472,
      "stddev": 0.0025616767208190036,
      "median": 0.01415404024,
      "user": 0.008484686225165568,
      "system": 0.006389131920529799,
      "min": 0.007542468240000001,
      "max": 0.019892028239999998
    },
    {
      "command": "pnpr@main",
      "mean": 0.008548550999656651,
      "stddev": 0.0006564339630793903,
      "median": 0.00846732224,
      "user": 0.005388304034334766,
      "system": 0.003697761716738195,
      "min": 0.007110430240000001,
      "max": 0.01049828424
    }
  ],
  "confirmation": {
    "results": [
      {
        "command": "pnpr@main",
        "mean": 0.008214240574976309,
        "stddev": 0.0008514347530914823,
        "median": 0.00796392312,
        "user": 0.005260669952606635,
        "system": 0.003417108436018956,
        "min": 0.00706861412,
        "max": 0.01131799812
      },
      {
        "command": "pnpr@HEAD",
        "mean": 0.008168942740129869,
        "stddev": 0.0007010698519349547,
        "median": 0.008073113619999999,
        "user": 0.004631035974025975,
        "system": 0.003999164285714286,
        "min": 0.00669802812,
        "max": 0.01200402512
      },
      {
        "command": "pacquet@main",
        "mean": 0.00828245184727273,
        "stddev": 0.0006868076378715335,
        "median": 0.00817304612,
        "user": 0.004611273833992094,
        "system": 0.004133901976284583,
        "min": 0.006926617120000001,
        "max": 0.01047842212
      },
      {
        "command": "pacquet@HEAD",
        "mean": 0.00805632801735099,
        "stddev": 0.0005997179350770566,
        "median": 0.00789162362,
        "user": 0.0047728758940397365,
        "system": 0.003720917350993377,
        "min": 0.006811481120000001,
        "max": 0.01016439412
      }
    ]
  }
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.561 ± 0.084 2.463 2.718 1.72 ± 0.12
pacquet@main 2.537 ± 0.055 2.481 2.637 1.71 ± 0.12
pnpr@HEAD 1.486 ± 0.095 1.400 1.661 1.00
pnpr@main 1.503 ± 0.113 1.398 1.753 1.01 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5614965362600004,
      "stddev": 0.08417133311539197,
      "median": 2.54949080346,
      "user": 2.05616604,
      "system": 1.70534434,
      "min": 2.4628897854600003,
      "max": 2.7182288904600003
    },
    {
      "command": "pacquet@main",
      "mean": 2.53673187526,
      "stddev": 0.05476245065074239,
      "median": 2.5182822709600003,
      "user": 1.95992514,
      "system": 1.72552904,
      "min": 2.48077460046,
      "max": 2.63729013946
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4855686766600003,
      "stddev": 0.0954607719684169,
      "median": 1.4517439209599998,
      "user": 1.15547414,
      "system": 1.31751054,
      "min": 1.4002010104599998,
      "max": 1.66116521446
    },
    {
      "command": "pnpr@main",
      "mean": 1.5025062559599998,
      "stddev": 0.11327723156631656,
      "median": 1.4821243929599999,
      "user": 1.11647814,
      "system": 1.29961044,
      "min": 1.39794120246,
      "max": 1.75334155246
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 529.7 ± 170.6 412.4 967.0 1.89 ± 0.61
pacquet@main 452.3 ± 123.9 348.0 762.4 1.61 ± 0.45
pnpr@HEAD 280.6 ± 13.0 257.3 298.6 1.00
pnpr@main 291.8 ± 20.0 265.2 335.2 1.04 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.52972269404,
      "stddev": 0.170589852870819,
      "median": 0.47218037934,
      "user": 0.8269456799999999,
      "system": 1.0254559399999998,
      "min": 0.41242164234,
      "max": 0.9670435273400001
    },
    {
      "command": "pacquet@main",
      "mean": 0.45232752994,
      "stddev": 0.12389329744899687,
      "median": 0.40741443334000005,
      "user": 0.72266038,
      "system": 0.92442554,
      "min": 0.34804981634000004,
      "max": 0.7624282923400001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28059201704000003,
      "stddev": 0.013048406815275377,
      "median": 0.28384232334000004,
      "user": 0.22552027999999993,
      "system": 0.50621094,
      "min": 0.25727101034,
      "max": 0.29860820334
    },
    {
      "command": "pnpr@main",
      "mean": 0.29180094194,
      "stddev": 0.019998776659856877,
      "median": 0.28558593484000006,
      "user": 0.24330678,
      "system": 0.51191634,
      "min": 0.26522998534000003,
      "max": 0.33517115734
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.639 ± 0.030 1.602 1.692 5.90 ± 0.19
pacquet@main 1.640 ± 0.088 1.566 1.868 5.90 ± 0.36
pnpr@HEAD 0.290 ± 0.010 0.279 0.305 1.04 ± 0.04
pnpr@main 0.278 ± 0.008 0.265 0.293 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.63948206474,
      "stddev": 0.02981246439662075,
      "median": 1.6322157050400001,
      "user": 1.04886208,
      "system": 1.03540972,
      "min": 1.60192881704,
      "max": 1.69238122004
    },
    {
      "command": "pacquet@main",
      "mean": 1.63954536944,
      "stddev": 0.0881707443879549,
      "median": 1.61904985504,
      "user": 1.0050095799999998,
      "system": 1.03763412,
      "min": 1.5655601160400001,
      "max": 1.8680610260400001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29031396394000003,
      "stddev": 0.009559350371021066,
      "median": 0.29037458154000007,
      "user": 0.24828577999999996,
      "system": 0.54400682,
      "min": 0.27866194704,
      "max": 0.30506203904
    },
    {
      "command": "pnpr@main",
      "mean": 0.27801914284000007,
      "stddev": 0.007668509297777902,
      "median": 0.27785372054,
      "user": 0.22876508,
      "system": 0.50469142,
      "min": 0.26516038604000003,
      "max": 0.29318707104
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 339.8 ± 52.8 269.4 462.4 2.59 ± 0.50
pacquet@main 394.5 ± 52.9 327.1 515.3 3.00 ± 0.53
pnpr@HEAD 131.3 ± 15.0 107.4 156.1 1.00
pnpr@main 136.0 ± 12.0 114.7 156.7 1.04 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.33977669756000006,
      "stddev": 0.05281405204608225,
      "median": 0.32876733746,
      "user": 0.36879312,
      "system": 0.12095428,
      "min": 0.26937505646000004,
      "max": 0.46236866646
    },
    {
      "command": "pacquet@main",
      "mean": 0.3944619964600001,
      "stddev": 0.0529312170510229,
      "median": 0.38561220496000004,
      "user": 0.43091011999999995,
      "system": 0.12536848,
      "min": 0.32712220946000004,
      "max": 0.51526925846
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.13127256466000004,
      "stddev": 0.015041595959392246,
      "median": 0.13267941946,
      "user": 0.06589362,
      "system": 0.02310996,
      "min": 0.10744083246000001,
      "max": 0.15610353746
    },
    {
      "command": "pnpr@main",
      "mean": 0.13598885346,
      "stddev": 0.011954940993405147,
      "median": 0.13664893696000002,
      "user": 0.06505030181818182,
      "system": 0.028150243636363637,
      "min": 0.11467445446,
      "max": 0.15668056046
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 601.1 ± 37.9 539.4 653.2 1.02 ± 0.20
pacquet@main 589.0 ± 109.4 310.6 667.3 1.00
pnpm@HEAD 3262.8 ± 316.7 2903.0 3813.9 5.54 ± 1.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6010770915288889,
      "stddev": 0.03787054833455979,
      "median": 0.59703302764,
      "user": 0.6259220688888889,
      "system": 0.15696342222222223,
      "min": 0.53944270864,
      "max": 0.6532481276400001
    },
    {
      "command": "pacquet@main",
      "mean": 0.5890333583066667,
      "stddev": 0.10943506502853392,
      "median": 0.60674369564,
      "user": 0.6129609577777777,
      "system": 0.13891019999999998,
      "min": 0.31062414264,
      "max": 0.6673254066400001
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.262793808751111,
      "stddev": 0.3166860098804902,
      "median": 3.2372292316399998,
      "user": 5.114629068888889,
      "system": 0.2379382,
      "min": 2.90299518164,
      "max": 3.8139421426399998
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 180.7 ± 7.5 168.7 198.7 1.01 ± 0.06
pacquet@main 179.6 ± 7.8 172.1 201.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.1807379277275,
      "stddev": 0.007547649861233408,
      "median": 0.17861872554000002,
      "user": 0.137793685,
      "system": 0.08663604249999998,
      "min": 0.16870690454000004,
      "max": 0.19874067454000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.17962651725428574,
      "stddev": 0.007769123417748372,
      "median": 0.17727490354000003,
      "user": 0.14012663142857146,
      "system": 0.08018119428571428,
      "min": 0.17214610954,
      "max": 0.20156669754000003
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.561 ± 0.166 4.410 4.934 1.32 ± 0.05
pacquet@main 4.513 ± 0.129 4.376 4.726 1.30 ± 0.04
pnpr@HEAD 3.518 ± 0.118 3.420 3.833 1.02 ± 0.04
pnpr@main 3.464 ± 0.066 3.414 3.612 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.560982515179999,
      "stddev": 0.1662466116650188,
      "median": 4.5172522526800005,
      "user": 1.9224522199999998,
      "system": 2.2105297,
      "min": 4.40963946668,
      "max": 4.93378181068
    },
    {
      "command": "pacquet@main",
      "mean": 4.512569065380001,
      "stddev": 0.1291926905907172,
      "median": 4.46104140618,
      "user": 1.68500922,
      "system": 2.050771,
      "min": 4.37565682368,
      "max": 4.72565441468
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.51800766438,
      "stddev": 0.11818853632967251,
      "median": 3.47517759718,
      "user": 1.58479902,
      "system": 1.9126930999999998,
      "min": 3.4198807926800003,
      "max": 3.8326095816800003
    },
    {
      "command": "pnpr@main",
      "mean": 3.464396312980001,
      "stddev": 0.06568234935096502,
      "median": 3.43455767668,
      "user": 1.5156292199999999,
      "system": 1.8327638,
      "min": 3.4139826166800002,
      "max": 3.61176968468
    }
  ]
}

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. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 141.6 ± 16.5 122.7 183.1 1.08 ± 0.14
pacquet@main 131.6 ± 8.2 116.3 147.1 1.00
pnpr@HEAD 141.6 ± 8.0 124.2 152.5 1.08 ± 0.09
pnpr@main 137.4 ± 11.3 125.8 162.0 1.04 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.14163041235142856,
      "stddev": 0.0164620876496549,
      "median": 0.13627078428,
      "user": 0.17467694571428574,
      "system": 0.14036727428571424,
      "min": 0.12266446878000001,
      "max": 0.18309334578
    },
    {
      "command": "pacquet@main",
      "mean": 0.13161111467473682,
      "stddev": 0.008152279522192349,
      "median": 0.12964013678,
      "user": 0.17018944947368417,
      "system": 0.12401119157894738,
      "min": 0.11631233978000001,
      "max": 0.14713840178
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.14158457378,
      "stddev": 0.008031900003591483,
      "median": 0.14292718178,
      "user": 0.16320787052631577,
      "system": 0.14591792842105264,
      "min": 0.12419131178000001,
      "max": 0.15246142978
    },
    {
      "command": "pnpr@main",
      "mean": 0.13738303399052632,
      "stddev": 0.011333853056459913,
      "median": 0.13333675578,
      "user": 0.1583497126315789,
      "system": 0.1453663494736842,
      "min": 0.12584803378,
      "max": 0.16199096878
    }
  ]
}

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 22, 2026
Copilot AI review requested due to automatic review settings September 22, 2026 10:33

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.

Comment thread pnpm11/config/reader/src/index.ts Resolved
Copilot AI review requested due to automatic review settings September 22, 2026 12:43
@zkochan
zkochan force-pushed the fix/devengines-runtime-range branch from 409b8ef to 0628635 Compare September 22, 2026 12:43

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.

Copilot AI review requested due to automatic review settings September 22, 2026 12:46
@qodo-code-review

qodo-code-review Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Version 11 install outcome is untested ✓ Resolved 📜 Skill insight ▣ Testability
Description
The added test.each cases only assert the intermediate config.nodeVersion value and never run
pnpm install or verify that the optional dependency remains installed. The shared range scenario
reaches dependency installability in both versions, but only the Rust suite exercises that
observable outcome through the command.
Code

pnpm11/config/reader/test/index.ts[R72-75]

+  { field: 'devEngines' as const, version: `>=${runningNodeMajor - 1}.0.0`, onFail: 'error' as const, expected: undefined },
+  { field: 'devEngines' as const, version: `^${runningNodeMajor + 1}.0.0`, onFail: 'error' as const, expected: undefined },
+  { field: 'engines' as const, version: '>=22.12.0', onFail: 'warn' as const, expected: undefined },
+])('when $field is $version and onFail is $onFail, nodeVersion is $expected', async ({ field, version, onFail, expected }) => {
Relevance

●●● Strong

The repository accepts requests to mirror Rust regression scenarios in TypeScript tests for shared
behavior.

PR-#14337
PR-#14295

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires shared defects to have regression coverage in every affected implementation
and equivalent scenarios in both stacks. The TypeScript additions only assert config.nodeVersion,
whereas the Rust test invokes install and verifies the optional dependency's package file exists.

Rule 2255044: Mirror cross-stack regression tests between TypeScript and Rust for shared pnpm v11/v12 bug fixes
pnpm11/config/reader/test/index.ts[72-75]
pnpm/crates/cli/tests/suite/install_runtimes.rs[520-527]
Skill: review-code

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 version 11 coverage checks only configuration parsing, while the shared defect manifests when `pnpm install` decides whether to retain an optional dependency.

## Fix Focus Areas
- pnpm11/config/reader/test/index.ts[72-75]
- pnpm/crates/cli/tests/suite/install_runtimes.rs[487-528]

## Recommended Fix
Add a version 11 install-level regression test equivalent to the Rust scenario: declare a runtime range below the running Node.js version, add an optional dependency requiring the running major, invoke the real version 11 CLI, and assert that the dependency is installed.

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


2. Runtime override skips valid packages ✓ Resolved 🔗 Cross-repo conflict ≡ Correctness
Description
getNodeVersionFromEnginesRuntime checks the manifest's onFail before runtimeOnFail is applied,
so a non-exact range returns undefined even when the effective policy is download. When a
workspace forces runtimeOnFail: download over a manifest's warn or error, pnpm provisions the
range minimum but package installability keeps using the host Node.js and can skip optional packages
valid for the provisioned runtime.
Code

pnpm11/config/reader/src/index.ts[R1293-1296]

+    if (nodeRuntime.onFail !== 'download') {
+      // A range stands for the Node.js already on the system, so only an exact
+      // version names the runtime pnpm would provision.
+      return semver.valid(version) ?? undefined
Relevance

●● Moderate

The effective runtime policy concern is plausible, but no close historical precedent confirms
acceptance of this semantic interaction.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed helper now returns no Node.js version for non-download ranges, while configuration
derives nodeVersion hundreds of lines before applying runtimeOnFail. pnpm.io explicitly
documents that this setting can force downloading a runtime whose manifest policy is warn, proving
that the effective download policy—not the original manifest value—must control the version used for
engine filtering.

pnpm11/config/reader/src/index.ts[539-547]
pnpm11/config/reader/src/index.ts[991-993]
pnpm11/config/reader/src/index.ts[1284-1303]
External repo: pnpm/pnpm.io, docs/settings/cli.md [143-154]

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 documented `runtimeOnFail` setting overrides the manifest's `onFail`, but `nodeVersion` is derived before that override is applied. A range whose manifest policy is `warn` or `error` therefore uses the host Node.js for engine filtering even when pnpm is configured to download the range's minimum version.

## Fix Focus Areas
- pnpm11/config/reader/src/index.ts[539-547]
- pnpm11/config/reader/src/index.ts[991-993]
- pnpm11/config/reader/test/index.ts[301-327]

## Recommended Fix
Apply `runtimeOnFail` to the relevant manifest before calling `getNodeVersionFromEnginesRuntime`, and remove the later duplicate application. Add a test where the manifest contains a Node.js range with `onFail: "warn"` and configuration sets `runtimeOnFail: "download"`; assert that `config.nodeVersion` is the range minimum and the runtime dependency is still created.

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



Remediation recommended

3. The release note conflates old and new ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The first changeset sentence uses Fixed ... skipping to combine the resolution with the previous
defective behavior instead of describing the old behavior in its own past-tense sentence. When this
entry becomes a release note, readers must infer the boundary between what previously happened and
what pnpm install does now.
Code

.changeset/devengines-runtime-range-uses-system-node.md[7]

+Fixed `pnpm install` skipping optional dependencies that the running Node.js supports. When `devEngines.runtime` declares a range without `onFail: download`, pnpm now uses the Node.js already on the system. Only an entry that sets `onFail` to `download` makes the range's lower bound the version pnpm provisions [pnpm/pnpm#15230](https://github.com/pnpm/pnpm/issues/15230).
Relevance

●●● Strong

Recent changeset precedents accepted separating prior behavior from fixes, directly matching this
wording rule.

PR-#14179
PR-#14606
PR-#14932

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rule requires any previous buggy behavior mentioned in a changeset to appear in a separate
past-tense sentence. The changed entry instead embeds the skipped-dependency behavior inside the
same Fixed statement that announces its resolution.

Rule 3058498: Describe previous buggy behavior in a separate past-tense sentence
.changeset/devengines-runtime-range-uses-system-node.md[7-7]

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

## Issue description
The changeset combines the prior bug and its correction in `Fixed pnpm install skipping...`, contrary to the required release-note structure for bug fixes.

## Fix Focus Areas
- .changeset/devengines-runtime-range-uses-system-node.md[7-7]

## Recommended Fix
Rewrite the old behavior as a separate past-tense sentence beginning with `Previously`, then state the corrected `pnpm install` behavior in a distinct present-tense sentence and retain the issue link at the end.

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


4. Malformed manifests crash installs ✓ Resolved 🐞 Bug ⛨ Security
Description
getNodeVersionFromEnginesRuntime calls .trim() after checking only that nodeRuntime.version is
non-null, even though project manifests are parsed and cast without runtime type validation. A
repository with a numeric or object runtime version therefore throws during configuration before
pnpm install reaches its normal engine checks, allowing attacker-controlled manifest data to abort
pnpm 11 installs.
Code

pnpm11/config/reader/src/index.ts[1291]

+    const version = nodeRuntime.version.trim()
Relevance

●●● Strong

Recent pnpm11 precedents accepted validating malformed configuration values to prevent runtime
crashes, matching this unvalidated manifest path.

PR-#13197
PR-#13856

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The config reader consumes the unvalidated root project manifest and invokes the changed helper;
JSON parsing provides only a TypeScript cast, while the existing runtime conversion path explicitly
guards the same field with typeof before string operations. The newly added direct .trim()
therefore turns malformed manifest data that was previously rejected by semver parsing into a
synchronous TypeError.

pnpm11/config/reader/src/index.ts[516-545]
pnpm11/config/reader/src/index.ts[1283-1292]
pnpm11/workspace/project-manifest-reader/src/readFile.ts[35-41]
pnpm11/pkg-manifest/utils/src/convertEnginesRuntimeToDependencies.ts[24-28]

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

## Issue description
`getNodeVersionFromEnginesRuntime` calls `.trim()` on manifest-controlled values without first verifying that the runtime version is a string, causing malformed manifests to abort configuration.

## Fix Focus Areas
- pnpm11/config/reader/src/index.ts[1283-1302]
- pnpm11/config/reader/test/index.ts[65-80]

## Recommended Fix
Check `typeof nodeRuntime.version === 'string'` before trimming or parsing it, continuing to the next engines field when the value has another type. Add regression cases using numeric and object versions and assert that configuration completes without setting `nodeVersion`.

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


Grey Divider

Context sources
✅ Cross-repo context — repo relationships
  Explored: repo: pnpm/update (sha: fcaa952e)
  Explored: repo: pnpm/setup (sha: fbda4c85)
  Explored: repo: pnpm/pnpm.io (sha: 6820e95f)
  Explored: repo: pnpm/node-semver-rs (sha: 1ae976a0)
Review mode: 🧠 Deep: The latest push contains substantial behavioral changes across CLI configuration/reporting, runtime resolution, update/override logic, global approvals, and store handling, creating many independent paths where a redundant review could catch subtle defects.

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread pnpm11/config/reader/test/index.ts Resolved
Comment thread pnpm11/config/reader/src/index.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

1 similar comment
@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.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Sep 22, 2026
Copilot AI review requested due to automatic review settings September 22, 2026 12:52
@greptile-apps
greptile-apps Bot dismissed their stale review September 22, 2026 12:53

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Tung Lam and others added 6 commits September 22, 2026 16:09
`node_version_from_engines_runtime` returned the lower bound of every
`devEngines.runtime` and `engines.runtime` range, so a declared range stood in
for the Node.js running the install. Optional dependencies whose `engines.node`
the running Node.js satisfies were skipped, because their engines were compared
against that lower bound.

The lower bound is now used only when the entry sets `onFail` to `download`,
the case where pnpm provisions the runtime. Otherwise a range means the Node.js
already on the system, and only an exact version names one.

Refs pnpm#15230.
`getNodeVersionFromEnginesRuntime` set `config.nodeVersion` to the lower bound
of every `devEngines.runtime` and `engines.runtime` range. A declared range
stood in for the Node.js running the install, `packageIsInstallable` compared
each package's `engines.node` against that lower bound, and optional
dependencies the running Node.js supported were skipped.

The lower bound is now used only when the entry sets `onFail` to `download`,
the case where pnpm provisions the runtime. Otherwise a range means the
Node.js already on the system, and only an exact version names one. This
matches `node_version_from_engines_runtime` on the Rust side.

Refs pnpm#15230.
…v11 install test

`getNodeVersionFromEnginesRuntime` was called before `runtimeOnFail` was
applied to the root and engine pin manifests. When `runtimeOnFail: download`
overrides a range entry, `config.nodeVersion` was left undefined instead of
taking the range lower bound, and when `runtimeOnFail: ignore` overrides
`download`, `config.nodeVersion` kept the lower bound instead of host node.

Derive `pnpmConfig.nodeVersion` after applying `runtimeOnFail` to both
`rootProjectManifest` and `enginePinManifest`. Also add an install-level
regression test in `pnpm/test/install/nodeRuntime.ts` asserting that an optional
dependency is installed when a runtime range is declared without download.

Refs pnpm#15230.
Guard against malformed non-string runtime version values before trimming
in `getNodeVersionFromEnginesRuntime`. Also update the changeset wording
to describe the previous behavior in its own past-tense sentence.
Copilot AI review requested due to automatic review settings September 22, 2026 14:18
@zkochan
zkochan force-pushed the fix/devengines-runtime-range branch from 9143085 to 02d7409 Compare September 22, 2026 14:18

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 September 22, 2026 14:18

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 02d7409

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

@zkochan
zkochan merged commit 7aec3d4 into pnpm:main Sep 22, 2026
55 checks passed
@tunglambk
tunglambk deleted the fix/devengines-runtime-range branch September 23, 2026 06:18
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
…npm#15256)

`node_version_from_engines_runtime` returned the lower bound of every
`devEngines.runtime` and `engines.runtime` range, so a declared range stood in
for the Node.js running the install. Optional dependencies whose `engines.node`
the running Node.js satisfies were skipped, because their engines were compared
against that lower bound.

The lower bound is now used only when the entry sets `onFail` to `download`,
the case where pnpm provisions the runtime. Otherwise a range means the Node.js
already on the system, and only an exact version names one.

The v11 `getNodeVersionFromEnginesRuntime` now applies the same rule. It returns
the range's lower bound only when the entry sets `onFail` to `download`, an
exact version otherwise, and nothing for a range, so `packageIsInstallable`
sees the Node.js running the install. `nodeVersion` is derived after `runtimeOnFail`
is applied so workspace-level download and ignore policies take effect.

Closes pnpm#15230.

---------

Co-authored-by: Tung Lam <[email protected]>
Co-authored-by: Zoltan Kochan <[email protected]>
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.

pnpm treats lower bound of .devEngines.runtime.version as current runtime and skips optional dependncies that don't match this bound

4 participants