Skip to content

fix: allow updating cataloged deps to versions satisfying catalog ran… - #13723

Closed
Ayush442842q wants to merge 4 commits into
pnpm:mainfrom
Ayush442842q:fix/strict-catalog-update-range-satisfies
Closed

Ayush442842q wants to merge 4 commits into
pnpm:mainfrom
Ayush442842q:fix/strict-catalog-update-range-satisfies

Conversation

@Ayush442842q

@Ayush442842q Ayush442842q commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes a bug in strict catalog mode (catalogMode: strict) where targeted package installations or updates (pnpm update <pkg>@<version> / pnpm add <pkg>@<version>) to a concrete version satisfying a range defined in the catalog were rejected with a ERR_PNPM_CATALOG_VERSION_MISMATCH error.

Instead of requiring exact string/version equality, strict mode now resolves the check using semver.satisfies when the catalog specifier is a valid range. This enables automated workflows (such as Renovate or lockfile-only updates) to bump lockfile resolutions within catalog-defined ranges.

Fixes #13715

Squash Commit Body

This PR resolves a strict catalog mode verification issue where updating a cataloged dependency to a concrete version satisfying a range specifier defined in the catalog was rejected.

Problem

Previously, targeted updates or installations (e.g. pnpm update pkg@version) in strict catalog mode were verified by ensuring the wanted version (wantedDep.bareSpecifier) is string-equal or exact-value equal to the catalog specifier (catalogDepSpecifier). Since semver.valid() rejects range strings, range-pinned catalog entries could never pass this check when adding or updating to a concrete version, causing strict mode validation to incorrectly fail.

Solution

  • TypeScript CLI: In @pnpm/installing.deps-installer, added a range satisfaction check: if the catalog specifier is a valid range, we check if the wanted version satisfies the range via semver.satisfies.
  • Rust pacquet Port: In package-manager/src/catalog_mode.rs, updated the versions_equal logic to parse the right-hand specifier as a Range if it is not an exact Version, and perform Range::satisfies.
  • Tests: Added tests to both the TypeScript and Rust test suites to verify that strict mode permits adding/updating concrete versions satisfying a range catalog specifier.

Closes #13715

Checklist

  • I checked the referenced issue and verified that none of the PRs already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust pnpm/ port.
  • Added a changeset (pnpm changeset) if this PR changes any published package.
  • Added or updated tests.
  • Updated the documentation if needed.

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

    • Strict catalog mode now accepts exact package versions that satisfy an existing catalog range.
    • Catalog entries remain unchanged when the requested version falls within the configured range.
    • Genuine version mismatches continue to produce the appropriate strict-mode errors or prefer-mode warnings.
  • Tests

    • Added coverage for compatible version ranges and confirmed mismatched ranges remain rejected.

@Ayush442842q
Ayush442842q requested a review from zkochan as a code owner August 8, 2026 03:13
@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 Aug 8, 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: c7477225-43fc-4772-8480-23e6b049cd6d

📥 Commits

Reviewing files that changed from the base of the PR and between 9b20598 and 4273f98.

📒 Files selected for processing (6)
  • .changeset/strict-catalog-range-satisfy.md
  • pnpm/crates/cli/tests/suite/update.rs
  • pnpm/crates/package-manager/src/catalog_mode.rs
  • pnpm/crates/package-manager/src/catalog_mode/tests.rs
  • pnpm11/installing/deps-installer/src/install/index.ts
  • pnpm11/installing/deps-installer/test/catalogs.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • pnpm11/installing/deps-installer/src/install/index.ts
  • pnpm/crates/package-manager/src/catalog_mode.rs
  • pnpm/crates/package-manager/src/catalog_mode/tests.rs
  • .changeset/strict-catalog-range-satisfy.md
  • pnpm11/installing/deps-installer/test/catalogs.ts

📝 Walkthrough

Walkthrough

Strict catalog matching now accepts concrete dependency versions that satisfy catalog ranges. Rust and TypeScript implementations apply the behavior. Tests cover in-range acceptance, out-of-range rejection, lockfile output, and patch release metadata.

