Skip to content
Commit Detail

Commit 9eea9ab

Author
Pete Bacon Darwin <pbacondarwin@cloudflare.com> 2026-02-12 16:56:11 +0000
Parents
dd7a515
Tree
b51d883
fix(node:tty): make ReadStream and WriteStream constructors non-throwing

Previously, the ReadStream and WriteStream constructors in the node:tty
module would throw ERR_METHOD_NOT_IMPLEMENTED, which was a breaking
change from the unenv-preset behavior where they are no-ops.

This change:
- Makes ReadStream and WriteStream constructors succeed and store fd
- Sets default properties (isRaw, isTTY, columns, rows)
- Changes cursorTo, moveCursor, clearLine, clearScreenDown from throwing
  to no-op functions that invoke callbacks if provided
- Updates tests to verify the new behavior

Files changed

2 files changed~2 modified