Repository navigation
Conversation
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughChangesJSR specifier rewriting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant UpdateLatest
participant resolve_jsr_impl
participant build_resolve_result
participant ManifestLockfile
User->>UpdateLatest: update jsr dependency
UpdateLatest->>resolve_jsr_impl: resolve latest package
resolve_jsr_impl->>build_resolve_result: pass calculated jsr specifier
build_resolve_result->>ManifestLockfile: write updated manifest and resolution
ManifestLockfile-->>User: return updated jsr version and package
Possibly related issues
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 update --latest to rewrite jsr: specifiers while preserving protocol
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains within the scope of the prior review feedback. Reviews (3): Last reviewed commit: "refactor(resolving-npm-resolver): skip s..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1. Changeset missing pnpm entry
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rs (1)
115-116: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep test documentation limited to non-obvious rationale. These comments partly restate assertions or porting history; retain only the protocol-binding and known-failure-gate invariants.
pnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rs#L115-L116: remove the description of the unaliased output shape.pnpm/crates/cli/tests/update_jsr.rs#L84-L86: replace the test-behavior summary with the registry-binding invariant, if documentation is needed.pnpm/crates/cli/tests/update_jsr.rs#L141-L144: retain the explanation of the gate placement, but remove the assertion summary.As per coding guidelines, Rust comments should explain non-obvious invariants or contracts rather than narrate test behavior.
🤖 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/resolving-npm-resolver/src/calc_specifier/tests.rs` around lines 115 - 116, Trim the comments at pnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rs:115-116 by removing the unaliased output-shape description. At pnpm/crates/cli/tests/update_jsr.rs:84-86, replace the test-behavior summary with only the registry-binding invariant if documentation is needed. At pnpm/crates/cli/tests/update_jsr.rs:141-144, preserve the non-obvious gate-placement rationale while removing the assertion summary; do not alter test behavior.Source: Coding guidelines
pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs (1)
283-292: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winKeep calculated-specifier rendering lazy.
build_resolve_resultprefersspec.normalized_bare_specifier, but both call sites now allocate and serializecalculated_specifierbefore that choice. The previousor_elsepath avoided this work whenever parsing had already normalized the specifier.
pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs#L283-L292: only callcalc_specifierwhenspec.normalized_bare_specifieris absent.pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs#L344-L355: only callcalc_prefixed_specifierwhenjsr_spec.spec.normalized_bare_specifieris absent.As per path instructions, resolver paths are hot and should avoid extra common-path work.
🤖 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/resolving-npm-resolver/src/npm_resolver.rs` around lines 283 - 292, The calculated specifier must remain lazy: in build_resolve_result at pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs lines 283-292, only invoke calc_specifier when spec.normalized_bare_specifier is absent; likewise, at lines 344-355, only invoke calc_prefixed_specifier when jsr_spec.spec.normalized_bare_specifier is absent, preserving the normalized value on the common path.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rs`:
- Around line 115-116: Trim the comments at
pnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rs:115-116 by
removing the unaliased output-shape description. At
pnpm/crates/cli/tests/update_jsr.rs:84-86, replace the test-behavior summary
with only the registry-binding invariant if documentation is needed. At
pnpm/crates/cli/tests/update_jsr.rs:141-144, preserve the non-obvious
gate-placement rationale while removing the assertion summary; do not alter test
behavior.
In `@pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs`:
- Around line 283-292: The calculated specifier must remain lazy: in
build_resolve_result at pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs
lines 283-292, only invoke calc_specifier when spec.normalized_bare_specifier is
absent; likewise, at lines 344-355, only invoke calc_prefixed_specifier when
jsr_spec.spec.normalized_bare_specifier is absent, preserving the normalized
value on the common path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e2e56d9d-e660-4480-8bd4-b27882469a0d
📒 Files selected for processing (8)
.changeset/update-latest-rewrites-jsr-specifiers.mdpnpm/crates/cli/tests/update_jsr.rspnpm/crates/resolving-npm-resolver/src/calc_specifier.rspnpm/crates/resolving-npm-resolver/src/calc_specifier/tests.rspnpm/crates/resolving-npm-resolver/src/lib.rspnpm/crates/resolving-npm-resolver/src/named_registry_resolver.rspnpm/crates/resolving-npm-resolver/src/npm_resolver.rspnpm/plans/TEST_PORTING.md
…pre-empts `build_resolve_result` prefers the spec's own normalized bare specifier over the computed one, so computing it for a spec that already carries one — a registry-host tarball URL, whose text has to stay verbatim — only allocated a string to drop it. Gate `calc_specifier_from` on the spec so neither call site renders in that case. Also trim test doc comments that restated their assertions. Addresses review feedback on #13394. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Thanks — addressed in b15417e98b90d5b26a4ac2a8ec2e0b0dd0dbfb8f. Eager specifier allocation (Qodo #2, CodeRabbit nitpick 2) — valid, fixed. Rather than duplicating the guard at both call sites, Test comments (CodeRabbit nitpick 1) — fixed. Trimmed the doc comments on Changeset missing
The same section also requires the release-note prose to say Code Coverage check — failing on every branch right now, Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit b15417e |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
`update --latest` writes back whatever the resolver reports as the dependency's normalized bare specifier, and writes nothing when the resolver reports none — so specifiers no resolver claims are left alone. The JSR path never reported one, so a `jsr:` dependency always landed in that "unclaimed" case and kept its old version. Reporting the npm-shaped range `calc_specifier` builds would have been wrong: it would rewrite the entry into a registry dependency. Render the picked version back under the protocol instead, through a new `calc_prefixed_specifier` mirroring the TypeScript resolver's `calcPrefixedSpecifier` — `jsr:<range>` when the dependency installs under the package's own name, `jsr:<pkg name>@<range>` when it is aliased, keeping the range operator the entry already declared. `BuildResolveResult` now carries the rendered specifier rather than the inputs to render it, since which shape to render is the calling resolver's knowledge, not `build_resolve_result`'s. The named-registry resolver has the same gap and is tracked separately in #13393. TypeScript-side: no change needed, `resolveJsr` already calls `calcPrefixedSpecifier`. Closes #13363 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…pre-empts `build_resolve_result` prefers the spec's own normalized bare specifier over the computed one, so computing it for a spec that already carries one — a registry-host tarball URL, whose text has to stay verbatim — only allocated a string to drop it. Gate `calc_specifier_from` on the spec so neither call site renders in that case. Also trim test doc comments that restated their assertions. Addresses review feedback on #13394. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Code review by qodo was updated up to the latest commit c4d836b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13394 +/- ##
=======================================
Coverage 87.31% 87.31%
=======================================
Files 542 542
Lines 93200 93225 +25
=======================================
+ Hits 81376 81400 +24
- Misses 11824 11825 +1 ☔ 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. 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.48158597894,
"stddev": 0.1333577419105054,
"median": 2.4498192138400006,
"user": 1.4607278799999999,
"system": 1.3169839199999998,
"min": 2.3488106223400003,
"max": 2.75144183034,
"times": [
2.4349925213400003,
2.37926303534,
2.38729734134,
2.4646459063400004,
2.4916526943400004,
2.3488106223400003,
2.75144183034,
2.5323010043400003,
2.36579898034,
2.6596558533400003
]
},
{
"command": "pacquet@main",
"mean": 2.49510515374,
"stddev": 0.13695559164959617,
"median": 2.4666844558400003,
"user": 1.5317536799999998,
"system": 1.2772367199999999,
"min": 2.3246534713400004,
"max": 2.79621511934,
"times": [
2.56266744434,
2.54625744334,
2.79621511934,
2.4236729503400003,
2.41631989634,
2.3609761323400003,
2.5869201683400003,
2.3246534713400004,
2.5024864083400002,
2.4308825033400003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.53322865784,
"stddev": 0.15877154129705276,
"median": 1.50580259984,
"user": 1.02801108,
"system": 1.1387169199999998,
"min": 1.34541913434,
"max": 1.77623165334,
"times": [
1.38419660934,
1.42644648134,
1.66688046634,
1.34541913434,
1.60867137134,
1.77623165334,
1.42682754234,
1.5847776573399999,
1.38273510034,
1.7301005623399999
]
},
{
"command": "pnpr@main",
"mean": 1.5704142882399998,
"stddev": 0.1459299418986834,
"median": 1.62895593234,
"user": 1.09869358,
"system": 1.1181759199999999,
"min": 1.33976087434,
"max": 1.75247639334,
"times": [
1.48030989134,
1.39939639934,
1.69813402634,
1.70984928734,
1.63640398734,
1.6390997303400001,
1.42720441534,
1.33976087434,
1.62150787734,
1.75247639334
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2618614660400001,
"stddev": 0.008365496826834004,
"median": 0.26317981204000007,
"user": 0.22437246000000002,
"system": 0.5276244999999999,
"min": 0.25001980554000003,
"max": 0.27444027154000006,
"times": [
0.26757831654,
0.25001980554000003,
0.27444027154000006,
0.25334173854,
0.26702092354000007,
0.26935092354000006,
0.26297360254,
0.25013006454000003,
0.26338602154000007,
0.26037299254000007
]
},
{
"command": "pacquet@main",
"mean": 0.25474042434,
"stddev": 0.008278812277742133,
"median": 0.2574034310400001,
"user": 0.19731466000000003,
"system": 0.5318567,
"min": 0.24154831254,
"max": 0.26699173854,
"times": [
0.26193236654,
0.26038175954000004,
0.26699173854,
0.25372302754000003,
0.25774919854000006,
0.24154831254,
0.24555981454,
0.24471116354000003,
0.25727558454000005,
0.25753127754000005
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26733219254000007,
"stddev": 0.008227450167745676,
"median": 0.26700302504000006,
"user": 0.21954906,
"system": 0.5112717,
"min": 0.25660438754000003,
"max": 0.27970567254000006,
"times": [
0.26807252954000005,
0.26077844854000004,
0.27970567254000006,
0.26593352054,
0.27961185554000006,
0.25660438754000003,
0.25865208254000005,
0.26964509854,
0.26150099254000003,
0.27281733754000004
]
},
{
"command": "pnpr@main",
"mean": 0.2706421466400001,
"stddev": 0.006799621347198053,
"median": 0.27096862204000005,
"user": 0.21925925999999998,
"system": 0.5316759,
"min": 0.25910465754000006,
"max": 0.28229695554000006,
"times": [
0.27285766354,
0.25910465754000006,
0.26637568554,
0.26664939154000006,
0.27836323854000006,
0.26466845254000004,
0.28229695554000006,
0.27068071354000006,
0.27416817754000006,
0.27125653054000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.77910649698,
"stddev": 0.01985470375037598,
"median": 2.7821538409800004,
"user": 1.7317605200000004,
"system": 1.3046074,
"min": 2.73278302748,
"max": 2.8021534434800004,
"times": [
2.79421603748,
2.8021534434800004,
2.7950861924800003,
2.78098733348,
2.73278302748,
2.78698611748,
2.78074694948,
2.78332034848,
2.7710473484800002,
2.76373817148
]
},
{
"command": "pacquet@main",
"mean": 2.77243287038,
"stddev": 0.014824551131589354,
"median": 2.7693914734800003,
"user": 1.6804867199999998,
"system": 1.309487,
"min": 2.75027839148,
"max": 2.7981715724800003,
"times": [
2.77005215048,
2.7687307964800003,
2.7981715724800003,
2.75027839148,
2.78341428448,
2.7891676054800003,
2.75746613048,
2.7640281584800004,
2.7641531244800004,
2.7788664894800004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6053261934799998,
"stddev": 0.1418114709125977,
"median": 1.5606514899800001,
"user": 1.06223182,
"system": 1.1038321,
"min": 1.44356253648,
"max": 1.8391283044800002,
"times": [
1.44356253648,
1.5989948334800002,
1.51783799948,
1.4995448924800001,
1.55646753648,
1.83206979848,
1.48684992748,
1.7139706624800002,
1.56483544348,
1.8391283044800002
]
},
{
"command": "pnpr@main",
"mean": 1.66858217768,
"stddev": 0.1276565175368042,
"median": 1.68587817198,
"user": 1.0373666199999998,
"system": 1.1405771,
"min": 1.43218617848,
"max": 1.86748768348,
"times": [
1.75473597248,
1.86748768348,
1.7051966084799999,
1.72358213848,
1.52981198348,
1.59301137548,
1.6305842804800001,
1.43218617848,
1.7826658204799999,
1.6665597354800001
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.59779919546,
"stddev": 0.011371994730521778,
"median": 0.59492594966,
"user": 0.7330017999999997,
"system": 0.66180786,
"min": 0.58043306516,
"max": 0.6144784721600001,
"times": [
0.60652639016,
0.6144784721600001,
0.5940678901600001,
0.61185706316,
0.59325516416,
0.60581336416,
0.59023564516,
0.58554089116,
0.59578400916,
0.58043306516
]
},
{
"command": "pacquet@main",
"mean": 0.58450070656,
"stddev": 0.01333154093316889,
"median": 0.5820045471599999,
"user": 0.7125770999999999,
"system": 0.65255776,
"min": 0.56869224016,
"max": 0.60645552216,
"times": [
0.56869224016,
0.59603003116,
0.57974346316,
0.60286688716,
0.58426563116,
0.60645552216,
0.57667530116,
0.58544739116,
0.56921588916,
0.57561470916
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31114568695999995,
"stddev": 0.006960746439115103,
"median": 0.31224446565999997,
"user": 0.20745390000000002,
"system": 0.51990566,
"min": 0.30079004516,
"max": 0.32428198516,
"times": [
0.30574340716,
0.31455401116,
0.31528723516,
0.31315879716,
0.30708924715999997,
0.31133013416,
0.32428198516,
0.31565503816,
0.30079004516,
0.30356696916
]
},
{
"command": "pnpr@main",
"mean": 0.3054120806599999,
"stddev": 0.006432759058100605,
"median": 0.30405568616,
"user": 0.2006402,
"system": 0.5423231599999998,
"min": 0.29664948816,
"max": 0.31850119116,
"times": [
0.30863115016,
0.31850119116,
0.30011825816,
0.30137967816,
0.31018306816,
0.30384084616,
0.30427052616,
0.30063133616,
0.30991526416,
0.29664948816
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.91540907536,
"stddev": 0.0075323132333284274,
"median": 1.91355076206,
"user": 0.9432078999999998,
"system": 0.76852144,
"min": 1.90864249006,
"max": 1.9331456990600002,
"times": [
1.91588930206,
1.9331456990600002,
1.9230754280600002,
1.9154279610600002,
1.90864249006,
1.91304658506,
1.9087706140600003,
1.9140549390600001,
1.9102406690600002,
1.91179706606
]
},
{
"command": "pacquet@main",
"mean": 1.8978563532600004,
"stddev": 0.010636848659922449,
"median": 1.89940382506,
"user": 0.9209548999999999,
"system": 0.76166344,
"min": 1.87544817106,
"max": 1.91432337106,
"times": [
1.9036428230600002,
1.91432337106,
1.87544817106,
1.8938668220600001,
1.89850287406,
1.8984634790600001,
1.9031153920600001,
1.90030477606,
1.9040952820600001,
1.88680054206
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31310712056,
"stddev": 0.004976260897904578,
"median": 0.31244527056000004,
"user": 0.20504700000000003,
"system": 0.5525377399999998,
"min": 0.30593883306,
"max": 0.32393428606,
"times": [
0.31246772806,
0.32393428606,
0.31336286906,
0.30841344506,
0.30593883306,
0.31242281306,
0.31701380006,
0.31554873506000003,
0.31026059206,
0.31170810406
]
},
{
"command": "pnpr@main",
"mean": 0.29913553396000003,
"stddev": 0.010032926714467242,
"median": 0.30415219906,
"user": 0.19545859999999998,
"system": 0.5133380399999999,
"min": 0.28160472406000003,
"max": 0.30971708506,
"times": [
0.29076220106,
0.28991427106,
0.28160472406000003,
0.28980768906000004,
0.30657088606,
0.30562380706000003,
0.30971708506,
0.30728273906000003,
0.30268059106,
0.30739134606
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36833604878,
"stddev": 0.007194417541474242,
"median": 0.36862794028,
"user": 0.3565644599999999,
"system": 0.06183609999999999,
"min": 0.35752753578,
"max": 0.38139010378000004,
"times": [
0.36180342678,
0.38139010378000004,
0.37038995778,
0.36965128178,
0.36083488878000003,
0.35752753578,
0.37542534278,
0.36614207778,
0.36760459878,
0.37259127378
]
},
{
"command": "pacquet@main",
"mean": 0.36305610928000004,
"stddev": 0.008775463117214301,
"median": 0.36026432728,
"user": 0.36073765999999996,
"system": 0.051609300000000004,
"min": 0.35062467378,
"max": 0.37392972078000003,
"times": [
0.35960812378,
0.35791802278,
0.35062467378,
0.35290944678,
0.37252901478,
0.37305570978,
0.37087362078,
0.36092053078,
0.35819222878,
0.37392972078000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08728611202242423,
"stddev": 0.0015749845152981273,
"median": 0.08722102578,
"user": 0.020349763030303034,
"system": 0.009448006060606057,
"min": 0.08454175778,
"max": 0.09065942678,
"times": [
0.08704697678000001,
0.08681234378,
0.09007383278,
0.08688270678,
0.08495997678,
0.08769599178,
0.09037595078,
0.08454175778,
0.08676235978,
0.08754233178,
0.08800020578000001,
0.08726344578,
0.08681255578,
0.08617473978,
0.08752189278,
0.08664881478,
0.09065942678,
0.08516775978,
0.08910783878,
0.08465281678,
0.08740067378000001,
0.08790939478,
0.08677893178,
0.08722102578,
0.08807946578,
0.08590875778,
0.08977110978,
0.08480173878,
0.08857786778,
0.08672053978000001,
0.08748617578000001,
0.08852055878000001,
0.08656173078
]
},
{
"command": "pnpr@main",
"mean": 0.08739110284250003,
"stddev": 0.001572774008981336,
"median": 0.08739848028,
"user": 0.020933366250000005,
"system": 0.008906306249999999,
"min": 0.08385688478,
"max": 0.09068651678,
"times": [
0.08923010778,
0.08530543878,
0.08760835678000001,
0.08542401278,
0.08955787778,
0.08866880978,
0.09033254978000001,
0.08650820978,
0.08909242878,
0.08684151878,
0.08852785278,
0.08549832378,
0.08949762278000001,
0.08385688478,
0.08785474178,
0.08807093078,
0.08648768078,
0.08695972178,
0.08812264678000001,
0.08642797778,
0.08595206078,
0.08748512378000001,
0.08653792578,
0.09068651678,
0.08558674978,
0.08717728378,
0.08750030378,
0.08731183678,
0.08718394578000001,
0.08766523378,
0.08549778278,
0.08805683278
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.52078794284,
"stddev": 0.13445762589456225,
"median": 4.46114340734,
"user": 1.67162474,
"system": 1.3831562600000002,
"min": 4.41894991734,
"max": 4.78207545634,
"times": [
4.48505972234,
4.41894991734,
4.42651004034,
4.4370942513400005,
4.78207545634,
4.55397839234,
4.42693778734,
4.74313075334,
4.43722709234,
4.49691601534
]
},
{
"command": "pacquet@main",
"mean": 4.48453457094,
"stddev": 0.052367140488039345,
"median": 4.47046083484,
"user": 1.6988698400000004,
"system": 1.34111746,
"min": 4.41892842934,
"max": 4.61179209434,
"times": [
4.46003963534,
4.47504211234,
4.41892842934,
4.61179209434,
4.46587955734,
4.46347523034,
4.48950748534,
4.5115122983400004,
4.44500351534,
4.50416535134
]
},
{
"command": "pnpr@HEAD",
"mean": 3.538290364540001,
"stddev": 0.13996207105932099,
"median": 3.47421060634,
"user": 1.1857221400000002,
"system": 1.23157056,
"min": 3.44718135234,
"max": 3.80301080034,
"times": [
3.44718135234,
3.80301080034,
3.46526597034,
3.50641731934,
3.50202525834,
3.79961281334,
3.45990958834,
3.47626087734,
3.45105933034,
3.47216033534
]
},
{
"command": "pnpr@main",
"mean": 3.53791930474,
"stddev": 0.11997197911693973,
"median": 3.49654899934,
"user": 1.22323524,
"system": 1.2002605599999998,
"min": 3.44761814234,
"max": 3.8409321913400003,
"times": [
3.44761814234,
3.49770757634,
3.53908323034,
3.56155523434,
3.46929754034,
3.4601145943400002,
3.44776642934,
3.61972768634,
3.49539042234,
3.8409321913400003
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13394 |
| 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 | 1,443.56 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 305.94 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 300.79 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 84.54 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,345.42 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,447.18 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 256.60 ms |
…st (pnpm#13394) `update --latest` writes back whatever the resolver reports as the dependency's normalized bare specifier, and writes nothing when the resolver reports none — so specifiers no resolver claims are left alone. The JSR path never reported one, so a `jsr:` dependency always landed in that "unclaimed" case and kept its old version. Reporting the npm-shaped range `calc_specifier` builds would have been wrong: it would rewrite the entry into a registry dependency. Render the picked version back under the protocol instead, through a new `calc_prefixed_specifier` mirroring the TypeScript resolver's `calcPrefixedSpecifier` — `jsr:<range>` when the dependency installs under the package's own name, `jsr:<pkg name>@<range>` when it is aliased, keeping the range operator the entry already declared. `BuildResolveResult` now carries the rendered specifier rather than the inputs to render it, since which shape to render is the calling resolver's knowledge, not `build_resolve_result`'s. The named-registry resolver has the same gap and is tracked separately in pnpm#13393. TypeScript-side: no change needed, `resolveJsr` already calls `calcPrefixedSpecifier`. Closes pnpm#13363
Summary
pnpm update --latestleftjsr:dependencies at their old version in pacquet:jsr:1.0.0stayed put where the TypeScript CLI rewrites it tojsr:2.0.0.update --latestwrites back whatever the resolver reports as the dependency's normalized bare specifier, and writes nothing when the resolver reports none — deliberately, so specifiers no resolver claims are left alone. pacquet's JSR path never reported one, so everyjsr:dependency landed in that "unclaimed" case.Reporting the npm-shaped range
calc_specifierbuilds would have been wrong — it would rewrite the entry into a plain registry dependency. This addscalc_prefixed_specifier, mirroring the TypeScript resolver'scalcPrefixedSpecifier, and renders the picked version back under the protocol:jsr:<range>when the dependency installs under the package's own name,jsr:<pkg name>@<range>when it is aliased, keeping the range operator the entry already declared.The ported
update_latest_bumps_a_jsr_dependencytest loses itsallow_known_failure!gate and moves out ofknown_failures.update_latest_bumps_an_aliased_jsr_dependencykeeps only its importer gate (#13362), so its manifest assertion now runs for real.No TypeScript-side change:
resolveJsrinresolving/npm-resolver/src/index.tsalready callscalcPrefixedSpecifier. This PR brings pacquet up to it.Follow-up: the named-registry resolver has the identical gap —
<alias>:dependencies are also never rewritten. It needs the same wiring plus its own test; filed as #13393 and marked with aTODOat the site.Closes #13363
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpm update --latestnow properly bumps unaliasedjsr:dependencies to the latest available versions while preserving the originaljsr:protocol form and range operator.jsr:--latestbehavior.jsr:specifier formatting and--latestbumping outcomes.