mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
This implements the FileHandle.prototype.readLines() method in src/js/node/fs.promises.ts, which was previously a stub throwing "BUN TODO FileHandle.readLines". The implementation creates a readline Interface with the file's read stream as input and crlfDelay set to Infinity, matching Node.js behavior from vendor/node/lib/internal/fs/promises.js. Tests added: - test/js/bun/fs/file-handle-readlines.test.ts: Comprehensive tests covering various scenarios (normal lines, empty lines, no trailing newline, empty files, and custom options) - test/js/node/test/parallel/test-fs-promises-file-handle-readLines.mjs: Node.js compatibility test All tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>