Skip to content

fix(npm): enforce LF line endings and guard the packed tarball - #19

Merged
fadymondy merged 1 commit into
mainfrom
fix/9-lf-packaging
Oct 14, 2026
Merged

fadymondy merged 1 commit into
mainfrom
fix/9-lf-packaging

Conversation

@fadymondy

Copy link
Copy Markdown
Contributor

Fixes #9

  • .gitattributes with * text=auto eol=lf (plus binary markers), so npm/ is LF on every checkout whatever core.autocrlf is. git ls-files --eol npm/ shows w/lf after this.
  • npm/pack.test.js: runs npm pack, extracts the tarball and fails if any file contains a CR byte. It also has a unit check showing a CRLF file is flagged. I verified locally that the test fails with a CRLF bin/togo.js and passes with LF. It is not published (not in files).
  • CI: the existing npm job (ubuntu + windows) now runs it.

Not done here: moving npm publish into the tag-triggered release workflow (item 2 of the issue). That needs an npm token and a decision about provenance/approval, so npm publishing stays a manual maintainer step for now. 0.2.33 is not republished; the next npm release is the first to carry the guard.

🤖 Generated with Claude Code

Add .gitattributes (* text=auto eol=lf) so checkouts are LF regardless of
core.autocrlf, and an npm pack test that fails if any packed file contains a
CR byte. The test runs in the npm CI job on ubuntu and windows.

Fixes #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadymondy
fadymondy merged commit b2becf7 into main Oct 14, 2026
3 checks passed
@fadymondy
fadymondy deleted the fix/9-lf-packaging branch October 14, 2026 15:08
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.

npm package 0.2.33 was packed with CRLF line endings; enforce LF packaging

1 participant