Changes

Strict catalog matching

Layer / File(s) Summary
Range-aware catalog matching
pnpm/crates/package-manager/src/catalog_mode.rs, pnpm11/installing/deps-installer/src/install/index.ts
Rust and TypeScript matching accept a concrete version that satisfies a catalog range. Exact matches and invalid-input rejection remain supported.
Strict-mode validation and release metadata
pnpm/crates/package-manager/src/catalog_mode/tests.rs, pnpm11/installing/deps-installer/test/catalogs.ts, pnpm/crates/cli/tests/suite/update.rs, .changeset/strict-catalog-range-satisfy.md
Tests cover accepted in-range versions, lockfile recording, and out-of-range mismatch behavior. The changeset records patch releases for the affected packages.

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

Sequence Diagram(s)

sequenceDiagram
  participant PnpmUpdate
  participant installSome
  participant CatalogRange
  participant Lockfile
  PnpmUpdate->>installSome: request concrete dependency version
  installSome->>CatalogRange: check version against catalog range
  CatalogRange-->>installSome: version satisfies range
  installSome->>Lockfile: retain catalog reference and resolved version
Loading

Assessment against linked issues

Objective Addressed Explanation
Allow concrete requested versions that satisfy catalog ranges in strict mode [#13715] ✅
Preserve strict-mode rejection for versions outside the catalog range [#13715] ✅
Record the accepted dependency version without updating the catalog entry [#13715] ✅

Possibly related PRs

  • pnpm/pnpm#13716: Extends the same strict catalog range matching behavior across related implementations and tests.
  • pnpm/pnpm#13196: Modifies related catalog: dependency handling and catalog regression tests.

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

Suggested reviewers: zkochan

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

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

greptile-apps Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (3): Last reviewed commit: "refactor(pacquet): remove redundant rust..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 4273f9875b0d

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.460 ± 0.119 2.358 2.709 1.70 ± 0.16
pacquet@main 2.483 ± 0.157 2.343 2.741 1.71 ± 0.18
pnpr@HEAD 1.502 ± 0.107 1.339 1.676 1.04 ± 0.11
pnpr@main 1.449 ± 0.117 1.364 1.703 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4600982327000005,
      "stddev": 0.11921273862728454,
      "median": 2.4073280813,
      "user": 1.7774305799999996,
      "system": 1.46204002,
      "min": 2.3583735418,
      "max": 2.7087073008,
      "times": [
        2.7087073008,
        2.6201894718,
        2.3743427228000002,
        2.3726856538,
        2.4254284768,
        2.5138945208,
        2.4554028468,
        2.3892276858,
        2.3827301058,
        2.3583735418
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4827238777000007,
      "stddev": 0.15709350851982207,
      "median": 2.3951918628,
      "user": 1.5677587799999997,
      "system": 1.28334762,
      "min": 2.3428795088000003,
      "max": 2.7407188548,
      "times": [
        2.3428795088000003,
        2.4001360928,
        2.3902476328,
        2.7219496928,
        2.6460119568000002,
        2.3622302038000003,
        2.3760304858,
        2.7407188548,
        2.4671624478,
        2.3798719008
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5016335435000001,
      "stddev": 0.10737957515910918,
      "median": 1.5039581118,
      "user": 1.03513138,
      "system": 1.12794342,
      "min": 1.3389536628,
      "max": 1.6759693568,
      "times": [
        1.5564334598,
        1.5193760218,
        1.4388381848,
        1.6317885858,
        1.3603147638,
        1.4885402018,
        1.5388915528,
        1.4672296448000002,
        1.3389536628,
        1.6759693568
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4492750091,
      "stddev": 0.11701169694485512,
      "median": 1.3820311993,
      "user": 1.0748906799999998,
      "system": 1.1499199199999999,
      "min": 1.3639260978,
      "max": 1.7029993088,
      "times": [
        1.3677596678000001,
        1.5857424858,
        1.3639260978,
        1.3891952378,
        1.7029993088,
        1.3748671608,
        1.5083665728,
        1.3639620448,
        1.3709535518,
        1.4649779628000001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 255.9 ± 6.2 246.4 264.2 1.00
pacquet@main 261.5 ± 7.3 252.6 276.3 1.02 ± 0.04
pnpr@HEAD 279.3 ± 4.4 270.4 285.1 1.09 ± 0.03
pnpr@main 301.3 ± 55.4 272.8 446.6 1.18 ± 0.22
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25593288926,
      "stddev": 0.006159484107220228,
      "median": 0.25784736396,
      "user": 0.21316774,
      "system": 0.5031108000000001,
      "min": 0.24644392246000002,
      "max": 0.26421551846,
      "times": [
        0.25823627646,
        0.26421551846,
        0.24644392246000002,
        0.25020477546000003,
        0.25946413246,
        0.25236348246,
        0.26098807246,
        0.24827734046000002,
        0.25745845146,
        0.26167692046
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.26147026145999996,
      "stddev": 0.007346557965527105,
      "median": 0.25845026646,
      "user": 0.20810763999999998,
      "system": 0.5250353999999999,
      "min": 0.25259832146,
      "max": 0.27633012646,
      "times": [
        0.25868447446000004,
        0.25694367846,
        0.25259832146,
        0.26059233246,
        0.25739926046,
        0.25821605846,
        0.25657568046,
        0.26766157346,
        0.27633012646,
        0.26970110846
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27929181246,
      "stddev": 0.004351447053776881,
      "median": 0.28010684846,
      "user": 0.22702824000000002,
      "system": 0.5452071000000001,
      "min": 0.27044376746000004,
      "max": 0.28511176946,
      "times": [
        0.27432776046,
        0.28511176946,
        0.27044376746000004,
        0.27901676946000004,
        0.27822588146,
        0.28308933746000003,
        0.28119692746,
        0.28167754546,
        0.27792857446,
        0.28189979146
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3013220790600001,
      "stddev": 0.05537853268265364,
      "median": 0.27801324346,
      "user": 0.23790214,
      "system": 0.5930568999999999,
      "min": 0.27283406646,
      "max": 0.44656416146000005,
      "times": [
        0.27732488646000003,
        0.28196062546,
        0.27671054746,
        0.28202231046000004,
        0.34546369146,
        0.44656416146000005,
        0.27283406646,
        0.27729114246000003,
        0.27870160046000003,
        0.27434775846000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.605 ± 0.012 2.585 2.625 1.64 ± 0.16
pacquet@main 2.615 ± 0.018 2.588 2.639 1.64 ± 0.16
pnpr@HEAD 1.619 ± 0.156 1.428 1.866 1.02 ± 0.14
pnpr@main 1.592 ± 0.159 1.448 1.880 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6047706393200003,
      "stddev": 0.012125894760829429,
      "median": 2.60561670472,
      "user": 1.5041113400000001,
      "system": 1.3790957,
      "min": 2.5848821202199996,
      "max": 2.6253291172199997,
      "times": [
        2.5996931602199997,
        2.60350609122,
        2.60639402222,
        2.5848821202199996,
        2.61289088322,
        2.6253291172199997,
        2.6145605762199997,
        2.6048393872199997,
        2.58740588622,
        2.60820514922
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6145093200199994,
      "stddev": 0.018352987030063644,
      "median": 2.61503031172,
      "user": 1.5476625400000001,
      "system": 1.3362547,
      "min": 2.58842062122,
      "max": 2.63876750722,
      "times": [
        2.63876750722,
        2.6318197452199996,
        2.6240945712199997,
        2.6011086182199996,
        2.6263858552199997,
        2.6017298422199997,
        2.5932571082199996,
        2.58842062122,
        2.63354327922,
        2.60596605222
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6190845922200001,
      "stddev": 0.15634745127521743,
      "median": 1.61501018972,
      "user": 1.0287429399999999,
      "system": 1.1612123999999997,
      "min": 1.42786047522,
      "max": 1.86564529622,
      "times": [
        1.76136976922,
        1.59667847022,
        1.86564529622,
        1.54522367422,
        1.46235958522,
        1.8197261202200001,
        1.44264652422,
        1.42786047522,
        1.63599409822,
        1.63334190922
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.59182722912,
      "stddev": 0.15931914172799458,
      "median": 1.5640987662199999,
      "user": 1.0010851400000003,
      "system": 1.1975187999999999,
      "min": 1.44772513922,
      "max": 1.8803115162200001,
      "times": [
        1.44772513922,
        1.45030910122,
        1.45221165822,
        1.62555974722,
        1.8803115162200001,
        1.50263778522,
        1.63919477322,
        1.8288488012200002,
        1.6268868282200002,
        1.46458694122
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 422.7 ± 11.6 403.7 439.2 1.39 ± 0.06
pacquet@main 409.4 ± 12.2 394.6 430.8 1.35 ± 0.06
pnpr@HEAD 312.4 ± 7.1 296.1 320.8 1.03 ± 0.04
pnpr@main 303.2 ± 9.3 291.0 317.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.42268591044,
      "stddev": 0.01162876542789239,
      "median": 0.42157476914,
      "user": 0.5367660599999999,
      "system": 0.68436374,
      "min": 0.40371600364,
      "max": 0.43917950064,
      "times": [
        0.42189827464,
        0.43112836464,
        0.41682244364,
        0.43227391664000003,
        0.42125126364,
        0.43478772764,
        0.40371600364,
        0.41774556964,
        0.40805603964,
        0.43917950064
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.40939775693999997,
      "stddev": 0.012193420553548492,
      "median": 0.40749013214,
      "user": 0.5413516599999999,
      "system": 0.65626764,
      "min": 0.39464443064,
      "max": 0.43078093464,
      "times": [
        0.39464443064,
        0.39482598064,
        0.40207204064,
        0.42482300364000003,
        0.43078093464,
        0.41172607364,
        0.41269801964,
        0.40325419064,
        0.41682743164,
        0.40232546364
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31240619784,
      "stddev": 0.007075851969559332,
      "median": 0.31359040614,
      "user": 0.21330776,
      "system": 0.53000314,
      "min": 0.29606406764,
      "max": 0.32076802264,
      "times": [
        0.31641456164,
        0.31116910264,
        0.31899315564,
        0.31659882664,
        0.31409197964,
        0.31308883264,
        0.32076802264,
        0.29606406764,
        0.30878227064,
        0.30809115864
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30322407444,
      "stddev": 0.009346556998817656,
      "median": 0.30347839564,
      "user": 0.19152845999999998,
      "system": 0.52481584,
      "min": 0.29102668664,
      "max": 0.31744047063999997,
      "times": [
        0.29519198664,
        0.31644770364,
        0.29227781864,
        0.30371010764,
        0.30469579164,
        0.30324668364,
        0.31744047063999997,
        0.31011000564,
        0.29809348964,
        0.29102668664
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.730 ± 0.005 1.721 1.736 5.54 ± 0.15
pacquet@main 1.727 ± 0.012 1.715 1.756 5.53 ± 0.16
pnpr@HEAD 0.313 ± 0.007 0.301 0.327 1.00 ± 0.03
pnpr@main 0.312 ± 0.009 0.300 0.325 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.73001663878,
      "stddev": 0.005038983894912326,
      "median": 1.73068852908,
      "user": 0.7609709199999999,
      "system": 0.76577728,
      "min": 1.72148174008,
      "max": 1.73573374708,
      "times": [
        1.73258882708,
        1.72882320608,
        1.73030543808,
        1.7258138700799999,
        1.73515116708,
        1.72148174008,
        1.73548816808,
        1.72370860408,
        1.73107162008,
        1.73573374708
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.7271986239800001,
      "stddev": 0.011894640678559635,
      "median": 1.7241371400799999,
      "user": 0.74522952,
      "system": 0.7616293799999998,
      "min": 1.71510884608,
      "max": 1.7563385490799999,
      "times": [
        1.72117521708,
        1.72290813708,
        1.7563385490799999,
        1.72694343208,
        1.73720164108,
        1.71701461908,
        1.71510884608,
        1.7270215180800002,
        1.7247447810799998,
        1.7235294990799999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31285588787999996,
      "stddev": 0.006573605411361705,
      "median": 0.31225867158000004,
      "user": 0.21464502,
      "system": 0.5362638799999999,
      "min": 0.30136134208000004,
      "max": 0.32682082208,
      "times": [
        0.31720421308,
        0.31207129608000006,
        0.32682082208,
        0.31594613008000005,
        0.30825531108000004,
        0.31337208708000003,
        0.31010800608000005,
        0.31097362408,
        0.31244604708,
        0.30136134208000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.31226615578000005,
      "stddev": 0.008574366687832428,
      "median": 0.31374883508000007,
      "user": 0.22298592,
      "system": 0.51777838,
      "min": 0.29957864208,
      "max": 0.32496482708,
      "times": [
        0.32496482708,
        0.32226164008,
        0.31473093108000005,
        0.31276673908,
        0.31657683108,
        0.31766338308000003,
        0.30166029308000003,
        0.30597845708000004,
        0.30647981408,
        0.29957864208
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 233.6 ± 18.0 193.5 265.1 2.67 ± 0.21
pacquet@main 228.7 ± 11.5 207.5 248.4 2.61 ± 0.14
pnpr@HEAD 88.2 ± 2.1 85.1 92.4 1.01 ± 0.03
pnpr@main 87.6 ± 1.3 85.4 90.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2335675241466667,
      "stddev": 0.018039378294218818,
      "median": 0.23659172148000002,
      "user": 0.1628272766666667,
      "system": 0.07326145333333334,
      "min": 0.19353324248,
      "max": 0.26511559448,
      "times": [
        0.24555712748,
        0.23054510048000001,
        0.24270352248000002,
        0.24499383448,
        0.23181756048000002,
        0.21878372148,
        0.26511559448,
        0.24307836348,
        0.24136588248000002,
        0.22402785548,
        0.22128848448,
        0.19353324248
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.22868802389666665,
      "stddev": 0.01145706114624162,
      "median": 0.22752498948,
      "user": 0.17060344333333335,
      "system": 0.07335603666666667,
      "min": 0.20751885048000002,
      "max": 0.24843078048,
      "times": [
        0.23136113648,
        0.22789428548000001,
        0.21984995448,
        0.23732574848000001,
        0.22715569348,
        0.20751885048000002,
        0.22264123348,
        0.22204500948,
        0.24843078048,
        0.24605900648,
        0.22174698148,
        0.23222760648000002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08823245806064517,
      "stddev": 0.00208887429095432,
      "median": 0.08790900748000001,
      "user": 0.022645472903225806,
      "system": 0.008129793548387098,
      "min": 0.08511226948000002,
      "max": 0.09238511748000001,
      "times": [
        0.09238511748000001,
        0.09149455148,
        0.08594876348000001,
        0.08612077548000001,
        0.08722959748,
        0.08872907148,
        0.08576299648,
        0.08730083148000001,
        0.08790900748000001,
        0.08638424748000001,
        0.09126768648000001,
        0.08620597348000002,
        0.08887684648000001,
        0.09173197548,
        0.08781758748000001,
        0.09050522148000001,
        0.08914744248,
        0.08733096648000001,
        0.09079050448,
        0.08624678048000001,
        0.08818191848000001,
        0.08800677048000001,
        0.08787653748000002,
        0.08511226948000002,
        0.08916158048000002,
        0.08682122348000001,
        0.08604936148000002,
        0.09136896648000001,
        0.08830090948000001,
        0.08979430148,
        0.08534641648
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08757247005575759,
      "stddev": 0.0012900593830669689,
      "median": 0.08724715048000001,
      "user": 0.02159058727272727,
      "system": 0.009389870303030307,
      "min": 0.08540447548,
      "max": 0.09046920448000001,
      "times": [
        0.08675100148,
        0.08793985548000001,
        0.08845640148000002,
        0.08540447548,
        0.09040061648000002,
        0.09045358548000001,
        0.08639739248000002,
        0.08712509248000001,
        0.08742538248000001,
        0.08900386448000001,
        0.08701511648000002,
        0.08583698348000002,
        0.08691130148000001,
        0.08721277648,
        0.08793568748000001,
        0.08683936748000001,
        0.08870757048000001,
        0.08861589948000001,
        0.09046920448000001,
        0.08822367648000001,
        0.08696385048000001,
        0.08656562648,
        0.08800945648000001,
        0.08561781348000001,
        0.08810387248000001,
        0.08606984948000002,
        0.08868992748000001,
        0.08711092548,
        0.08763559648000001,
        0.08746732248000001,
        0.08655671848000002,
        0.08724715048000001,
        0.08672815048000002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 825.8 ± 182.4 633.6 1183.9 1.15 ± 0.34
pacquet@main 717.3 ± 137.1 549.5 963.0 1.00
pnpm@HEAD 2970.2 ± 73.0 2836.3 3065.4 4.14 ± 0.80
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8258481600866667,
      "stddev": 0.18243353430855277,
      "median": 0.7904729674200001,
      "user": 0.7713069666666665,
      "system": 0.15310925555555555,
      "min": 0.63359099842,
      "max": 1.1839464554199999,
      "times": [
        0.7904729674200001,
        0.80496563342,
        0.6749338554200001,
        1.03390688742,
        0.8950230824200001,
        1.1839464554199999,
        0.6892222144200001,
        0.7265713464200001,
        0.63359099842
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7173192836422222,
      "stddev": 0.1370872889244683,
      "median": 0.6971639524200001,
      "user": 0.6627811888888888,
      "system": 0.11433314444444445,
      "min": 0.54954163042,
      "max": 0.9629862934200001,
      "times": [
        0.54954163042,
        0.7679698894200001,
        0.61617389442,
        0.71231939842,
        0.6179671464200001,
        0.6971639524200001,
        0.9629862934200001,
        0.89631411642,
        0.6354372314200001
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.9702163335311114,
      "stddev": 0.0729954795719571,
      "median": 2.9677167634200003,
      "user": 4.594811966666667,
      "system": 0.2697913666666667,
      "min": 2.83627521542,
      "max": 3.06535809442,
      "times": [
        2.9347062524200003,
        2.83627521542,
        3.06535809442,
        2.93870627142,
        2.9677167634200003,
        3.04099394142,
        3.0472632824200003,
        2.92175469842,
        2.97917248242
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.538 ± 0.128 4.422 4.744 1.30 ± 0.04
pacquet@main 4.525 ± 0.105 4.435 4.759 1.30 ± 0.04
pnpr@HEAD 3.539 ± 0.116 3.442 3.742 1.01 ± 0.04
pnpr@main 3.492 ± 0.049 3.437 3.587 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.53805702686,
      "stddev": 0.1279900004407611,
      "median": 4.49992069156,
      "user": 1.7391469999999998,
      "system": 1.4478313999999997,
      "min": 4.42236463756,
      "max": 4.7442644755600005,
      "times": [
        4.67715805256,
        4.5416439115600005,
        4.43246477256,
        4.45819747156,
        4.70914728056,
        4.54425703956,
        4.7442644755600005,
        4.42390072056,
        4.42717190656,
        4.42236463756
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.5254573879599995,
      "stddev": 0.10480497091144793,
      "median": 4.48488475756,
      "user": 1.7693864999999995,
      "system": 1.3619215999999998,
      "min": 4.43492393756,
      "max": 4.75875502356,
      "times": [
        4.45169217956,
        4.6273966495600005,
        4.47711612156,
        4.75875502356,
        4.44140433556,
        4.43492393756,
        4.52464597956,
        4.45260482556,
        4.49265339356,
        4.59338143356
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.53868210826,
      "stddev": 0.1158506229418957,
      "median": 3.4747871660600005,
      "user": 1.2092388,
      "system": 1.2085301999999998,
      "min": 3.44214626356,
      "max": 3.74244640656,
      "times": [
        3.4792628695600003,
        3.74244640656,
        3.68543769056,
        3.6807627585600002,
        3.46048134256,
        3.44214626356,
        3.45693409856,
        3.45845591356,
        3.4703114625600002,
        3.51058227656
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.49185436686,
      "stddev": 0.0485110730007086,
      "median": 3.4809239085600003,
      "user": 1.1673644,
      "system": 1.2626368999999997,
      "min": 3.43745800356,
      "max": 3.58665170656,
      "times": [
        3.48146738956,
        3.48038042756,
        3.4536604795600003,
        3.45246999256,
        3.5203088735600003,
        3.43745800356,
        3.58665170656,
        3.48342507956,
        3.55796159356,
        3.46476012256
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13723
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,584.88 ms
(-3.49%)Baseline: 2,678.47 ms
3,214.16 ms
(80.42%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,721.48 ms
(-3.22%)Baseline: 1,778.72 ms
2,134.47 ms
(80.65%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
403.72 ms
(-11.31%)Baseline: 455.18 ms
546.22 ms
(73.91%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
193.53 ms
(-12.74%)Baseline: 221.79 ms
266.15 ms
(72.72%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,358.37 ms
(-3.67%)Baseline: 2,448.12 ms
2,937.74 ms
(80.28%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,422.36 ms
(-2.36%)Baseline: 4,529.23 ms
5,435.08 ms
(81.37%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
246.44 ms
(-14.11%)Baseline: 286.92 ms
344.31 ms
(71.58%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
633.59 ms
(-14.13%)Baseline: 737.86 ms
885.44 ms
(71.56%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13723
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,427.86 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
301.36 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
296.06 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.11 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,338.95 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,442.15 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
270.44 ms
🐰 View full continuous benchmarking report in Bencher

…ge under strict mode

This resolves a bug in strict catalog mode where updating a cataloged
dependency to a concrete version satisfying a range specifier defined in the
catalog was rejected.

Fixes pnpm#13715
@Ayush442842q
Ayush442842q force-pushed the fix/strict-catalog-update-range-satisfies branch from 849dcea to 4273f98 Compare August 8, 2026 11:26
@coderabbitai

coderabbitai Bot commented Aug 8, 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.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.23%. Comparing base (6b6205b) to head (4273f98).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/package-manager/src/catalog_mode.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13723   +/-   ##
=======================================
  Coverage   88.22%   88.23%           
=======================================
  Files         616      616           
  Lines      100163   100173   +10     
=======================================
+ Hits        88373    88384   +11     
+ Misses      11790    11789    -1     

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

@zkochan

zkochan commented Aug 11, 2026

Copy link
Copy Markdown
Member

Closing as a duplicate: pnpm/pnpm#13716 was opened first and fixes the same issue in both stacks, so we are going with that one.

For the record, the two implementations were not equivalent. Relaxing the catalogMode gate in installSome is only half the fix: whether the dependency stays cataloged is decided later, in resolveDependencyTree, which only builds a catalogLookup when the catalog has no entry for the alias. When a range entry already exists, the dependency takes the Skip adding <pkg> to the default catalog because it already exists as <spec> path and gets written to package.json as a pinned version — so under catalogMode: strict the project silently drops out of the catalog:

catalogMode: strict, catalog: { is-positive: ^3.0.0 }, pkg-a deps: { is-positive: "catalog:" }

$ pnpm update '[email protected]' --recursive --lockfile-only
[WARN] Skip adding is-positive to the default catalog because it already exists as ^3.0.0
→ pkg-a/package.json:  "is-positive": "3.0.0"
→ pnpm-lock.yaml:      the catalogs: section is gone

That turns a loud ERR_PNPM_CATALOG_VERSION_MISMATCH into a silent, repo-wide un-cataloging under pnpm update -r, and it diverges from pacquet, which keeps the dependency on catalog:. #13716 handles this by also rewriting wantedDep.bareSpecifier to the catalog: specifier on the accepting branch, which is the behavior we want.

Thanks for the contribution and for the thorough write-up on the original issue.


Written by an agent (Claude Code, claude-opus-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

catalogMode: strict rejects pnpm update <pkg>@<version> for in-range versions when the catalog entry is a range, instead of checking semver.satisfies

3 participants