Skip to content

fix(node): make readline Interface and Readline classes no-op stubs#6016

Merged
anonrig merged 3 commits intomainfrom
pbacondarwin/readline-interface-no-throw
Feb 17, 2026
Merged

fix(node): make readline Interface and Readline classes no-op stubs#6016
anonrig merged 3 commits intomainfrom
pbacondarwin/readline-interface-no-throw

Conversation

@petebacondarwin
Copy link
Contributor

Summary

  • Change the readline Interface class and the readline/promises Interface and Readline classes to be no-op stubs instead of throwing errors
  • Methods now return sensible defaults (empty strings, zero values, etc.) instead of throwing ERR_METHOD_NOT_IMPLEMENTED errors
  • This matches the behavior of unenv's readline implementation, which allows code that depends on readline to work without crashing even though the functionality is not fully implemented

Fixes compatibility with cloudflare/workers-sdk#11734

@petebacondarwin petebacondarwin requested review from a team as code owners February 4, 2026 20:01
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

Change the readline Interface class and the readline/promises Interface
and Readline classes to be no-op stubs instead of throwing errors.

This matches the behavior of unenv's readline implementation, which allows
code that depends on readline to work without crashing even though the
functionality is not fully implemented.

Methods now return sensible defaults (empty strings, zero values, etc.)
instead of throwing ERR_METHOD_NOT_IMPLEMENTED errors.

Fixes compatibility with cloudflare/workers-sdk#11734
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 17, 2026

Merging this PR will degrade performance by 17.77%

❌ 1 regressed benchmark
✅ 69 untouched benchmarks
⏩ 129 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
jsonResponse[Response] 39.6 µs 48.2 µs -17.77%

Comparing pbacondarwin/readline-interface-no-throw (1bcc795) with main (e94c96d)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@anonrig anonrig merged commit 5361a73 into main Feb 17, 2026
22 of 24 checks passed
@anonrig anonrig deleted the pbacondarwin/readline-interface-no-throw branch February 17, 2026 15:17
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.

2 participants