Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (22)
📝 WalkthroughWalkthroughThis PR implements scoped package registry support across the pnpm/pacquet codebase. It extends the config schema to store per-scope registry routes, parses them from ChangesScoped registries implementation
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12340 +/- ##
==========================================
+ Coverage 87.74% 87.82% +0.07%
==========================================
Files 291 291
Lines 36107 36164 +57
==========================================
+ Hits 31683 31761 +78
+ Misses 4424 4403 -21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)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": 4.18349581916,
"stddev": 0.18241386530856302,
"median": 4.11296830936,
"user": 3.544542659999999,
"system": 3.4279806199999996,
"min": 4.01850346436,
"max": 4.54980881236,
"times": [
4.0874777913600004,
4.01850346436,
4.17621589036,
4.54980881236,
4.3686506963600005,
4.365895210360001,
4.13845882736,
4.033596703360001,
4.055922794360001,
4.0404280013600005
]
},
{
"command": "pacquet@main",
"mean": 4.14445978476,
"stddev": 0.15606580123525268,
"median": 4.182185497360001,
"user": 3.54121746,
"system": 3.40760152,
"min": 3.94583124036,
"max": 4.33075705636,
"times": [
4.21513139536,
4.31428327536,
3.95762035536,
4.153274903360001,
3.94583124036,
4.01265116636,
4.33075705636,
3.98720245536,
4.21109609136,
4.31674990836
]
},
{
"command": "pnpr@HEAD",
"mean": 2.3913592048599996,
"stddev": 0.15308904330915424,
"median": 2.3888418838599996,
"user": 2.60058086,
"system": 2.9930644200000005,
"min": 2.1689908173599997,
"max": 2.60859866336,
"times": [
2.60859866336,
2.1689908173599997,
2.3452426743599997,
2.52991001936,
2.5356498953599997,
2.18898483536,
2.49925899136,
2.3565510393599998,
2.25927238436,
2.42113272836
]
},
{
"command": "pnpr@main",
"mean": 2.31626895456,
"stddev": 0.15458391763898377,
"median": 2.2664345403599997,
"user": 2.6385454599999996,
"system": 3.00427392,
"min": 2.1832645023599997,
"max": 2.64177082236,
"times": [
2.64177082236,
2.52903364636,
2.28880215836,
2.19186422036,
2.26830340336,
2.3672862973599997,
2.1875505833599997,
2.2402482343599996,
2.26456567736,
2.1832645023599997
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6671281044399999,
"stddev": 0.020560123612667368,
"median": 0.66377748944,
"user": 0.40482644000000007,
"system": 1.31448388,
"min": 0.64343604144,
"max": 0.6947005014400001,
"times": [
0.66707228344,
0.6947005014400001,
0.66048269544,
0.69447752344,
0.6887419744400001,
0.6456792194400001,
0.6776260724400001,
0.6536627754400001,
0.6454019574400001,
0.64343604144
]
},
{
"command": "pacquet@main",
"mean": 0.66756786344,
"stddev": 0.01787661754669341,
"median": 0.6649068039400001,
"user": 0.37288943999999996,
"system": 1.3284759800000001,
"min": 0.64976722744,
"max": 0.71464006144,
"times": [
0.66832318644,
0.6619698484400001,
0.71464006144,
0.64976722744,
0.65846442344,
0.6666214554400001,
0.65383041444,
0.66614020244,
0.6722484094400001,
0.6636734054400001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.77777278024,
"stddev": 0.044265072666794913,
"median": 0.7595380034400001,
"user": 0.40653014,
"system": 1.3347681800000002,
"min": 0.7399404364400001,
"max": 0.87918255144,
"times": [
0.8330106954400001,
0.77877175044,
0.7755723814400001,
0.74961452044,
0.75125285444,
0.7399404364400001,
0.7589864684400001,
0.76008953844,
0.75130660544,
0.87918255144
]
},
{
"command": "pnpr@main",
"mean": 0.81934064174,
"stddev": 0.11196272602917423,
"median": 0.7806646799400001,
"user": 0.40701583999999996,
"system": 1.34815498,
"min": 0.75861563744,
"max": 1.1323341074400002,
"times": [
0.81692158944,
0.77909852944,
0.77177451044,
0.7763769234400001,
0.7822308304400001,
0.75861563744,
0.78486096344,
1.1323341074400002,
0.82510255844,
0.76609076744
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.8484330441000005,
"stddev": 0.055093567693418465,
"median": 3.8478239323000003,
"user": 3.53105578,
"system": 3.34531804,
"min": 3.7647411378,
"max": 3.9232845418,
"times": [
3.8250081558,
3.9041439478,
3.8309654068000003,
3.9060735878,
3.8239803528,
3.9232845418,
3.8708913828,
3.8646824578000003,
3.7647411378,
3.7705594698000002
]
},
{
"command": "pacquet@main",
"mean": 3.8159902231000005,
"stddev": 0.04769330425885132,
"median": 3.8079108688000005,
"user": 3.48799388,
"system": 3.3389624400000004,
"min": 3.7411284498,
"max": 3.8980300568,
"times": [
3.7774810638000003,
3.7835621528,
3.7925585648,
3.8980300568,
3.8314533438000002,
3.7411284498,
3.8166413018000003,
3.7991804358000003,
3.8416392738000003,
3.8782275878
]
},
{
"command": "pnpr@HEAD",
"mean": 2.2409733609,
"stddev": 0.14252745464278127,
"median": 2.2486159903000003,
"user": 2.43588778,
"system": 2.89023324,
"min": 2.0057364768,
"max": 2.4088174308,
"times": [
2.0677546318,
2.1810305598,
2.3460316358,
2.0057364768,
2.2187790908,
2.2784528898,
2.4088174308,
2.3722523228,
2.1343764828,
2.3965020878
]
},
{
"command": "pnpr@main",
"mean": 2.0699720256,
"stddev": 0.04253509728440881,
"median": 2.0578113103,
"user": 2.4587775800000005,
"system": 2.88151434,
"min": 2.0019535438,
"max": 2.1433301978,
"times": [
2.1322057968,
2.0414988228,
2.0019535438,
2.1433301978,
2.0847505768000003,
2.0828919178,
2.0561397278,
2.0476005178000003,
2.0594828928,
2.0498662618
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.11036898118,
"stddev": 0.014086728728168777,
"median": 1.11063490828,
"user": 1.1387017,
"system": 1.6702625199999996,
"min": 1.08754736878,
"max": 1.13602706878,
"times": [
1.10226977878,
1.11215172078,
1.11205886678,
1.09645549178,
1.13602706878,
1.10677012278,
1.11292018278,
1.12827826078,
1.08754736878,
1.10921094978
]
},
{
"command": "pacquet@main",
"mean": 1.10537820528,
"stddev": 0.029004939504132965,
"median": 1.10232510728,
"user": 1.0951728000000003,
"system": 1.6653851199999998,
"min": 1.07224366278,
"max": 1.17473428978,
"times": [
1.10359907678,
1.10105113778,
1.12360251478,
1.07456994378,
1.1065933027800001,
1.07224366278,
1.17473428978,
1.11058228478,
1.08866597978,
1.09813985978
]
},
{
"command": "pnpr@HEAD",
"mean": 0.7063753099800001,
"stddev": 0.047525500141388385,
"median": 0.6860948072800002,
"user": 0.36168429999999996,
"system": 1.2892371199999997,
"min": 0.66665698778,
"max": 0.8083251157800001,
"times": [
0.66665698778,
0.6874363897800001,
0.6763188087800001,
0.68163820578,
0.77491848478,
0.6847532247800001,
0.6895462267800001,
0.6763308667800001,
0.8083251157800001,
0.7178287887800001
]
},
{
"command": "pnpr@main",
"mean": 0.6767877331800001,
"stddev": 0.020605817660187126,
"median": 0.67321782428,
"user": 0.34930059999999996,
"system": 1.27334902,
"min": 0.6556094327800001,
"max": 0.7284178357800001,
"times": [
0.65709101378,
0.68065322478,
0.6693140967800001,
0.6556094327800001,
0.68198964078,
0.67297542478,
0.67346022378,
0.7284178357800001,
0.6837283417800001,
0.6646380967800001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.60247687606,
"stddev": 0.057721837306739236,
"median": 2.5891677067599996,
"user": 1.5882862999999998,
"system": 1.9192335999999997,
"min": 2.55203958376,
"max": 2.75054879676,
"times": [
2.62991769676,
2.55311189376,
2.56843771776,
2.59856146976,
2.60949909176,
2.57830927976,
2.60456928676,
2.55203958376,
2.57977394376,
2.75054879676
]
},
{
"command": "pacquet@main",
"mean": 2.6099503132599997,
"stddev": 0.04651493913614878,
"median": 2.5993050902599997,
"user": 1.5769389999999999,
"system": 1.9366208,
"min": 2.5618273727600003,
"max": 2.72125040976,
"times": [
2.64140912676,
2.59928008276,
2.5618273727600003,
2.59100339376,
2.5694300447600003,
2.61003748276,
2.57599976276,
2.59933009776,
2.62993535876,
2.72125040976
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6973549452600001,
"stddev": 0.0173488344384032,
"median": 0.6943608322600001,
"user": 0.3517784,
"system": 1.3159884999999998,
"min": 0.68015170776,
"max": 0.72602998576,
"times": [
0.6804322837600001,
0.70723613776,
0.68543033176,
0.6891286187600001,
0.7242964417600001,
0.6999881507600001,
0.68126274876,
0.72602998576,
0.69959304576,
0.68015170776
]
},
{
"command": "pnpr@main",
"mean": 0.6792177745600001,
"stddev": 0.012593377553497096,
"median": 0.67649290526,
"user": 0.34181690000000003,
"system": 1.2816205,
"min": 0.6650854057600001,
"max": 0.7063614957600001,
"times": [
0.7063614957600001,
0.69362059876,
0.66928350276,
0.6720608827600001,
0.6776422507600001,
0.67534355976,
0.66927244976,
0.68030179676,
0.6832058027600001,
0.6650854057600001
]
}
]
} |
|
| Branch | pr/12340 |
| Testbed | pacquet |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 3,848.43 ms(-55.65%)Baseline: 8,676.71 ms | 10,412.05 ms (36.96%) |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot 🚷 view threshold | 2,602.48 ms(-45.30%)Baseline: 4,758.12 ms | 5,709.75 ms (45.58%) |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 1,110.37 ms(-19.54%)Baseline: 1,380.07 ms | 1,656.08 ms (67.05%) |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 4,183.50 ms(-56.32%)Baseline: 9,576.71 ms | 11,492.05 ms (36.40%) |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 667.13 ms(+0.59%)Baseline: 663.23 ms | 795.87 ms (83.82%) |
|
| Branch | pr/12340 |
| 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,240.97 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 697.35 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 706.38 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,391.36 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 777.77 ms |
Code Review by Qodo
1. Snapshot registry map cloned
|
PR Summary by QodoFix scoped package routing via configured scoped registries WalkthroughsDescription• Parse scoped registry routes from .npmrc, pnpm-workspace.yaml, and --config.@scope:registry. • Thread resolved registry maps through resolution, install/add/update/outdated, snapshots, and .modules.yaml. • Add regression tests ensuring scoped packages use scoped registries and never hit default. Diagramgraph TD
NPMRC[".npmrc parser"] --> CFG["Config"] --> MAP["resolved_registries()"] --> PICK["Registry picker"] --> OPS["Pkg manager ops"] --> MOD[".modules.yaml"]
WS["pnpm-workspace.yaml"] --> CFG
CLI["CLI --config overrides"] --> CFG
High-Level AssessmentThe following are alternative approaches to this PR: 1. Centralize registry helpers in pacquet-config
2. Represent registry URLs as Url types in Config
Recommendation: The PR’s approach (store scoped routes on Config, expose a pnpm-shaped resolved_registries(), and reuse the existing pick_registry_for_package logic everywhere) is the right baseline: it keeps routing rules centralized and makes behavior consistent across commands and persistence. Consider a follow-up to deduplicate helper functions (scope key parsing and URL normalization) to avoid drift, but it’s reasonable to keep this PR focused on correctness plus regressions. File ChangesEnhancement (4)
Bug fix (9)
Tests (8)
Other (1)
|
Summary
Tests
Written by an agent (Codex, GPT-5).
Summary by CodeRabbit
Release Notes
New Features
@private). Scoped registry configuration is now recognized from configuration files, workspace settings, and CLI overrides, and is properly used during package operations including add, update, install, and outdated checks.Tests