Repository navigation
Conversation
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.
normalizePath("a///b///c.txt")currently returnsa/b///c.txt, and normalizing that result again changes it. Make the forward-slash replacement global so every repeated group collapses in one call, keeping storage and lookup normalization consistent.Add nine Bun unit tests covering repeated internal groups, leading/trailing groups, idempotence, ordinary paths, empty/root/all-slash input, and Windows separators. Against untouched upstream commit
bab714d, these tests produce 4 passes and 5 failures; with the fix, all nine pass.Closes #161.
Validation
Executed against these exact files in Ubuntu/WSL with Bun 1.4.3 and the repository's frozen lockfile:
bun test— 38 passed, 0 failedbun run format:check— passedbun run build— passed (bundle, CLI, and declarations)bunx tsc --noEmit— passedgit diff --check— passedWindows also passes tests, formatting with LF checkout, and TypeScript. The Windows build fails because Winterspec emits backslash-containing import paths; the same error reproduces on untouched upstream
bab714d. No build-system changes are included.Related work
Open PR #133 contains the same one-line normalization fix alongside route regression coverage and a test-server change. This PR overlaps that fix and offers the smaller two-file change with focused utility coverage for #161.
Prepared and verified with AI assistance.