docs: define exact normalization contract#69
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
hyfdev
marked this pull request as ready for review
July 17, 2026 07:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pathequality while retaining Node-style trailing separators and Windows drive-letter spellingWhy
Standard
Pathequality compares components and can hide exact spelling differences such as.versus./,fooversusfoo/, and Windows drive-letter case. SugarPath already preserves those observable spellings, but the public documentation did not state the stronger fixed-point guarantee or explain that it is not a unique spelling for everyPath-equal value.Node.js publicly preserves trailing separators but does not guarantee exact idempotence for every Win32 input. These tests keep SugarPath's existing trailing behavior while explicitly protecting its stronger exact-output contract.
Validation
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets --all-features -- -D warningsSUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=0 cargo test --locked -p sugar_pathSUGAR_PATH_EXPECT_CACHED_CURRENT_DIR=1 cargo test --locked --workspace --features cached_current_dirRUSTDOCFLAGS='-D warnings' cargo doc --locked -p sugar_path --all-features --no-depscached_current_dirNative Windows CI will execute the Windows-specific exact-output cases; local cross-target library checks passed.