Repository navigation
fix(self-update): store the resolved pnpm pin as the packageManagerDependencies specifier - #12992
Conversation
…pendencies specifier `pnpm self-update <dist-tag>` (e.g. `next-12`) resolved the tag to an exact version and wrote that exact version into `devEngines.packageManager.version`, but recorded the raw dist-tag as the `packageManagerDependencies` specifier in `pnpm-lock.yaml`. The specifier then no longer matched the manifest pin. Because pacquet validates the `packageManagerDependencies` specifier under `--frozen-lockfile` (deriving the expected specifier from the manifest via `package_manager_to_sync`), the mismatch made a later frozen install fail with `FrozenLockfileOutdated`. This is how the update-lockfile job produced an invalid lockfile in #12989, hot-fixed by hand in #12990. The TypeScript CLI is unaffected: its self-update derives the specifier from the resolved version. Both self-update call sites now record the resolved pin instead of the CLI argument: the project-pin path stores the updated `devEngines` constraint (the value a later install reads back) via a new `package_manager_pin_specifier` helper, and the global-switch path stores the resolved version. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesSelf-update pin synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant SelfUpdateHandler
participant ProjectManifest
participant LockfileDependencies
SelfUpdateHandler->>ProjectManifest: resolve and write pin_specifier
ProjectManifest->>LockfileDependencies: synchronize packageManagerDependencies
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoFix self-update lockfile specifier to use resolved pnpm pin
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Historical regression comment in test
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pnpm/crates/cli/src/cli_args/self_update.rs (1)
299-302: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAvoid unnecessary string allocation.
Thanks to Rust's Non-Lexical Lifetimes (NLL), the temporary immutable borrow of
entry(held bycurrent) ends immediately after its last use on the left side of the&&condition. Becausecurrentis no longer used when the right side (entry.as_object_mut()) executes, you don't need to allocate aStringto decouple the lifetimes.You can safely remove
.map(ToString::to_string)and.as_deref()to keepcurrentas anOption<&str>.♻️ Proposed refactor
- let current = entry.get("version").and_then(Value::as_str).map(ToString::to_string); + let current = entry.get("version").and_then(Value::as_str); let updated = - package_manager_pin_specifier(legacy_pins_pnpm, current.as_deref(), target_version); - if current.as_deref() != Some(updated.as_str()) + package_manager_pin_specifier(legacy_pins_pnpm, current, target_version); + if current != Some(updated.as_str()) && let Some(object) = entry.as_object_mut()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/cli/src/cli_args/self_update.rs` around lines 299 - 302, Update the current extraction in the self-update version comparison to retain an Option<&str> by removing the ToString allocation, then pass current directly to package_manager_pin_specifier and compare it directly with the updated string without as_deref(). Preserve the existing NLL-dependent mutable entry update flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/pacquet-self-update-pin-specifier.md:
- Around line 1-5: Update the changeset frontmatter to include "pnpm": patch,
and remove the implementation rationale from the body. Keep only a concise
user-facing summary of the self-update lockfile behavior change.
---
Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/self_update.rs`:
- Around line 299-302: Update the current extraction in the self-update version
comparison to retain an Option<&str> by removing the ToString allocation, then
pass current directly to package_manager_pin_specifier and compare it directly
with the updated string without as_deref(). Preserve the existing NLL-dependent
mutable entry update flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2d6e8bb9-c15b-4896-ba63-0b668b5a2d29
📒 Files selected for processing (3)
.changeset/pacquet-self-update-pin-specifier.mdpnpm/crates/cli/src/cli_args/self_update.rspnpm/crates/cli/src/cli_args/self_update/tests.rs
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12992 +/- ##
==========================================
+ Coverage 85.51% 85.52% +0.01%
==========================================
Files 496 496
Lines 79399 79405 +6
==========================================
+ Hits 67898 67915 +17
+ Misses 11501 11490 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.678414323860001,
"stddev": 0.06866879587176813,
"median": 3.6932762120600002,
"user": 3.6562428999999996,
"system": 3.2864131400000005,
"min": 3.5737807150600003,
"max": 3.8017847810600003,
"times": [
3.6295603240600003,
3.5737807150600003,
3.7124955890600004,
3.72333925206,
3.6287563300600003,
3.8017847810600003,
3.7245741910600003,
3.68988086406,
3.6966715600600004,
3.60329963206
]
},
{
"command": "pacquet@main",
"mean": 3.7069882311599995,
"stddev": 0.14268818598029606,
"median": 3.64217544156,
"user": 3.6210008,
"system": 3.3039690399999997,
"min": 3.5816439840600003,
"max": 3.9864597170600002,
"times": [
3.8410539370600003,
3.59923408606,
3.58753696706,
3.6103202420600002,
3.9864597170600002,
3.85733756206,
3.5816439840600003,
3.59832252606,
3.67403064106,
3.7339426490600003
]
},
{
"command": "pnpr@HEAD",
"mean": 2.11685585216,
"stddev": 0.10823992021736593,
"median": 2.06724922056,
"user": 2.7756558,
"system": 2.91729454,
"min": 1.97314976106,
"max": 2.28826953106,
"times": [
2.0029268080600002,
2.28826953106,
2.06701128106,
2.06748716006,
2.21044653206,
2.05418462506,
2.23885423406,
1.97314976106,
2.0645282910600002,
2.20170029806
]
},
{
"command": "pnpr@main",
"mean": 2.11014299136,
"stddev": 0.10811825579413314,
"median": 2.08804802106,
"user": 2.7633631000000003,
"system": 2.9541727399999997,
"min": 1.97336592306,
"max": 2.3077856960600003,
"times": [
2.3077856960600003,
1.97336592306,
2.2098507130600002,
2.23610604006,
2.1114244010600003,
2.0962667820600003,
2.07982926006,
2.03997421606,
2.00688633806,
2.0399405440600002
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6582944417400001,
"stddev": 0.028158352126413818,
"median": 0.65242312924,
"user": 0.37457779999999996,
"system": 1.34271606,
"min": 0.63181997974,
"max": 0.72986030274,
"times": [
0.64402863474,
0.64080814974,
0.65705260974,
0.6567671687400001,
0.6385130867400001,
0.6480790897400001,
0.6756220617400001,
0.63181997974,
0.6603933337400001,
0.72986030274
]
},
{
"command": "pacquet@main",
"mean": 0.7204785627400001,
"stddev": 0.03709872166642049,
"median": 0.71737281324,
"user": 0.4043297,
"system": 1.3692841599999999,
"min": 0.6799974817400001,
"max": 0.81149116074,
"times": [
0.6799974817400001,
0.71299605174,
0.7233832187400001,
0.72174957474,
0.69104701574,
0.7045622627400001,
0.73013136174,
0.81149116074,
0.6910536807400001,
0.7383738187400001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.7115818030400001,
"stddev": 0.021143504162377567,
"median": 0.7143168987400002,
"user": 0.40830890000000003,
"system": 1.35987436,
"min": 0.6805975857400001,
"max": 0.7440958107400001,
"times": [
0.7323276807400001,
0.7118476157400001,
0.7169889517400001,
0.6805975857400001,
0.7167861817400001,
0.69488815674,
0.6900429977400001,
0.6945771617400001,
0.7336658877400001,
0.7440958107400001
]
},
{
"command": "pnpr@main",
"mean": 0.72665921024,
"stddev": 0.01105190771437752,
"median": 0.7241555407400001,
"user": 0.41533749999999997,
"system": 1.37313236,
"min": 0.71650307674,
"max": 0.7522623017400001,
"times": [
0.71920317274,
0.7242259967400001,
0.7176306127400001,
0.7240850847400001,
0.71650307674,
0.7298242527400001,
0.73773484674,
0.72607636474,
0.7522623017400001,
0.71904639274
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.348308744060001,
"stddev": 0.06535056455348988,
"median": 4.34801609426,
"user": 3.8710514199999997,
"system": 3.37868736,
"min": 4.25607927926,
"max": 4.42497942126,
"times": [
4.41124955726,
4.42497942126,
4.36251001726,
4.42382798126,
4.33352217126,
4.39536952026,
4.26100556326,
4.25607927926,
4.32679096926,
4.28775296026
]
},
{
"command": "pacquet@main",
"mean": 4.3917746406600005,
"stddev": 0.05545682090662466,
"median": 4.40086344276,
"user": 3.92436302,
"system": 3.3938574600000004,
"min": 4.30240525026,
"max": 4.47716317626,
"times": [
4.40737654126,
4.31318674126,
4.37823349726,
4.35821002926,
4.39435034426,
4.42327626726,
4.41639357726,
4.30240525026,
4.47716317626,
4.44715098226
]
},
{
"command": "pnpr@HEAD",
"mean": 2.2511654189600003,
"stddev": 0.1287086539200765,
"median": 2.25056296076,
"user": 2.6046703199999994,
"system": 2.8948847599999996,
"min": 2.07238365826,
"max": 2.41917105926,
"times": [
2.2438735042599998,
2.21871217026,
2.36870381326,
2.31326817226,
2.08299545926,
2.12400755126,
2.41128638426,
2.25725241726,
2.41917105926,
2.07238365826
]
},
{
"command": "pnpr@main",
"mean": 2.19354699156,
"stddev": 0.13457883913916582,
"median": 2.15858974026,
"user": 2.64057782,
"system": 2.88848086,
"min": 2.03651110126,
"max": 2.41227964126,
"times": [
2.38211982326,
2.11331242426,
2.09150181326,
2.28590165426,
2.04777650426,
2.12115039526,
2.19602908526,
2.24888747326,
2.41227964126,
2.03651110126
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.4606203649199998,
"stddev": 0.018866335849560587,
"median": 1.46261169382,
"user": 1.4222849199999998,
"system": 1.73949022,
"min": 1.42936886132,
"max": 1.48597907032,
"times": [
1.46231166232,
1.42936886132,
1.46291172532,
1.48597907032,
1.47810135532,
1.48189147332,
1.4661486343199999,
1.4550487673199999,
1.44850186532,
1.43594023432
]
},
{
"command": "pacquet@main",
"mean": 1.4593187786199997,
"stddev": 0.029374653874272082,
"median": 1.44771567432,
"user": 1.4129800199999998,
"system": 1.7383221199999999,
"min": 1.43863653132,
"max": 1.5323681733199999,
"times": [
1.44103134732,
1.5323681733199999,
1.44760031032,
1.43863653132,
1.44088899332,
1.45511502332,
1.48866753432,
1.44783103832,
1.45404455832,
1.44700427632
]
},
{
"command": "pnpr@HEAD",
"mean": 0.69318185502,
"stddev": 0.024557238011141822,
"median": 0.68764708982,
"user": 0.35384822,
"system": 1.3026089200000002,
"min": 0.67457300032,
"max": 0.75968943332,
"times": [
0.67990758732,
0.69093114432,
0.75968943332,
0.69223536232,
0.68287290832,
0.67457300032,
0.67671608932,
0.68436303532,
0.6928195983200001,
0.69771039132
]
},
{
"command": "pnpr@main",
"mean": 0.7001664764200001,
"stddev": 0.04925429001043744,
"median": 0.68584314432,
"user": 0.36754011999999997,
"system": 1.30427652,
"min": 0.6740185803200001,
"max": 0.8395353063200001,
"times": [
0.68333070632,
0.68210563632,
0.68213327032,
0.68925805732,
0.6740185803200001,
0.68835558232,
0.68937545432,
0.6921662053200001,
0.6813859653200001,
0.8395353063200001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.1819679508000003,
"stddev": 0.04235190095492845,
"median": 3.1706895293,
"user": 1.8720997000000001,
"system": 2.03653884,
"min": 3.1416250118,
"max": 3.2783192298,
"times": [
3.2783192298,
3.1932977648,
3.1514039508000002,
3.1420830648,
3.2214329028,
3.1416250118,
3.1690117708,
3.1933175698,
3.1723672878,
3.1568209548
]
},
{
"command": "pacquet@main",
"mean": 3.1579612602,
"stddev": 0.046882170906538484,
"median": 3.1454599028,
"user": 1.8496885999999997,
"system": 2.0201707399999997,
"min": 3.1049076398,
"max": 3.2600578108000002,
"times": [
3.1049076398,
3.1058335708,
3.1977175278,
3.1833979108,
3.1668049728,
3.1337864268,
3.1540867908,
3.2600578108000002,
3.1368330148,
3.1361869368
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6998012999000001,
"stddev": 0.008465386384715806,
"median": 0.6996268128,
"user": 0.36245209999999994,
"system": 1.30342144,
"min": 0.6860582918000001,
"max": 0.7117483318000001,
"times": [
0.7112261258000001,
0.6999841018,
0.6932194808000001,
0.6956908078,
0.7078813278000001,
0.6992695238000001,
0.7117483318000001,
0.7006381438000001,
0.6860582918000001,
0.6922968638000001
]
},
{
"command": "pnpr@main",
"mean": 0.6874381876000001,
"stddev": 0.02571283959775309,
"median": 0.6845592038000001,
"user": 0.34806299999999996,
"system": 1.2980549399999999,
"min": 0.6640707268000001,
"max": 0.7540633598,
"times": [
0.6943815838,
0.6730559608000001,
0.6886810938000001,
0.6866619468,
0.6923509448,
0.6824564608000001,
0.7540633598,
0.6706375168,
0.6640707268000001,
0.6680222818000001
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.67232355048,
"stddev": 0.02564892027420042,
"median": 0.6621427819800001,
"user": 0.6256784599999999,
"system": 0.15443013999999997,
"min": 0.64399772048,
"max": 0.7140068874800001,
"times": [
0.7140068874800001,
0.7135439224800001,
0.6955750164800001,
0.6611904874800001,
0.6666513514800001,
0.6536420724800001,
0.6630950764800001,
0.64399772048,
0.6569169004800001,
0.6546160694800001
]
},
{
"command": "pacquet@main",
"mean": 0.66347225118,
"stddev": 0.007754526874561786,
"median": 0.6600776324800001,
"user": 0.62035246,
"system": 0.15331334,
"min": 0.65250825548,
"max": 0.6756053534800001,
"times": [
0.6595916244800001,
0.66056364048,
0.65250825548,
0.65887464348,
0.6756053534800001,
0.6670458474800001,
0.6745441894800001,
0.66960976648,
0.65856049248,
0.6578186984800001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.11223939243833335,
"stddev": 0.0009743123911319527,
"median": 0.11223262548000001,
"user": 0.028300659999999995,
"system": 0.02204739833333333,
"min": 0.11001150048000001,
"max": 0.11437634348000002,
"times": [
0.11253448848000001,
0.11188280048000002,
0.11216897948000001,
0.11437634348000002,
0.11001150048000001,
0.11237637148000001,
0.11347853548000002,
0.11157926448000001,
0.11269646248000001,
0.11177516848,
0.11244622848000001,
0.11254855548,
0.11215785748000001,
0.11203806848000002,
0.11300413848000002,
0.11111164648,
0.11309839048000002,
0.11111286848000002,
0.11370319848000002,
0.11131274848000001,
0.11303551648000001,
0.11083103548,
0.11226398748000001,
0.11220126348000001
]
},
{
"command": "pnpr@main",
"mean": 0.11229116881333333,
"stddev": 0.000689664305137096,
"median": 0.11233774748,
"user": 0.028497576666666663,
"system": 0.02196223166666666,
"min": 0.11089048448000001,
"max": 0.11380316448000001,
"times": [
0.11089048448000001,
0.11257048748000001,
0.11248914548000001,
0.11219870948,
0.11235046648000001,
0.11208540948000001,
0.11277077748000001,
0.11213250948000002,
0.11380316448000001,
0.11102363948,
0.11232502848,
0.11347921248000001,
0.11181640048000001,
0.11156481748000001,
0.11231033648000001,
0.11319563648000001,
0.11181463648000001,
0.11249259048000002,
0.11145121148,
0.11259818448000002,
0.11244517348000001,
0.11262500948000001,
0.11179214348000001,
0.11276287648000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 6.626995469480001,
"stddev": 0.15824642098156072,
"median": 6.66261904488,
"user": 3.9207082799999995,
"system": 3.5916983799999995,
"min": 6.32068881238,
"max": 6.87811520038,
"times": [
6.68078715138,
6.67462674738,
6.46349553038,
6.51941206238,
6.65061134238,
6.32068881238,
6.87811520038,
6.61239099038,
6.71300218838,
6.75682466938
]
},
{
"command": "pacquet@main",
"mean": 6.6430413043800005,
"stddev": 0.11871805288995305,
"median": 6.60743621538,
"user": 3.91462728,
"system": 3.5861589799999996,
"min": 6.53427291538,
"max": 6.91704749238,
"times": [
6.57716634138,
6.53427291538,
6.91704749238,
6.62662490038,
6.62817726538,
6.58498721238,
6.78950701838,
6.62284111638,
6.55775746738,
6.59203131438
]
},
{
"command": "pnpr@HEAD",
"mean": 4.87260714068,
"stddev": 0.12930039087699957,
"median": 4.84680006138,
"user": 2.8356016799999995,
"system": 3.12314088,
"min": 4.70556742038,
"max": 5.13462990638,
"times": [
4.99714931638,
4.94175557638,
4.75335099038,
4.89291566838,
4.91137098438,
4.79933579638,
4.70556742038,
4.80068445438,
5.13462990638,
4.78931129338
]
},
{
"command": "pnpr@main",
"mean": 4.9059573061799995,
"stddev": 0.10133125203596832,
"median": 4.87387839288,
"user": 2.82394948,
"system": 3.12106938,
"min": 4.80087598838,
"max": 5.14265720338,
"times": [
4.92506058538,
4.83767318238,
4.84757566338,
4.80087598838,
4.89066723738,
4.98898909638,
4.82761702438,
4.85708954838,
5.14265720338,
4.94136753238
]
}
]
} |
|
| Branch | pr/12992 |
| Testbed | pnpr |
⚠️ 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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 2,251.17 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 699.80 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 693.18 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 112.24 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,116.86 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 4,872.61 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 711.58 ms |
…ng it The immutable borrow of the devEngines `version` entry ends (via NLL) before the mutable `entry.as_object_mut()` reborrow, so the pin-specifier lookup can take `Option<&str>` directly instead of allocating a `String` to decouple the lifetimes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Code review by qodo was updated up to the latest commit 3f78f48 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
Confidence Score: 5/5Safe to merge — the change is a targeted, self-contained correctness fix with no new dependencies or interface changes. The fix correctly threads the resolved manifest constraint ( No files require special attention. Reviews (2): Last reviewed commit: "docs(self-update): drop pin-specifier co..." | Re-trigger Greptile |
…per doc The block comment before `pin_specifier` and the test preamble restated the contract already documented on `package_manager_pin_specifier`. Keep only the non-obvious details: the devEngines-has-no-pnpm-entry fallback, and the regression the test guards. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Code review by qodo was updated up to the latest commit 216c73a |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
pnpm self-update <dist-tag>(e.g.next-12) resolved the tag to an exact version and wrote that exact version intodevEngines.packageManager.version, but recorded the raw dist-tag as thepackageManagerDependenciesspecifier inpnpm-lock.yaml. The lockfile specifier then no longer matched the manifest pin.Because pacquet validates the
packageManagerDependenciesspecifier under--frozen-lockfile(it derives the expected specifier from the manifest viapackage_manager_to_sync), the mismatch made a later frozen install fail withFrozenLockfileOutdated("the lockfile is not up to date"). This is how the daily update-lockfile job produced an invalid lockfile in #12989, which had to be hot-fixed by hand in #12990.The TypeScript CLI is unaffected — its
self-updatederives the specifier from the resolved version, so this is a pacquet-only correctness bug and a parity divergence.Both self-update call sites now record the resolved pin instead of the CLI argument:
devEnginesconstraint (the value a later install reads back), via a newpackage_manager_pin_specifierhelper — exact for exact/legacy pins, preserved range for range pins;Related to #12989, #12990.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any published package. Keep it short and written for pnpm users — it becomes a release note.Written by an agent (Claude Code, claude-opus-4-8).
Summary by CodeRabbit
pnpm self-update <dist-tag>to record the correct resolved package manager version (or pin range style) intopackageManagerDependencies, preventingpnpm-lock.yamldrift and avoiding--frozen-lockfilefailures.packageManagerpin scenarios.