Repository navigation
fix(patching): support non-ASCII patch paths - #13802
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? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthrough
ChangesNon-ASCII patch commit handling
Estimated code review effort: 2 (Simple) | ~10 minutes Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "test(patching): cover dash-prefixed path..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpm11/patching/commands/src/patchCommit.ts`:
- Line 155: Update the execa git diff invocation in patchCommit to insert the
`--` path terminator immediately before folderAN and folderBN, ensuring
dash-prefixed directories are treated as operands. Add a regression test
covering a directory path beginning with `-`, matching the Rust implementation’s
behavior.
🪄 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: 7edbca5e-e64c-4851-8d35-156ecfebd41d
📒 Files selected for processing (5)
.changeset/bright-pandas-quote.mdpnpm/crates/patching/src/commit.rspnpm/crates/patching/src/commit/tests.rspnpm11/patching/commands/src/patchCommit.tspnpm11/patching/commands/test/patch.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13802 +/- ##
==========================================
- Coverage 88.24% 88.24% -0.01%
==========================================
Files 624 624
Lines 101807 101809 +2
==========================================
+ Hits 89837 89838 +1
- Misses 11970 11971 +1 ☔ 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.5808669658600003,
"stddev": 0.18243221212902036,
"median": 2.55586843236,
"user": 1.7230687599999996,
"system": 1.4352820999999998,
"min": 2.34548846136,
"max": 2.8326506673600003,
"times": [
2.3930255443600004,
2.34548846136,
2.57507880636,
2.7227957063600003,
2.8059387193600003,
2.50731116236,
2.8326506673600003,
2.72466514136,
2.53665805836,
2.36505739136
]
},
{
"command": "pacquet@main",
"mean": 2.4967265006600003,
"stddev": 0.15683321384345184,
"median": 2.4044497483600002,
"user": 1.7632000600000002,
"system": 1.3897234,
"min": 2.38458298836,
"max": 2.8233891213600004,
"times": [
2.6239909743600003,
2.8233891213600004,
2.39765898136,
2.3904260023600004,
2.4112405153600003,
2.38458298836,
2.46350936536,
2.39372729236,
2.6844868653600003,
2.39425290036
]
},
{
"command": "pnpr@HEAD",
"mean": 1.4525133096599998,
"stddev": 0.10535173902671986,
"median": 1.4085738123599998,
"user": 1.19968986,
"system": 1.2041994,
"min": 1.36414405336,
"max": 1.65664536336,
"times": [
1.37209387136,
1.36700686936,
1.36414405336,
1.43474899536,
1.37826161536,
1.38239862936,
1.65664536336,
1.59284409136,
1.53095787336,
1.44603173436
]
},
{
"command": "pnpr@main",
"mean": 1.4952333242599998,
"stddev": 0.14226065188205783,
"median": 1.44109079386,
"user": 1.16158586,
"system": 1.2087107000000001,
"min": 1.3741552693599999,
"max": 1.7618257093599998,
"times": [
1.44166670136,
1.38814008036,
1.7618257093599998,
1.44051488636,
1.7429697933600001,
1.38324492136,
1.3741552693599999,
1.42510615336,
1.48645975936,
1.50824996836
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26845499904000003,
"stddev": 0.007592093632213962,
"median": 0.26488138564,
"user": 0.2619036,
"system": 0.53394946,
"min": 0.26160553764000005,
"max": 0.28139946064000004,
"times": [
0.28067705064000004,
0.26160553764000005,
0.26570558164,
0.28139946064000004,
0.26278354464000003,
0.26235496764000005,
0.26248209664000005,
0.27256155264000004,
0.27092300864,
0.26405718964
]
},
{
"command": "pacquet@main",
"mean": 0.26775923334000007,
"stddev": 0.006604730376187958,
"median": 0.26636283914000003,
"user": 0.23731019999999997,
"system": 0.53556636,
"min": 0.25928286864000005,
"max": 0.27665238864,
"times": [
0.27415385864,
0.26273714764000006,
0.27665238864,
0.26298393164000006,
0.27432782564,
0.26165051164,
0.27387089564000006,
0.26974174664000006,
0.25928286864000005,
0.26219115864000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28681614684,
"stddev": 0.005236206778878981,
"median": 0.28575859214,
"user": 0.258473,
"system": 0.54437636,
"min": 0.28172356964000006,
"max": 0.29693749564000005,
"times": [
0.29392567864,
0.28439577764,
0.28872440264000004,
0.28242904664,
0.28258181464000004,
0.28795328164000006,
0.29693749564000005,
0.28712140664,
0.28236899464000004,
0.28172356964000006
]
},
{
"command": "pnpr@main",
"mean": 0.28990879644000006,
"stddev": 0.005514822087578823,
"median": 0.29009248664000004,
"user": 0.25594629999999996,
"system": 0.55784496,
"min": 0.28031022064000005,
"max": 0.30011150664,
"times": [
0.29541007164000005,
0.28735514564000003,
0.28718648764000004,
0.28999626564000003,
0.30011150664,
0.28483968264000004,
0.29175527364000003,
0.28031022064000005,
0.29193460264000004,
0.29018870764000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6309328879400002,
"stddev": 0.03113715396071676,
"median": 2.63347479034,
"user": 1.6766878600000001,
"system": 1.40732724,
"min": 2.5803468198400004,
"max": 2.6820214418400004,
"times": [
2.64339025684,
2.6625370908400003,
2.6279638108400003,
2.6820214418400004,
2.63491631284,
2.63877242784,
2.6320332678400002,
2.5803468198400004,
2.62403573284,
2.58331171784
]
},
{
"command": "pacquet@main",
"mean": 2.59313386944,
"stddev": 0.02548978892210542,
"median": 2.59959015634,
"user": 1.52638236,
"system": 1.2958009400000001,
"min": 2.55463772584,
"max": 2.6256562218400004,
"times": [
2.60735158984,
2.55463772584,
2.59727385784,
2.62330212184,
2.5722836578400003,
2.57416169084,
2.61228967084,
2.56247570284,
2.6019064548400004,
2.6256562218400004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.4926268600400001,
"stddev": 0.11805088000327221,
"median": 1.4476946723400002,
"user": 1.04576826,
"system": 1.1065119399999999,
"min": 1.42072999684,
"max": 1.81052915584,
"times": [
1.42911375584,
1.52145241784,
1.43534789584,
1.81052915584,
1.42492363184,
1.4600414488400002,
1.48918926184,
1.42205950284,
1.5128815328400003,
1.42072999684
]
},
{
"command": "pnpr@main",
"mean": 1.5799749047400002,
"stddev": 0.12373625531387109,
"median": 1.57144274934,
"user": 1.01160136,
"system": 1.1324363399999997,
"min": 1.41338756184,
"max": 1.81499782784,
"times": [
1.7122469368400002,
1.5290504778400003,
1.63304737184,
1.41338756184,
1.4770570848400002,
1.50384217384,
1.61383502084,
1.4714380308400001,
1.6308465608400002,
1.81499782784
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41297339010000006,
"stddev": 0.01646693259471784,
"median": 0.4092316212,
"user": 0.51012588,
"system": 0.6870871599999999,
"min": 0.3832279967,
"max": 0.4344876387,
"times": [
0.4261213177,
0.4344876387,
0.4047431407,
0.43143312170000003,
0.4102011607,
0.39924453470000004,
0.4277252147,
0.3832279967,
0.4042876937,
0.4082620817
]
},
{
"command": "pacquet@main",
"mean": 0.40722947100000007,
"stddev": 0.013206801362100949,
"median": 0.40916468570000003,
"user": 0.5101845799999999,
"system": 0.6721624599999998,
"min": 0.3880338097,
"max": 0.4273186397,
"times": [
0.39673922970000003,
0.3880338097,
0.42184309670000003,
0.40049794270000005,
0.41667826770000005,
0.4273186397,
0.40731634270000006,
0.41278225770000004,
0.39007209470000004,
0.4110130287
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30272762670000003,
"stddev": 0.004774854375773825,
"median": 0.30145194370000006,
"user": 0.21592637999999997,
"system": 0.5174019599999999,
"min": 0.2972728297,
"max": 0.3107817687,
"times": [
0.2993178677,
0.2972728297,
0.2982732327,
0.3107817687,
0.3070840407,
0.29862972270000004,
0.30467069970000005,
0.3029972517,
0.30834221770000003,
0.29990663570000003
]
},
{
"command": "pnpr@main",
"mean": 0.297453823,
"stddev": 0.008878764797061867,
"median": 0.29711726270000005,
"user": 0.20305738,
"system": 0.52309766,
"min": 0.2785910977,
"max": 0.3129954747,
"times": [
0.2785910977,
0.3129954747,
0.2984565877,
0.3029937037,
0.2944350007,
0.29577793770000005,
0.3024797817,
0.29423398570000003,
0.30133986570000004,
0.2932347947
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7195639232999997,
"stddev": 0.0068803349608996525,
"median": 1.7200289775000002,
"user": 0.7579245399999999,
"system": 0.7451757599999997,
"min": 1.7078384045,
"max": 1.7298525974999999,
"times": [
1.7212669425,
1.7230943504999998,
1.7128831665,
1.7078384045,
1.7298525974999999,
1.7239188214999999,
1.7187910125,
1.7133669265,
1.7272946734999999,
1.7173323374999998
]
},
{
"command": "pacquet@main",
"mean": 1.7033982843,
"stddev": 0.006620251633323997,
"median": 1.702331848,
"user": 0.7502546399999999,
"system": 0.72748326,
"min": 1.6954380505,
"max": 1.7169717395,
"times": [
1.7169717395,
1.7033819995,
1.6973596055,
1.7110024375,
1.7029218435,
1.6988772824999998,
1.6993350134999998,
1.7017418525,
1.6954380505,
1.7069530185
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29037731530000005,
"stddev": 0.008189900724127824,
"median": 0.28967714600000005,
"user": 0.20491913999999997,
"system": 0.4842938599999999,
"min": 0.27924926450000004,
"max": 0.3047384865,
"times": [
0.3047384865,
0.28382798950000004,
0.27924926450000004,
0.28805484350000005,
0.28379990650000003,
0.2841077765,
0.29129944850000006,
0.29136798650000006,
0.3000008115,
0.29732663950000005
]
},
{
"command": "pnpr@main",
"mean": 0.30245038450000006,
"stddev": 0.004577657162901511,
"median": 0.30353274100000005,
"user": 0.21583864,
"system": 0.5235123599999999,
"min": 0.29371665450000006,
"max": 0.30821069850000005,
"times": [
0.29760109650000005,
0.30821069850000005,
0.30499621150000006,
0.30452166750000004,
0.30471127350000005,
0.30254381450000006,
0.30043763250000005,
0.29990902650000006,
0.30785576950000004,
0.29371665450000006
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20450920719714286,
"stddev": 0.01686632470798383,
"median": 0.20183652234,
"user": 0.1650057771428571,
"system": 0.05118572571428571,
"min": 0.18308277984000002,
"max": 0.23841293184,
"times": [
0.20110627284000002,
0.19437565884,
0.20895665484,
0.20365703284,
0.18308277984000002,
0.20107870184,
0.22403373484,
0.23176342884,
0.23841293184,
0.18428472084,
0.20845571284,
0.19268057884,
0.18867391984,
0.20256677184
]
},
{
"command": "pacquet@main",
"mean": 0.20697961605428575,
"stddev": 0.01747074965755298,
"median": 0.20393662484,
"user": 0.16972377714285708,
"system": 0.05388136857142856,
"min": 0.17668147484,
"max": 0.23895161584,
"times": [
0.20562177084,
0.22245760884000002,
0.19664172284,
0.23895161584,
0.17668147484,
0.19981590584,
0.21937789484,
0.22205049284,
0.20225147884,
0.21863043784,
0.18683243484,
0.19747258684,
0.22261590684000002,
0.18831329284
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08692818459000003,
"stddev": 0.0017344279859106664,
"median": 0.08751539484000001,
"user": 0.018807076249999995,
"system": 0.010432254375,
"min": 0.08298653384000002,
"max": 0.08985473784,
"times": [
0.08757978584000001,
0.08644341784000001,
0.08911368284000001,
0.08452968684,
0.08762057284000001,
0.08891055084,
0.08574262984000001,
0.08565292184000001,
0.08333990884,
0.08763478984,
0.08876776184000001,
0.08563142084000001,
0.08838076384000002,
0.08651417184000001,
0.08853924184,
0.08745100384000001,
0.08764855584000002,
0.08634998184,
0.08541618584,
0.08787390984000001,
0.08744087584000002,
0.08867185184000001,
0.08785581684,
0.08482274884,
0.08865681284000002,
0.08778389084,
0.08759002584000002,
0.08415582284,
0.08298653384000002,
0.08732945584000001,
0.08985473784,
0.08541238884
]
},
{
"command": "pnpr@main",
"mean": 0.08689112587125002,
"stddev": 0.00221674894332066,
"median": 0.08666275134000001,
"user": 0.022063982500000006,
"system": 0.0076202562500000005,
"min": 0.08215879684,
"max": 0.09131356284000001,
"times": [
0.08741325284000001,
0.08827823084000001,
0.08760712784000001,
0.08477104184,
0.08946021484000001,
0.08447333184000001,
0.08233123084,
0.08215879684,
0.08838260784000002,
0.08663256384000001,
0.08636304784000001,
0.08885700984000001,
0.08824398684000001,
0.08487950584000001,
0.08815924584000001,
0.09085190384000001,
0.08515005484000002,
0.08885479584000001,
0.08486496784000001,
0.08863673484000001,
0.08582883084000001,
0.08627191584,
0.08747799484,
0.08639934684000002,
0.08907782484000001,
0.08486985784000001,
0.09131356284000001,
0.08494749384000001,
0.08977663984,
0.08521847384000002,
0.08627149484,
0.08669293884000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7870161012888889,
"stddev": 0.13678886970647944,
"median": 0.8021270974000001,
"user": 0.7532328555555556,
"system": 0.13390395333333335,
"min": 0.6228354254,
"max": 1.0013984264,
"times": [
0.6245388534,
0.8375603264000001,
0.9359911784,
0.8728328474000001,
0.6800806244000001,
0.6228354254,
0.7057801324,
0.8021270974000001,
1.0013984264
]
},
{
"command": "pacquet@main",
"mean": 0.6989844946222222,
"stddev": 0.058793907205311774,
"median": 0.6848852154,
"user": 0.6509177444444444,
"system": 0.10155584222222222,
"min": 0.6398917354,
"max": 0.8178065664,
"times": [
0.6729096684000001,
0.6398917354,
0.6848852154,
0.6704692604000001,
0.7727867844,
0.6464832004000001,
0.6988152944,
0.8178065664,
0.6868127264
]
},
{
"command": "pnpm@HEAD",
"mean": 2.8829266661777777,
"stddev": 0.06216444129266264,
"median": 2.8655421104,
"user": 4.443382633333332,
"system": 0.23511117555555552,
"min": 2.8011944343999997,
"max": 2.9960434494,
"times": [
2.9317755764,
2.9042487753999997,
2.9960434494,
2.8011944343999997,
2.8655421104,
2.9300645194,
2.8244077973999997,
2.8457970394,
2.8472662934
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.47119037664,
"stddev": 0.14015529355984213,
"median": 4.432596117739999,
"user": 1.68123498,
"system": 1.37576806,
"min": 4.40020116174,
"max": 4.867150630739999,
"times": [
4.867150630739999,
4.44681425874,
4.41062198574,
4.43800067474,
4.41354976474,
4.42719156074,
4.44522036174,
4.4478864507399996,
4.415266916739999,
4.40020116174
]
},
{
"command": "pacquet@main",
"mean": 4.618900237839999,
"stddev": 0.16492412938144344,
"median": 4.592916196239999,
"user": 1.6569117799999997,
"system": 1.37701376,
"min": 4.40660532474,
"max": 4.86442080474,
"times": [
4.79026733374,
4.40660532474,
4.4641591177399995,
4.86442080474,
4.81557445574,
4.66866293674,
4.5171694557399995,
4.47745683474,
4.67363177474,
4.511054339739999
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5398187059399993,
"stddev": 0.11103534438862186,
"median": 3.4983795092400003,
"user": 1.18512888,
"system": 1.1929536600000001,
"min": 3.44797389474,
"max": 3.78006113474,
"times": [
3.49176608074,
3.4720902497400004,
3.59214269374,
3.6814527537400004,
3.5049929377400004,
3.44797389474,
3.78006113474,
3.5058259627400004,
3.4486584607400004,
3.4732228907400002
]
},
{
"command": "pnpr@main",
"mean": 3.55567995994,
"stddev": 0.12069704411733327,
"median": 3.5310084182400003,
"user": 1.15452778,
"system": 1.23857136,
"min": 3.4390867917400003,
"max": 3.78916466274,
"times": [
3.7401524487400004,
3.5358916607400004,
3.78916466274,
3.5261251757400003,
3.56430657974,
3.57746808574,
3.4390867917400003,
3.46930979474,
3.47307384974,
3.44222054974
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13802 |
| 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,420.73 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 279.25 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 297.27 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 82.99 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,364.14 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,447.97 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 281.72 ms |
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpm11/patching/commands/test/patch.test.ts`:
- Around line 393-406: Replace the direct patch.handler and patchCommit.handler
calls in the regression test with the existing CLI test harness, invoking the
real pnpm patch and patch-commit commands using the dash-prefixed path. Preserve
the assertions for the normalized patch header and installed file, and ensure
the test setup rebuilds the pnpm bundle before executing the CLI integration
flow.
🪄 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: 138bfcd7-8dc2-45ee-af6e-8c9ee1006cef
📒 Files selected for processing (2)
pnpm11/patching/commands/src/patchCommit.tspnpm11/patching/commands/test/patch.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpm11/patching/commands/src/patchCommit.ts
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Summary
Closes #13801.
Configure Git with
core.quotePath=falsewhile generating package diffs sopatch-commitcan normalize paths containing non-ASCII characters. The option and regression coverage are mirrored in both the TypeScript CLI and the Rustpnpm/port, with a changeset for the published packages.Squash Commit Body
Checklist
pnpm/port.@pnpm/patching.commands,pnpm, andpacquet.Written by an agent (OpenAI Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpm patch-commitfailures when project or edit paths contain non-ASCII characters or begin with a dash.Tests