fix(nodes): enforce LF for .md files and harden doc generator on Windows#1330
fix(nodes): enforce LF for .md files and harden doc generator on Windows#1330joshuadarron wants to merge 1 commit into
Conversation
*.md eol=lf in .gitattributes stops git from converting node READMEs to CRLF on checkout. injectBlock in gen-node-tables.mjs now normalizes \r\n before diffing, so the script is idempotent even on repos missing the gitattributes rule. Closes #1329 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo files are changed to fix spurious Windows CRLF diffs in generated node README files. ChangesWindows CRLF Line-Ending Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID. Do not edit or delete. |
Summary
*.md text eol=lfto.gitattributesso git never checks out Markdown files with CRLF on Windows.injectBlockinnodes/scripts/gen-node-tables.mjsto normalize\r\n → \nbefore diffing, makingnodes:docs-generateidempotent on Windows regardless of what line endings git placed on disk.Problem
On Windows,
* text=autoin.gitattributescaused git to check out.mdfiles with CRLF. The doc generator reads CRLF, splices in a generated block built from JS template literals (LF only), and writes back a mixed-ending file. Because the content always differed from the original, every build rewrote the file and left it permanently dirty ingit status.Test plan
node nodes/scripts/gen-node-tables.mjs webhook—git statusshould show no modifications.git check-attr eol -- nodes/src/nodes/webhook/README.mdreturnseol: lf.Closes #1329
🤖 Generated with Claude Code
Summary by CodeRabbit