Repository navigation
fix(scripts): normalize line endings before matching versions - #274
Merged
Merged
Conversation
domoritz
approved these changes
Oct 6, 2026
domoritz
left a comment
Member
There was a problem hiding this comment.
Thanks for the fix. I don't think we need that long of a comment. Let's remove it.
PerryLink
force-pushed
the
fix/version-check-line-endings
branch
from
October 6, 2026 10:35
3cb8af4 to
d99ed2a
Compare
Contributor
Author
|
Removed it -- the diff is a single line now ( Thanks for the review. One heads-up while you are here: the |
donghaoren
approved these changes
Oct 6, 2026
donghaoren
enabled auto-merge (squash)
October 6, 2026 16:22
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.
scripts/check-versions.mjsreads each version source and matches it with LF-only patterns. Git for Windows checks out withcore.autocrlf=trueand the repo has no.gitattributes, souv.locklands on disk as CRLF and its pattern never matches:uv.lockin this checkout has 4811 CRLF pairs and zero bare LF, so the mismatch is purely a checkout artefact -- the version really is there.Normalizing line endings inside
read()fixes every source at once, whatever git did on the way out:CI runs on
ubuntu-latestonly, so this never fails there; it only affects contributors and anyone runningnpm teston Windows, where it fails at the first step (test:versions).A
* text=auto eol=lf.gitattributeswould also fix it, but that changes how every file in the repo is checked out. Normalizing in the reader is the smaller change -- happy to switch if you would rather have the.gitattributes.