Skip to content

Commit 64dfe54

Browse files
committed
Test the pnpm takeover gate with a mixed-ending lock
The refusals test merged in from main (#2015) expected a pure CRLF pnpm lock to be refused with vendor_lockfile_crlf_unsupported. This branch teaches the pnpm rewriter to wire pure CRLF locks byte-faithfully, so that refusal now applies only to locks that mix CRLF and LF. Give the test a mixed-ending lock so it still checks that a hosted pin's takeover meets the pnpm lock-text gates. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e79b9f1 commit 64dfe54

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎crates/socket-patch-core/src/vendor/refusals.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,8 @@ mod tests {
882882

883883
/// A hosted pnpm pin's takeover meets the pnpm lock-text gates
884884
/// (#853); a ledger entry already at the selected uuid is in sync.
885+
/// The lock mixes CRLF and LF endings, which the pnpm rewriter
886+
/// cannot write back byte-faithfully (a pure CRLF lock is wired).
885887
#[tokio::test]
886888
async fn a_hosted_pin_meets_the_pnpm_gates_before_its_takeover() {
887889
let tmp = tempfile::tempdir().unwrap();
@@ -892,7 +894,7 @@ mod tests {
892894
.unwrap();
893895
std::fs::write(
894896
tmp.path().join("pnpm-lock.yaml"),
895-
HOSTED_V9.replace('\n', "\r\n"),
897+
HOSTED_V9.replacen('\n', "\r\n", 1),
896898
)
897899
.unwrap();
898900
let pin = HostedPin {

0 commit comments

Comments
 (0)