Skip to content

Normalise line endings on the release asset - #7

Merged
IPerception merged 1 commit into
mainfrom
chore/normalise-release-eol
Aug 17, 2026
Merged

Normalise line endings on the release asset#7
IPerception merged 1 commit into
mainfrom
chore/normalise-release-eol

Conversation

@IPerception

Copy link
Copy Markdown
Owner

v1.1.0 shipped as a 297,077-byte download of a 290,824-byte file — 6,253
carriage returns and nothing else. The release asset is copied from the working
tree, and a Windows checkout has CRLF there.

LF is this repo's canonical form: .gitattributes puts every text file on it
via * text=auto, with only *.edi and *.txt exempt because there line
endings are data. So the CRLF asset matched neither what git stores, nor
what the Pages demo serves, nor what CI tested — three copies of the same
app, and the one people download was the odd one out.

Staging now normalises on the way out, and reports how many bytes it removed, so
a silent regression shows up in the release output rather than only in a byte
count someone happens to compare:

staged EDIWorkbench-v1.2.0.html (290824 bytes, 6253 CRLF bytes normalised away), version confirmed inside it

v1.1.0's published asset is deliberately left alone. Replacing it would mean
a version number no longer identifies one specific set of bytes, which is the
exact property step 2 of this script exists to protect — its comment says
re-cutting "silently strands everyone who downloaded the first one with a file
that says the same version but isn't the same bytes." The content is identical
either way; only the download is larger than it needs to be. The fix applies
from the next release.

Verified: node --check passes, node web/tests/all.mjs green, and the
normalisation was run against the current app — 297,077 → 290,824 bytes, no CR
remaining, version string intact. Step 5 could not be exercised through a dry
run because step 2 correctly refuses an already-released tag.

🤖 Generated with Claude Code

v1.1.0 shipped as a 297,077-byte download of a 290,824-byte file: 6,253
carriage returns and nothing else. The asset is copied from the working tree,
and a Windows checkout has CRLF there.

LF is this repo's canonical form -- .gitattributes puts every text file on it
via `* text=auto`, with only *.edi and *.txt exempt because there line endings
are data. So the CRLF asset matched neither what git stores, nor what the Pages
demo serves, nor what CI tested.

Staging now normalises, and reports how many bytes it removed so a silent
regression is visible in the release output.

v1.1.0's published asset is left alone. Replacing it would mean a version
number no longer identifies one set of bytes, which is the property step 2 of
this script exists to protect. The fix applies from the next release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@IPerception
IPerception merged commit 1f96a7e into main Aug 17, 2026
1 check passed
@IPerception
IPerception deleted the chore/normalise-release-eol branch August 17, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant