Repository navigation
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 (4)
📝 WalkthroughWalkthroughSelf-update and ChangesWorkspace isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Assessment against linked issues
Out-of-scope changes
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ 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 |
PR Summary by QodoFix self-update/dlx by anchoring installs to their own directories
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains. Reviews (3): Last reviewed commit: "test(self-update): pin leftover recovery..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
pnpm/crates/cli/src/cli_args/dlx.rs (1)
296-304: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the current workspace-isolation invariant.
Both comments should explain that each throwaway installation sets
workspace_dirto its own install directory to prevent ambient workspace discovery. Remove historical descriptions of the prior failure.
pnpm/crates/cli/src/cli_args/dlx.rs#L296-L304: reduce the comment to the dlx prepare-directory isolation invariant.pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs#L256-L265: reduce the comment to the engine install-directory isolation invariant.As per coding guidelines, comments must describe current behavior rather than historical implementation details.
🤖 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/dlx.rs` around lines 296 - 304, Update the comments at pnpm/crates/cli/src/cli_args/dlx.rs:296-304 and pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs:256-265 to describe only the current workspace-isolation invariant: each throwaway installation sets workspace_dir to its own prepare or install directory to prevent ambient workspace discovery. Remove historical failure details and references to prior issues; the code at both sites requires no change.Sources: Coding guidelines, Path instructions
.changeset/self-update-ignores-ambient-workspace.md (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCondense this changeset to the user-visible fix.
The details about persisted
allowBuilds, workspace anchoring, and discovery are implementation rationale. State thatpnpm self-updateandpnpm dlxno longer fail when an ancestor directory containspnpm-workspace.yaml.As per path instructions, changeset prose must describe user-visible behavior concisely.
🤖 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 @.changeset/self-update-ignores-ambient-workspace.md at line 5, Condense the changeset to state only the user-visible fix: pnpm self-update and pnpm dlx no longer fail when an ancestor directory contains pnpm-workspace.yaml. Remove implementation details about allowBuilds persistence, workspace anchoring, and discovery.Sources: Coding guidelines, Path instructions, Learnings
🤖 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/cli/src/cli_args/self_update/install_pnpm/tests.rs`:
- Around line 23-57: Extend
run_install_ignores_an_ambient_workspace_manifest_above_the_install_dir to
prepopulate install_dir with corrupted partial-install leftovers, then rerun
run_install without manual cleanup and assert package_dir contains the wrapper
package afterward. Preserve the ambient workspace manifest setup and verify
recovery completes successfully with the package installed under install_dir.
In `@pnpm/crates/cli/tests/dlx.rs`:
- Around line 108-124: The test
dlx_ignores_an_ambient_workspace_manifest_above_the_cache_dir only covers Unix
and verifies execution in the caller workspace, not the installation location.
Make the regression coverage portable or add a Windows-specific equivalent,
assert that the package manifest is installed beneath the dlx cache prepare
directory, and retain the assertion that the bin executes from the process
working directory.
---
Nitpick comments:
In @.changeset/self-update-ignores-ambient-workspace.md:
- Line 5: Condense the changeset to state only the user-visible fix: pnpm
self-update and pnpm dlx no longer fail when an ancestor directory contains
pnpm-workspace.yaml. Remove implementation details about allowBuilds
persistence, workspace anchoring, and discovery.
In `@pnpm/crates/cli/src/cli_args/dlx.rs`:
- Around line 296-304: Update the comments at
pnpm/crates/cli/src/cli_args/dlx.rs:296-304 and
pnpm/crates/cli/src/cli_args/self_update/install_pnpm.rs:256-265 to describe
only the current workspace-isolation invariant: each throwaway installation sets
workspace_dir to its own prepare or install directory to prevent ambient
workspace discovery. Remove historical failure details and references to prior
issues; the code at both sites requires no change.
🪄 Autofix
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: d2bb4316-2405-40d9-922f-fd8f368780d8
📒 Files selected for processing (5)
.changeset/self-update-ignores-ambient-workspace.mdpnpm/crates/cli/src/cli_args/dlx.rspnpm/crates/cli/src/cli_args/self_update/install_pnpm.rspnpm/crates/cli/src/cli_args/self_update/install_pnpm/tests.rspnpm/crates/cli/tests/dlx.rs
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Review follow-up for #13709: trim the anchoring comments to a pointer at the shared rationale in cli_args::global, plant the pre-fix leftovers (stray node_modules and a lockfile at the adopted workspace root) in the run_install regression test and assert the global dir's lockfile survives untouched, and assert the dlx package lands under the cache prepare dir. Co-Authored-By: Claude Fable 5 <[email protected]>
…nstall dirs With workspace_dir unset, the install pipeline discovers a workspace by walking up from the manifest dir. The self-update engine dir sits under the global packages dir, which carries a pnpm-workspace.yaml of global settings once a global allowBuilds decision has been persisted; adopting it as the workspace root laid the engine out as a workspace sub-importer and the wrapper never landed in the install dir. The dlx cache install had the same exposure from a stray workspace file above the cache dir. Closes #13697. Co-Authored-By: Claude Fable 5 <[email protected]>
Review follow-up for #13709: trim the anchoring comments to a pointer at the shared rationale in cli_args::global, plant the pre-fix leftovers (stray node_modules and a lockfile at the adopted workspace root) in the run_install regression test and assert the global dir's lockfile survives untouched, and assert the dlx package lands under the cache prepare dir. Co-Authored-By: Claude Fable 5 <[email protected]>
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 760c68d |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13709 +/- ##
=======================================
Coverage 88.19% 88.19%
=======================================
Files 615 615
Lines 99955 99980 +25
=======================================
+ Hits 88157 88180 +23
- Misses 11798 11800 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7542755622199997,
"stddev": 0.1673473290827785,
"median": 2.7291953379200002,
"user": 2.445977079999999,
"system": 1.90693736,
"min": 2.53438255692,
"max": 3.04073809492,
"times": [
2.57528483892,
2.53438255692,
3.04073809492,
2.91491806492,
2.77944811992,
2.82877773992,
2.67196380092,
2.90932766792,
2.60897218192,
2.67894255592
]
},
{
"command": "pacquet@main",
"mean": 2.9643236417200005,
"stddev": 0.2004700948596258,
"median": 3.0242971139200003,
"user": 2.8698578799999996,
"system": 2.23027526,
"min": 2.6723686309200003,
"max": 3.30284088692,
"times": [
3.05106407192,
3.16803473892,
3.03127914592,
2.6723686309200003,
2.73857831792,
3.30284088692,
2.82733628992,
3.04247631092,
3.01731508192,
2.79194294192
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6180455631199997,
"stddev": 0.13754455502170743,
"median": 1.60037318942,
"user": 1.63545048,
"system": 1.6488646599999999,
"min": 1.4025534559200001,
"max": 1.86516845792,
"times": [
1.5582766669199999,
1.55283590092,
1.64246971192,
1.55809928392,
1.6582639859200001,
1.47208098792,
1.86516845792,
1.7475954579200002,
1.4025534559200001,
1.72311172192
]
},
{
"command": "pnpr@main",
"mean": 1.5576545446200003,
"stddev": 0.16378091660614974,
"median": 1.5191710729199999,
"user": 1.3457983799999995,
"system": 1.34165946,
"min": 1.37805845692,
"max": 1.8363851319200002,
"times": [
1.73536914892,
1.7608410819200002,
1.40976518092,
1.8363851319200002,
1.45209000692,
1.55648697092,
1.53634549292,
1.50199665292,
1.37805845692,
1.40920732192
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27587135722,
"stddev": 0.009818179728282833,
"median": 0.27531283572,
"user": 0.22394974000000004,
"system": 0.5459796199999999,
"min": 0.25848248172,
"max": 0.29566552772,
"times": [
0.25848248172,
0.27106088972000003,
0.27603593972,
0.27252760672,
0.27785453672,
0.26837971172,
0.29566552772,
0.28143577772,
0.27458973172,
0.28268136872
]
},
{
"command": "pacquet@main",
"mean": 0.27268265302,
"stddev": 0.005942511290893002,
"median": 0.27349434372000003,
"user": 0.22787593999999997,
"system": 0.5562033199999998,
"min": 0.26419789272,
"max": 0.28431682072000003,
"times": [
0.26548097472,
0.27131374672,
0.27528314472,
0.26758307472,
0.27256142072,
0.27656793872,
0.26419789272,
0.28431682072000003,
0.27509424972,
0.27442726672
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28889160912000006,
"stddev": 0.01069518287014173,
"median": 0.28724942722,
"user": 0.22145343999999997,
"system": 0.5727272199999999,
"min": 0.27557681572,
"max": 0.31310443972,
"times": [
0.29545306772,
0.28344558472000003,
0.29032545372,
0.27557681572,
0.28417340072,
0.27980833972,
0.29381230472000003,
0.31310443972,
0.28152097672,
0.29169570772000003
]
},
{
"command": "pnpr@main",
"mean": 0.28998653182,
"stddev": 0.012884366292950769,
"median": 0.28676516671999996,
"user": 0.22610413999999998,
"system": 0.5662205199999999,
"min": 0.27851378672,
"max": 0.32067717072,
"times": [
0.32067717072,
0.28348514772,
0.29004518572,
0.27851378672,
0.28281175272000003,
0.30086611072,
0.27876549972000003,
0.29247849872,
0.28130228572,
0.29091987972
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7008195750599997,
"stddev": 0.06478805863317316,
"median": 2.70781008306,
"user": 1.8608642399999997,
"system": 1.51710086,
"min": 2.59761012406,
"max": 2.81729388806,
"times": [
2.64714943806,
2.63895890706,
2.71389464706,
2.81729388806,
2.76613609206,
2.71722162006,
2.73668449606,
2.67152101906,
2.70172551906,
2.59761012406
]
},
{
"command": "pacquet@main",
"mean": 2.67916577656,
"stddev": 0.026135968126892818,
"median": 2.66947732756,
"user": 1.7790321399999995,
"system": 1.45745016,
"min": 2.65546675906,
"max": 2.72717480406,
"times": [
2.68590124206,
2.71841972106,
2.66575196706,
2.65557884006,
2.65745216006,
2.66159108706,
2.67320268806,
2.65546675906,
2.72717480406,
2.69111849706
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6888870820600002,
"stddev": 0.12358432376733504,
"median": 1.70929680006,
"user": 1.43506884,
"system": 1.6118712599999998,
"min": 1.49288172806,
"max": 1.8381366900600002,
"times": [
1.49288172806,
1.80993098706,
1.54143612406,
1.64726660406,
1.7899173140600002,
1.7804432440600002,
1.62314702706,
1.8381366900600002,
1.5943841060600001,
1.77132699606
]
},
{
"command": "pnpr@main",
"mean": 1.69832953216,
"stddev": 0.11848743506068045,
"median": 1.70722064956,
"user": 1.6326994399999997,
"system": 1.82798716,
"min": 1.5355210400600001,
"max": 1.8839961340600002,
"times": [
1.5543811660600002,
1.6221163610600002,
1.66959626906,
1.74484503006,
1.75147648906,
1.5355210400600001,
1.8839961340600002,
1.6136468380600002,
1.84621136306,
1.7615046310600002
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6465867482200001,
"stddev": 0.07499164677588938,
"median": 0.62984135622,
"user": 0.8619967799999999,
"system": 0.99686928,
"min": 0.54041933472,
"max": 0.78767768772,
"times": [
0.78767768772,
0.54041933472,
0.59677578072,
0.6721126067200001,
0.6081666627200001,
0.57626369172,
0.64680138172,
0.6128813307200001,
0.71896566772,
0.70580333772
]
},
{
"command": "pacquet@main",
"mean": 0.5746218116199999,
"stddev": 0.06960487692025763,
"median": 0.55781091622,
"user": 0.7838784799999998,
"system": 0.89487278,
"min": 0.49875818972,
"max": 0.67941352572,
"times": [
0.55478392472,
0.55968237672,
0.65626184572,
0.66770675972,
0.67941352572,
0.50214376072,
0.55593945572,
0.50186435572,
0.56966392172,
0.49875818972
]
},
{
"command": "pnpr@HEAD",
"mean": 0.39510668902,
"stddev": 0.03569413132009808,
"median": 0.39174543872,
"user": 0.28172787999999993,
"system": 0.67159178,
"min": 0.33591212572,
"max": 0.46019376272,
"times": [
0.38443351172,
0.46019376272,
0.40167152772000003,
0.39820954472000003,
0.43580867672,
0.41245684272,
0.37543884172,
0.33591212572,
0.38528133272000004,
0.36166072372
]
},
{
"command": "pnpr@main",
"mean": 0.38105713191999996,
"stddev": 0.03269122422804713,
"median": 0.38018340522000005,
"user": 0.26405537999999995,
"system": 0.67312598,
"min": 0.32720926472,
"max": 0.42037218372,
"times": [
0.40449748872,
0.42037218372,
0.41201828872,
0.41923656072000004,
0.35515679372000003,
0.39147512072,
0.35809414272,
0.36889168972,
0.32720926472,
0.35361978572
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8833208410200002,
"stddev": 0.025841848517587536,
"median": 1.8804684416200002,
"user": 1.10233476,
"system": 0.8932661799999998,
"min": 1.8502709536200002,
"max": 1.9271947186200002,
"times": [
1.8876064086200002,
1.8622014756200003,
1.9271947186200002,
1.90932007462,
1.8896692426200001,
1.8733304746200001,
1.90856587462,
1.8727777646200001,
1.85227142262,
1.8502709536200002
]
},
{
"command": "pacquet@main",
"mean": 1.8399310578199999,
"stddev": 0.0649160864192307,
"median": 1.84882816412,
"user": 0.9932033599999999,
"system": 0.88666318,
"min": 1.71728569962,
"max": 1.92826208762,
"times": [
1.87046122162,
1.92826208762,
1.8074576606200001,
1.71728569962,
1.7796922906200001,
1.8922444926200002,
1.8759293056200002,
1.8001235796200001,
1.9006591336200003,
1.82719510662
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33878374112,
"stddev": 0.02206479899421999,
"median": 0.34254157912000005,
"user": 0.22777105999999997,
"system": 0.59813328,
"min": 0.30190492862,
"max": 0.37183098762000005,
"times": [
0.34911824162000005,
0.30755680962000004,
0.30190492862,
0.32629311362,
0.36204654262,
0.37183098762000005,
0.34760883462000003,
0.33814828962000004,
0.33639479462000005,
0.34693486862
]
},
{
"command": "pnpr@main",
"mean": 0.34308687332000004,
"stddev": 0.015091410423266617,
"median": 0.34203292312,
"user": 0.24166475999999998,
"system": 0.58728788,
"min": 0.32166080062,
"max": 0.37574820762000005,
"times": [
0.33652218362,
0.32166080062,
0.34695058762000003,
0.34362899762000004,
0.35624138462000005,
0.34667073262000003,
0.37574820762000005,
0.33298579762,
0.34043684862,
0.33002319262
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2737643278171428,
"stddev": 0.030963573441352404,
"median": 0.28025584296,
"user": 0.23111685999999998,
"system": 0.09242030285714287,
"min": 0.20590047746000004,
"max": 0.31995061346,
"times": [
0.20590047746000004,
0.24291499546000003,
0.24897821846000004,
0.29466478146,
0.27854797946,
0.24587839346000004,
0.30404470646,
0.31995061346,
0.30792913546,
0.28196370646,
0.25641666346,
0.28908186246,
0.28809050946,
0.26833854646
]
},
{
"command": "pacquet@main",
"mean": 0.26303703456000005,
"stddev": 0.0187628772284895,
"median": 0.25972500645999996,
"user": 0.22997555999999997,
"system": 0.08460166,
"min": 0.24255755546000002,
"max": 0.30239242146,
"times": [
0.27134309046,
0.25493789646,
0.24722815046000002,
0.26451211646,
0.28129362846,
0.24255755546000002,
0.26952830046,
0.24706417146000004,
0.24951301446000004,
0.30239242146
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09527536321862069,
"stddev": 0.003830745091374175,
"median": 0.09444049846000001,
"user": 0.02473986,
"system": 0.012240108275862069,
"min": 0.09010936046000001,
"max": 0.10485257246,
"times": [
0.09550845346,
0.09253580946000001,
0.09207534346,
0.09711162646,
0.09385055946000001,
0.09307272646,
0.09645000446,
0.09194915646,
0.10149099646000001,
0.09029198246,
0.09297425246,
0.10485257246,
0.09695001246,
0.09259943946,
0.09544284046000001,
0.10151043146000001,
0.09302374546,
0.10091977246,
0.09522099346,
0.09444049846000001,
0.09874276046000001,
0.09482635346,
0.09205958346000001,
0.09880346446,
0.09188391446000001,
0.10004536846,
0.09406621446,
0.09017729646,
0.09010936046000001
]
},
{
"command": "pnpr@main",
"mean": 0.09558618746000001,
"stddev": 0.003915827073702003,
"median": 0.09475553946000001,
"user": 0.02587166,
"system": 0.01191066,
"min": 0.09031123846,
"max": 0.10493372446,
"times": [
0.09184330746000001,
0.09055282346,
0.09031123846,
0.09229294146,
0.09347745746000001,
0.09098082646000001,
0.09185550046,
0.09267811546,
0.09324589246000001,
0.09564071246,
0.09446319946000001,
0.09586341146,
0.09502619846,
0.09350661346,
0.09599707246,
0.09432321746000001,
0.09733892346,
0.09529835846000001,
0.09753917046,
0.10034244746000001,
0.10112746246000001,
0.09945156246,
0.10223327946,
0.09889566846,
0.10374606146000001,
0.09523962946,
0.09260214346000001,
0.09229378346,
0.10493372446,
0.09448488046
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.0485516854333334,
"stddev": 0.2515106268292984,
"median": 0.9725790191000001,
"user": 1.0236783133333334,
"system": 0.1819657822222222,
"min": 0.6904935901000001,
"max": 1.4376676751,
"times": [
0.8421596851,
0.9725790191000001,
1.4376676751,
0.8807004921000001,
0.6904935901000001,
1.2119268851,
1.3080737821,
1.2137900951,
0.8795739451000001
]
},
{
"command": "pacquet@main",
"mean": 1.2597509655444445,
"stddev": 0.35041587487251974,
"median": 1.2126758150999999,
"user": 1.2455687577777776,
"system": 0.23596567111111108,
"min": 0.8036800851000001,
"max": 1.9613684891,
"times": [
1.9613684891,
0.8036800851000001,
1.4214368171,
1.5708409830999999,
1.1755903701,
1.2163819461,
0.9792685681000001,
1.2126758150999999,
0.9965156161000001
]
},
{
"command": "pnpm@HEAD",
"mean": 3.8559634736555557,
"stddev": 0.1652715157395395,
"median": 3.8471055601,
"user": 5.9867265355555555,
"system": 0.3390598933333333,
"min": 3.6360498251,
"max": 4.1681705821,
"times": [
4.1681705821,
3.8182588951,
4.005985831099999,
3.8740957271000003,
3.8115336671000004,
3.8471055601,
3.6360498251,
3.6447150781000004,
3.8977560971000003
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.75409629082,
"stddev": 0.13469380940067943,
"median": 4.720100133620001,
"user": 2.64120036,
"system": 1.8928890800000002,
"min": 4.646220732620001,
"max": 5.06439305862,
"times": [
4.69882515062,
4.901089846620001,
4.744251090620001,
4.66382170562,
4.646220732620001,
4.65279688862,
4.647654877620001,
4.78053444062,
5.06439305862,
4.74137511662
]
},
{
"command": "pacquet@main",
"mean": 4.918149062820001,
"stddev": 0.2405798791099955,
"median": 4.85695999212,
"user": 3.0737636599999996,
"system": 2.2233214799999996,
"min": 4.65315574362,
"max": 5.505440607620001,
"times": [
4.65315574362,
5.01992882662,
4.841345734620001,
4.7762489846200005,
4.87257424962,
5.505440607620001,
4.83744246162,
5.06971703662,
4.87770517762,
4.727931805620001
]
},
{
"command": "pnpr@HEAD",
"mean": 3.68731748142,
"stddev": 0.08592212648316204,
"median": 3.66346652262,
"user": 1.7771996599999997,
"system": 1.7236554799999997,
"min": 3.59284318662,
"max": 3.8583264066200003,
"times": [
3.59284318662,
3.64019328762,
3.5928987606200002,
3.68110987162,
3.73000814062,
3.6458231736199997,
3.74744937562,
3.62193725162,
3.76258535962,
3.8583264066200003
]
},
{
"command": "pnpr@main",
"mean": 3.79680417772,
"stddev": 0.1327940073697904,
"median": 3.79897501862,
"user": 1.99577016,
"system": 1.9539788799999998,
"min": 3.63912845662,
"max": 4.10140563962,
"times": [
3.63912845662,
3.7986382076200003,
3.71231278862,
4.10140563962,
3.64199170562,
3.81135959562,
3.88278086662,
3.75688676162,
3.79931182962,
3.82422592562
]
}
]
} |
Summary
Fixes #13697.
pnpm self-update lateston v12 failed withthe installed pnpm wrapper is missing at …\node_modules\@pnpm\exeon machines where the global packages directory (…/pnpm/global/v11) contains apnpm-workspace.yaml. That file is written there by pacquet itself when a global install persists anallowBuildsdecision, so any such machine had every subsequentself-updatefresh install broken.Root cause:
self_update::install_pnpm::run_installsetcfg.workspace_dir = None, and withNonethe install pipeline discovers a workspace by walking up from the manifest dir (configured_or_discovered_workspace_dir). The engine's fresh install dir sits directly underglobal/v11, so the walk-up adopted the global-settingspnpm-workspace.yamlas the workspace root and laid the engine out as a workspace sub-importer — the wrapper package never landed in the install dir'snode_modules/, and the reporter's progress line carried the global dir as its prefix (exactly what the issue's garbled log shows). The global-add group install already guards against this very hazard by pinningworkspace_dirto the install dir (run_group_installincli_args::global); the engine install and the dlx cache install never got the same anchor.The fix pins
workspace_dir = Some(install_dir)in both places:self_update::install_pnpm::run_install(also used bypnpm withandpackageManagerdelegation for the engine's global-virtual-store install);dlxcache install, which had the same latent exposure — a straypnpm-workspace.yamlabove the cache directory broke everypnpm dlxinvocation.Verified that a machine already carrying the corrupted leftovers (stray
node_modules/lockfile atglobal/v11from failed attempts) recovers with no manual cleanup: the nextself-updatesucceeds and links the wrapper correctly.This is a pacquet-only fix: the TypeScript CLI passes its lockfile dir into the install explicitly and does not re-discover a workspace from the install dir (the reporter's TS-driven self-updates on the same machine worked fine), so there is nothing to mirror.
Squash Commit Body
Checklist
already linked to it solves it.
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-fable-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpm self-updateandpnpm dlxinstallations being affected by unrelated workspace configuration in parent directories.Tests
dlxbehavior when an ancestor workspace configuration is present.