Repository navigation
chore: remove decorative comment dividers - #13153
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Low impact] This comment-only cleanup appears safe to merge. Reviews (39) · Last reviewed commit: "chore: keep blank lines and named headin..." · Reviewed by Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
pnpm/crates/package-manifest/src/lib.rs (1)
447-463: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winRemove the unnecessary
Resultwrapper fromscript_if_present.
script_if_presentis infallible and only ever returnsOk. ReturningOption<&str>directly improves API ergonomics and avoids unnecessary?or.unwrap()calls at the call sites. As per Rust API Guidelines, methods that cannot fail should not returnResult.♻️ Proposed fix
- pub fn script(&self, command: &str) -> Result<&str, PackageManifestError> { - self.script_if_present(command)? - .ok_or_else(|| PackageManifestError::NoScript(command.to_string())) - } - - pub fn script_if_present(&self, command: &str) -> Result<Option<&str>, PackageManifestError> { - if let Some(script_str) = self - .value - .get("scripts") - .and_then(|scripts| scripts.get(command)) - .and_then(|script| script.as_str()) - { - return Ok(Some(script_str)); - } - - Ok(None) + pub fn script(&self, command: &str) -> Result<&str, PackageManifestError> { + self.script_if_present(command) + .ok_or_else(|| PackageManifestError::NoScript(command.to_string())) + } + + pub fn script_if_present(&self, command: &str) -> Option<&str> { + self.value + .get("scripts") + .and_then(|scripts| scripts.get(command)) + .and_then(|script| script.as_str()) }Apply the following downstream fix in
pnpm/crates/cli/src/cli_args/run/recursive.rs:- let Some(script) = manifest.script_if_present(script_name)? else { + let Some(script) = manifest.script_if_present(script_name) else {And in
pnpm/crates/package-manifest/src/tests.rs:- assert_eq!(manifest.script_if_present("invalid").unwrap(), None); + assert_eq!(manifest.script_if_present("invalid"), None);🤖 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/package-manifest/src/lib.rs` around lines 447 - 463, Change PackageManifest::script_if_present to return Option<&str> directly, removing the infallible Result wrapper while preserving its existing lookup behavior. Update PackageManifest::script to handle the direct Option when producing NoScript, and adjust callers such as the recursive run flow and tests to remove ? or unwrap usage.pnpm/crates/cli/src/cli_args/add.rs (3)
39-77: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winCritical:
--save-peeralone no longer impliesdevDependencies, contradicting docs and this PR's own tests.
save_dev()now returnsself.save_devverbatim, anddependency_groups()chains each flag independently with no cross-flag inference. Tracing all 8 cases inadd/tests.rsagainst this implementation: the "save_peer: truealone" case producesSome(vec![Peer]), but the test assertsSome(vec![Dev, Peer]). The field's own doc comment (line 33) and pnpm's documented--save-peerbehavior state that "Using --save-peer will add one or more packages to peerDependencies and install them as dev dependencies" — precisely the "conditional fallback behavior between prod/dev/optional/peer" the line-range summary says was removed. This will fail the updated unit test and silently drop the peer dependency fromdevDependencies(so it stops being materialized) whenever--save-peeris passed without--save-dev.🐛 Restore the peer→dev inference
/// Whether to add entry to `"devDependencies"`. fn save_dev(&self) -> bool { - self.save_dev + // `--save-peer` alone (no explicit --save-prod/--save-optional) + // also targets devDependencies, mirroring pnpm's + // peer-deps-are-installed-as-dev-deps default. + self.save_dev || (self.save_peer && !self.save_prod && !self.save_optional) }🤖 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/add.rs` around lines 39 - 77, Restore the peer-to-dev inference in AddArgs::save_dev and dependency_groups: when save_peer is enabled without save_prod, save_dev, or save_optional, include both DependencyGroup::Dev and DependencyGroup::Peer. Preserve explicit flag handling and existing ordering for all other combinations so the save_peer-only case returns Dev followed by Peer.
110-134: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
--virtual-store-dirshould only override config when passed
default_valueon thisOption<PathBuf>makes it populate even when the flag is omitted, soapply_cli_configalways replaces the loadedvirtual_store_dir. That silently drops a customvirtualStoreDirfrom.npmrc/pnpm-workspace.yamlonpnpm add. Remove the clap default and keep the config fallback, or only assign when the field isSome(...).🤖 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/add.rs` around lines 110 - 134, Update AddArgs::virtual_store_dir and apply_cli_config so an omitted --virtual-store-dir preserves the existing Config::virtual_store_dir value. Remove the Clap default or conditionally assign only when virtual_store_dir is Some, while retaining the provided CLI path override behavior.
294-321: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMerge config defaults into
run_globalpinning.pnpm add -gstill buildsPinnedVersionfrom CLI flags only here, so configuredsaveExact/savePrefixdefaults are ignored. Foldconfig.save_exactandconfig.save_prefixinto thePinnedVersion::from_save_options(...)call to matchrun()/run_selected().🤖 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/add.rs` around lines 294 - 321, Update run_global to pass config.save_exact and config.save_prefix into PinnedVersion::from_save_options alongside the CLI options, matching the default-merging behavior of run() and run_selected(). Preserve the existing global install flow and validation.
🧹 Nitpick comments (2)
pnpm/crates/cli/src/cli_args/add.rs (2)
63-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winStale doc:
dependency_groups()no longer returns "an iterator".The doc comment still describes the old iterator-based contract; the function now returns
Option<Vec<DependencyGroup>>withNonesignaling "no explicit flags". Worth updating for accuracy.🤖 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/add.rs` around lines 63 - 77, Update the documentation for dependency_groups() to describe its current Option<Vec<DependencyGroup>> return type, including that None indicates no explicit --save-* flags and Some contains the selected DependencyGroup values.
211-251: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate effective-pinned-version computation between
run()andrun_selected().The
effective_save_exact/effective_save_prefix/pinned_versionblock is copy-pasted verbatim. Extracting a small helper (e.g.fn effective_pinned_version(&self, config: &Config) -> PinnedVersion) would remove the duplication and prevent the two call sites drifting apart later.🤖 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/add.rs` around lines 211 - 251, Extract the duplicated effective pinned-version calculation from `run()` and `run_selected()` into a shared helper on the command type, such as `effective_pinned_version`, accepting the configuration and returning `PinnedVersion`. Replace both inline `effective_save_exact`, `effective_save_prefix`, and `PinnedVersion::from_save_options` blocks with calls to that helper, preserving CLI-over-config precedence.
🤖 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 `@pnpm/crates/config/src/defaults.rs`:
- Around line 11-18: Update expand_tilde so the remainder after the "~" prefix
trims both '/' and '\\' delimiters before passing it to home_dir.join,
preserving the home directory base for Windows-style paths while retaining
current behavior for Unix-style paths.
---
Outside diff comments:
In `@pnpm/crates/cli/src/cli_args/add.rs`:
- Around line 39-77: Restore the peer-to-dev inference in AddArgs::save_dev and
dependency_groups: when save_peer is enabled without save_prod, save_dev, or
save_optional, include both DependencyGroup::Dev and DependencyGroup::Peer.
Preserve explicit flag handling and existing ordering for all other combinations
so the save_peer-only case returns Dev followed by Peer.
- Around line 110-134: Update AddArgs::virtual_store_dir and apply_cli_config so
an omitted --virtual-store-dir preserves the existing Config::virtual_store_dir
value. Remove the Clap default or conditionally assign only when
virtual_store_dir is Some, while retaining the provided CLI path override
behavior.
- Around line 294-321: Update run_global to pass config.save_exact and
config.save_prefix into PinnedVersion::from_save_options alongside the CLI
options, matching the default-merging behavior of run() and run_selected().
Preserve the existing global install flow and validation.
In `@pnpm/crates/package-manifest/src/lib.rs`:
- Around line 447-463: Change PackageManifest::script_if_present to return
Option<&str> directly, removing the infallible Result wrapper while preserving
its existing lookup behavior. Update PackageManifest::script to handle the
direct Option when producing NoScript, and adjust callers such as the recursive
run flow and tests to remove ? or unwrap usage.
---
Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/add.rs`:
- Around line 63-77: Update the documentation for dependency_groups() to
describe its current Option<Vec<DependencyGroup>> return type, including that
None indicates no explicit --save-* flags and Some contains the selected
DependencyGroup values.
- Around line 211-251: Extract the duplicated effective pinned-version
calculation from `run()` and `run_selected()` into a shared helper on the
command type, such as `effective_pinned_version`, accepting the configuration
and returning `PinnedVersion`. Replace both inline `effective_save_exact`,
`effective_save_prefix`, and `PinnedVersion::from_save_options` blocks with
calls to that helper, preserving CLI-over-config precedence.
🪄 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: 45f14c61-b7d1-4d7f-9082-a7693df2b8e6
📒 Files selected for processing (46)
pnpm/crates/cli/src/cli_args/add.rspnpm/crates/cli/src/cli_args/add/tests.rspnpm/crates/cli/src/cli_args/config.rspnpm/crates/cli/src/cli_args/deploy.rspnpm/crates/cli/src/cli_args/dlx.rspnpm/crates/cli/src/cli_args/global.rspnpm/crates/cli/src/cli_args/run/recursive.rspnpm/crates/cli/src/cli_args/runtime.rspnpm/crates/cli/src/cli_args/self_update/install_pnpm.rspnpm/crates/cli/tests/stage.rspnpm/crates/config/src/defaults.rspnpm/crates/config/src/lib.rspnpm/crates/config/src/workspace_yaml.rspnpm/crates/lockfile/src/freshness/tests.rspnpm/crates/lockfile/src/pkg_name_suffix.rspnpm/crates/lockfile/src/project_snapshot.rspnpm/crates/lockfile/src/project_snapshot/tests.rspnpm/crates/lockfile/src/resolution/tests.rspnpm/crates/modules-yaml/src/lib.rspnpm/crates/package-manager/src/add.rspnpm/crates/package-manager/src/install/tests.rspnpm/crates/package-manager/src/install_frozen_lockfile.rspnpm/crates/package-manager/src/install_package_by_snapshot.rspnpm/crates/package-manager/src/install_package_from_registry.rspnpm/crates/package-manager/src/install_package_from_registry/tests.rspnpm/crates/package-manifest/src/lib.rspnpm/crates/package-manifest/src/tests.rspnpm/crates/registry/src/lib.rspnpm/crates/registry/src/package.rspnpm/crates/registry/src/package_version.rspnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rspnpm/crates/resolving-deps-resolver/src/tests.rspnpm/crates/store-dir/src/msgpackr_records/tests.rspnpm/crates/tarball/src/lib.rspnpm/crates/workspace-manifest-writer/src/edit.rspnpm11/config/reader/test/index.tspnpm11/deps/inspection/tree-builder/src/getTree.tspnpm11/installing/deps-installer/test/link.tspnpm11/installing/deps-installer/test/lockfile.tspnpm11/pnpm/bundle-deps.tspnpr/crates/pnpr/src/auth.rspnpr/crates/pnpr/src/config/tests.rspnpr/crates/pnpr/src/server.rspnpr/crates/pnpr/src/server/staged.rspnpr/crates/pnpr/src/server/tests.rspnpr/crates/pnpr/tests/server.rs
💤 Files with no reviewable changes (16)
- pnpm11/deps/inspection/tree-builder/src/getTree.ts
- pnpm/crates/cli/tests/stage.rs
- pnpm/crates/lockfile/src/resolution/tests.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rs
- pnpr/crates/pnpr/tests/server.rs
- pnpm/crates/workspace-manifest-writer/src/edit.rs
- pnpr/crates/pnpr/src/server/tests.rs
- pnpm/crates/lockfile/src/freshness/tests.rs
- pnpm11/config/reader/test/index.ts
- pnpm/crates/cli/src/cli_args/config.rs
- pnpr/crates/pnpr/src/server/staged.rs
- pnpm11/pnpm/bundle-deps.ts
- pnpr/crates/pnpr/src/server.rs
- pnpm11/installing/deps-installer/test/link.ts
- pnpm11/installing/deps-installer/test/lockfile.ts
- pnpr/crates/pnpr/src/auth.rs
3186798 to
a49055a
Compare
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Same-run syscall checkEach install runs 2 more times per revision, untimed, under
Integrated-Benchmark Report (Linux)Commit: Compared against main at: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked, injected, and Cargo workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4002682753799993,
"stddev": 0.12494151203949398,
"median": 2.34677278698,
"user": 1.9577007199999996,
"system": 1.37783454,
"min": 2.27850391848,
"max": 2.5706544124799997
},
{
"command": "pacquet@main",
"mean": 2.2739611104799997,
"stddev": 0.0507668855454791,
"median": 2.2504575844799994,
"user": 1.80473282,
"system": 1.34324054,
"min": 2.2341105134799997,
"max": 2.38196072048
},
{
"command": "pnpr@HEAD",
"mean": 1.4254687251800002,
"stddev": 0.11542130493395535,
"median": 1.38079816998,
"user": 1.7715897200000001,
"system": 1.2444973400000001,
"min": 1.28968547548,
"max": 1.59492240648
},
{
"command": "pnpr@main",
"mean": 1.4446600432799999,
"stddev": 0.1481605623214204,
"median": 1.42993943148,
"user": 1.7034745199999999,
"system": 1.30500814,
"min": 1.26432335648,
"max": 1.65741338248
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27867230848,
"stddev": 0.024583919213620326,
"median": 0.27884311648000004,
"user": 0.3618487,
"system": 0.6522435999999999,
"min": 0.24103123198,
"max": 0.32984787098
},
{
"command": "pacquet@main",
"mean": 0.27518778038,
"stddev": 0.00968856944154206,
"median": 0.27362654198,
"user": 0.33964229999999995,
"system": 0.6564498999999999,
"min": 0.26156447698,
"max": 0.29211254698
},
{
"command": "pnpr@HEAD",
"mean": 0.28676014608,
"stddev": 0.03524894634974839,
"median": 0.26747087948000003,
"user": 0.3534,
"system": 0.6611376999999999,
"min": 0.25648758398,
"max": 0.37280834898000004
},
{
"command": "pnpr@main",
"mean": 0.26905116308,
"stddev": 0.01756306497787029,
"median": 0.26773603498,
"user": 0.3368722,
"system": 0.5998211,
"min": 0.24666540798,
"max": 0.31017983098
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.016106657912941184,
"stddev": 0.001916108087061056,
"median": 0.01580595496,
"user": 0.009867950588235298,
"system": 0.0077034214117647085,
"min": 0.012680957460000001,
"max": 0.02259610346
},
{
"command": "pacquet@main",
"mean": 0.014230030368602155,
"stddev": 0.0016376456450364829,
"median": 0.01398085546,
"user": 0.009062904731182793,
"system": 0.006380448602150536,
"min": 0.01125829346,
"max": 0.01980647546
},
{
"command": "pnpr@HEAD",
"mean": 0.01367564213410714,
"stddev": 0.001320825668520995,
"median": 0.01353570846,
"user": 0.009152944285714285,
"system": 0.005718805357142857,
"min": 0.011250922460000002,
"max": 0.01798725146
},
{
"command": "pnpr@main",
"mean": 0.014201784081761655,
"stddev": 0.0014531390254335023,
"median": 0.014016220460000001,
"user": 0.009045228704663214,
"system": 0.006357825699481865,
"min": 0.01178154546,
"max": 0.01938945546
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.017152573587012984,
"stddev": 0.0012318561831905744,
"median": 0.017350467100000003,
"user": 0.010559406753246752,
"system": 0.008204374675324675,
"min": 0.013958441600000001,
"max": 0.0202189246
},
{
"command": "pacquet@main",
"mean": 0.01684009176993463,
"stddev": 0.0015847543606194638,
"median": 0.017005543600000003,
"user": 0.011351212287581703,
"system": 0.0070450457516339875,
"min": 0.012748914600000001,
"max": 0.022128449600000002
},
{
"command": "pnpr@HEAD",
"mean": 0.0159791427595092,
"stddev": 0.0014223033628417406,
"median": 0.0160267446,
"user": 0.010643706012269934,
"system": 0.006860550306748466,
"min": 0.012810504600000001,
"max": 0.0194697276
},
{
"command": "pnpr@main",
"mean": 0.014924834026829275,
"stddev": 0.0016570987733788441,
"median": 0.014642044600000001,
"user": 0.010212038048780493,
"system": 0.006080848780487804,
"min": 0.011282877600000001,
"max": 0.019096118600000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.61176808684,
"stddev": 0.10214820286465398,
"median": 2.58912606234,
"user": 3.2749057200000005,
"system": 2.0359887599999995,
"min": 2.47123003834,
"max": 2.85702751734
},
{
"command": "pacquet@main",
"mean": 2.58847518594,
"stddev": 0.11113048702316658,
"median": 2.5813082728400003,
"user": 3.25832062,
"system": 1.9449527599999996,
"min": 2.47270845434,
"max": 2.87317469234
},
{
"command": "pnpr@HEAD",
"mean": 1.68821980204,
"stddev": 0.08652961006516595,
"median": 1.68161104584,
"user": 2.6335846199999997,
"system": 2.0619662599999993,
"min": 1.5404769383399999,
"max": 1.83537517834
},
{
"command": "pnpr@main",
"mean": 1.6263686923399998,
"stddev": 0.09093664965523841,
"median": 1.6135931988399999,
"user": 2.55501912,
"system": 1.8038597600000004,
"min": 1.51803428734,
"max": 1.80947662234
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6810714748600001,
"stddev": 0.03567789508961129,
"median": 0.68336927266,
"user": 1.08107774,
"system": 1.1405051,
"min": 0.6326285906600001,
"max": 0.7406158756600001
},
{
"command": "pacquet@main",
"mean": 0.6730221500600002,
"stddev": 0.047067931321972394,
"median": 0.6834764616600001,
"user": 1.0694691400000003,
"system": 1.1216736999999999,
"min": 0.5977320716600001,
"max": 0.7252203016600001
},
{
"command": "pnpr@HEAD",
"mean": 0.37373432916000005,
"stddev": 0.020151818759214103,
"median": 0.36818318866,
"user": 0.38498074,
"system": 0.6692477,
"min": 0.34597737766000003,
"max": 0.40511136366
},
{
"command": "pnpr@main",
"mean": 0.34691397236,
"stddev": 0.018484351914803923,
"median": 0.35387025666,
"user": 0.34419764,
"system": 0.6424017,
"min": 0.32184244066,
"max": 0.37461152666
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.65208269148,
"stddev": 0.045113558665680294,
"median": 1.63632875878,
"user": 1.18423472,
"system": 1.0500171200000001,
"min": 1.61654472478,
"max": 1.7688925017800001
},
{
"command": "pacquet@main",
"mean": 1.66873518188,
"stddev": 0.055836610178653066,
"median": 1.6524940037800002,
"user": 1.21357682,
"system": 1.08343562,
"min": 1.6172381667800002,
"max": 1.81423531478
},
{
"command": "pnpr@HEAD",
"mean": 0.35871536458,
"stddev": 0.020083586012130773,
"median": 0.36166134228,
"user": 0.35935881999999997,
"system": 0.67315152,
"min": 0.33543075978000003,
"max": 0.39076084878
},
{
"command": "pnpr@main",
"mean": 0.34253221018,
"stddev": 0.010844392633786313,
"median": 0.34128539778,
"user": 0.31499011999999993,
"system": 0.68034032,
"min": 0.31935396278,
"max": 0.35905828978000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.33477483772000005,
"stddev": 0.02375458131924624,
"median": 0.33370374992000007,
"user": 0.36134769999999994,
"system": 0.2186521,
"min": 0.29773966492000004,
"max": 0.36574036292000006
},
{
"command": "pacquet@main",
"mean": 0.33111192232000003,
"stddev": 0.021157440118431407,
"median": 0.32738794692000006,
"user": 0.3758498,
"system": 0.22096869999999996,
"min": 0.30719732992000004,
"max": 0.36913074392000006
},
{
"command": "pnpr@HEAD",
"mean": 0.11762052780000001,
"stddev": 0.006982563696832115,
"median": 0.11773179292000001,
"user": 0.05748371999999998,
"system": 0.027134739999999997,
"min": 0.10216229392000001,
"max": 0.13235855092
},
{
"command": "pnpr@main",
"mean": 0.11564993752869565,
"stddev": 0.004551122215900509,
"median": 0.11619631192000002,
"user": 0.0606733652173913,
"system": 0.022198752173913042,
"min": 0.10800113692000002,
"max": 0.12311424592000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.33600016849333336,
"stddev": 0.022947343227651903,
"median": 0.33304681216,
"user": 0.38157678222222224,
"system": 0.059143682222222216,
"min": 0.30912999316,
"max": 0.36920240416
},
{
"command": "pacquet@main",
"mean": 0.31428585416000004,
"stddev": 0.034001948522429846,
"median": 0.31554453516000003,
"user": 0.3608112266666667,
"system": 0.05329912666666666,
"min": 0.26476802816,
"max": 0.38380120916
},
{
"command": "pnpm@HEAD",
"mean": 4.942587011937778,
"stddev": 0.23154161596135564,
"median": 4.89631157716,
"user": 7.698496448888887,
"system": 0.44972523777777773,
"min": 4.6210429161599995,
"max": 5.39665074916
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.10662911068000001,
"stddev": 0.011094133229083437,
"median": 0.10655815628000001,
"user": 0.11056066666666667,
"system": 0.049834739999999995,
"min": 0.08947444578000001,
"max": 0.13148670878
},
{
"command": "pacquet@main",
"mean": 0.10511374555419356,
"stddev": 0.01192870879755359,
"median": 0.10340222978000001,
"user": 0.11028064193548388,
"system": 0.04647668193548386,
"min": 0.08529330478000001,
"max": 0.12780444078
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.13849350483619047,
"stddev": 0.010468678526900803,
"median": 0.13988508036,
"user": 0.05579646190476191,
"system": 0.09631810761904762,
"min": 0.11369178136000001,
"max": 0.15424096436
},
{
"command": "pacquet@main",
"mean": 0.1357533708817391,
"stddev": 0.010391232061914462,
"median": 0.13797014036000002,
"user": 0.05439174347826086,
"system": 0.09549245130434784,
"min": 0.11685402436,
"max": 0.15317548236
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.802817210980001,
"stddev": 0.13236729297717068,
"median": 4.811634911880001,
"user": 2.82572926,
"system": 1.85977112,
"min": 4.56845671438,
"max": 5.05128222738
},
{
"command": "pacquet@main",
"mean": 4.78083545418,
"stddev": 0.15416201799482354,
"median": 4.82583603538,
"user": 2.81330446,
"system": 1.84391162,
"min": 4.54040927838,
"max": 5.02797792938
},
{
"command": "pnpr@HEAD",
"mean": 3.5615447129800004,
"stddev": 0.05742968224418215,
"median": 3.54047351588,
"user": 2.57986306,
"system": 1.70706852,
"min": 3.49858648038,
"max": 3.6813296393800004
},
{
"command": "pnpr@main",
"mean": 3.6837027148800003,
"stddev": 0.15329468525891307,
"median": 3.6229818593800003,
"user": 2.67453246,
"system": 1.81564832,
"min": 3.51397135638,
"max": 3.91707723838
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.15100685498,
"stddev": 0.010399348058432992,
"median": 0.15033878198,
"user": 0.20779397777777778,
"system": 0.16317096222222222,
"min": 0.13867095148,
"max": 0.17977070948
},
{
"command": "pacquet@main",
"mean": 0.15488880001333336,
"stddev": 0.011154117716540754,
"median": 0.15384028448,
"user": 0.21336303333333329,
"system": 0.15907717333333335,
"min": 0.13838164148,
"max": 0.18557892148
},
{
"command": "pnpr@HEAD",
"mean": 0.16179415273000003,
"stddev": 0.008898258155901562,
"median": 0.16184031048,
"user": 0.218624575,
"system": 0.15507655249999996,
"min": 0.14819813248,
"max": 0.18586399248000002
},
{
"command": "pnpr@main",
"mean": 0.16158818990857143,
"stddev": 0.01199888327731854,
"median": 0.15826836398,
"user": 0.2146834857142857,
"system": 0.15996316857142853,
"min": 0.14623242848,
"max": 0.18625157348000002
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.1904335020799999,
"stddev": 0.04423136676845895,
"median": 1.17903154578,
"user": 0.69902462,
"system": 0.27637948,
"min": 1.15150373978,
"max": 1.27038818178
},
{
"command": "pacquet@main",
"mean": 1.20925123158,
"stddev": 0.05831812986150729,
"median": 1.19530730878,
"user": 0.80948952,
"system": 0.30142867999999995,
"min": 1.15012503678,
"max": 1.36628650278
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.05261709326727274,
"stddev": 0.004021482834445056,
"median": 0.05292800254,
"user": 0.040119447272727295,
"system": 0.028902825454545446,
"min": 0.04048228154,
"max": 0.06418311454
},
{
"command": "pacquet@main",
"mean": 0.05270383336978726,
"stddev": 0.005569370716915041,
"median": 0.05209771254,
"user": 0.04086871999999999,
"system": 0.028128050212765952,
"min": 0.04287828454,
"max": 0.06263621154000001
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13153 |
| 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) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 163.74 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,372.90 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 259.43 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 261.99 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 92.63 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,289.34 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,362.70 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 225.48 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 5.53 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 5.29 ms |
dd72bc6 to
ad0ba3e
Compare
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pnpm/crates/lockfile/src/freshness.rs (1)
568-574: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCorrect the map type in the docstring.
The docstring mentions
BTreeMapbut the actual signature andProjectSnapshotfield useHashMap.📝 Proposed fix for the docstring
/// or both contain the same entries. The importer side is a typed -/// `BTreeMap<String, DependencyMeta>` while the manifest side is raw +/// `HashMap<String, DependencyMeta>` while the manifest side is raw /// JSON from `package.json`. fn dependencies_meta_equal(🤖 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/lockfile/src/freshness.rs` around lines 568 - 574, Update the documentation for dependencies_meta_equal to describe the importer side as a HashMap<String, DependencyMeta> instead of a BTreeMap, matching the function signature and ProjectSnapshot field; leave the implementation unchanged.
🤖 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 `@pnpm/crates/package-manager/src/dependencies_graph_to_lockfile.rs`:
- Around line 318-330: Update the dependencies_meta construction chain to
discard the collected map when it is empty, returning None instead. Apply this
after the collect in the dependenciesMeta parsing expression, while preserving
populated maps and the existing injected/patch filtering behavior.
---
Nitpick comments:
In `@pnpm/crates/lockfile/src/freshness.rs`:
- Around line 568-574: Update the documentation for dependencies_meta_equal to
describe the importer side as a HashMap<String, DependencyMeta> instead of a
BTreeMap, matching the function signature and ProjectSnapshot field; leave the
implementation unchanged.
🪄 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: 372ade25-9695-4a52-a6a8-adf69241a8ee
📒 Files selected for processing (66)
pnpm/crates/cli/src/cli_args/add.rspnpm/crates/cli/src/cli_args/config.rspnpm/crates/cli/src/cli_args/config/tests.rspnpm/crates/cli/src/cli_args/deploy.rspnpm/crates/cli/src/cli_args/global.rspnpm/crates/cli/src/cli_args/run/recursive.rspnpm/crates/cli/tests/hoisted_node_linker.rspnpm/crates/cli/tests/lifecycle_scripts.rspnpm/crates/cli/tests/stage.rspnpm/crates/config/src/defaults.rspnpm/crates/config/src/lib.rspnpm/crates/config/src/npmrc_auth/tests.rspnpm/crates/config/src/workspace_yaml.rspnpm/crates/default-reporter/src/state.rspnpm/crates/global/src/list.rspnpm/crates/hooks/tests/node_hooks.rspnpm/crates/lockfile/src/freshness.rspnpm/crates/lockfile/src/freshness/tests.rspnpm/crates/lockfile/src/pkg_name_suffix.rspnpm/crates/lockfile/src/project_snapshot.rspnpm/crates/lockfile/src/project_snapshot/tests.rspnpm/crates/lockfile/src/resolution/tests.rspnpm/crates/modules-yaml/src/lib.rspnpm/crates/network/src/tests.rspnpm/crates/network/src/tls/tests.rspnpm/crates/package-manager/src/add.rspnpm/crates/package-manager/src/build_modules/tests.rspnpm/crates/package-manager/src/dependencies_graph_to_lockfile.rspnpm/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rspnpm/crates/package-manager/src/hoisted_dep_graph/tests.rspnpm/crates/package-manager/src/install.rspnpm/crates/package-manager/src/install/tests.rspnpm/crates/package-manager/src/install_frozen_lockfile.rspnpm/crates/package-manager/src/install_frozen_lockfile/tests.rspnpm/crates/package-manager/src/install_package_by_snapshot.rspnpm/crates/package-manager/src/install_package_from_registry.rspnpm/crates/package-manager/src/install_package_from_registry/tests.rspnpm/crates/package-manifest/src/lib.rspnpm/crates/package-manifest/src/tests.rspnpm/crates/registry/src/lib.rspnpm/crates/registry/src/package.rspnpm/crates/registry/src/package_version.rspnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rspnpm/crates/resolving-deps-resolver/src/tests.rspnpm/crates/store-dir/src/msgpackr_records/tests.rspnpm/crates/tarball/src/lib.rspnpm/crates/workspace-manifest-writer/src/edit.rspnpm/crates/workspace-manifest-writer/src/tests.rspnpm11/config/reader/src/Config.tspnpm11/config/reader/test/index.tspnpm11/deps/inspection/tree-builder/src/getTree.tspnpm11/installing/deps-installer/test/link.tspnpm11/installing/deps-installer/test/lockfile.tspnpm11/pnpm/bundle-deps.tspnpm11/pnpm/test/deploy.tspnpm11/pnpm/test/install/global.tspnpm11/pnpm/test/install/sideEffects.tspnpm11/pnpm/test/recursive/update.tspnpr/crates/pnpr/src/auth.rspnpr/crates/pnpr/src/config/tests.rspnpr/crates/pnpr/src/registry/tests.rspnpr/crates/pnpr/src/server.rspnpr/crates/pnpr/src/server/staged.rspnpr/crates/pnpr/src/server/tests.rspnpr/crates/pnpr/src/storage.rspnpr/crates/pnpr/tests/server.rs
💤 Files with no reviewable changes (27)
- pnpr/crates/pnpr/src/server/staged.rs
- pnpm/crates/workspace-manifest-writer/src/tests.rs
- pnpm/crates/hooks/tests/node_hooks.rs
- pnpm/crates/global/src/list.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_importer/tests.rs
- pnpm/crates/cli/tests/stage.rs
- pnpm11/installing/deps-installer/test/link.ts
- pnpr/crates/pnpr/src/server/tests.rs
- pnpm/crates/package-manager/src/install_frozen_lockfile/tests.rs
- pnpr/crates/pnpr/src/registry/tests.rs
- pnpm/crates/resolving-deps-resolver/src/tests.rs
- pnpm11/pnpm/bundle-deps.ts
- pnpr/crates/pnpr/tests/server.rs
- pnpr/crates/pnpr/src/auth.rs
- pnpm11/pnpm/test/deploy.ts
- pnpm/crates/workspace-manifest-writer/src/edit.rs
- pnpm/crates/lockfile/src/freshness/tests.rs
- pnpm/crates/network/src/tls/tests.rs
- pnpm/crates/package-manager/src/hoisted_dep_graph/tests.rs
- pnpm/crates/lockfile/src/resolution/tests.rs
- pnpm11/pnpm/test/install/global.ts
- pnpr/crates/pnpr/src/storage.rs
- pnpr/crates/pnpr/src/server.rs
- pnpm11/installing/deps-installer/test/lockfile.ts
- pnpm/crates/cli/src/cli_args/config.rs
- pnpm11/deps/inspection/tree-builder/src/getTree.ts
- pnpm/crates/config/src/npmrc_auth/tests.rs
🚧 Files skipped from review as they are similar to previous changes (20)
- pnpm/crates/lockfile/src/project_snapshot/tests.rs
- pnpm/crates/cli/src/cli_args/run/recursive.rs
- pnpm/crates/store-dir/src/msgpackr_records/tests.rs
- pnpm/crates/registry/src/package_version.rs
- pnpm/crates/package-manager/src/install_package_from_registry.rs
- pnpm/crates/package-manager/src/install_package_from_registry/tests.rs
- pnpm/crates/tarball/src/lib.rs
- pnpm/crates/package-manager/src/install_package_by_snapshot.rs
- pnpm11/config/reader/test/index.ts
- pnpm/crates/cli/src/cli_args/deploy.rs
- pnpm/crates/config/src/defaults.rs
- pnpm/crates/lockfile/src/pkg_name_suffix.rs
- pnpm/crates/cli/src/cli_args/global.rs
- pnpm/crates/config/src/lib.rs
- pnpr/crates/pnpr/src/config/tests.rs
- pnpm/crates/package-manager/src/install_frozen_lockfile.rs
- pnpm/crates/package-manager/src/install/tests.rs
- pnpm/crates/package-manifest/src/tests.rs
- pnpm/crates/package-manifest/src/lib.rs
- pnpm/crates/config/src/workspace_yaml.rs
8977f2e to
68534ed
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
No new runtime behavior recordedGarnet runs in 1 of 19 TS CI / Test / ubuntu (24.0.0, 2) / Node 24 / chunk 2/3 · −1
How to read thisbash › curl ← ancestry as captured, then the process that acted └─ example[.]com ← what it reached Recorded by Garnet · Add it to your CI ↗ |
Comments Outside DiffThese findings could not be posted inline.
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Removing them makes @stylistic/indent misread the type alias above the first section comment, so the lint fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Removing a divider also removed the blank line before some section comments, leaving them attached to the preceding item. Restore those blank lines and the section names that the divider-only headings carried. In getTree.ts the dividers can go once the blank line before the comment stays, so drop them there as well. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Code review by qodo was updated up to the latest commit ebf0a4c |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
@coderabbitai review Written by an agent (Claude Code, claude-opus-5-5). |
Action performed
|
|
Status after the review-and-fix pass on ebf0a4c:
Review status on ebf0a4c: Qodo found no issues, Greptile rated it 5/5 with no findings, and CodeRabbit generated no actionable comments. CI is green, with 73 checks passing and 2 skipped. Greptile's older "Comments Outside Diff" entries refer to Written by an agent (Claude Code, claude-opus-5-5). |
Summary
Remove decorative comment dividers (
// ------,// ===== … =====,// ----- … -----) from Rust and TypeScript sources. Section comments that carry a name are kept as plain comments, with the blank line before them preserved. The diff touches comments only and changes no runtime behavior.Squash Commit Body
Checklist
Written by an agent (Codex, GPT-6). Updated by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit