Skip to content

Commit 332b3e8

Browse files
Fix CRLF checkout of pnpm registry fixtures (#2238) (#2239)
* Start fix for CRLF pnpm registry fixtures Refs #2238. Assisted-by: Claude Code:claude-fable-5-2 * Check out pnpm registry goldens byte for byte The pnpm-registry-overrides fixtures are real pnpm output, and seven unit tests compare what the scan writes against them byte for byte. Unlike the other captured pnpm fixtures they were not marked -text, so a Windows checkout converted them to CRLF and the tests failed. Fixes #2238. Assisted-by: Claude Code:claude-fable-5-2 * Point the golden doc at .gitattributes The module comment listed the fixture trees marked -text by name and had drifted from .gitattributes, which now also covers the pnpm registry goldens. Refs #2238. Assisted-by: Claude Code:claude-fable-5-2 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e9a4cdd commit 332b3e8

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎.gitattributes‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ crates/socket-patch-core/tests/fixtures/upstream/** -text
2222
# derive their CRLF variants from the LF bytes themselves.
2323
crates/socket-patch-core/tests/fixtures/pnpm-hosted/** -text
2424

25+
# The registry route goldens are real pnpm output too: the tests compare
26+
# what the scan writes against them byte for byte, so they are checked
27+
# out exactly as committed.
28+
crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/** -text
29+
2530
# Captured vlt locks are byte-real; CRLF variants are derived in the tests.
2631
crates/socket-patch-core/tests/fixtures/vlt-locks/** -text
2732

‎crates/socket-patch-core/src/vex/discover/testing/golden.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
//! ```
2626
//!
2727
//! Unix only: Windows checkouts convert some fixtures' line endings (only
28-
//! `redirect/**`, `pdm-native/*.lock`, `pnpm-hosted/**` and `vlt-locks/**`
29-
//! among the corpus trees are `-text`),
30-
//! and I/O error texts differ, so the snapshot would describe different
31-
//! inputs. The Unix legs (Linux + macOS) pin the behavior.
28+
//! the corpus trees that `.gitattributes` marks `-text` are checked out as
29+
//! committed), and I/O error texts differ, so the snapshot would describe
30+
//! different inputs. The Unix legs (Linux + macOS) pin the behavior.
3231
//!
3332
//! [`discover_patched_refs`]: crate::vex::discover::discover_patched_refs
3433
#![cfg(not(windows))]

0 commit comments

Comments
 (0)